diff --git a/language/src/main/java/com/github/arvyy/islisp/nodes/ISLISPExpressionNode.java b/language/src/main/java/com/github/arvyy/islisp/nodes/ISLISPExpressionNode.java index 1b3d5fb..a95f260 100644 --- a/language/src/main/java/com/github/arvyy/islisp/nodes/ISLISPExpressionNode.java +++ b/language/src/main/java/com/github/arvyy/islisp/nodes/ISLISPExpressionNode.java @@ -101,10 +101,10 @@ public boolean isInstrumentable() { @Override public boolean hasTag(Class tag) { - if (tag == StandardTags.ExpressionTag.class) { + if (getSourceSection() != null && tag == StandardTags.ExpressionTag.class) { return true; } - if (tag == StandardTags.StatementTag.class) { + if (getSourceSection() != null && tag == StandardTags.StatementTag.class) { return true; } return tag == StandardTags.RootBodyTag.class && isRootBody; diff --git a/language/src/main/java/com/github/arvyy/islisp/nodes/ISLISPLiteralNode.java b/language/src/main/java/com/github/arvyy/islisp/nodes/ISLISPLiteralNode.java index c4b02e9..afc4ac2 100644 --- a/language/src/main/java/com/github/arvyy/islisp/nodes/ISLISPLiteralNode.java +++ b/language/src/main/java/com/github/arvyy/islisp/nodes/ISLISPLiteralNode.java @@ -1,7 +1,6 @@ package com.github.arvyy.islisp.nodes; import com.oracle.truffle.api.frame.VirtualFrame; -import com.oracle.truffle.api.instrumentation.Tag; import com.oracle.truffle.api.source.SourceSection; /** @@ -27,11 +26,4 @@ public Object executeGeneric(VirtualFrame frame) { return value; } - @Override - public boolean hasTag(Class tag) { - // TODO - // Truffle fails asserts due to literals inheriting standard tag from expression - // but not having associated source section - return false; - } }