Kaynağa Gözat

* renamed call_offset to para_offset

peter 25 yıl önce
ebeveyn
işleme
25dda03cdc

+ 5 - 1
compiler/cg386cal.pas

@@ -1239,6 +1239,7 @@ implementation
           aktprocsym:=p^.inlineprocsym;
           procinfo^.returntype:=aktprocsym^.definition^.rettype;
           procinfo^.return_offset:=p^.retoffset;
+          procinfo^.para_offset:=p^.para_offset;
           { arg space has been filled by the parent secondcall }
           st:=aktprocsym^.definition^.localst;
           { set it to the same lexical level }
@@ -1291,7 +1292,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.116  2000-01-09 12:35:00  jonas
+  Revision 1.117  2000-01-16 22:17:11  peter
+    * renamed call_offset to para_offset
+
+  Revision 1.116  2000/01/09 12:35:00  jonas
     * changed edi allocation to use getexplicitregister32/ungetregister
       (adapted tgeni386 a bit for this) and enabled it by default
     * fixed very big and stupid bug of mine in cg386mat that broke the

+ 15 - 12
compiler/cgai386.pas

@@ -2706,7 +2706,7 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
             emitpushreferenceaddr(hr);
             reset_reference(hr);
             hr.base:=procinfo^.framepointer;
-            hr.offset:=pvarsym(p)^.address+procinfo^.call_offset;
+            hr.offset:=pvarsym(p)^.address+procinfo^.para_offset;
 
             emitpushreferenceaddr(hr);
             reset_reference(hr);
@@ -2745,7 +2745,7 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
                parasymtable:
                  begin
                     hr.base:=procinfo^.framepointer;
-                    hr.offset:=pvarsym(p)^.address+procinfo^.call_offset;
+                    hr.offset:=pvarsym(p)^.address+procinfo^.para_offset;
                  end;
                else
                  hr.symbol:=newasmsymbol(pvarsym(p)^.mangledname);
@@ -2775,7 +2775,7 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
               new(r);
               reset_reference(r^);
               r^.base:=procinfo^.framepointer;
-              r^.offset:=pvarsym(p)^.address+4+procinfo^.call_offset;
+              r^.offset:=pvarsym(p)^.address+4+procinfo^.para_offset;
 {$ifndef noAllocEdi}
               getexplicitregister32(R_EDI);
 {$endif noAllocEdi}
@@ -2817,7 +2817,7 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
                    new(r);
                    reset_reference(r^);
                    r^.base:=procinfo^.framepointer;
-                   r^.offset:=pvarsym(p)^.address+4+procinfo^.call_offset;
+                   r^.offset:=pvarsym(p)^.address+4+procinfo^.para_offset;
 {$ifndef noAllocEdi}
                    getexplicitregister32(R_EDI);
 {$endif noAllocEdi}
@@ -2851,7 +2851,7 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
               new(r);
               reset_reference(r^);
               r^.base:=procinfo^.framepointer;
-              r^.offset:=pvarsym(p)^.address+4+procinfo^.call_offset;
+              r^.offset:=pvarsym(p)^.address+4+procinfo^.para_offset;
               exprasmlist^.concat(new(paicpu,
                 op_ref_reg(A_MOV,S_L,r,R_ECX)));
 
@@ -2859,7 +2859,7 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
               new(r);
               reset_reference(r^);
               r^.base:=procinfo^.framepointer;
-              r^.offset:=pvarsym(p)^.address+procinfo^.call_offset;
+              r^.offset:=pvarsym(p)^.address+procinfo^.para_offset;
               exprasmlist^.concat(new(paicpu,
                 op_ref_reg(A_MOV,S_L,r,R_ESI)));
 
@@ -2903,7 +2903,7 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
               new(r);
               reset_reference(r^);
               r^.base:=procinfo^.framepointer;
-              r^.offset:=pvarsym(p)^.address+procinfo^.call_offset;
+              r^.offset:=pvarsym(p)^.address+procinfo^.para_offset;
               exprasmlist^.concat(new(paicpu,
                 op_reg_ref(A_MOV,S_L,R_ESP,r)));
            end
@@ -2912,7 +2912,7 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
             begin
               reset_reference(href1);
               href1.base:=procinfo^.framepointer;
-              href1.offset:=pvarsym(p)^.address+procinfo^.call_offset;
+              href1.offset:=pvarsym(p)^.address+procinfo^.para_offset;
               reset_reference(href2);
               href2.base:=procinfo^.framepointer;
               href2.offset:=-pvarsym(p)^.localvarsym^.address;
