Browse Source

- write_access fields removed in favor of a flag

daniel 23 years ago
parent
commit
f4c6d762fd
4 changed files with 27 additions and 21 deletions
  1. 6 1
      compiler/ncal.pas
  2. 6 5
      compiler/nld.pas
  3. 7 11
      compiler/nmem.pas
  4. 8 4
      compiler/node.pas

+ 6 - 1
compiler/ncal.pas

@@ -1317,10 +1317,12 @@ implementation
                 result:=hpt;
                 result:=hpt;
                 goto errorexit;
                 goto errorexit;
             end;
             end;
+{$ifdef dummy}
         { Calling a message method directly ? }
         { Calling a message method directly ? }
         if assigned(procdefinition) and
         if assigned(procdefinition) and
          (po_containsself in procdefinition.procoptions) then
          (po_containsself in procdefinition.procoptions) then
             message(cg_e_cannot_call_message_direct);
             message(cg_e_cannot_call_message_direct);
+{$endif}
 
 
         { ensure that the result type is set }
         { ensure that the result type is set }
         if not restypeset then
         if not restypeset then
@@ -2593,7 +2595,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.91  2002-09-01 12:14:15  peter
+  Revision 1.92  2002-09-01 13:28:37  daniel
+   - write_access fields removed in favor of a flag
+
+  Revision 1.91  2002/09/01 12:14:15  peter
     * remove debug line
     * remove debug line
     * containself methods can be called directly
     * containself methods can be called directly
 
 

+ 6 - 5
compiler/nld.pas

@@ -38,7 +38,6 @@ interface
           symtableentry : tsym;
           symtableentry : tsym;
           symtable : tsymtable;
           symtable : tsymtable;
           procdef : tprocdef;
           procdef : tprocdef;
-          write_access : boolean;
           constructor create(v : tsym;st : tsymtable);virtual;
           constructor create(v : tsym;st : tsymtable);virtual;
           constructor create_procvar(v : tsym;d:tprocdef;st : tsymtable);virtual;
           constructor create_procvar(v : tsym;d:tprocdef;st : tsymtable);virtual;
           constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
           constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
@@ -77,7 +76,6 @@ interface
        tassignmentnodeclass = class of tassignmentnode;
        tassignmentnodeclass = class of tassignmentnode;
 
 
        tfuncretnode = class(tnode)
        tfuncretnode = class(tnode)
-          write_access : boolean;
           funcretsym : tfuncretsym;
           funcretsym : tfuncretsym;
           constructor create(v:tsym);virtual;
           constructor create(v:tsym);virtual;
           constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
           constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
@@ -363,7 +361,7 @@ implementation
     procedure Tloadnode.mark_write;
     procedure Tloadnode.mark_write;
 
 
     begin
     begin
-      write_access:=true;
+      include(flags,nf_write);
     end;
     end;
 {$endif}
 {$endif}
 
 
@@ -739,7 +737,7 @@ implementation
     procedure Tfuncretnode.mark_write;
     procedure Tfuncretnode.mark_write;
 
 
     begin
     begin
-      write_access:=true;
+      include(flags,nf_write);
     end;
     end;
 {$endif}
 {$endif}
 
 
@@ -1145,7 +1143,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.55  2002-09-01 08:01:16  daniel
+  Revision 1.56  2002-09-01 13:28:37  daniel
+   - write_access fields removed in favor of a flag
+
+  Revision 1.55  2002/09/01 08:01:16  daniel
    * Removed sets from Tcallnode.det_resulttype
    * Removed sets from Tcallnode.det_resulttype
    + Added read/write notifications of variables. These will be usefull
    + Added read/write notifications of variables. These will be usefull
      for providing information for several optimizations. For example
      for providing information for several optimizations. For example

+ 7 - 11
compiler/nmem.pas

@@ -77,9 +77,6 @@ interface
        tdoubleaddrnodeclass = class of tdoubleaddrnode;
        tdoubleaddrnodeclass = class of tdoubleaddrnode;
 
 
        tderefnode = class(tunarynode)
        tderefnode = class(tunarynode)
-       {$ifdef var_notification}
-          write_access:boolean;
-       {$endif}
           constructor create(l : tnode);virtual;
           constructor create(l : tnode);virtual;
           function pass_1 : tnode;override;
           function pass_1 : tnode;override;
           function det_resulttype:tnode;override;
           function det_resulttype:tnode;override;
