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
2f54e6dd
Commit
2f54e6dd
authored
10 years ago
by
Lukas Stadler
Browse files
Options
Downloads
Patches
Plain Diff
remove unnecessary use of AbsentFrameSlotNode in ReadVariableNonFrame
parent
94c48da6
Branches
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/access/ReadVariableNode.java
+4
-13
4 additions, 13 deletions
...c/com/oracle/truffle/r/nodes/access/ReadVariableNode.java
with
4 additions
and
13 deletions
com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/ReadVariableNode.java
+
4
−
13
View file @
2f54e6dd
...
...
@@ -31,7 +31,6 @@ import com.oracle.truffle.api.frame.*;
import
com.oracle.truffle.api.nodes.*
;
import
com.oracle.truffle.api.source.*
;
import
com.oracle.truffle.r.nodes.*
;
import
com.oracle.truffle.r.nodes.access.FrameSlotNode.AbsentFrameSlotNode
;
import
com.oracle.truffle.r.nodes.access.ReadVariableNodeFactory.BuiltinFunctionVariableNodeFactory
;
import
com.oracle.truffle.r.nodes.access.ReadVariableNodeFactory.ReadAndCopySuperVariableNodeFactory
;
import
com.oracle.truffle.r.nodes.access.ReadVariableNodeFactory.ReadLocalVariableNodeFactory
;
...
...
@@ -336,31 +335,23 @@ public abstract class ReadVariableNode extends RNode implements VisibilityContro
@Child
private
ReadVariableNode
readNode
;
@Child
private
UnresolvedReadVariableNode
unresolvedNode
;
@Children
private
final
A
bsentFrameSlotNode
[]
absentFrameSlot
Node
s
;
private
final
A
ssumption
[]
absentFrameSlot
Assumption
s
;
private
final
Symbol
symbol
;
ReadVariableNonFrameNode
(
List
<
Assumption
>
assumptions
,
ReadVariableNode
readNode
,
UnresolvedReadVariableNode
unresolvedNode
,
Symbol
symbol
)
{
this
.
readNode
=
readNode
;
this
.
unresolvedNode
=
unresolvedNode
;
this
.
absentFrameSlot
Nodes
=
wrap
Assumption
s
(
assumptions
);
this
.
absentFrameSlot
Assumptions
=
assumptions
.
toArray
(
new
Assumption
[
assumptions
.
size
()]
);
this
.
symbol
=
symbol
;
}
private
AbsentFrameSlotNode
[]
wrapAssumptions
(
List
<
Assumption
>
assumptions
)
{
AbsentFrameSlotNode
[]
nodes
=
new
AbsentFrameSlotNode
[
assumptions
.
size
()];
for
(
int
i
=
0
;
i
<
assumptions
.
size
();
i
++)
{
nodes
[
i
]
=
new
AbsentFrameSlotNode
(
assumptions
.
get
(
i
),
symbol
);
}
return
nodes
;
}
@ExplodeLoop
@Override
public
Object
execute
(
VirtualFrame
frame
)
{
controlVisibility
();
try
{
for
(
int
i
=
0
;
i
<
absentFrameSlotNodes
.
length
;
i
++
)
{
a
bsentFrameSlotNodes
[
i
].
getA
ssumption
()
.
check
();
for
(
Assumption
assumption
:
absentFrameSlotAssumptions
)
{
assumption
.
check
();
}
}
catch
(
InvalidAssumptionException
e
)
{
return
replace
(
unresolvedNode
).
execute
(
frame
);
...
...
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