Skip to content

Commit 80c9267

Browse files
author
Nicolas Laurent
committed
replace DispatchNode.create(PRIVATE) with DispatchNode.create()
1 parent ad26094 commit 80c9267

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+74
-121
lines changed

src/main/java/org/truffleruby/builtins/EnumeratorSizeNode.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import com.oracle.truffle.api.frame.VirtualFrame;
2121
import com.oracle.truffle.api.profiles.ConditionProfile;
2222

23-
import static org.truffleruby.language.dispatch.DispatchConfiguration.PRIVATE;
2423

2524
public class EnumeratorSizeNode extends RubyContextSourceNode {
2625

@@ -45,7 +44,7 @@ public Object execute(VirtualFrame frame) {
4544
if (noBlockProfile.profile(block == null)) {
4645
if (toEnumWithSize == null) {
4746
CompilerDirectives.transferToInterpreterAndInvalidate();
48-
toEnumWithSize = insert(DispatchNode.create(PRIVATE));
47+
toEnumWithSize = insert(DispatchNode.create());
4948
}
5049

5150
final Object self = RubyArguments.getSelf(frame);

src/main/java/org/truffleruby/builtins/ReturnEnumeratorIfNoBlockNode.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import com.oracle.truffle.api.frame.VirtualFrame;
2323
import com.oracle.truffle.api.profiles.ConditionProfile;
2424

25-
import static org.truffleruby.language.dispatch.DispatchConfiguration.PRIVATE;
2625

2726
public class ReturnEnumeratorIfNoBlockNode extends RubyContextSourceNode {
2827

@@ -44,7 +43,7 @@ public Object execute(VirtualFrame frame) {
4443
if (noBlockProfile.profile(block == null)) {
4544
if (toEnumNode == null) {
4645
CompilerDirectives.transferToInterpreterAndInvalidate();
47-
toEnumNode = insert(DispatchNode.create(PRIVATE));
46+
toEnumNode = insert(DispatchNode.create());
4847
}
4948

5049
if (methodSymbol == null) {

src/main/java/org/truffleruby/cext/CExtNodes.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@
112112
import com.oracle.truffle.api.profiles.ConditionProfile;
113113
import com.oracle.truffle.api.source.SourceSection;
114114

115-
import static org.truffleruby.language.dispatch.DispatchConfiguration.PRIVATE;
116115

117116
@CoreModule("Truffle::CExt")
118117
public class CExtNodes {
@@ -1101,7 +1100,7 @@ public abstract static class ClassNewNode extends CoreMethodArrayArgumentsNode {
11011100
protected RubyClass classNew(RubyClass superclass) {
11021101
if (allocateNode == null) {
11031102
CompilerDirectives.transferToInterpreterAndInvalidate();
1104-
allocateNode = insert(DispatchNode.create(PRIVATE));
1103+
allocateNode = insert(DispatchNode.create());
11051104
initializeClassNode = insert(InitializeClassNodeGen.create(false));
11061105
}
11071106

@@ -1154,7 +1153,7 @@ protected Object debug(Object... objects) {
11541153
private RubyString callToS(Object object) {
11551154
if (toSCall == null) {
11561155
CompilerDirectives.transferToInterpreterAndInvalidate();
1157-
toSCall = insert(DispatchNode.create(PRIVATE));
1156+
toSCall = insert(DispatchNode.create());
11581157
}
11591158

11601159
return (RubyString) toSCall.call(object, "to_s");

src/main/java/org/truffleruby/core/array/ArrayNodes.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import static org.truffleruby.core.array.ArrayHelpers.setSize;
1313
import static org.truffleruby.core.array.ArrayHelpers.setStoreAndSize;
1414
import static org.truffleruby.language.dispatch.DispatchNode.PUBLIC;
15-
import static org.truffleruby.language.dispatch.DispatchConfiguration.PRIVATE;
1615

1716
import java.util.Arrays;
1817

@@ -1215,7 +1214,7 @@ public boolean respondToToAry(Object object) {
12151214
protected Object callToAry(Object object) {
12161215
if (toAryNode == null) {
12171216
CompilerDirectives.transferToInterpreterAndInvalidate();
1218-
toAryNode = insert(DispatchNode.create(PRIVATE));
1217+
toAryNode = insert(DispatchNode.create());
12191218
}
12201219
return toAryNode.call(object, "to_ary");
12211220
}

src/main/java/org/truffleruby/core/basicobject/BasicObjectNodes.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@
7676
import com.oracle.truffle.api.object.Shape;
7777
import com.oracle.truffle.api.profiles.ConditionProfile;
7878

79-
import static org.truffleruby.language.dispatch.DispatchConfiguration.PRIVATE;
80-
8179

8280
@CoreModule(value = "BasicObject", isClass = true)
8381
public abstract class BasicObjectNodes {
@@ -96,7 +94,7 @@ protected boolean not(Object value,
9694
@CoreMethod(names = "!=", required = 1)
9795
public abstract static class NotEqualNode extends CoreMethodArrayArgumentsNode {
9896

99-
@Child private DispatchNode equalNode = DispatchNode.create(PRIVATE);
97+
@Child private DispatchNode equalNode = DispatchNode.create();
10098
@Child private BooleanCastNode booleanCastNode = BooleanCastNode.create();
10199

102100
@Specialization

src/main/java/org/truffleruby/core/cast/NumericToFloatNode.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import com.oracle.truffle.api.dsl.Specialization;
2222
import com.oracle.truffle.api.profiles.BranchProfile;
2323

24-
import static org.truffleruby.language.dispatch.DispatchConfiguration.PRIVATE;
2524

2625
/** Casts a value into a Ruby Float (double). */
2726
public abstract class NumericToFloatNode extends RubyContextNode {
@@ -34,7 +33,7 @@ public abstract class NumericToFloatNode extends RubyContextNode {
3433
private Object callToFloat(RubyDynamicObject value) {
3534
if (toFloatCallNode == null) {
3635
CompilerDirectives.transferToInterpreterAndInvalidate();
37-
toFloatCallNode = insert(DispatchNode.create(PRIVATE));
36+
toFloatCallNode = insert(DispatchNode.create());
3837
}
3938
return toFloatCallNode.call(value, "to_f");
4039
}

src/main/java/org/truffleruby/core/cast/ToAryNode.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
import com.oracle.truffle.api.dsl.Specialization;
2222
import com.oracle.truffle.api.profiles.BranchProfile;
2323

24-
import static org.truffleruby.language.dispatch.DispatchConfiguration.PRIVATE;
25-
2624

2725
@NodeChild(value = "child", type = RubyNode.class)
2826
public abstract class ToAryNode extends RubyContextSourceNode {
@@ -45,7 +43,7 @@ protected RubyArray coerceObject(Object object,
4543
@Cached BranchProfile errorProfile) {
4644
if (toAryNode == null) {
4745
CompilerDirectives.transferToInterpreterAndInvalidate();
48-
toAryNode = insert(DispatchNode.create(PRIVATE));
46+
toAryNode = insert(DispatchNode.create());
4947
}
5048

5149
final Object coerced;

src/main/java/org/truffleruby/core/cast/ToFNode.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import com.oracle.truffle.api.dsl.Specialization;
2121
import com.oracle.truffle.api.profiles.BranchProfile;
2222

23-
import static org.truffleruby.language.dispatch.DispatchConfiguration.PRIVATE;
2423

2524
public abstract class ToFNode extends RubyContextNode {
2625

@@ -62,7 +61,7 @@ protected double coerceDynamicObject(RubyDynamicObject object,
6261
private double coerceObject(Object object, BranchProfile errorProfile) {
6362
if (toFNode == null) {
6463
CompilerDirectives.transferToInterpreterAndInvalidate();
65-
toFNode = insert(DispatchNode.create(PRIVATE));
64+
toFNode = insert(DispatchNode.create());
6665
}
6766

6867
final Object coerced;

src/main/java/org/truffleruby/core/cast/ToStringOrSymbolNode.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import com.oracle.truffle.api.frame.VirtualFrame;
2424
import com.oracle.truffle.api.profiles.BranchProfile;
2525

26-
import static org.truffleruby.language.dispatch.DispatchConfiguration.PRIVATE;
2726

2827
/** Convert objects to a String by calling #to_str, but leave existing Strings or Symbols as they are. */
2928
@NodeChild(value = "child", type = RubyNode.class)
@@ -71,7 +70,7 @@ protected RubyString coerceObject(VirtualFrame frame, Object object,
7170
private Object callToStr(Object object) {
7271
if (toStr == null) {
7372
CompilerDirectives.transferToInterpreterAndInvalidate();
74-
toStr = insert(DispatchNode.create(PRIVATE));
73+
toStr = insert(DispatchNode.create());
7574
}
7675
return toStr.call(object, "to_str");
7776
}

src/main/java/org/truffleruby/core/exception/ErrnoErrorNode.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import org.truffleruby.language.dispatch.DispatchNode;
2121
import org.truffleruby.platform.ErrnoDescriptions;
2222

23-
import static org.truffleruby.language.dispatch.DispatchConfiguration.PRIVATE;
2423

2524
public abstract class ErrnoErrorNode extends RubyContextNode {
2625

@@ -58,7 +57,7 @@ protected RubySystemCallError errnoError(int errno, RubyString extraMessage, Bac
5857
private RubyString formatMessage(Object errnoDescription, int errno, RubyString extraMessage) {
5958
if (formatMessageNode == null) {
6059
CompilerDirectives.transferToInterpreterAndInvalidate();
61-
formatMessageNode = insert(DispatchNode.create(PRIVATE));
60+
formatMessageNode = insert(DispatchNode.create());
6261
}
6362
return (RubyString) formatMessageNode.call(
6463
getContext().getCoreLibrary().truffleExceptionOperationsModule,

0 commit comments

Comments
 (0)