Skip to content

Commit

Permalink
Find more globals
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Aug 27, 2024
1 parent a39481a commit bf0c62e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Sources/backends/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bf0c62e

Please sign in to comment.