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

QIRWrapperNode is now constant

parent 736c3b13
No related branches found
No related tags found
No related merge requests found
......@@ -26,17 +26,15 @@ import com.oracle.truffle.api.CompilerDirectives.*;
import com.oracle.truffle.api.frame.*;
import com.oracle.truffle.api.nodes.*;
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.data.RDataFactory;
import com.oracle.truffle.r.runtime.env.REnvironment;
import com.oracle.truffle.r.runtime.env.REnvironment.PutException;
import com.oracle.truffle.r.runtime.nodes.RSourceSectionNode;
import com.oracle.truffle.r.runtime.nodes.RSyntaxElement;
import com.oracle.truffle.r.runtime.nodes.RSyntaxFunction;
import com.oracle.truffle.r.runtime.nodes.RSyntaxConstant;
@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
public final int id;
......@@ -65,22 +63,7 @@ public final class RQIRWrapperNode extends RSourceSectionNode implements RSyntax
}
@Override
public ArgumentsSignature getSyntaxSignature() {
return null;
}
@Override
public RSyntaxElement[] getSyntaxArgumentDefaults() {
return new RSyntaxElement[0];
}
@Override
public RSyntaxElement getSyntaxBody() {
return this;
}
@Override
public String getSyntaxDebugName() {
return getSourceSection().getCharacters().toString();
public Object getValue() {
return createQuery(id);
}
}
......@@ -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.
*/
public enum FastROptions {
PrintErrorStacktraces("Prints Java and R stack traces for all errors", false),
PrintErrorStacktracesToFile("Dumps Java and R stack traces to 'fastr_errors.log' for all errors", true),
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", false),
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),
TraceCalls("Trace all R function calls", false),
......@@ -221,16 +221,16 @@ public enum FastROptions {
/**
* 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
* elements are deemed to match. Matching is done with {@link String#startsWith} to allow
* additional data to be tagged onto the element.
* elements are deemed to match. Matching is done with {@link String#startsWith} to allow additional
* data to be tagged onto the element.
*
* E.g.
* <ul>
* <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
* {@code null}.
* <li>{@code -R:Option=foo,bar=xx} returns {@code bar=xx} iff {@code element.equals("bar")},
* else {@code null}.
* <li>{@code -R:Option=foo,bar=xx} returns {@code bar=xx} iff {@code element.equals("bar")}, else
* {@code null}.
*
* @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
......
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