* 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.
This commit is contained in:
Nikolay Nikolov 2021-09-18 18:10:57 +03:00
parent 324382d3a5
commit d3ec8f0d29

View File

@ -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;