* Clarity over blocknode and VMT flags. nf_usercode_entry doesn't need to be cascaded in "firstpass" as TBlockNode.Simplify already does this

This commit is contained in:
J. Gareth "Curious Kit" Moreton 2024-03-01 00:09:14 +00:00 committed by florian
parent 1bba83cebb
commit 5ea60b97b1
2 changed files with 6 additions and 4 deletions

View File

@ -228,7 +228,9 @@ interface
{ Node cannot be assigned to } { Node cannot be assigned to }
nf_no_lvalue, nf_no_lvalue,
{ this node is the user code entry, if a node with this flag is removed { this node is the user code entry, if a node with this flag is removed
during simplify, the flag must be moved to another node } during simplify, the flag must be moved to another node. Though
normally applicable to block nodes, they can also appear on asm nodes
in the case of pure assembly routines }
nf_usercode_entry, nf_usercode_entry,
{ tderefnode } { tderefnode }
@ -268,10 +270,11 @@ interface
{ tasmnode } { tasmnode }
nf_get_asm_position, nf_get_asm_position,
{ tblocknode } { tblocknode / this is not node-specific because it can also appear on
implicit try/finally nodes }
nf_block_with_exit, nf_block_with_exit,
{ tloadvmtaddrnode } { tloadvmtaddrnode / tisnode }
nf_ignore_for_wpo, { we know that this loadvmtaddrnode cannot be used to construct a class instance } nf_ignore_for_wpo, { we know that this loadvmtaddrnode cannot be used to construct a class instance }
{ node is derived from generic parameter } { node is derived from generic parameter }

View File

@ -196,7 +196,6 @@ implementation
{ should the node be replaced? } { should the node be replaced? }
if assigned(hp) then if assigned(hp) then
begin begin
hp.flags := hp.flags + (p.flags * [nf_usercode_entry]);
p.free; p.free;
{ switch to new node } { switch to new node }
p:=hp; p:=hp;