mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 07:28:26 +02:00
+ added 'else' tracking for the if..end_if blocks
This commit is contained in:
parent
7bef4d827d
commit
7f1050464a
@ -323,6 +323,7 @@ implementation
|
||||
|
||||
twasmblockitem = class(TLinkedListItem)
|
||||
blockstart: taicpu;
|
||||
elseinstr: taicpu;
|
||||
constructor Create(ablockstart: taicpu);
|
||||
end;
|
||||
|
||||
@ -464,6 +465,16 @@ implementation
|
||||
inc(cur_nesting_depth);
|
||||
end;
|
||||
|
||||
a_else:
|
||||
begin
|
||||
cblock:=twasmblockitem(blockstack.Last);
|
||||
if (cblock=nil) or
|
||||
(cblock.blockstart.opcode<>a_if) or
|
||||
assigned(cblock.elseinstr) then
|
||||
internalerror(2021102302);
|
||||
cblock.elseinstr:=lastinstr;
|
||||
end;
|
||||
|
||||
a_end_block,
|
||||
a_end_loop,
|
||||
a_end_if,
|
||||
|
Loading…
Reference in New Issue
Block a user