-
Notifications
You must be signed in to change notification settings - Fork 35
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 issue 401 #443
Merged
Merged
Fix issue 401 #443
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
9ea5531
[WIP] debug control flow of interpreter
andreaTP 8e08feb
checkpoint control flow rewrite
andreaTP 08e2a7f
100% tests passing
andreaTP 7b823ee
some minor cleanup
andreaTP 5fb68d2
cleanup
andreaTP ca7966f
intuition of the real fix
andreaTP 0f27bb2
finalizing the fix
andreaTP 77a455d
cleanup
andreaTP 8996165
final cleanups
andreaTP cf20a92
clean again
andreaTP ceaea25
minor
andreaTP f990d98
final cleanup
andreaTP c62b8b3
review
andreaTP c34dfbe
trim fac.wat
andreaTP File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
runtime/src/main/java/com/dylibso/chicory/runtime/CtrlFrame.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.dylibso.chicory.runtime; | ||
|
||
import com.dylibso.chicory.wasm.types.OpCode; | ||
|
||
public class CtrlFrame { | ||
// OpCode of the current Control Flow instruction | ||
public final OpCode opCode; | ||
// params or inputs | ||
public final int startValues; | ||
// returns or outputs | ||
public final int endValues; | ||
// the height of the stack before entering the current Control Flow instruction | ||
public final int height; | ||
|
||
public CtrlFrame(OpCode opCode, int startValues, int endValues, int height) { | ||
this.opCode = opCode; | ||
this.startValues = startValues; | ||
this.endValues = endValues; | ||
this.height = height; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// unwind stack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed