|
@@ -4589,17 +4589,9 @@ implementation
|
|
exit(true);
|
|
exit(true);
|
|
|
|
|
|
{ Value parameters of which we know they are modified by definition
|
|
{ Value parameters of which we know they are modified by definition
|
|
- have to be copied to a temp; the same goes for cases of "x:=f(x)"
|
|
|
|
- where x is passed as value parameter to f(), at least if we
|
|
|
|
- optimized invocation by setting the funcretnode to x to avoid an
|
|
|
|
- assignment afterwards (since x may be read inside the function after
|
|
|
|
- it modified result==x) }
|
|
|
|
|
|
+ have to be copied to a temp }
|
|
if (para.parasym.varspez=vs_value) and
|
|
if (para.parasym.varspez=vs_value) and
|
|
- (not(para.parasym.varstate in [vs_initialised,vs_declared,vs_read]) or
|
|
|
|
- (assigned(aktassignmentnode) and
|
|
|
|
- (aktassignmentnode.right=self) and
|
|
|
|
- (nf_assign_done_in_right in aktassignmentnode.flags) and
|
|
|
|
- actualtargetnode(@aktassignmentnode.left)^.isequal(actualtargetnode(@para.left)^))) then
|
|
|
|
|
|
+ not(para.parasym.varstate in [vs_initialised,vs_declared,vs_read]) then
|
|
exit(true);
|
|
exit(true);
|
|
|
|
|
|
{ the compiler expects that it can take the address of parameters passed by reference in
|
|
{ the compiler expects that it can take the address of parameters passed by reference in
|