Browse Source

+ added compiler internal error when encountering certain unexpected wasm instructions (indicating improper nesting)

Nikolay Nikolov 1 year ago
parent
commit
089e7ca6c8
1 changed files with 2 additions and 0 deletions
  1. 2 0
      compiler/wasm32/aasmcpu.pas

+ 2 - 0
compiler/wasm32/aasmcpu.pas

@@ -2534,6 +2534,8 @@ uses
                   result:=tai_wasmstruc_loop.create_from(taicpu(result),srclist);
                   result:=tai_wasmstruc_loop.create_from(taicpu(result),srclist);
                 a_try:
                 a_try:
                   result:=tai_wasmstruc_try.create_from(srclist);
                   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
                 else
                   ;
                   ;
               end;
               end;