فهرست منبع

* generate an internalerror if there are values remaining on top of stack
at the end of a procedure. If the compiler is compiled with
DEBUG_WASMSTACK, the previous asm comment message is emitted instead of
internal error.

Nikolay Nikolov 3 سال پیش
والد
کامیت
d3ec8f0d29
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      compiler/wasm32/hlcgcpu.pas

+ 4 - 0
compiler/wasm32/hlcgcpu.pas

@@ -2048,7 +2048,11 @@ implementation
       list.concat(taicpu.op_none(a_end_block));
       decblock;
       if fevalstackheight<>0 then
+{$ifdef DEBUG_WASMSTACK}
         list.concat(tai_comment.Create(strpnew('!!! values remaining on stack at end of block !!!')));
+{$else DEBUG_WASMSTACK}
+        internalerror(2021091801);
+{$endif DEBUG_WASMSTACK}
       inherited;
     end;