|
@@ -1877,6 +1877,11 @@ implementation
|
|
firstpass would be called multiple times }
|
|
firstpass would be called multiple times }
|
|
include(callnodeflags,cnf_objc_processed);
|
|
include(callnodeflags,cnf_objc_processed);
|
|
|
|
|
|
|
|
+ { make sure the methodpointer doesn't get translated into a call
|
|
|
|
+ as well (endless loop) }
|
|
|
|
+ if methodpointer.nodetype=loadvmtaddrn then
|
|
|
|
+ tloadvmtaddrnode(methodpointer).forcall:=true;
|
|
|
|
+
|
|
{ A) set the appropriate objc_msgSend* variant to call }
|
|
{ A) set the appropriate objc_msgSend* variant to call }
|
|
|
|
|
|
{ record returned via implicit pointer }
|
|
{ record returned via implicit pointer }
|
|
@@ -1938,6 +1943,10 @@ implementation
|
|
(selftree.resultdef.typ<>classrefdef) then
|
|
(selftree.resultdef.typ<>classrefdef) then
|
|
begin
|
|
begin
|
|
selftree:=cloadvmtaddrnode.create(selftree);
|
|
selftree:=cloadvmtaddrnode.create(selftree);
|
|
|
|
+ { since we're in a class method of the current class, its
|
|
|
|
+ information has already been initialized (and that of all of
|
|
|
|
+ its parent classes too) }
|
|
|
|
+ tloadvmtaddrnode(selftree).forcall:=true;
|
|
typecheckpass(selftree);
|
|
typecheckpass(selftree);
|
|
end;
|
|
end;
|
|
selfrestype:=selftree.resultdef;
|
|
selfrestype:=selftree.resultdef;
|
|
@@ -1981,6 +1990,9 @@ implementation
|
|
(methodpointer.resultdef.typ<>classrefdef)) then
|
|
(methodpointer.resultdef.typ<>classrefdef)) then
|
|
begin
|
|
begin
|
|
methodpointer:=cloadvmtaddrnode.create(methodpointer);
|
|
methodpointer:=cloadvmtaddrnode.create(methodpointer);
|
|
|
|
+ { no need to obtain the class ref by calling class(), sending
|
|
|
|
+ this message will initialize it if necessary }
|
|
|
|
+ tloadvmtaddrnode(methodpointer).forcall:=true;
|
|
firstpass(methodpointer);
|
|
firstpass(methodpointer);
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
@@ -2013,7 +2025,10 @@ implementation
|
|
vmttree:=methodpointer.getcopy;
|
|
vmttree:=methodpointer.getcopy;
|
|
{ Only a typenode can be passed when it is called with <class of xx>.create }
|
|
{ Only a typenode can be passed when it is called with <class of xx>.create }
|
|
if vmttree.nodetype=typen then
|
|
if vmttree.nodetype=typen then
|
|
- vmttree:=cloadvmtaddrnode.create(vmttree);
|
|
|
|
|
|
+ begin
|
|
|
|
+ vmttree:=cloadvmtaddrnode.create(vmttree);
|
|
|
|
+ tloadvmtaddrnode(vmttree).forcall:=true;
|
|
|
|
+ end;
|
|
end
|
|
end
|
|
else
|
|
else
|
|
begin
|
|
begin
|