From c33532da9c1626fdb1acf5955078a9d13a67620e Mon Sep 17 00:00:00 2001 From: Julien Lopez <julien.lopez@lri.fr> Date: Mon, 22 Jan 2018 14:13:55 +0100 Subject: [PATCH] QIRWrapperNode is now constant --- .../r/nodes/query/RQIRWrapperNode.java | 25 +++---------------- .../truffle/r/runtime/FastROptions.java | 12 ++++----- 2 files changed, 10 insertions(+), 27 deletions(-) diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/query/RQIRWrapperNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/query/RQIRWrapperNode.java index 82017b57cf..c5489c1c00 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/query/RQIRWrapperNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/query/RQIRWrapperNode.java @@ -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); } } diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/FastROptions.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/FastROptions.java index 982d68f8ef..8f06ce2234 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/FastROptions.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/FastROptions.java @@ -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 -- GitLab