* fixed vmt issues on 64 bit systems

This commit is contained in:
florian 2004-04-25 16:32:31 +00:00
parent c0c83b91f8
commit 6bf70cec85

View File

@ -20,29 +20,29 @@
const const
vmtInstanceSize = 0; vmtInstanceSize = 0;
vmtParent = 8; vmtParent = sizeof(longint)*2;
{ These were negative value's, but are now positive, else classes { These were negative value's, but are now positive, else classes
couldn't be used with shared linking which copies only all data from couldn't be used with shared linking which copies only all data from
the .global directive and not the data before the directive (PFV) } the .global directive and not the data before the directive (PFV) }
vmtClassName = 12; vmtClassName = vmtParent+sizeof(pointer);
vmtDynamicTable = 16; vmtDynamicTable = vmtParent+sizeof(pointer)*2;
vmtMethodTable = 20; vmtMethodTable = vmtParent+sizeof(pointer)*3;
vmtFieldTable = 24; vmtFieldTable = vmtParent+sizeof(pointer)*4;
vmtTypeInfo = 28; vmtTypeInfo = vmtParent+sizeof(pointer)*5;
vmtInitTable = 32; vmtInitTable = vmtParent+sizeof(pointer)*6;
vmtAutoTable = 36; vmtAutoTable = vmtParent+sizeof(pointer)*7;
vmtIntfTable = 40; vmtIntfTable = vmtParent+sizeof(pointer)*8;
vmtMsgStrPtr = 44; vmtMsgStrPtr = vmtParent+sizeof(pointer)*9;
{ methods } { methods }
vmtMethodStart = 48; vmtMethodStart = vmtParent+sizeof(pointer)*10;
vmtDestroy = vmtMethodStart; vmtDestroy = vmtMethodStart;
vmtNewInstance = vmtMethodStart+4; vmtNewInstance = vmtMethodStart+sizeof(pointer);
vmtFreeInstance = vmtMethodStart+8; vmtFreeInstance = vmtMethodStart+sizeof(pointer)*2;
vmtSafeCallException = vmtMethodStart+12; vmtSafeCallException = vmtMethodStart+sizeof(pointer)*3;
vmtDefaultHandler = vmtMethodStart+16; vmtDefaultHandler = vmtMethodStart+sizeof(pointer)*4;
vmtAfterConstruction = vmtMethodStart+20; vmtAfterConstruction = vmtMethodStart+sizeof(pointer)*5;
vmtBeforeDestruction = vmtMethodStart+24; vmtBeforeDestruction = vmtMethodStart+sizeof(pointer)*6;
vmtDefaultHandlerStr = vmtMethodStart+28; vmtDefaultHandlerStr = vmtMethodStart+sizeof(pointer)*7;
type type
TextFile = Text; TextFile = Text;
@ -102,9 +102,9 @@
TObject = class TObject = class
public public
{ please don't change the order of virtual methods, because } { please don't change the order of virtual methods, because
{ their vmt offsets are used by some assembler code which uses } their vmt offsets are used by some assembler code which uses
{ hard coded addresses (FK) } hard coded addresses (FK) }
constructor Create; constructor Create;
{ the virtual procedures must be in THAT order } { the virtual procedures must be in THAT order }
destructor Destroy;virtual; destructor Destroy;virtual;
@ -299,7 +299,10 @@
{ {
$Log$ $Log$
Revision 1.21 2003-12-06 00:02:34 florian Revision 1.22 2004-04-25 16:32:31 florian
* fixed vmt issues on 64 bit systems
Revision 1.21 2003/12/06 00:02:34 florian
* widechars in tvarrec fixed for big endian machines as well * widechars in tvarrec fixed for big endian machines as well
Revision 1.20 2003/12/05 23:54:04 jonas Revision 1.20 2003/12/05 23:54:04 jonas