Skip to content

Commit

Permalink
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@
import com.oracle.truffle.api.utilities.CyclicAssumption;
import org.jruby.truffle.nodes.RubyGuards;
import org.jruby.truffle.runtime.core.RubyBasicObject;
import org.jruby.truffle.runtime.methods.InternalMethod;

import java.util.ArrayList;
import java.util.Collection;
@@ -89,9 +90,16 @@ public AdvancedInstrumentRoot createInstrumentRoot(Probe probe, Node node) {
public Object executeRoot(Node node, VirtualFrame frame) {
if (!inTraceFuncProfile.profile(isInTraceFunc)) {
final Object self = RubyArguments.getSelf(frame.getArguments());
final int id = 0;
final Object classname = self;

final Object id;
final InternalMethod method = RubyArguments.getMethod(frame.getArguments());
if (method != null) {
id = context.getSymbol(method.getName());
} else {
id = context.getCoreLibrary().getNilObject();
}

final RubyBinding binding = new RubyBinding(
context.getCoreLibrary().getBindingClass(),
self,

0 comments on commit 302f22b

Please sign in to comment.