|
17 | 17 | import org.jruby.truffle.runtime.RubyContext;
|
18 | 18 | import org.jruby.truffle.runtime.core.RubyClass;
|
19 | 19 | import org.jruby.truffle.runtime.core.RubyModule;
|
20 |
| -import org.jruby.truffle.runtime.core.RubyNilClass; |
21 |
| -import org.jruby.truffle.runtime.core.RubyString; |
22 | 20 |
|
23 | 21 | @CoreClass(name = "main")
|
24 | 22 | public abstract class MainNodes {
|
25 | 23 |
|
26 |
| - @CoreMethod(names = "include", argumentsAsArray = true, needsSelf = false, required = 1, visibility = Visibility.PRIVATE) |
27 |
| - public abstract static class IncludeNode extends CoreMethodNode { |
28 |
| - |
29 |
| - @Child private ModuleNodes.IncludeNode includeNode; |
30 |
| - |
31 |
| - public IncludeNode(RubyContext context, SourceSection sourceSection) { |
32 |
| - super(context, sourceSection); |
33 |
| - includeNode = ModuleNodesFactory.IncludeNodeFactory.create(context, sourceSection, new RubyNode[]{null, null}); |
34 |
| - } |
35 |
| - |
36 |
| - public IncludeNode(IncludeNode prev) { |
37 |
| - super(prev); |
38 |
| - includeNode = prev.includeNode; |
39 |
| - } |
40 |
| - |
41 |
| - @Specialization |
42 |
| - public RubyNilClass include(VirtualFrame frame, Object[] args) { |
43 |
| - notDesignedForCompilation(); |
44 |
| - final RubyClass object = getContext().getCoreLibrary().getObjectClass(); |
45 |
| - return includeNode.executeInclude(frame, object, args); |
46 |
| - } |
47 |
| - } |
48 |
| - |
49 | 24 | @CoreMethod(names = "public", argumentsAsArray = true, needsSelf = false, visibility = Visibility.PRIVATE)
|
50 | 25 | public abstract static class PublicNode extends CoreMethodNode {
|
51 | 26 |
|
@@ -92,22 +67,4 @@ public RubyModule doPrivate(VirtualFrame frame, Object[] args) {
|
92 | 67 | }
|
93 | 68 | }
|
94 | 69 |
|
95 |
| - @CoreMethod(names = {"to_s", "inspect"}, needsSelf = false) |
96 |
| - public abstract static class ToSNode extends CoreMethodNode { |
97 |
| - |
98 |
| - public ToSNode(RubyContext context, SourceSection sourceSection) { |
99 |
| - super(context, sourceSection); |
100 |
| - } |
101 |
| - |
102 |
| - public ToSNode(ToSNode prev) { |
103 |
| - super(prev); |
104 |
| - } |
105 |
| - |
106 |
| - @Specialization |
107 |
| - public RubyString toS() { |
108 |
| - return getContext().makeString("main"); |
109 |
| - } |
110 |
| - |
111 |
| - } |
112 |
| - |
113 | 70 | }
|
0 commit comments