From bf0c62e65d9ec04b9df05cafdefe3ff9debe18a1 Mon Sep 17 00:00:00 2001 From: Robert Konrad Date: Tue, 27 Aug 2024 15:48:14 +0200 Subject: [PATCH] Find more globals --- Sources/backends/util.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Sources/backends/util.c b/Sources/backends/util.c index 774daaf..697d80d 100644 --- a/Sources/backends/util.c +++ b/Sources/backends/util.c @@ -72,6 +72,14 @@ void find_referenced_globals(function *f, global_id *globals, size_t *globals_si find_referenced_global_for_var(o->op_load_member.from, globals, globals_size); break; } + case OPCODE_STORE_MEMBER: + case OPCODE_SUB_AND_STORE_MEMBER: + case OPCODE_ADD_AND_STORE_MEMBER: + case OPCODE_DIVIDE_AND_STORE_MEMBER: + case OPCODE_MULTIPLY_AND_STORE_MEMBER: { + find_referenced_global_for_var(o->op_store_member.to, globals, globals_size); + break; + } case OPCODE_CALL: { for (uint8_t i = 0; i < o->op_call.parameters_size; ++i) { find_referenced_global_for_var(o->op_call.parameters[i], globals, globals_size);