From 089e7ca6c8a1cfb24f80383afdd26ccea01ad2b6 Mon Sep 17 00:00:00 2001 From: Nikolay Nikolov Date: Thu, 5 Oct 2023 20:19:08 +0300 Subject: [PATCH] + added compiler internal error when encountering certain unexpected wasm instructions (indicating improper nesting) --- compiler/wasm32/aasmcpu.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/wasm32/aasmcpu.pas b/compiler/wasm32/aasmcpu.pas index 48d8d8bc4e..35b90090d9 100644 --- a/compiler/wasm32/aasmcpu.pas +++ b/compiler/wasm32/aasmcpu.pas @@ -2534,6 +2534,8 @@ uses result:=tai_wasmstruc_loop.create_from(taicpu(result),srclist); a_try: result:=tai_wasmstruc_try.create_from(srclist); + a_else,a_end_if,a_end_block,a_end_loop,a_end_try,a_catch,a_catch_all: + internalerror(2023100503); else ; end;