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
fe0f565f
Commit
fe0f565f
authored
6 years ago
by
Tomas Stupka
Browse files
Options
Downloads
Plain Diff
[GR-10857] Can't read env binding after .fastr.context.spawn(...).
PullRequest: fastr/1604
parents
3b572a0c
2bc503b2
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/function/RCallNode.java
+16
-13
16 additions, 13 deletions
...es/src/com/oracle/truffle/r/nodes/function/RCallNode.java
with
16 additions
and
13 deletions
com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/RCallNode.java
+
16
−
13
View file @
fe0f565f
...
...
@@ -306,17 +306,7 @@ public abstract class RCallNode extends RCallBaseNode implements RSyntaxNode, RS
try
{
boolean
isFieldAccess
=
builtin
.
isFieldAccess
();
if
(
internalDispatchCall
==
null
)
{
CompilerDirectives
.
transferToInterpreterAndInvalidate
();
AlteredArguments
alteredArguments
=
null
;
if
(
isFieldAccess
)
{
RSyntaxNode
[]
newArgs
=
Arrays
.
copyOf
(
arguments
,
arguments
.
length
);
newArgs
[
1
]
=
RContext
.
getASTBuilder
().
constant
(
newArgs
[
1
].
getSourceSection
(),
CallUtils
.
unevaluatedArgAsFieldName
(
this
,
newArgs
[
1
]));
// we know that there are no varargs in the signature, but this RCallNode
// instance could have been confused by lookup of "..." as the field, in which
// case it would think it should lookup varargs.
alteredArguments
=
new
AlteredArguments
(
newArgs
,
new
int
[
0
]);
}
internalDispatchCall
=
insert
(
FunctionDispatchNodeGen
.
create
(
this
,
alteredArguments
,
false
,
slot
));
createInternDispatchCall
(
isFieldAccess
,
slot
);
}
if
(
isAttributableProfile
.
profile
(
dispatchObject
instanceof
RAttributeStorage
)
&&
isS4Profile
.
profile
(((
RAttributeStorage
)
dispatchObject
).
isS4
()))
{
...
...
@@ -348,8 +338,7 @@ public abstract class RCallNode extends RCallBaseNode implements RSyntaxNode, RS
resultFunction
=
function
;
}
if
(
internalDispatchCall
==
null
||
internalDispatchCall
.
tempFrameSlot
!=
slot
)
{
CompilerDirectives
.
transferToInterpreterAndInvalidate
();
internalDispatchCall
=
insert
(
FunctionDispatchNodeGen
.
create
(
this
,
false
,
slot
));
createInternDispatchCall
(
isFieldAccess
,
slot
);
}
return
internalDispatchCall
.
execute
(
frame
,
resultFunction
,
lookupVarArgs
(
frame
,
isFieldAccess
),
s3Args
,
null
);
}
finally
{
...
...
@@ -357,6 +346,20 @@ public abstract class RCallNode extends RCallBaseNode implements RSyntaxNode, RS
}
}
private
void
createInternDispatchCall
(
boolean
isFieldAccess
,
FrameSlot
slot
)
{
CompilerDirectives
.
transferToInterpreterAndInvalidate
();
AlteredArguments
alteredArguments
=
null
;
if
(
isFieldAccess
)
{
RSyntaxNode
[]
newArgs
=
Arrays
.
copyOf
(
arguments
,
arguments
.
length
);
newArgs
[
1
]
=
RContext
.
getASTBuilder
().
constant
(
newArgs
[
1
].
getSourceSection
(),
CallUtils
.
unevaluatedArgAsFieldName
(
this
,
newArgs
[
1
]));
// we know that there are no varargs in the signature, but this RCallNode
// instance could have been confused by lookup of "..." as the field, in which
// case it would think it should lookup varargs.
alteredArguments
=
new
AlteredArguments
(
newArgs
,
new
int
[
0
]);
}
internalDispatchCall
=
insert
(
FunctionDispatchNodeGen
.
create
(
this
,
alteredArguments
,
false
,
slot
));
}
@Specialization
(
guards
=
{
"explicitArgs != null"
,
"isInternalGenericDispatch(function)"
})
public
Object
callInternalGenericExplicit
(
VirtualFrame
frame
,
RFunction
function
,
@Cached
(
"create()"
)
ClassHierarchyNode
classHierarchyNode
,
...
...
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