mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 16:39:36 +01:00
* hardcode offset of the ISA field in Objective-C (meta)classes to be
0, just like gcc/clang. This results in more efficient code on
non-fragile ABI platforms and removes a dependency of the name
of the isa field in header translations
git-svn-id: trunk@20623 -
This commit is contained in:
parent
2e3605e999
commit
284210ad48
@ -221,16 +221,13 @@ implementation
|
||||
expectloc:=LOC_REGISTER;
|
||||
if left.nodetype<>typen then
|
||||
begin
|
||||
{ make sure that the isa field is loaded correctly in case
|
||||
of the non-fragile ABI }
|
||||
if is_objcclass(left.resultdef) and
|
||||
(left.nodetype<>typen) then
|
||||
begin
|
||||
vs:=search_struct_member(tobjectdef(left.resultdef),'ISA');
|
||||
if not assigned(vs) or
|
||||
(tsym(vs).typ<>fieldvarsym) then
|
||||
internalerror(2009092502);
|
||||
result:=csubscriptnode.create(tfieldvarsym(vs),left);
|
||||
{ don't use the ISA field name, assume this field is at offset
|
||||
0 (just like gcc/clang) }
|
||||
result:=ctypeconvnode.create_internal(left,voidpointertype);
|
||||
result:=cderefnode.create(result);
|
||||
inserttypeconv_internal(result,resultdef);
|
||||
{ reused }
|
||||
left:=nil;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user