Skip to content

Commit

Permalink
fix standard tags
Browse files Browse the repository at this point in the history
  • Loading branch information
arvyy committed Jul 26, 2024
1 parent 5447a86 commit 4ce60d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ public boolean isInstrumentable() {

@Override
public boolean hasTag(Class<? extends Tag> 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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

/**
Expand All @@ -27,11 +26,4 @@ public Object executeGeneric(VirtualFrame frame) {
return value;
}

@Override
public boolean hasTag(Class<? extends Tag> tag) {
// TODO
// Truffle fails asserts due to literals inheriting standard tag from expression
// but not having associated source section
return false;
}
}

0 comments on commit 4ce60d0

Please sign in to comment.