Skip to content
Snippets Groups Projects
Commit 8537e722 authored by Julien Lopez's avatar Julien Lopez
Browse files

Remove translation function of TruffleNodes

parent 829e998c
No related branches found
No related tags found
No related merge requests found
package qir.ast;
import java.util.function.Function;
import com.oracle.truffle.api.source.SourceSection;
import qir.util.IQIRVisitor;
......@@ -13,13 +11,11 @@ import qir.util.IQIRVisitor;
public final class QIRTruffleNode extends QIRNode {
private final String name;
private final String code;
private final Function<QIRTruffleNode, String> translation;
public QIRTruffleNode(final SourceSection source, final String name, final String code, final Function<QIRTruffleNode, String> translation) {
public QIRTruffleNode(final SourceSection source, final String name, final String code) {
super(source);
this.name = name;
this.code = code;
this.translation = translation;
}
public final String getName() {
......@@ -30,10 +26,6 @@ public final class QIRTruffleNode extends QIRNode {
return code;
}
public final Function<QIRTruffleNode, String> getTranslation() {
return translation;
}
@Override
public final String toString() {
return "TruffleNode(" + name + ")";
......
......@@ -234,6 +234,6 @@ public final class QIRSQLVisitor implements IQIRVisitor<String> {
@Override
public final String visit(final QIRTruffleNode qirTruffleNode) {
return "truffle.executetruffle('" + qirTruffleNode.getTranslation().apply(qirTruffleNode) + "')";
return "truffle.executetruffle('" + qirTruffleNode.getCode() + "')";
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment