|
17 | 17 | import com.oracle.truffle.api.CompilerDirectives;
|
18 | 18 | import com.oracle.truffle.api.dsl.GenerateNodeFactory;
|
19 | 19 | import com.oracle.truffle.api.dsl.GenerateUncached;
|
20 |
| -import com.oracle.truffle.api.frame.FrameInstance.FrameAccess; |
21 | 20 | import com.oracle.truffle.api.frame.FrameSlotKind;
|
22 |
| -import com.oracle.truffle.api.profiles.ConditionProfile; |
23 | 21 | import com.oracle.truffle.api.strings.TruffleString;
|
24 | 22 | import org.truffleruby.Layouts;
|
25 | 23 | import org.truffleruby.RubyContext;
|
|
35 | 33 | import org.truffleruby.core.encoding.Encodings;
|
36 | 34 | import org.truffleruby.core.klass.RubyClass;
|
37 | 35 | import org.truffleruby.core.string.RubyString;
|
38 |
| -import org.truffleruby.language.CallStackManager; |
39 | 36 | import org.truffleruby.language.RubyBaseNode;
|
40 | 37 | import org.truffleruby.language.RubyBaseNodeWithExecute;
|
41 | 38 | import org.truffleruby.language.RubyNode;
|
42 | 39 | import org.truffleruby.language.RubySourceNode;
|
43 | 40 | import org.truffleruby.language.Visibility;
|
44 |
| -import org.truffleruby.language.arguments.ReadCallerFrameNode; |
45 | 41 | import org.truffleruby.language.arguments.RubyArguments;
|
46 | 42 | import org.truffleruby.language.control.RaiseException;
|
47 | 43 | import org.truffleruby.language.locals.FindDeclarationVariableNodes;
|
@@ -500,28 +496,6 @@ protected Object allocate(RubyClass rubyClass) {
|
500 | 496 |
|
501 | 497 | }
|
502 | 498 |
|
503 |
| - @Primitive(name = "caller_binding") |
504 |
| - public abstract static class CallerBindingNode extends PrimitiveArrayArgumentsNode { |
505 |
| - |
506 |
| - @Child ReadCallerFrameNode callerFrameNode = new ReadCallerFrameNode(); |
507 |
| - |
508 |
| - @Specialization |
509 |
| - protected RubyBinding binding(VirtualFrame frame, |
510 |
| - @Cached ConditionProfile javaCoreMethodProfile) { |
511 |
| - MaterializedFrame callerFrame = callerFrameNode.execute(frame); |
512 |
| - |
513 |
| - if (javaCoreMethodProfile.profile(CallStackManager.isJavaCore(RubyArguments.tryGetMethod(callerFrame)))) { |
514 |
| - // we are called from a Java core method, e.g., Method#call, we need to find the actual caller |
515 |
| - callerFrame = getContext() |
516 |
| - .getCallStack() |
517 |
| - .getNonJavaCoreCallerFrame(FrameAccess.MATERIALIZE) |
518 |
| - .materialize(); |
519 |
| - } |
520 |
| - |
521 |
| - return BindingNodes.createBinding(getContext(), getLanguage(), callerFrame); |
522 |
| - } |
523 |
| - } |
524 |
| - |
525 | 499 | @Primitive(name = "create_empty_binding")
|
526 | 500 | public abstract static class CreateEmptyBindingNode extends PrimitiveArrayArgumentsNode {
|
527 | 501 | @Specialization
|
|
0 commit comments