瀏覽代碼

* move properties and functions of TVMT to the end of the record, so that one only needs to adjust the total entry count TVMTBuilder.generate_vmt_def()

git-svn-id: trunk@34223 -
svenbarth 9 年之前
父節點
當前提交
61551cbb0f
共有 2 個文件被更改,包括 5 次插入6 次删除
  1. 1 1
      compiler/nobj.pas
  2. 4 5
      rtl/inc/objpash.inc

+ 1 - 1
compiler/nobj.pas

@@ -843,7 +843,7 @@ implementation
                 including its virtual methods. We only want the non-method
                 including its virtual methods. We only want the non-method
                 fields, as the methods will be added automatically based on
                 fields, as the methods will be added automatically based on
                 the VMT we generated here only add the 12 first fields }
                 the VMT we generated here only add the 12 first fields }
-              for i:=0 to 13 do
+              for i:=0 to 11 do
                 begin
                 begin
                   sym:=tsym(trecorddef(systemvmt).symtable.SymList[i]);
                   sym:=tsym(trecorddef(systemvmt).symtable.SymList[i]);
                   if sym.typ in [procsym,propertysym] then
                   if sym.typ in [procsym,propertysym] then

+ 4 - 5
rtl/inc/objpash.inc

@@ -99,11 +99,6 @@
        PVmt = ^TVmt;
        PVmt = ^TVmt;
        PPVmt = ^PVmt;
        PPVmt = ^PVmt;
        TVmt = record
        TVmt = record
-       private
-         function GetvParent: PVmt; inline;
-       public
-         property vParent: PVmt read GetvParent;
-       public
          vInstanceSize: SizeInt;
          vInstanceSize: SizeInt;
          vInstanceSize2: SizeInt;
          vInstanceSize2: SizeInt;
          vParentRef: {$ifdef VER3_0}PVmt{$else}PPVmt{$endif};
          vParentRef: {$ifdef VER3_0}PVmt{$else}PPVmt{$endif};
@@ -129,6 +124,10 @@
          vEquals: CodePointer;
          vEquals: CodePointer;
          vGetHashCode: CodePointer;
          vGetHashCode: CodePointer;
          vToString: CodePointer;
          vToString: CodePointer;
+       private
+         function GetvParent: PVmt; inline;
+       public
+         property vParent: PVmt read GetvParent;
        end;
        end;
 
 
        PGuid = ^TGuid;
        PGuid = ^TGuid;