Skip to content

Commit

Permalink
reflect fix of return_call in #76
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuoguo committed Jan 12, 2025
1 parent f72ab18 commit a83750f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/wasm/MiniWasmTFP.scala
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ case class EvaluatorTFP(module: ModuleInstance) {
val newFrame = Frame(ArrayBuffer(frameLocals: _*))
if (isTail)
// when tail call, share the continuation for returning with the callee
evalList(body, List(), newFrame, kont, mkont, List(kont), h)
evalList(body, List(), newFrame, brTable.last, mkont, List(brTable.last), h)
else {
val restK: Cont[Ans] = (s1, m1) => kont(s1.take(ty.out.size) ++ newStack, m1)
// We make a new brTable by `restK`, since function creates a new block to escape
Expand Down

0 comments on commit a83750f

Please sign in to comment.