Skip to content

Commit

Permalink
adding STOP instruction for mainExit block
Browse files Browse the repository at this point in the history
  • Loading branch information
tutugordillo committed Oct 22, 2024
1 parent 7f9476b commit ff1c434
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/solution_generation/reconstruct_bytecode.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ def traverse_cfg(cfg_object, asm_dicts, tags_dict):
asm_instructions += asm_block
init_pos_dict += [block_id]*len(asm_block)

elif jump_type == "mainExit":
asm_instructions+=asm_block+[asm_from_op_info("STOP")]
init_pos_dict += [block_id]*len(asm_block+1)

else:
raise Exception("[ERROR]: Unknown jump type when generating asm output")

Expand Down

0 comments on commit ff1c434

Please sign in to comment.