Skip to content

Commit 3a24a13

Browse files
committed
Removing RubySourceNode
1 parent 9d53516 commit 3a24a13

File tree

5 files changed

+7
-58
lines changed

5 files changed

+7
-58
lines changed

src/main/java/org/truffleruby/core/binding/BindingNodes.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import java.util.Set;
1616

1717
import com.oracle.truffle.api.CompilerDirectives;
18-
import com.oracle.truffle.api.dsl.GenerateNodeFactory;
1918
import com.oracle.truffle.api.dsl.GenerateUncached;
2019
import com.oracle.truffle.api.dsl.Idempotent;
2120
import com.oracle.truffle.api.dsl.NeverDefault;
@@ -38,7 +37,6 @@
3837
import org.truffleruby.language.RubyBaseNode;
3938
import org.truffleruby.language.RubyBaseNodeWithExecute;
4039
import org.truffleruby.language.RubyNode;
41-
import org.truffleruby.language.RubySourceNode;
4240
import org.truffleruby.language.arguments.RubyArguments;
4341
import org.truffleruby.language.control.RaiseException;
4442
import org.truffleruby.language.locals.FindDeclarationVariableNodes;

src/main/java/org/truffleruby/interop/InteropNodes.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import java.util.Map;
1919

2020
import com.oracle.truffle.api.dsl.Bind;
21-
import com.oracle.truffle.api.dsl.NeverDefault;
2221
import com.oracle.truffle.api.frame.VirtualFrame;
2322
import com.oracle.truffle.api.interop.ExceptionType;
2423
import com.oracle.truffle.api.interop.NodeLibrary;
@@ -50,7 +49,6 @@
5049
import org.truffleruby.language.RubyBaseNode;
5150
import org.truffleruby.language.RubyGuards;
5251
import org.truffleruby.language.RubyNode;
53-
import org.truffleruby.language.RubySourceNode;
5452
import org.truffleruby.language.control.RaiseException;
5553
import org.truffleruby.language.dispatch.DispatchNode;
5654
import org.truffleruby.language.library.RubyStringLibrary;
@@ -65,7 +63,6 @@
6563
import com.oracle.truffle.api.dsl.Cached;
6664
import com.oracle.truffle.api.dsl.Cached.Shared;
6765
import com.oracle.truffle.api.dsl.CreateCast;
68-
import com.oracle.truffle.api.dsl.GenerateNodeFactory;
6966
import com.oracle.truffle.api.dsl.GenerateUncached;
7067
import com.oracle.truffle.api.dsl.ImportStatic;
7168
import com.oracle.truffle.api.dsl.NodeChild;

src/main/java/org/truffleruby/language/RubyNode.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242

4343
/** RubyNode has source, execute, and is instrument-able. If there is no need for source and instrument-able,
4444
* {@link RubyBaseNode} or {@link RubyBaseNodeWithExecute} should be used instead to save footprint. RubyNode does not
45-
* have any fields which would prevent using @GenerateUncached. It should never be subclassed directly, either use
46-
* {@link RubyContextSourceNode} (cannot be uncached, but avoids the DSL generating 6 field accessors for each subclass)
47-
* or {@link RubySourceNode} (can be uncached). SourceRubyNode is not defined since there was no use for it for now. */
45+
* have any fields which would prevent using @GenerateUncached. It should never be subclassed directly, use
46+
* {@link RubyContextSourceNode} (cannot be uncached, but avoids the DSL generating 6 field accessors for each
47+
* subclass). SourceRubyNode is not defined since there was no use for it for now. */
4848
@GenerateWrapper
4949
@ExportLibrary(NodeLibrary.class)
5050
public abstract class RubyNode extends RubyBaseNodeWithExecute implements InstrumentableNode {

src/main/java/org/truffleruby/language/RubySourceNode.java

Lines changed: 0 additions & 43 deletions
This file was deleted.

src/processor/java/org/truffleruby/processor/CoreModuleProcessor.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ public class CoreModuleProcessor extends TruffleRubyProcessor {
9898
TypeMirror primitiveNodeType;
9999
TypeMirror coreMethodNodeType;
100100
TypeMirror alwaysInlinedMethodNodeType;
101-
TypeMirror rubySourceNodeType;
102101

103102
@Override
104103
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnvironment) {
@@ -115,7 +114,6 @@ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment
115114
coreMethodNodeType = elementUtils.getTypeElement("org.truffleruby.builtins.CoreMethodNode").asType();
116115
alwaysInlinedMethodNodeType = elementUtils
117116
.getTypeElement("org.truffleruby.core.inlined.AlwaysInlinedMethodNode").asType();
118-
rubySourceNodeType = elementUtils.getTypeElement("org.truffleruby.language.RubySourceNode").asType();
119117

120118

121119
if (!annotations.isEmpty()) {
@@ -200,10 +198,9 @@ private void processCoreModule(TypeElement coreModuleElement) throws IOException
200198
: null;
201199
coreModuleChecks.checks(coreMethod.lowerFixnum(), checkAmbiguous, klass, needsSelf);
202200
if (!inherits(e.asType(), coreMethodNodeType) &&
203-
!inherits(e.asType(), alwaysInlinedMethodNodeType) &&
204-
!inherits(e.asType(), rubySourceNodeType)) {
201+
!inherits(e.asType(), alwaysInlinedMethodNodeType)) {
205202
error(e +
206-
" should inherit from CoreMethodArrayArgumentsNode, CoreMethodNode, AlwaysInlinedMethodNode or RubySourceNode",
203+
" should inherit from CoreMethodArrayArgumentsNode, CoreMethodNode, AlwaysInlinedMethodNode",
207204
e);
208205
}
209206
processCoreMethod(stream, rubyStream, coreModuleElement, coreModule, klass, coreMethod,
@@ -225,9 +222,9 @@ private void processCoreModule(TypeElement coreModuleElement) throws IOException
225222
if (primitive != null) {
226223
processPrimitive(stream, rubyPrimitives, coreModuleElement, klass, primitive);
227224
coreModuleChecks.checks(primitive.lowerFixnum(), null, klass, true);
228-
if (!inherits(e.asType(), primitiveNodeType) && !inherits(e.asType(), rubySourceNodeType)) {
225+
if (!inherits(e.asType(), primitiveNodeType)) {
229226
error(e +
230-
" should inherit from PrimitiveArrayArgumentsNode, PrimitiveNode or RubySourceNode",
227+
" should inherit from PrimitiveArrayArgumentsNode, PrimitiveNode",
231228
e);
232229
}
233230
}

0 commit comments

Comments
 (0)