|
9 | 9 | */
|
10 | 10 | package org.truffleruby.core.kernel;
|
11 | 11 |
|
| 12 | +import static org.truffleruby.language.dispatch.DispatchConfiguration.PRIVATE; |
| 13 | +import static org.truffleruby.language.dispatch.DispatchConfiguration.PRIVATE_DOES_RESPOND; |
| 14 | +import static org.truffleruby.language.dispatch.DispatchConfiguration.PUBLIC; |
| 15 | +import static org.truffleruby.language.dispatch.DispatchConfiguration.PUBLIC_DOES_RESPOND; |
| 16 | + |
12 | 17 | import java.io.File;
|
13 | 18 | import java.io.PrintStream;
|
14 | 19 | import java.nio.file.Paths;
|
|
17 | 22 | import java.util.List;
|
18 | 23 | import java.util.concurrent.TimeUnit;
|
19 | 24 |
|
20 |
| -import com.oracle.truffle.api.nodes.NodeUtil; |
21 | 25 | import org.jcodings.specific.UTF8Encoding;
|
22 | 26 | import org.truffleruby.RubyContext;
|
23 | 27 | import org.truffleruby.builtins.CoreMethod;
|
|
59 | 63 | import org.truffleruby.core.numeric.BigIntegerOps;
|
60 | 64 | import org.truffleruby.core.numeric.RubyBignum;
|
61 | 65 | import org.truffleruby.core.proc.ProcNodes.ProcNewNode;
|
62 |
| -import org.truffleruby.core.proc.ProcNodesFactory.ProcNewNodeFactory; |
63 | 66 | import org.truffleruby.core.proc.ProcOperations;
|
64 | 67 | import org.truffleruby.core.proc.RubyProc;
|
65 | 68 | import org.truffleruby.core.rope.CodeRange;
|
|
148 | 151 | import com.oracle.truffle.api.nodes.ExplodeLoop;
|
149 | 152 | import com.oracle.truffle.api.nodes.IndirectCallNode;
|
150 | 153 | import com.oracle.truffle.api.nodes.Node;
|
| 154 | +import com.oracle.truffle.api.nodes.NodeUtil; |
151 | 155 | import com.oracle.truffle.api.object.DynamicObjectLibrary;
|
152 | 156 | import com.oracle.truffle.api.object.Property;
|
153 | 157 | import com.oracle.truffle.api.object.Shape;
|
154 | 158 | import com.oracle.truffle.api.profiles.BranchProfile;
|
155 | 159 | import com.oracle.truffle.api.profiles.ConditionProfile;
|
156 | 160 | import com.oracle.truffle.api.source.SourceSection;
|
157 | 161 |
|
158 |
| -import static org.truffleruby.language.dispatch.DispatchConfiguration.PRIVATE; |
159 |
| -import static org.truffleruby.language.dispatch.DispatchConfiguration.PRIVATE_DOES_RESPOND; |
160 |
| -import static org.truffleruby.language.dispatch.DispatchConfiguration.PUBLIC; |
161 |
| -import static org.truffleruby.language.dispatch.DispatchConfiguration.PUBLIC_DOES_RESPOND; |
162 |
| - |
163 | 162 | @CoreModule("Kernel")
|
164 | 163 | public abstract class KernelNodes {
|
165 | 164 |
|
@@ -1424,10 +1423,9 @@ protected RubyArray privateMethods(Object self, boolean includeAncestors) {
|
1424 | 1423 | @CoreMethod(names = "proc", isModuleFunction = true, needsBlock = true)
|
1425 | 1424 | public abstract static class ProcNode extends CoreMethodArrayArgumentsNode {
|
1426 | 1425 |
|
1427 |
| - @Child private ProcNewNode procNewNode = ProcNewNodeFactory.create(null); |
1428 |
| - |
1429 | 1426 | @Specialization
|
1430 |
| - protected RubyProc proc(VirtualFrame frame, Object maybeBlock) { |
| 1427 | + protected RubyProc proc(VirtualFrame frame, Object maybeBlock, |
| 1428 | + @Cached ProcNewNode procNewNode) { |
1431 | 1429 | return procNewNode.executeProcNew(frame, coreLibrary().procClass, ArrayUtils.EMPTY_ARRAY, maybeBlock);
|
1432 | 1430 | }
|
1433 | 1431 |
|
|
0 commit comments