@@ -2922,7 +2922,7 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
             begin
               reset_reference(href1);
               href1.base:=procinfo^.framepointer;
-              href1.offset:=pvarsym(p)^.address+procinfo^.call_offset;
+              href1.offset:=pvarsym(p)^.address+procinfo^.para_offset;
               reset_reference(href2);
               href2.base:=procinfo^.framepointer;
               href2.offset:=-pvarsym(p)^.localvarsym^.address;
@@ -3119,7 +3119,7 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
               if (aktprocsym^.definition^.proctypeoption in [potype_unitinit,potype_proginit,potype_unitfinalize]) then
                 parasize:=0
               else
-                parasize:=aktprocsym^.definition^.parast^.datasize+procinfo^.call_offset-4;
+                parasize:=aktprocsym^.definition^.parast^.datasize+procinfo^.para_offset-4;
               if stackframe<>0 then
                 exprasmlist^.insert(new(paicpu,
                   op_const_reg(A_SUB,S_L,gettempsize,R_ESP)));
@@ -3130,7 +3130,7 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
               if (aktprocsym^.definition^.proctypeoption in [potype_unitinit,potype_proginit,potype_unitfinalize]) then
                 parasize:=0
               else
-                parasize:=aktprocsym^.definition^.parast^.datasize+procinfo^.call_offset-8;
+                parasize:=aktprocsym^.definition^.parast^.datasize+procinfo^.para_offset-8;
               nostackframe:=false;
               if stackframe<>0 then
                   begin
@@ -3660,7 +3660,10 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
 end.
 {
   $Log$
-  Revision 1.69  2000-01-12 10:38:17  peter
+  Revision 1.70  2000-01-16 22:17:11  peter
+    * renamed call_offset to para_offset
+
+  Revision 1.69  2000/01/12 10:38:17  peter
     * smartlinking fixes for binary writer
     * release alignreg code and moved instruction writing align to cpuasm,
       but it doesn't use the specified register yet

+ 6 - 3
compiler/hcodegen.pas

@@ -73,7 +73,7 @@ implementation
           { firsttemp position }
           firsttemp_offset : longint;
           { parameter offset }
-          call_offset : longint;
+          para_offset : longint;
 
           { some collected informations about the procedure }
           { see pi_xxxx above                          }
@@ -296,7 +296,7 @@ implementation
         selfpointer_offset:=0;
         return_offset:=0;
         firsttemp_offset:=0;
-        call_offset:=0;
+        para_offset:=0;
         flags:=0;
         framepointer:=R_NO;
         globalsymbol:=false;
@@ -447,7 +447,10 @@ end.
 
 {
   $Log$
-  Revision 1.54  2000-01-11 17:16:04  jonas
+  Revision 1.55  2000-01-16 22:17:11  peter
+    * renamed call_offset to para_offset
+
+  Revision 1.54  2000/01/11 17:16:04  jonas
     * removed a lot of memory leaks when an error is encountered (caused by
       procinfo and pstringcontainers). There are still plenty left though :)
 

+ 8 - 5
compiler/pass_2.pas

@@ -516,8 +516,8 @@ implementation
                          if procinfo^.retoffset>=0 then
                            dec(procinfo^.retoffset,4);
 
-                         dec(procinfo^.call_offset,4);
-                         aktprocsym^.definition^.parast^.address_fixup:=procinfo^.call_offset;
+                         dec(procinfo^.para_offset,4);
+                         aktprocsym^.definition^.parast^.address_fixup:=procinfo^.para_offset;
                        end;
                      end;
                    *)
@@ -600,7 +600,7 @@ implementation
                                        { when loading parameter to reg  }
                                        new(hr);
                                        reset_reference(hr^);
