Browse Source

* (Peter) patch to fix snapshot

marco 22 năm trước cách đây
mục cha
commit
88e866dcb7
2 tập tin đã thay đổi với 17 bổ sung8 xóa
  1. 11 7
      compiler/browcol.pas
  2. 6 1
      compiler/cclasses.pas

+ 11 - 7
compiler/browcol.pas

@@ -79,7 +79,6 @@ type
     PSymbolMemInfo = ^TSymbolMemInfo;
     TSymbolMemInfo = record
       Addr      : longint;
-      LocalAddr : longint;
       Size      : longint;
       PushSize  : longint;
     end;
@@ -268,7 +267,7 @@ uses
   CUtils,
   globtype,globals,comphook,
   finput,fmodule,
-  cpuinfo,aasmbase,aasmtai,paramgr,
+  cpuinfo,cginfo,aasmbase,aasmtai,paramgr,
   symsym,symdef,symtype,symbase;
 
 const
@@ -1438,11 +1437,13 @@ end;
                    Symbol^.Flags:=(Symbol^.Flags or sfPointer);
                    Symbol^.RelatedTypeID:=longint(tpointerdef(vartype.def).pointertype.def);
                  end;
-               MemInfo.Addr:=address;
-               if assigned(localvarsym) then
-                 MemInfo.LocalAddr:=localvarsym.address
+               if  Table.symtabletype in [recordsymtable,objectsymtable] then
+                 MemInfo.Addr:=fieldoffset
                else
-                 MemInfo.LocalAddr:=0;
+                 if localloc.loc=LOC_REFERENCE then
+                   MemInfo.Addr:=localloc.reference.offset
+                 else
+                   MemInfo.Addr:=0;
                if assigned(vartype.def) and (vartype.def.deftype=arraydef) then
                  begin
                    if tarraydef(vartype.def).highrange<tarraydef(vartype.def).lowrange then
@@ -2111,7 +2112,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.34  2003-09-07 22:09:34  peter
+  Revision 1.35  2003-09-24 13:02:10  marco
+   * (Peter) patch to fix snapshot
+
+  Revision 1.34  2003/09/07 22:09:34  peter
     * preparations for different default calling conventions
     * various RA fixes
 

+ 6 - 1
compiler/cclasses.pas

@@ -1616,6 +1616,8 @@ end;
         newp.FIndexnr:=oldp.FIndexnr;
         newp.FIndexNext:=oldp.FIndexNext;
         data^[newp.FIndexnr]:=newp;
+        if First=oldp then
+          First:=newp;
         { update Linked List backward }
         i:=newp.FIndexnr;
         while (i>0) do
@@ -1866,7 +1868,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.23  2003-06-09 12:19:34  peter
+  Revision 1.24  2003-09-24 13:02:10  marco
+   * (Peter) patch to fix snapshot
+
+  Revision 1.23  2003/06/09 12:19:34  peter
     * insertlistafter added
 
   Revision 1.22  2002/12/15 19:34:31  florian