From 0249f07fa94a9ac5c062575f0312c9c00292361b Mon Sep 17 00:00:00 2001 From: chrivers Date: Fri, 26 Jan 2007 23:03:40 +0000 Subject: [PATCH] * Renamed IIOffset to FieldOffset to avoid confusion with IOffset (TImplementedInterface) git-svn-id: trunk@6219 - --- compiler/nobj.pas | 10 +++++----- compiler/pdecvar.pas | 5 +++-- compiler/symdef.pas | 17 ++++++++--------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/compiler/nobj.pas b/compiler/nobj.pas index bf872924c1..8cbb7b839e 100644 --- a/compiler/nobj.pas +++ b/compiler/nobj.pas @@ -521,7 +521,7 @@ implementation ImplIntf.AddImplProc(implprocdef) end else - if ImplIntf.itype = etStandard then + if ImplIntf.VtblImplIntf.IType = etStandard then Message1(sym_e_no_matching_implementation_found,tprocdef(def).fullprocname(false)); end; end; @@ -1221,10 +1221,10 @@ implementation { VTable } current_asmdata.asmlists[al_globals].concat(Tai_const.Createname(intf_get_vtbl_name(AImplIntf.VtblImplIntf),0)); { IOffset field } - if AImplIntf.VtblImplIntf.itype = etStandard then - current_asmdata.asmlists[al_globals].concat(Tai_const.Create_aint(AImplIntf.VtblImplIntf.ioffset)) + if AImplIntf.VtblImplIntf.IType = etStandard then + current_asmdata.asmlists[al_globals].concat(Tai_const.Create_aint(AImplIntf.VtblImplIntf.IOffset)) else - current_asmdata.asmlists[al_globals].concat(Tai_const.Create_aint(AImplIntf.VtblImplIntf.iioffset)); + current_asmdata.asmlists[al_globals].concat(Tai_const.Create_aint(AImplIntf.VtblImplIntf.FieldOffset)); { IIDStr } current_asmdata.getdatalabel(iidlabel); rawdata.concat(cai_align.create(const_align(sizeof(aint)))); @@ -1236,7 +1236,7 @@ implementation rawdata.concat(Tai_string.Create(AImplIntf.IntfDef.iidstr^)); current_asmdata.asmlists[al_globals].concat(Tai_const.Create_sym(iidlabel)); { IType } - current_asmdata.asmlists[al_globals].concat(Tai_const.Create_aint(aint(AImplIntf.itype))); + current_asmdata.asmlists[al_globals].concat(Tai_const.Create_aint(aint(AImplIntf.VtblImplIntf.IType))); end; diff --git a/compiler/pdecvar.pas b/compiler/pdecvar.pas index 8e284d2fe4..6d3adf2bf3 100644 --- a/compiler/pdecvar.pas +++ b/compiler/pdecvar.pas @@ -643,6 +643,7 @@ implementation for i:=0 to aclass.ImplementedInterfaces.Count-1 do begin ImplIntf:=TImplementedInterface(aclass.ImplementedInterfaces[i]); + { FIXME: Is this check valid? } if ImplIntf.IntfDef.Objname^=pattern then begin found:=true; @@ -651,8 +652,8 @@ implementation end; if found then begin - ImplIntf.itype := etFieldValue; - ImplIntf.iioffset := tfieldvarsym(p.propaccesslist[palt_read].firstsym^.sym).fieldoffset; + ImplIntf.IType := etFieldValue; + ImplIntf.FieldOffset := tfieldvarsym(p.propaccesslist[palt_read].firstsym^.sym).fieldoffset; end else Comment(V_Error, 'Implements-property used on unimplemented interface'); diff --git a/compiler/symdef.pas b/compiler/symdef.pas index a183a0bd12..cece4edf36 100644 --- a/compiler/symdef.pas +++ b/compiler/symdef.pas @@ -204,10 +204,10 @@ interface VtblImplIntf : TImplementedInterface; NameMappings : TFPHashList; ProcDefs : TFPObjectList; - // IIOffset can be merged with IOffset. But then, fpc is not allowed to genrate a vmtentry. + // FieldOffset can be merged with IOffset. But then, fpc is not allowed to genrate a vmtentry. // Right now, fpc generate an entry for all implemented interfaces (but it should just for etStandard ones) // - Ivo Steinmann - iioffset : longint; + FieldOffset : longint; constructor create(aintf: tobjectdef); constructor create_deref(d:tderef); destructor destroy; override; @@ -4028,12 +4028,11 @@ implementation begin inherited create; intfdef:=aintf; - ioffset:=-1; - itype:=etStandard; - iioffset:=-1; + IOffset:=-1; + IType:=etStandard; + FieldOffset:=-1; NameMappings:=nil; procdefs:=nil; - iioffset := 0; end; @@ -4042,9 +4041,9 @@ implementation inherited create; intfdef:=nil; intfdefderef:=d; - ioffset:=-1; - itype:=etStandard; - iioffset:=-1; + IOffset:=-1; + IType:=etStandard; + FieldOffset:=-1; NameMappings:=nil; procdefs:=nil; end;