Skip to content

Commit

Permalink
pass k as fall through cont for if
Browse files Browse the repository at this point in the history
  • Loading branch information
Kraks committed Oct 2, 2024
1 parent 7c1a0ad commit c47501c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/wasm/MiniWasm.scala
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ object Evaluator {
retStack.take(ty.toList.size) ++ newStack,
frame,
trail)
eval(inner, List(), frame, k :: trail)
eval(inner, List(), frame, k :: trail)(k)
case Br(label) =>
trail(label)(stack)
case BrIf(label) =>
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/genwasym/TestEval.scala
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class TestEval extends FunSuite {
test("power") { testFile("./benchmarks/wasm/pow.wat", Some("$real_main"), Some(1024)) }
//test("start") { testFile("./benchmarks/wasm/start.wat") }
// test("loop") { testFile("./benchmarks/wasm/loop.wat") }
//test("fact") { testFile("./benchmarks/wasm/fact.wat", None, Some(120)) }
test("fact") { testFile("./benchmarks/wasm/fact.wat", None, Some(120)) }

// Parser works, but the memory issue remains
//test("btree") { testFile("./benchmarks/wasm/btree/2o1u-no-label-for-real.wat") }
Expand Down

0 comments on commit c47501c

Please sign in to comment.