|
37 | 37 | import org.truffleruby.language.ReadOwnFrameAndVariablesNode;
|
38 | 38 | import org.truffleruby.language.RubyBaseNode;
|
39 | 39 | import org.truffleruby.language.RubyNode;
|
40 |
| -import org.truffleruby.language.RubyRootNode; |
41 | 40 | import org.truffleruby.language.arguments.MaybeReadCallerVariablesNode;
|
42 | 41 | import org.truffleruby.language.arguments.ReadCallerVariablesNode;
|
43 | 42 | import org.truffleruby.language.arguments.RubyArguments;
|
|
62 | 61 | import com.oracle.truffle.api.dsl.NodeChild;
|
63 | 62 | import com.oracle.truffle.api.dsl.Specialization;
|
64 | 63 | import com.oracle.truffle.api.frame.FrameDescriptor;
|
65 |
| -import com.oracle.truffle.api.frame.FrameInstance.FrameAccess; |
66 | 64 | import com.oracle.truffle.api.frame.FrameSlot;
|
67 | 65 | import com.oracle.truffle.api.frame.FrameSlotKind;
|
68 | 66 | import com.oracle.truffle.api.frame.FrameUtil;
|
69 | 67 | import com.oracle.truffle.api.frame.MaterializedFrame;
|
70 | 68 | import com.oracle.truffle.api.frame.VirtualFrame;
|
71 | 69 | import com.oracle.truffle.api.nodes.IndirectCallNode;
|
72 |
| -import com.oracle.truffle.api.nodes.Node; |
73 |
| -import com.oracle.truffle.api.nodes.RootNode; |
74 | 70 | import com.oracle.truffle.api.profiles.ConditionProfile;
|
75 |
| -import com.oracle.truffle.api.Truffle; |
76 | 71 |
|
77 | 72 | @CoreModule("Truffle::KernelOperations")
|
78 | 73 | public abstract class TruffleKernelNodes {
|
@@ -364,36 +359,6 @@ protected Object storage(VirtualFrame frame,
|
364 | 359 | }
|
365 | 360 | }
|
366 | 361 |
|
367 |
| - /* When getting special variables from the wrong side of a C call we know it's going to be slow. */ |
368 |
| - @Primitive(name = "ruby_caller_special_variables") |
369 |
| - public abstract static class GetSlowCallerSpecialVariableStorage extends PrimitiveArrayArgumentsNode { |
370 |
| - |
371 |
| - @Child GetSpecialVariableStorage getStorageNode = GetSpecialVariableStorage.create(); |
372 |
| - |
373 |
| - @Specialization |
374 |
| - @TruffleBoundary |
375 |
| - protected Object storage() { |
376 |
| - return getStorageNode.execute(Truffle.getRuntime().iterateFrames(frameInstance -> { |
377 |
| - final Node callNode = frameInstance.getCallNode(); |
378 |
| - |
379 |
| - if (callNode != null) { |
380 |
| - final RootNode rootNode = callNode.getRootNode(); |
381 |
| - // Skip Ruby frames in cext.rb file since they are implementing methods which are implemented |
382 |
| - // with C in MRI, and therefore are also implicitly skipped when when looking up the block passed |
383 |
| - // to a C API function. |
384 |
| - if (rootNode instanceof RubyRootNode && |
385 |
| - rootNode.getSourceSection().isAvailable() && |
386 |
| - !rootNode.getSourceSection().getSource().getName().endsWith("cext.rb") && |
387 |
| - !rootNode.getSourceSection().getSource().getName().endsWith("cext_ruby.rb")) { |
388 |
| - return frameInstance.getFrame(FrameAccess.MATERIALIZE).materialize(); |
389 |
| - } |
390 |
| - } |
391 |
| - |
392 |
| - return null; |
393 |
| - })); |
394 |
| - } |
395 |
| - } |
396 |
| - |
397 | 362 | @Primitive(name = "proc_special_variables")
|
398 | 363 | public abstract static class GetProcSpecialVariableStorage extends PrimitiveArrayArgumentsNode {
|
399 | 364 |
|
|
0 commit comments