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
9df4183e
Commit
9df4183e
authored
9 years ago
by
Lukas Stadler
Browse files
Options
Downloads
Patches
Plain Diff
resolve promises during RVN specialization
parent
e6394390
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/variables/ReadVariableNode.java
+17
-6
17 additions, 6 deletions
...le/truffle/r/nodes/access/variables/ReadVariableNode.java
with
17 additions
and
6 deletions
com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/variables/ReadVariableNode.java
+
17
−
6
View file @
9df4183e
...
@@ -311,16 +311,18 @@ public final class ReadVariableNode extends RNode implements RSyntaxNode, Visibi
...
@@ -311,16 +311,18 @@ public final class ReadVariableNode extends RNode implements RSyntaxNode, Visibi
private
static
final
class
DescriptorStableMatch
extends
DescriptorLevel
{
private
static
final
class
DescriptorStableMatch
extends
DescriptorLevel
{
private
final
StableValue
<
Object
>
valueAssumption
;
private
final
Assumption
assumption
;
private
final
Object
value
;
public
DescriptorStableMatch
(
StableValue
<
Object
>
valueAssumption
)
{
public
DescriptorStableMatch
(
Assumption
assumption
,
Object
value
)
{
this
.
valueAssumption
=
valueAssumption
;
this
.
assumption
=
assumption
;
this
.
value
=
value
;
}
}
@Override
@Override
public
Object
execute
(
VirtualFrame
frame
)
throws
InvalidAssumptionException
{
public
Object
execute
(
VirtualFrame
frame
)
throws
InvalidAssumptionException
{
valueA
ssumption
.
getAssumption
().
check
();
a
ssumption
.
check
();
return
value
Assumption
.
getValue
()
;
return
value
;
}
}
@Override
@Override
...
@@ -524,7 +526,16 @@ public final class ReadVariableNode extends RNode implements RSyntaxNode, Visibi
...
@@ -524,7 +526,16 @@ public final class ReadVariableNode extends RNode implements RSyntaxNode, Visibi
if
(
match
)
{
if
(
match
)
{
ReadVariableLevel
level
=
levels
.
get
(
levels
.
size
()
-
1
);
ReadVariableLevel
level
=
levels
.
get
(
levels
.
size
()
-
1
);
if
(
level
.
valueAssumption
!=
null
)
{
if
(
level
.
valueAssumption
!=
null
)
{
lastLevel
=
new
DescriptorStableMatch
(
level
.
valueAssumption
);
Assumption
assumption
=
level
.
valueAssumption
.
getAssumption
();
Object
value
=
level
.
valueAssumption
.
getValue
();
if
(
kind
!=
ReadKind
.
UnforcedSilentLocal
&&
value
instanceof
RPromise
)
{
RPromise
promise
=
(
RPromise
)
value
;
Object
promiseValue
=
PromiseHelperNode
.
evaluateSlowPath
(
frame
,
promise
);
if
(
promiseValue
instanceof
RFunction
)
{
value
=
promiseValue
;
}
}
lastLevel
=
new
DescriptorStableMatch
(
assumption
,
value
);
}
else
{
}
else
{
complex
=
true
;
complex
=
true
;
lastLevel
=
new
Match
(
level
.
slot
);
lastLevel
=
new
Match
(
level
.
slot
);
...
...
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