* don't internalerror in decstack() if the evaluation stack becomes corrupted

in case -sr is used (-sr code cannot be compiled, and is only used for
    debugging; with -alr, the stack slot information is printed in the
    assembler file)

git-svn-id: branches/jvmbackend@18410 -
This commit is contained in:
Jonas Maebe 2011-08-20 07:57:22 +00:00
parent 2a64e411ce
commit bf0b8503c9

View File

@ -221,7 +221,8 @@ implementation
if slots=0 then
exit;
dec(fevalstackheight,slots);
if (fevalstackheight<0) then
if (fevalstackheight<0) and
not(cs_no_regalloc in current_settings.globalswitches) then
internalerror(2010120501);
if cs_asm_regalloc in current_settings.globalswitches then
list.concat(tai_comment.Create(strpnew(' freed '+tostr(slots)+', stack height = '+tostr(fevalstackheight))));