浏览代码

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

J. Gareth "Curious Kit" Moreton 1 年之前
父节点
当前提交
5ea60b97b1
共有 2 个文件被更改,包括 6 次插入4 次删除
  1. 6 3
      compiler/node.pas
  2. 0 1
      compiler/pass_1.pas

+ 6 - 3
compiler/node.pas

@@ -228,7 +228,9 @@ interface
          { Node cannot be assigned to }
          nf_no_lvalue,
          { 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,
 
          { tderefnode }
@@ -268,10 +270,11 @@ interface
          { tasmnode }
          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,
 
-         { tloadvmtaddrnode }
+         { tloadvmtaddrnode / tisnode }
          nf_ignore_for_wpo, { we know that this loadvmtaddrnode cannot be used to construct a class instance }
 
          { node is derived from generic parameter }

+ 0 - 1
compiler/pass_1.pas

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