|
@@ -147,9 +147,9 @@
|
|
|
i:=intftable^.EntryCount;
|
|
|
Res:=@intftable^.Entries[0];
|
|
|
while i>0 do begin
|
|
|
- if Res^.EntryType = etStandard then
|
|
|
- ppointer(@(pbyte(instance)[Res^.IOffset]))^:=
|
|
|
- pointer(Res^.VTable);
|
|
|
+ if Res^.EntryType = etStandard then
|
|
|
+ ppointer(@(pbyte(instance)[Res^.IOffset]))^:=
|
|
|
+ pointer(Res^.VTable);
|
|
|
inc(Res);
|
|
|
dec(i);
|
|
|
end;
|
|
@@ -583,24 +583,24 @@
|
|
|
case IEntry^.EntryType of
|
|
|
etStandard:
|
|
|
begin
|
|
|
- writeln('Doing etStandard cast of ', TObject(Instance).classname(), ' with self = ', ptruint(Instance), ' and offset = ', IEntry^.IOffset);
|
|
|
+ //writeln('Doing etStandard cast of ', TObject(Instance).classname(), ' with self = ', ptruint(Instance), ' and offset = ', IEntry^.IOffset);
|
|
|
Pointer(Obj) := Pointer(PtrInt(Instance) + IEntry^.IOffset);
|
|
|
end;
|
|
|
etFieldValue:
|
|
|
begin
|
|
|
- writeln('Doing etFieldValue cast of ', TObject(Instance).classname(), ' with offset = ', IEntry^.EntryOffset);
|
|
|
+ //writeln('Doing etFieldValue cast of ', TObject(Instance).classname(), ' with offset = ', IEntry^.EntryOffset);
|
|
|
Pointer(obj) := ppointer(Pointer(Instance)+IEntry^.EntryOffset)^;
|
|
|
end;
|
|
|
etVirtualMethodResult:
|
|
|
begin
|
|
|
- writeln('Doing etVirtualMethodResult cast of ', TObject(Instance).classname());
|
|
|
+ //writeln('Doing etVirtualMethodResult cast of ', TObject(Instance).classname());
|
|
|
TMethod(Getter).data := Instance;
|
|
|
TMethod(Getter).code := ppointer(ptrint(Instance) + IEntry^.EntryOffset)^;
|
|
|
Pointer(obj) := Pointer(Getter());
|
|
|
end;
|
|
|
etStaticMethodResult:
|
|
|
begin
|
|
|
- writeln('Doing etStaticMethodResult cast of ', TObject(Instance).classname());
|
|
|
+ //writeln('Doing etStaticMethodResult cast of ', TObject(Instance).classname());
|
|
|
TMethod(Getter).data := Instance;
|
|
|
TMethod(Getter).code := pointer(IEntry^.EntryOffset);
|
|
|
Pointer(obj) := Pointer(Getter());
|