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
a7119692
Commit
a7119692
authored
10 years ago
by
Gero Leinemann
Browse files
Options
Downloads
Patches
Plain Diff
Added BinaryConditionProfile to ResolvePromiseNode
parent
1a5b4ac8
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
+3
-1
3 additions, 1 deletion
...c/com/oracle/truffle/r/nodes/access/ReadVariableNode.java
with
3 additions
and
1 deletion
com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/ReadVariableNode.java
+
3
−
1
View file @
a7119692
...
@@ -215,6 +215,8 @@ public abstract class ReadVariableNode extends RNode implements VisibilityContro
...
@@ -215,6 +215,8 @@ public abstract class ReadVariableNode extends RNode implements VisibilityContro
return
value
;
return
value
;
}
}
private
final
ConditionProfile
isPromiseProfile
=
ConditionProfile
.
createBinaryProfile
();
/**
/**
* Catch all calls to {@link #execute(VirtualFrame, MaterializedFrame)} ({@code final} so it
* Catch all calls to {@link #execute(VirtualFrame, MaterializedFrame)} ({@code final} so it
* is not overridden by the annotation processor) and forward them to {@link #getReadNode()}
* is not overridden by the annotation processor) and forward them to {@link #getReadNode()}
...
@@ -224,7 +226,7 @@ public abstract class ReadVariableNode extends RNode implements VisibilityContro
...
@@ -224,7 +226,7 @@ public abstract class ReadVariableNode extends RNode implements VisibilityContro
@Override
@Override
public
final
Object
execute
(
VirtualFrame
frame
,
MaterializedFrame
enclosingFrame
)
{
public
final
Object
execute
(
VirtualFrame
frame
,
MaterializedFrame
enclosingFrame
)
{
Object
obj
=
getReadNode
().
execute
(
frame
,
enclosingFrame
);
Object
obj
=
getReadNode
().
execute
(
frame
,
enclosingFrame
);
if
(
isPromise
(
obj
))
{
if
(
isPromiseProfile
.
profile
(
isPromise
(
obj
))
)
{
return
doValue
(
frame
,
(
RPromise
)
obj
);
return
doValue
(
frame
,
(
RPromise
)
obj
);
}
}
return
obj
;
return
obj
;
...
...
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