-                                       hr^.offset:=pvarsym(regvars[i])^.address+procinfo^.call_offset;
+                                       hr^.offset:=pvarsym(regvars[i])^.address+procinfo^.para_offset;
                                        hr^.base:=procinfo^.framepointer;
 {$ifdef i386}
                                        procinfo^.aktentrycode^.concat(new(paicpu,op_ref_reg(A_MOV,regsize,
@@ -697,7 +697,7 @@ implementation
                                        { when loading parameter to reg  }
                                        new(hr);
                                        reset_reference(hr^);
-                                       hr^.offset:=pvarsym(regvars[i])^.address+procinfo^.call_offset;
+                                       hr^.offset:=pvarsym(regvars[i])^.address+procinfo^.para_offset;
                                        hr^.base:=procinfo^.framepointer;
 {$ifdef i386}
                                        procinfo^.aktentrycode^.concat(new(paicpu,op_ref_reg(A_MOV,regsize,
@@ -749,7 +749,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.49  2000-01-07 01:14:28  peter
+  Revision 1.50  2000-01-16 22:17:11  peter
+    * renamed call_offset to para_offset
+
+  Revision 1.49  2000/01/07 01:14:28  peter
     * updated copyright to 2000
 
   Revision 1.48  2000/01/04 15:15:52  florian

+ 5 - 2
compiler/pmodules.pas

@@ -913,7 +913,7 @@ unit pmodules;
          begin
            returntype.setdef(voiddef);
            _class:=nil;
-           call_offset:=8;
+           para_offset:=8;
            framepointer:=frame_pointer;
            flags:=0;
          end;
@@ -1619,7 +1619,10 @@ unit pmodules;
 end.
 {
   $Log$
-  Revision 1.182  2000-01-16 14:15:33  jonas
+  Revision 1.183  2000-01-16 22:17:12  peter
+    * renamed call_offset to para_offset
+
+  Revision 1.182  2000/01/16 14:15:33  jonas
     * changed "with object_type" construct because of bug in the
       compiler
 

+ 6 - 3
compiler/pstatmnt.pas

@@ -1202,7 +1202,7 @@ unit pstatmnt;
                    procinfo^.return_offset:=-funcretsym^.address;
                    if ((procinfo^.flags and pi_operator)<>0) and
                      assigned(opsym) then
-                     {opsym^.address:=procinfo^.call_offset; is wrong PM }
+                     {opsym^.address:=procinfo^.para_offset; is wrong PM }
                      opsym^.address:=-procinfo^.return_offset;
                    { eax is modified by a function }
 {$ifndef newcg}
@@ -1316,7 +1316,7 @@ unit pstatmnt;
                procinfo^.framepointer:=stack_pointer;
                { set the right value for parameters }
                dec(aktprocsym^.definition^.parast^.address_fixup,target_os.size_of_pointer);
-               dec(procinfo^.call_offset,target_os.size_of_pointer);
+               dec(procinfo^.para_offset,target_os.size_of_pointer);
              end;
           { force the asm statement }
             if token<>_ASM then
@@ -1331,7 +1331,10 @@ unit pstatmnt;
 end.
 {
   $Log$
-  Revision 1.119  2000-01-12 10:30:50  peter
+  Revision 1.120  2000-01-16 22:17:12  peter
+    * renamed call_offset to para_offset
+
+  Revision 1.119  2000/01/12 10:30:50  peter
     * fixed library with only end.
 
   Revision 1.118  2000/01/07 01:14:31  peter

+ 9 - 6
compiler/psub.pas

@@ -316,7 +316,7 @@ begin
      (pd^.proctypeoption=potype_destructor) then
     inc(paramoffset,target_os.size_of_pointer);
 
-  procinfo^.call_offset:=paramoffset;
+  procinfo^.para_offset:=paramoffset;
 
   pd^.parast^.datasize:=0;
 
@@ -1285,7 +1285,7 @@ begin
                            end;
                        end;
                     end;
-                 { also the call_offset }
+                 { also the para_offset }
                    hd^.parast^.address_fixup:=aktprocsym^.definition^.parast^.address_fixup;
                    hd^.count:=true;
 
@@ -1874,11 +1874,11 @@ begin
    { pointer to the return value ? }
    if ret_in_param(procinfo^.returntype.def) then
     begin
-      procinfo^.return_offset:=procinfo^.call_offset;
-      inc(procinfo^.call_offset,target_os.size_of_pointer);
+      procinfo^.return_offset:=procinfo^.para_offset;
+      inc(procinfo^.para_offset,target_os.size_of_pointer);
     end;
    { allows to access the parameters of main functions in nested functions }
-   aktprocsym^.definition^.parast^.address_fixup:=procinfo^.call_offset;
+   aktprocsym^.definition^.parast^.address_fixup:=procinfo^.para_offset;
 
    { when it is a value para and it needs a local copy then rename
      the parameter and insert a copy in the localst. This is not done
@@ -1939,7 +1939,10 @@ end.
 
 {
   $Log$
-  Revision 1.41  2000-01-11 17:16:06  jonas
+  Revision 1.42  2000-01-16 22:17:12  peter
+    * renamed call_offset to para_offset
+
+  Revision 1.41  2000/01/11 17:16:06  jonas
     * removed a lot of memory leaks when an error is encountered (caused by
       procinfo and pstringcontainers). There are still plenty left though :)