@@ -91,9 +88,6 @@ interface
 
 
        tsubscriptnode = class(tunarynode)
        tsubscriptnode = class(tunarynode)
           vs : tvarsym;
           vs : tvarsym;
-       {$ifdef var_notification}
-          write_access:boolean;
-       {$endif}
           constructor create(varsym : tsym;l : tnode);virtual;
           constructor create(varsym : tsym;l : tnode);virtual;
           constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
           constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
@@ -109,7 +103,6 @@ interface
        tsubscriptnodeclass = class of tsubscriptnode;
        tsubscriptnodeclass = class of tsubscriptnode;
 
 
        tvecnode = class(tbinarynode)
        tvecnode = class(tbinarynode)
-          write_access:boolean;
           constructor create(l,r : tnode);virtual;
           constructor create(l,r : tnode);virtual;
           function pass_1 : tnode;override;
           function pass_1 : tnode;override;
           function det_resulttype:tnode;override;
           function det_resulttype:tnode;override;
@@ -589,7 +582,7 @@ implementation
     procedure Tderefnode.mark_write;
     procedure Tderefnode.mark_write;
 
 
     begin
     begin
-      write_access:=true;
+      include(flags,nf_write);
     end;
     end;
 {$endif}
 {$endif}
 
 
@@ -666,7 +659,7 @@ implementation
     procedure Tsubscriptnode.mark_write;
     procedure Tsubscriptnode.mark_write;
 
 
     begin
     begin
-      write_access:=true;
+      include(flags,nf_write);
     end;
     end;
 {$endif}
 {$endif}
 
 
@@ -787,7 +780,7 @@ implementation
     procedure Tvecnode.mark_write;
     procedure Tvecnode.mark_write;
 
 
     begin
     begin
-      write_access:=true;
+      include(flags,nf_write);
     end;
     end;
 {$endif}
 {$endif}
 
 
@@ -1058,7 +1051,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.37  2002-09-01 08:01:16  daniel
+  Revision 1.38  2002-09-01 13:28:38  daniel
+   - write_access fields removed in favor of a flag
+
+  Revision 1.37  2002/09/01 08:01:16  daniel
    * Removed sets from Tcallnode.det_resulttype
    * Removed sets from Tcallnode.det_resulttype
    + Added read/write notifications of variables. These will be usefull
    + Added read/write notifications of variables. These will be usefull
      for providing information for several optimizations. For example
      for providing information for several optimizations. For example

+ 8 - 4
compiler/node.pas

@@ -217,6 +217,7 @@ interface
          nf_swapable,    { tbinop operands can be swaped }
          nf_swapable,    { tbinop operands can be swaped }
          nf_swaped,      { tbinop operands are swaped    }
          nf_swaped,      { tbinop operands are swaped    }
          nf_error,
          nf_error,
+         nf_write,       { Node is written to            }
 
 
          { flags used by tcallnode }
          { flags used by tcallnode }
          nf_return_value_used,
          nf_return_value_used,
@@ -250,10 +251,10 @@ interface
          nf_concat_string,
          nf_concat_string,
 
 
          { tfuncretnode }
          { tfuncretnode }
-         nf_is_first_funcret, { 20th }
+         nf_is_first_funcret,
 
 
          { tarrayconstructnode }
          { tarrayconstructnode }
-         nf_cargs,
+         nf_cargs,             { 20th }
          nf_cargswap,
          nf_cargswap,
          nf_forcevaria,
          nf_forcevaria,
          nf_novariaallowed,
          nf_novariaallowed,
@@ -269,7 +270,7 @@ interface
          nf_varstateset,
          nf_varstateset,
 
 
          { tasmnode }
          { tasmnode }
-         nf_object_preserved,
+         nf_object_preserved,   { 30th }
 
 
          { taddnode }
          { taddnode }
          nf_use_strconcat
          nf_use_strconcat
@@ -988,7 +989,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.40  2002-09-01 08:01:16  daniel
+  Revision 1.41  2002-09-01 13:28:38  daniel
+   - write_access fields removed in favor of a flag
+
+  Revision 1.40  2002/09/01 08:01:16  daniel
    * Removed sets from Tcallnode.det_resulttype
    * Removed sets from Tcallnode.det_resulttype
    + Added read/write notifications of variables. These will be usefull
    + Added read/write notifications of variables. These will be usefull
      for providing information for several optimizations. For example
      for providing information for several optimizations. For example