浏览代码

* vo_is_result flag added for the special RESULT symbol

peter 22 年之前
父节点
当前提交
fe96aad6d6
共有 4 个文件被更改,包括 23 次插入8 次删除
  1. 5 1
      compiler/pdecsub.pas
  2. 6 2
      compiler/pexpr.pas
  3. 6 2
      compiler/symconst.pas
  4. 6 3
      compiler/symtable.pas

+ 5 - 1
compiler/pdecsub.pas

@@ -162,6 +162,7 @@ implementation
             begin
               vs:=tabsolutesym.create_ref('RESULT',pd.rettype,tstoredsym(pd.funcretsym));
               include(vs.varoptions,vo_is_funcret);
+              include(vs.varoptions,vo_is_result);
               pd.localst.insert(vs);
             end;
 
@@ -2177,7 +2178,10 @@ const
 end.
 {
   $Log$
-  Revision 1.116  2003-04-25 20:59:33  peter
+  Revision 1.117  2003-04-26 00:33:07  peter
+    * vo_is_result flag added for the special RESULT symbol
+
+  Revision 1.116  2003/04/25 20:59:33  peter
     * removed funcretn,funcretsym, function result is now in varsym
       and aliases for result and function name are added using absolutesym
     * vs_hidden parameter for funcret passed in parameter

+ 6 - 2
compiler/pexpr.pas

@@ -1038,7 +1038,8 @@ implementation
               (
                (token=_LKLAMMER) or
                (not(m_fpc in aktmodeswitches) and
-                (afterassignment or in_args))
+                (afterassignment or in_args) and
+                not(vo_is_result in tvarsym(srsym).varoptions))
               ) then
             begin
               storesymtablestack:=symtablestack;
@@ -2310,7 +2311,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.110  2003-04-25 20:59:33  peter
+  Revision 1.111  2003-04-26 00:33:07  peter
+    * vo_is_result flag added for the special RESULT symbol
+
+  Revision 1.110  2003/04/25 20:59:33  peter
     * removed funcretn,funcretsym, function result is now in varsym
       and aliases for result and function name are added using absolutesym
     * vs_hidden parameter for funcret passed in parameter

+ 6 - 2
compiler/symconst.pas

@@ -251,7 +251,8 @@ type
     vo_is_const,  { variable is declared as const (parameter) and can't be written to }
     vo_is_exported,
     vo_is_high_value,
-    vo_is_funcret
+    vo_is_funcret,
+    vo_is_result  { special result variable }
   );
   tvaroptions=set of tvaroption;
 
@@ -353,7 +354,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.49  2003-04-25 20:59:35  peter
+  Revision 1.50  2003-04-26 00:33:07  peter
+    * vo_is_result flag added for the special RESULT symbol
+
+  Revision 1.49  2003/04/25 20:59:35  peter
     * removed funcretn,funcretsym, function result is now in varsym
       and aliases for result and function name are added using absolutesym
     * vs_hidden parameter for funcret passed in parameter

+ 6 - 3
compiler/symtable.pas

@@ -564,7 +564,7 @@ implementation
                (hsym.typ=varsym) and
                (vo_is_funcret in tvarsym(hsym).varoptions) and
                not((m_result in aktmodeswitches) and
-                   (hsym.name='RESULT')) then
+                   (vo_is_result in tvarsym(hsym).varoptions)) then
              hsym.owner.rename(hsym.name,'hidden'+hsym.name)
             else
              begin
@@ -1259,7 +1259,7 @@ implementation
                      (sym.typ in [absolutesym,varsym]) and
                      (vo_is_funcret in tvarsym(sym).varoptions) and
                      not((m_result in aktmodeswitches) and
-                         (sym.name='RESULT')) then
+                         (vo_is_result in tvarsym(sym).varoptions)) then
                    sym.owner.rename(sym.name,'hidden'+sym.name)
                   else
                    begin
@@ -2437,7 +2437,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.94  2003-04-25 20:59:35  peter
+  Revision 1.95  2003-04-26 00:33:07  peter
+    * vo_is_result flag added for the special RESULT symbol
+
+  Revision 1.94  2003/04/25 20:59:35  peter
     * removed funcretn,funcretsym, function result is now in varsym
       and aliases for result and function name are added using absolutesym
     * vs_hidden parameter for funcret passed in parameter