-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I ended up rewriting the entire control flow in a way that maps closely to the `TypeValidator` implementation. Fix #401
- Loading branch information
Showing
6 changed files
with
200 additions
and
82 deletions.
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.