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
5fdc237d
Commit
5fdc237d
authored
9 years ago
by
Lukas Stadler
Browse files
Options
Downloads
Patches
Plain Diff
do not store reference to WhileNode in WhileRepeatingNode
parent
9abc9048
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/control/WhileNode.java
+7
-7
7 additions, 7 deletions
...des/src/com/oracle/truffle/r/nodes/control/WhileNode.java
with
7 additions
and
7 deletions
com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/WhileNode.java
+
7
−
7
View file @
5fdc237d
...
...
@@ -45,7 +45,7 @@ public final class WhileNode extends AbstractLoopNode implements RSyntaxNode, Vi
private
final
boolean
isRepeat
;
private
WhileNode
(
RSyntaxNode
condition
,
RSyntaxNode
body
,
boolean
isRepeat
)
{
this
.
loop
=
Truffle
.
getRuntime
().
createLoopNode
(
new
WhileRepeatingNode
(
this
,
ConvertBooleanNode
.
create
(
condition
),
body
.
asRNode
()));
this
.
loop
=
Truffle
.
getRuntime
().
createLoopNode
(
new
WhileRepeatingNode
(
ConvertBooleanNode
.
create
(
condition
),
body
.
asRNode
()));
this
.
isRepeat
=
isRepeat
;
}
...
...
@@ -122,11 +122,7 @@ public final class WhileNode extends AbstractLoopNode implements RSyntaxNode, Vi
private
final
BranchProfile
breakBlock
=
BranchProfile
.
create
();
private
final
BranchProfile
nextBlock
=
BranchProfile
.
create
();
// used as RSyntaxNode
private
final
WhileNode
whileNode
;
public
WhileRepeatingNode
(
WhileNode
whileNode
,
ConvertBooleanNode
condition
,
RNode
body
)
{
this
.
whileNode
=
whileNode
;
public
WhileRepeatingNode
(
ConvertBooleanNode
condition
,
RNode
body
)
{
this
.
condition
=
condition
;
this
.
body
=
body
;
// pre-initialize the profile so that loop exits to not deoptimize
...
...
@@ -160,7 +156,11 @@ public final class WhileNode extends AbstractLoopNode implements RSyntaxNode, Vi
@Override
protected
RSyntaxNode
getRSyntaxNode
()
{
return
whileNode
;
Node
current
=
this
;
while
(!(
current
instanceof
WhileNode
))
{
current
=
current
.
getParent
();
}
return
(
WhileNode
)
current
;
}
@Override
...
...
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