Skip to content

Commit e356d67

Browse files
committed
ReadCallerDataNode should only skip RubyNode not RubyBaseNode
* It used to skip RubyContextNode before the previous commit. Before that, it used RubyBaseNode but that was before the DSL changed, which means data nodes for inline caches are just Nodes and not subclasses of the node using the DSL like before. Also, there is an intermediate CallInternalMethodNode since the new dispatch chain.
1 parent 94213b9 commit e356d67

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/truffleruby/language/arguments/ReadCallerDataNode.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.truffleruby.language.FrameAndVariablesSendingNode;
2525
import org.truffleruby.language.NotOptimizedWarningNode;
2626
import org.truffleruby.language.RubyBaseNode;
27+
import org.truffleruby.language.RubyNode;
2728
import org.truffleruby.language.control.RaiseException;
2829

2930
public abstract class ReadCallerDataNode extends RubyBaseNode {
@@ -78,7 +79,8 @@ private boolean notifyCallerToSendData() {
7879
startSending((FrameAndVariablesSendingNode) parent);
7980
return true;
8081
}
81-
if (parent instanceof RubyBaseNode) {
82+
if (parent instanceof RubyNode) {
83+
// A node with source info representing Ruby code, we could not find the FrameAndVariablesSendingNode
8284
return false;
8385
}
8486
parent = parent.getParent();

0 commit comments

Comments
 (0)