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
6c1fd191
Commit
6c1fd191
authored
6 years ago
by
Stepan Sindelar
Browse files
Options
Downloads
Plain Diff
[GR-11300] Fix: getNumberedFrame with 0 works even in interop context.
PullRequest: fastr/1658
parents
4f0b793e
ffc218c5
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.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FrameFunctions.java
+6
-0
6 additions, 0 deletions
...m/oracle/truffle/r/nodes/builtin/base/FrameFunctions.java
with
6 additions
and
0 deletions
com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FrameFunctions.java
+
6
−
0
View file @
6c1fd191
...
...
@@ -106,6 +106,7 @@ public class FrameFunctions {
public
static
final
class
FrameHelper
extends
RBaseNode
{
private
final
ConditionProfile
currentFrameProfile
=
ConditionProfile
.
createBinaryProfile
();
private
final
ConditionProfile
globalFrameProfile
=
ConditionProfile
.
createBinaryProfile
();
/**
* Determine the frame access mode of a subclass. The rule of thumb is that subclasses that
...
...
@@ -187,6 +188,11 @@ public class FrameFunctions {
protected
Frame
getNumberedFrame
(
VirtualFrame
frame
,
int
actualFrame
,
boolean
materialize
)
{
if
(
currentFrameProfile
.
profile
(
RArguments
.
getDepth
(
frame
)
==
actualFrame
))
{
return
materialize
?
frame
.
materialize
()
:
frame
;
}
else
if
(
globalFrameProfile
.
profile
(
actualFrame
==
0
))
{
// Note: this is optimization and necessity, because in the case of invocation of R
// function from another "master" language, there will be no actual Truffle frame
// for global environment
return
REnvironment
.
globalEnv
().
getFrame
();
}
else
{
if
(
RArguments
.
getDepth
(
frame
)
-
actualFrame
<=
ITERATE_LEVELS
)
{
Frame
current
=
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