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
b23d3f61
Commit
b23d3f61
authored
8 years ago
by
Lukas Stadler
Browse files
Options
Downloads
Patches
Plain Diff
additional profile in WrapArgumentsBaseNode
parent
8f657d6b
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/function/WrapArgumentBaseNode.java
+6
-1
6 additions, 1 deletion
...oracle/truffle/r/nodes/function/WrapArgumentBaseNode.java
with
6 additions
and
1 deletion
com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/WrapArgumentBaseNode.java
+
6
−
1
View file @
b23d3f61
...
...
@@ -23,6 +23,7 @@
package
com.oracle.truffle.r.nodes.function
;
import
com.oracle.truffle.api.profiles.BranchProfile
;
import
com.oracle.truffle.api.profiles.ValueProfile
;
import
com.oracle.truffle.r.runtime.data.RFunction
;
import
com.oracle.truffle.r.runtime.data.RLanguage
;
import
com.oracle.truffle.r.runtime.data.RS4Object
;
...
...
@@ -38,6 +39,7 @@ public abstract class WrapArgumentBaseNode extends RNode {
@Child
protected
RNode
operand
;
private
final
ValueProfile
argumentValueProfile
;
private
final
BranchProfile
everSeenVector
;
private
final
BranchProfile
everSeenLanguage
;
private
final
BranchProfile
everSeenFunction
;
...
...
@@ -49,6 +51,7 @@ public abstract class WrapArgumentBaseNode extends RNode {
protected
WrapArgumentBaseNode
(
RNode
operand
,
boolean
initProfiles
)
{
this
.
operand
=
operand
;
if
(
initProfiles
)
{
argumentValueProfile
=
ValueProfile
.
createClassProfile
();
everSeenVector
=
BranchProfile
.
create
();
everSeenLanguage
=
BranchProfile
.
create
();
everSeenFunction
=
BranchProfile
.
create
();
...
...
@@ -56,6 +59,7 @@ public abstract class WrapArgumentBaseNode extends RNode {
shareable
=
BranchProfile
.
create
();
nonShareable
=
BranchProfile
.
create
();
}
else
{
argumentValueProfile
=
null
;
everSeenVector
=
null
;
everSeenLanguage
=
null
;
everSeenFunction
=
null
;
...
...
@@ -65,7 +69,8 @@ public abstract class WrapArgumentBaseNode extends RNode {
}
}
protected
RShareable
getShareable
(
Object
result
)
{
protected
RShareable
getShareable
(
Object
initialResult
)
{
Object
result
=
argumentValueProfile
.
profile
(
initialResult
);
if
(
result
instanceof
RVector
)
{
everSeenVector
.
enter
();
return
(
RVector
)
result
;
...
...
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