Skip to content

Commit c40cc6f

Browse files
committed
Remove static in eachLong specialization
1 parent 3d6e3a7 commit c40cc6f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/main/java/org/truffleruby/core/range/RangeNodes.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import com.oracle.truffle.api.dsl.GenerateNodeFactory;
1414
import com.oracle.truffle.api.dsl.GenerateUncached;
1515
import com.oracle.truffle.api.dsl.NeverDefault;
16-
import com.oracle.truffle.api.nodes.Node;
1716
import com.oracle.truffle.api.profiles.InlinedConditionProfile;
1817
import com.oracle.truffle.api.profiles.InlinedLoopConditionProfile;
1918
import com.oracle.truffle.api.profiles.LoopConditionProfile;
@@ -127,25 +126,24 @@ protected RubyIntRange eachInt(RubyIntRange range, RubyProc block,
127126
}
128127

129128
@Specialization
130-
protected static RubyLongRange eachLong(RubyLongRange range, RubyProc block,
129+
protected RubyLongRange eachLong(RubyLongRange range, RubyProc block,
131130
@Shared @Cached InlinedConditionProfile excludedEndProfile,
132131
@Exclusive @Cached InlinedLoopConditionProfile loopProfile,
133-
@Cached @Shared CallBlockNode yieldNode,
134-
@Bind("this") Node node) {
132+
@Cached @Shared CallBlockNode yieldNode) {
135133
final long exclusiveEnd;
136-
if (excludedEndProfile.profile(node, range.excludedEnd)) {
134+
if (excludedEndProfile.profile(this, range.excludedEnd)) {
137135
exclusiveEnd = range.end;
138136
} else {
139137
exclusiveEnd = range.end + 1;
140138
}
141139

142140
long n = range.begin;
143141
try {
144-
for (; loopProfile.inject(node, n < exclusiveEnd); n++) {
142+
for (; loopProfile.inject(this, n < exclusiveEnd); n++) {
145143
yieldNode.yield(block, n);
146144
}
147145
} finally {
148-
profileAndReportLoopCount(node, loopProfile, n - range.begin);
146+
profileAndReportLoopCount(this, loopProfile, n - range.begin);
149147
}
150148

151149
return range;

0 commit comments

Comments
 (0)