mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 13:49:39 +02:00
* typecheckpass before calling do_simplify, as the siplify methods
assume that the resultdefs are available git-svn-id: trunk@9652 -
This commit is contained in:
parent
5e95516323
commit
482b83c3cb
@ -1070,7 +1070,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
{ Need to use a hack here to prevent the parameters from being copied.
|
{ Need to use a hack here to prevent the parameters from being copied.
|
||||||
The parameters must be copied between callinitblock/callcleanupblock because
|
The parameters must be copied between callinitblock/callcleanupblock because
|
||||||
the can reference methodpointer }
|
they can reference methodpointer }
|
||||||
oldleft:=left;
|
oldleft:=left;
|
||||||
left:=nil;
|
left:=nil;
|
||||||
n:=tcallnode(inherited dogetcopy);
|
n:=tcallnode(inherited dogetcopy);
|
||||||
@ -2661,10 +2661,17 @@ implementation
|
|||||||
gen_hidden_parameters;
|
gen_hidden_parameters;
|
||||||
|
|
||||||
{ Remove useless nodes from init/final blocks }
|
{ Remove useless nodes from init/final blocks }
|
||||||
|
{ (simplify depends on typecheck info) }
|
||||||
if assigned(callinitblock) then
|
if assigned(callinitblock) then
|
||||||
dosimplify(callinitblock);
|
begin
|
||||||
|
typecheckpass(callinitblock);
|
||||||
|
dosimplify(callinitblock);
|
||||||
|
end;
|
||||||
if assigned(callcleanupblock) then
|
if assigned(callcleanupblock) then
|
||||||
dosimplify(callcleanupblock);
|
begin
|
||||||
|
typecheckpass(callcleanupblock);
|
||||||
|
dosimplify(callcleanupblock);
|
||||||
|
end;
|
||||||
|
|
||||||
{ Continue with checking a normal call or generate the inlined code }
|
{ Continue with checking a normal call or generate the inlined code }
|
||||||
if cnf_do_inline in callnodeflags then
|
if cnf_do_inline in callnodeflags then
|
||||||
@ -3167,6 +3174,7 @@ implementation
|
|||||||
{ consider it must not be inlined if called
|
{ consider it must not be inlined if called
|
||||||
again inside the args or itself }
|
again inside the args or itself }
|
||||||
exclude(procdefinition.procoptions,po_inline);
|
exclude(procdefinition.procoptions,po_inline);
|
||||||
|
typecheckpass(inlineblock);
|
||||||
dosimplify(inlineblock);
|
dosimplify(inlineblock);
|
||||||
firstpass(inlineblock);
|
firstpass(inlineblock);
|
||||||
include(procdefinition.procoptions,po_inline);
|
include(procdefinition.procoptions,po_inline);
|
||||||
|
Loading…
Reference in New Issue
Block a user