Skip to content

Commit

Permalink
adding tags_dict and jumpdest
Browse files Browse the repository at this point in the history
  • Loading branch information
tutugordillo committed Oct 2, 2024
1 parent 6daf1c7 commit 40c3d81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/solution_generation/reconstruct_bytecode.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def generate_jumpdest_asm(jump_to, asm_instructions, asm_pos_dict):



def traverse_cfg(cfg_object, asm_dicts):
def traverse_cfg(cfg_object, asm_dicts, tags_dict):
block_list = cfg_object.get_block_list()
blocks = block_list.get_blocks_dict()

Expand Down Expand Up @@ -232,15 +232,15 @@ def traverse_cfg(cfg_object, asm_dicts):


# Combine information from the greedy algorithm and the CFG
def asm_from_cfg(cfg, asm_dicts):
def asm_from_cfg(cfg, asm_dicts, tags_dict):
objects_cfg = cfg.get_objects()
subObjects = cfg.get_subobject().get_objects()

json_object = {}
for obj_name in objects_cfg.keys():
obj = objects_cfg[obj_name]

asm = traverse_cfg(obj,asm_dicts)
asm = traverse_cfg(obj,asm_dicts,tags_dict)


return json_object

0 comments on commit 40c3d81

Please sign in to comment.