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

QIRWrapperNode is now constant

parent 736c3b13
Branches
No related tags found
No related merge requests found
...@@ -26,17 +26,15 @@ import com.oracle.truffle.api.CompilerDirectives.*; ...@@ -26,17 +26,15 @@ import com.oracle.truffle.api.CompilerDirectives.*;
import com.oracle.truffle.api.frame.*; import com.oracle.truffle.api.frame.*;
import com.oracle.truffle.api.nodes.*; import com.oracle.truffle.api.nodes.*;
import com.oracle.truffle.api.source.SourceSection; import com.oracle.truffle.api.source.SourceSection;
import com.oracle.truffle.r.runtime.ArgumentsSignature;
import com.oracle.truffle.r.runtime.context.RContext; import com.oracle.truffle.r.runtime.context.RContext;
import com.oracle.truffle.r.runtime.data.RDataFactory; import com.oracle.truffle.r.runtime.data.RDataFactory;
import com.oracle.truffle.r.runtime.env.REnvironment; import com.oracle.truffle.r.runtime.env.REnvironment;
import com.oracle.truffle.r.runtime.env.REnvironment.PutException; import com.oracle.truffle.r.runtime.env.REnvironment.PutException;
import com.oracle.truffle.r.runtime.nodes.RSourceSectionNode; import com.oracle.truffle.r.runtime.nodes.RSourceSectionNode;
import com.oracle.truffle.r.runtime.nodes.RSyntaxElement; import com.oracle.truffle.r.runtime.nodes.RSyntaxConstant;
import com.oracle.truffle.r.runtime.nodes.RSyntaxFunction;
@NodeInfo(shortName = "query", description = "The node representing a query") @NodeInfo(shortName = "query", description = "The node representing a query")
public final class RQIRWrapperNode extends RSourceSectionNode implements RSyntaxFunction { public final class RQIRWrapperNode extends RSourceSectionNode implements RSyntaxConstant {
// The unique identifier of the query // The unique identifier of the query
public final int id; public final int id;
...@@ -65,22 +63,7 @@ public final class RQIRWrapperNode extends RSourceSectionNode implements RSyntax ...@@ -65,22 +63,7 @@ public final class RQIRWrapperNode extends RSourceSectionNode implements RSyntax
} }
@Override @Override
public ArgumentsSignature getSyntaxSignature() { public Object getValue() {
return null; return createQuery(id);
}
@Override
public RSyntaxElement[] getSyntaxArgumentDefaults() {
return new RSyntaxElement[0];
}
@Override
public RSyntaxElement getSyntaxBody() {
return this;
}
@Override
public String getSyntaxDebugName() {
return getSourceSection().getCharacters().toString();
} }
} }
...@@ -37,8 +37,8 @@ import com.oracle.truffle.api.CompilerDirectives.CompilationFinal; ...@@ -37,8 +37,8 @@ import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
* N.B. The options must be initialized/processed at runtime for an AOT VM. * N.B. The options must be initialized/processed at runtime for an AOT VM.
*/ */
public enum FastROptions { public enum FastROptions {
PrintErrorStacktraces("Prints Java and R stack traces for all errors", false), PrintErrorStacktraces("Prints Java and R stack traces for all errors", true),
PrintErrorStacktracesToFile("Dumps Java and R stack traces to 'fastr_errors.log' for all errors", true), PrintErrorStacktracesToFile("Dumps Java and R stack traces to 'fastr_errors.log' for all errors", false),
CheckResultCompleteness("Assert completeness of results vectors after evaluating unit tests and R shell commands", true), CheckResultCompleteness("Assert completeness of results vectors after evaluating unit tests and R shell commands", true),
Debug("Debug=name1,name2,...; Turn on debugging output for 'name1', 'name2', etc.", null, true), Debug("Debug=name1,name2,...; Turn on debugging output for 'name1', 'name2', etc.", null, true),
TraceCalls("Trace all R function calls", false), TraceCalls("Trace all R function calls", false),
...@@ -221,16 +221,16 @@ public enum FastROptions { ...@@ -221,16 +221,16 @@ public enum FastROptions {
/** /**
* Convenience function for matching against an option whose value is expected to be a comma * Convenience function for matching against an option whose value is expected to be a comma
* separated list. If the option is set without a value, i.e. just plain {@code -R:Option}, all * separated list. If the option is set without a value, i.e. just plain {@code -R:Option}, all
* elements are deemed to match. Matching is done with {@link String#startsWith} to allow * elements are deemed to match. Matching is done with {@link String#startsWith} to allow additional
* additional data to be tagged onto the element. * data to be tagged onto the element.
* *
* E.g. * E.g.
* <ul> * <ul>
* <li>{@code -R:Option} returns {@code ""} for all values of {@code element}.</li> * <li>{@code -R:Option} returns {@code ""} for all values of {@code element}.</li>
* <li>{@code -R:Option=foo} returns {@code foo} iff {@code element.equals("foo")}, else * <li>{@code -R:Option=foo} returns {@code foo} iff {@code element.equals("foo")}, else
* {@code null}. * {@code null}.
* <li>{@code -R:Option=foo,bar=xx} returns {@code bar=xx} iff {@code element.equals("bar")}, * <li>{@code -R:Option=foo,bar=xx} returns {@code bar=xx} iff {@code element.equals("bar")}, else
* else {@code null}. * {@code null}.
* *
* @param element string to match against the option value list. * @param element string to match against the option value list.
* @return {@code ""} if the option is set with no {@code =value} component, the element if * @return {@code ""} if the option is set with no {@code =value} component, the element if
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment