Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix[venom]: invalid jump error #4214

Merged
merged 25 commits into from
Sep 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1fbc109
fix[venom]: Invalid jump error
HodanPlodky Aug 27, 2024
0c57b4e
fix/better cleanup
HodanPlodky Aug 28, 2024
da617c7
fix/better cleanup (lint)
HodanPlodky Aug 28, 2024
74817f3
fix/cleanup test
HodanPlodky Aug 28, 2024
7c269cf
fix/cleanup test (lint)
HodanPlodky Aug 28, 2024
3731403
fix/correction remove_unused_variables pass
HodanPlodky Aug 28, 2024
8c7f8a7
param check added
HodanPlodky Sep 3, 2024
da779ab
fix[venom]: small improvement
HodanPlodky Sep 3, 2024
ed1f13f
Merge branch 'master' into fix/snek-InvalidJump
HodanPlodky Sep 3, 2024
d7a4232
Update vyper/venom/venom_to_assembly.py - replace the map with for co…
HodanPlodky Sep 10, 2024
ee567ad
clean_unused_params cleanup
HodanPlodky Sep 10, 2024
f89dcfc
clean_unused_params cleanup
HodanPlodky Sep 10, 2024
977e147
changes according to review - for merge
HodanPlodky Sep 10, 2024
2add3d7
changes according to review - renamed all_inst to all_insts
HodanPlodky Sep 10, 2024
b4c8b7a
changes according to review - simplify the all_insts creation
HodanPlodky Sep 10, 2024
326adfd
assert that the depth is always zero
HodanPlodky Sep 11, 2024
84a4f7d
Update vyper/venom/venom_to_assembly.py - Incorrect assert message fix
HodanPlodky Sep 12, 2024
9776544
moved the cleanup check into the IRFunction class
HodanPlodky Sep 12, 2024
7c0f33a
small refactor
charles-cooper Sep 12, 2024
ff3444c
fix import
charles-cooper Sep 12, 2024
cb35c54
always pop
charles-cooper Sep 12, 2024
bdf20b0
fix instructions length check
charles-cooper Sep 13, 2024
8b8dda7
adjusted the test_duplicate_operands test
HodanPlodky Sep 13, 2024
3536dc0
remove cleanup_needed
charles-cooper Sep 16, 2024
c808126
Merge branch 'master' into fix/snek-InvalidJump
harkal Sep 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions vyper/venom/venom_to_assembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,19 +295,12 @@ def _generate_evm_for_basicblock_r(

self.clean_stack_from_cfg_in(asm, basicblock, stack)

param_insts = [inst for inst in basicblock.instructions if inst.opcode == "param"]
main_insts = [inst for inst in basicblock.instructions if inst.opcode != "param"]
param_insts = (inst for inst in basicblock.instructions if inst.opcode == "param")
main_insts = (inst for inst in basicblock.instructions if inst.opcode != "param")
all_inst = [x for one_iter in (param_insts, main_insts) for x in one_iter]
charles-cooper marked this conversation as resolved.
Show resolved Hide resolved

for i, inst in enumerate(param_insts):
next_liveness = (
param_insts[i + 1].liveness if i + 1 < len(param_insts) else main_insts[0].liveness
)
asm.extend(
self._generate_evm_for_instruction(inst, stack, cleanup_needed, next_liveness)
)

for i, inst in enumerate(main_insts):
next_liveness = main_insts[i + 1].liveness if i + 1 < len(main_insts) else OrderedSet()
for i, inst in enumerate(all_inst):
next_liveness = all_inst[i + 1].liveness if i + 1 < len(all_inst) else OrderedSet()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for i, inst in enumerate(all_inst):
next_liveness = all_inst[i + 1].liveness if i + 1 < len(all_inst) else OrderedSet()
for i, inst in enumerate(all_insts):
next_liveness = all_insts[i + 1].liveness if i + 1 < len(all_insts) else OrderedSet()


asm.extend(
self._generate_evm_for_instruction(inst, stack, cleanup_needed, next_liveness)
Expand Down
Loading