Skip to content

Smaller jump table#56

Merged
butterunderflow merged 1 commit intoGenerative-Program-Analysis:debug_retfrom
butterunderflow:zdh/smaller-jump-table
Oct 10, 2024
Merged

Smaller jump table#56
butterunderflow merged 1 commit intoGenerative-Program-Analysis:debug_retfrom
butterunderflow:zdh/smaller-jump-table

Conversation

@butterunderflow
Copy link
Contributor

I think we have an invariant that ret is always smaller than the size of trail, and this PR utilize this invariant to minimize trail's size. Intuitively, trail represent a local jump table in current calling frame.

  • Note, this is only for readability, and there's no space optimization involved since trail still needs to be caught by newK.

@Kraks
Copy link
Member

Kraks commented Oct 10, 2024

Looks good to me! Indeed it is not necessary to append trail into a new function call. Feel free to merge.

@butterunderflow butterunderflow merged commit a7b1749 into Generative-Program-Analysis:debug_ret Oct 10, 2024
Kraks added a commit that referenced this pull request Oct 13, 2024
* a failed test case

* update tribonacci.wat

* fix and test return behavior

* validation of return.wat

* `trail` is local jump table (#56)

* use rust compiled tribonacci.wat(a data section involved)

* keep both versions of tribonacci

---------

Co-authored-by: butterunderflow <azhong.934@gmail.com>
Co-authored-by: butterunderflow <112108686+butterunderflow@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants