Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QueryR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Lopez
QueryR
Commits
3a94886d
Commit
3a94886d
authored
8 years ago
by
Lukas Stadler
Browse files
Options
Downloads
Patches
Plain Diff
do not re-evaluate rhs upon fallback to generic in special replacement
parent
9f726e00
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/ReplacementNode.java
+11
-7
11 additions, 7 deletions
...c/com/oracle/truffle/r/nodes/control/ReplacementNode.java
with
11 additions
and
7 deletions
com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/ReplacementNode.java
+
11
−
7
View file @
3a94886d
...
...
@@ -237,21 +237,21 @@ abstract class ReplacementNode extends OperatorNode {
@Override
public
Object
execute
(
VirtualFrame
frame
)
{
Object
rhsValue
=
rhs
.
execute
(
frame
);
storeRhs
.
execute
(
frame
,
rhsValue
);
try
{
Object
rhsValue
=
rhs
.
execute
(
frame
);
storeRhs
.
execute
(
frame
,
rhsValue
);
// Note: the very last call is the actual assignment, e.g. [[<-, if this call's
// argument is shared, it bails out. Moreover, if that call's argument is not
// shared, it could not be extracted from a shared container (list), so we should be
// OK with not calling any other update function and just update the value directly.
replaceCall
.
execute
(
frame
);
removeRhs
.
execute
(
frame
);
visibility
.
execute
(
frame
,
false
);
return
rhsValue
;
}
catch
(
FullCallNeededException
|
RecursiveSpecialBailout
e
)
{
CompilerDirectives
.
transferToInterpreterAndInvalidate
();
return
replace
(
createGenericReplacement
(
getLazySourceSection
(),
operator
,
target
,
lhs
,
rhs
,
calls
,
targetVarName
,
isSuper
,
tempNamesStartIndex
)).
execute
(
frame
);
return
replace
(
createGenericReplacement
(
getLazySourceSection
(),
operator
,
target
,
lhs
,
rhs
,
calls
,
targetVarName
,
isSuper
,
tempNamesStartIndex
)).
execute
(
frame
,
rhsValue
);
}
removeRhs
.
execute
(
frame
);
visibility
.
execute
(
frame
,
false
);
return
rhsValue
;
}
@Override
...
...
@@ -292,7 +292,11 @@ abstract class ReplacementNode extends OperatorNode {
@Override
@ExplodeLoop
public
Object
execute
(
VirtualFrame
frame
)
{
Object
rhsValue
=
rhs
.
execute
(
frame
);
return
execute
(
frame
,
rhs
.
execute
(
frame
));
}
@ExplodeLoop
public
Object
execute
(
VirtualFrame
frame
,
Object
rhsValue
)
{
storeRhs
.
execute
(
frame
,
rhsValue
);
targetTmpWrite
.
execute
(
frame
,
target
.
execute
(
frame
));
for
(
RNode
update
:
updates
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment