From 7b7e2c56b7df43c7c6d99ef44dc4fff3b2e142bc Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Mon, 27 Jun 2022 12:19:27 -0700 Subject: [EH] Fix printing bug in nested blocks + delegate (#4753) `controlFlowDepth` is a variable used to print `delegate`'s target. When printing nested blocks, we increase `controlFlowDepth` by the number of nested blocks at once. But we should decrement it as we finish each block, rather than decrease by the number of nested blocks at once, because we need correct `controlFlowDepth` within nested blocks. --- test/exception-handling.wast.fromBinary | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/exception-handling.wast.fromBinary') diff --git a/test/exception-handling.wast.fromBinary b/test/exception-handling.wast.fromBinary index 29231a943..f88e54507 100644 --- a/test/exception-handling.wast.fromBinary +++ b/test/exception-handling.wast.fromBinary @@ -424,5 +424,18 @@ ) ) ) + (func $nested-block-and-try + (block $label$1 + (block $label$2 + ) + (try $label$5 + (do + (nop) + ) + (delegate 1) + ) + ) + (nop) + ) ) -- cgit v1.2.3