mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 13:49:11 +02:00
* Don't generate VMT checking code twice (gen_load_vmt_register generates it already).
git-svn-id: trunk@26657 -
This commit is contained in:
parent
a5d5ce8eb2
commit
e0082262cc
@ -877,13 +877,12 @@ implementation
|
|||||||
{ todo: fix vmt type for high level cg }
|
{ todo: fix vmt type for high level cg }
|
||||||
hlcg.location_force_reg(current_asmdata.CurrAsmList,methodpointer.location,proc_addr_voidptrdef,proc_addr_voidptrdef,false);
|
hlcg.location_force_reg(current_asmdata.CurrAsmList,methodpointer.location,proc_addr_voidptrdef,proc_addr_voidptrdef,false);
|
||||||
vmtreg:=methodpointer.location.register;
|
vmtreg:=methodpointer.location.register;
|
||||||
|
{ test validity of VMT }
|
||||||
|
if not(is_interface(tprocdef(procdefinition).struct)) and
|
||||||
|
not(is_cppclass(tprocdef(procdefinition).struct)) then
|
||||||
|
cg.g_maybe_testvmt(current_asmdata.CurrAsmList,vmtreg,tobjectdef(tprocdef(procdefinition).struct));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ test validity of VMT }
|
|
||||||
if not(is_interface(tprocdef(procdefinition).struct)) and
|
|
||||||
not(is_cppclass(tprocdef(procdefinition).struct)) then
|
|
||||||
cg.g_maybe_testvmt(current_asmdata.CurrAsmList,vmtreg,tobjectdef(tprocdef(procdefinition).struct));
|
|
||||||
|
|
||||||
{ Call through VMT, generate a VTREF symbol to notify the linker }
|
{ Call through VMT, generate a VTREF symbol to notify the linker }
|
||||||
vmtoffset:=tobjectdef(tprocdef(procdefinition).struct).vmtmethodoffset(tprocdef(procdefinition).extnumber);
|
vmtoffset:=tobjectdef(tprocdef(procdefinition).struct).vmtmethodoffset(tprocdef(procdefinition).extnumber);
|
||||||
{ register call for WPO }
|
{ register call for WPO }
|
||||||
|
Loading…
Reference in New Issue
Block a user