Mercurial > hg > graal-jvmci-8
changeset 13658:50c11b9a7fdf
Ruby: remove some unimportant debugging flags.
line wrap: on
line diff
--- a/graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/RubyContext.java Wed Jan 15 19:27:55 2014 +0000 +++ b/graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/RubyContext.java Wed Jan 15 19:33:33 2014 +0000 @@ -169,10 +169,6 @@ } public Object execute(RubyContext context, Source source, RubyParser.ParserContext parserContext, Object self, MaterializedFrame parentFrame) { - if (configuration.getPrintExecutedFiles()) { - implementationMessage("executing: %s", source.getName()); - } - try { final RubyParserResult parseResult = parser.parse(context, source, parserContext, parentFrame); final RubyArguments arguments = new RubyArguments(parentFrame, self, null);
--- a/graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/configuration/Configuration.java Wed Jan 15 19:27:55 2014 +0000 +++ b/graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/configuration/Configuration.java Wed Jan 15 19:33:33 2014 +0000 @@ -32,8 +32,6 @@ private final boolean fullObjectSpace; private final boolean printParseTree; - private final boolean printExecutedFiles; - private final boolean printSpiltInstanceVariables; private final boolean printUninitializedCalls; private final boolean printJavaExceptions; private final boolean printRubyExceptions; @@ -58,8 +56,6 @@ fullObjectSpace = builder.getFullObjectSpace(); printParseTree = builder.getPrintParseTree(); - printExecutedFiles = builder.getPrintExecutedFiles(); - printSpiltInstanceVariables = builder.getPrintSpiltInstanceVariables(); printUninitializedCalls = builder.getPrintUninitializedCalls(); printJavaExceptions = builder.getPrintJavaExceptions(); printRubyExceptions = builder.getPrintRubyExceptions(); @@ -108,14 +104,6 @@ return printParseTree; } - public boolean getPrintExecutedFiles() { - return printExecutedFiles; - } - - public boolean getPrintSpiltInstanceVariables() { - return printSpiltInstanceVariables; - } - public boolean getPrintUninitializedCalls() { return printUninitializedCalls; }
--- a/graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/configuration/ConfigurationBuilder.java Wed Jan 15 19:27:55 2014 +0000 +++ b/graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/configuration/ConfigurationBuilder.java Wed Jan 15 19:33:33 2014 +0000 @@ -37,8 +37,6 @@ private boolean fullObjectSpace = false; private boolean printParseTree = false; - private boolean printExecutedFiles = false; - private boolean printSpiltInstanceVariables = false; private boolean printUninitializedCalls = false; private boolean printJavaExceptions = false; private boolean printRubyExceptions = false; @@ -77,8 +75,6 @@ fullObjectSpace = configuration.getFullObjectSpace(); printParseTree = configuration.getPrintParseTree(); - printExecutedFiles = configuration.getPrintExecutedFiles(); - printSpiltInstanceVariables = configuration.getPrintSpiltInstanceVariables(); printUninitializedCalls = configuration.getPrintUninitializedCalls(); printJavaExceptions = configuration.getPrintJavaExceptions(); printRubyExceptions = configuration.getPrintRubyExceptions(); @@ -169,22 +165,6 @@ this.printParseTree = printParseTree; } - public boolean getPrintExecutedFiles() { - return printExecutedFiles; - } - - public void setPrintExecutedFiles(boolean printExecutedFiles) { - this.printExecutedFiles = printExecutedFiles; - } - - public boolean getPrintSpiltInstanceVariables() { - return printSpiltInstanceVariables; - } - - public void setPrintSpiltInstanceVariables(boolean printSpiltInstanceVariables) { - this.printSpiltInstanceVariables = printSpiltInstanceVariables; - } - public boolean getPrintUninitializedCalls() { return printUninitializedCalls; }
--- a/graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/core/RubyClass.java Wed Jan 15 19:27:55 2014 +0000 +++ b/graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/core/RubyClass.java Wed Jan 15 19:33:33 2014 +0000 @@ -114,7 +114,7 @@ include(superclass); - objectLayoutForInstances = new ObjectLayout(getName(), getContext(), superclass.objectLayoutForInstances); + objectLayoutForInstances = new ObjectLayout(getName(), superclass.objectLayoutForInstances); } public RubyBasicObject newInstance() { @@ -157,7 +157,7 @@ } private void renewObjectLayoutForInstances() { - objectLayoutForInstances = objectLayoutForInstances.renew(getContext(), superclass.objectLayoutForInstances); + objectLayoutForInstances = objectLayoutForInstances.renew(superclass.objectLayoutForInstances); for (RubyClass subClass : subClasses) { subClass.renewObjectLayoutForInstances();
--- a/graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/objects/ObjectLayout.java Wed Jan 15 19:27:55 2014 +0000 +++ b/graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/objects/ObjectLayout.java Wed Jan 15 19:33:33 2014 +0000 @@ -17,7 +17,6 @@ import com.oracle.truffle.api.nodes.*; import com.oracle.truffle.api.nodes.NodeUtil.*; -import com.oracle.truffle.ruby.runtime.*; /** * Maps names of instance variables to storage locations, which are either the offset of a primitive @@ -49,11 +48,11 @@ objectStorageLocationsUsed = 0; } - public ObjectLayout(String originHint, RubyContext context, ObjectLayout parent) { - this(originHint, context, parent, new HashMap<String, Class>()); + public ObjectLayout(String originHint, ObjectLayout parent) { + this(originHint, parent, new HashMap<String, Class>()); } - public ObjectLayout(String originHint, RubyContext context, ObjectLayout parent, Map<String, Class> storageTypes) { + public ObjectLayout(String originHint, ObjectLayout parent, Map<String, Class> storageTypes) { this.originHint = originHint; this.parent = parent; @@ -105,10 +104,6 @@ storageLocations.put(entry.getKey(), newStorageLocation); primitiveStorageLocationIndex += primitivesNeeded; } else { - if (canStoreInPrimitive && context.getConfiguration().getPrintSpiltInstanceVariables()) { - context.implementationMessage("instance variable %s of type %s spilt due to lack of space", name, type.getName()); - } - final ObjectStorageLocation newStorageLocation = new ObjectStorageLocation(this, objectStorageLocationIndex); storageLocations.put(entry.getKey(), newStorageLocation); objectStorageLocationIndex++; @@ -125,25 +120,25 @@ * comes from the same Ruby class as it did, but it's a new layout because layouts are * immutable, so modifications to the superclass yields a new layout. */ - public ObjectLayout renew(RubyContext context, ObjectLayout newParent) { - return new ObjectLayout(originHint + ".renewed", context, newParent, getStorageTypes()); + public ObjectLayout renew(ObjectLayout newParent) { + return new ObjectLayout(originHint + ".renewed", newParent, getStorageTypes()); } /** * Create a new version of this layout but with a new variable. */ - public ObjectLayout withNewVariable(RubyContext context, String name, Class type) { + public ObjectLayout withNewVariable(String name, Class type) { final Map<String, Class> storageTypes = getStorageTypes(); storageTypes.put(name, type); - return new ObjectLayout(originHint + ".withnew", context, parent, storageTypes); + return new ObjectLayout(originHint + ".withnew", parent, storageTypes); } /** * Create a new version of this layout but with an existing variable generalized to support any * type. */ - public ObjectLayout withGeneralisedVariable(RubyContext context, String name) { - return withNewVariable(context, name, Object.class); + public ObjectLayout withGeneralisedVariable(String name) { + return withNewVariable(name, Object.class); } /**
--- a/graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/objects/RubyBasicObject.java Wed Jan 15 19:27:55 2014 +0000 +++ b/graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/objects/RubyBasicObject.java Wed Jan 15 19:33:33 2014 +0000 @@ -124,7 +124,7 @@ * the layout of this object. */ - rubyClass.setObjectLayoutForInstances(rubyClass.getObjectLayoutForInstances().withNewVariable(rubyClass.getContext(), name, value.getClass())); + rubyClass.setObjectLayoutForInstances(rubyClass.getObjectLayoutForInstances().withNewVariable(name, value.getClass())); updateLayout(); storageLocation = objectLayout.findStorageLocation(name); @@ -140,7 +140,7 @@ * layout and update the layout of this object. */ - rubyClass.setObjectLayoutForInstances(rubyClass.getObjectLayoutForInstances().withGeneralisedVariable(rubyClass.getContext(), name)); + rubyClass.setObjectLayoutForInstances(rubyClass.getObjectLayoutForInstances().withGeneralisedVariable(name)); updateLayout(); storageLocation = objectLayout.findStorageLocation(name); @@ -315,15 +315,13 @@ } public void switchToPrivateLayout() { - final RubyContext context = getRubyClass().getContext(); - final Map<String, Object> instanceVariables = getInstanceVariables(); hasPrivateLayout = true; objectLayout = ObjectLayout.EMPTY; for (Entry<String, Object> entry : instanceVariables.entrySet()) { - objectLayout = objectLayout.withNewVariable(context, entry.getKey(), entry.getValue().getClass()); + objectLayout = objectLayout.withNewVariable(entry.getKey(), entry.getValue().getClass()); } setInstanceVariables(instanceVariables);
--- a/graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/subsystems/FeatureManager.java Wed Jan 15 19:27:55 2014 +0000 +++ b/graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/subsystems/FeatureManager.java Wed Jan 15 19:33:33 2014 +0000 @@ -35,11 +35,6 @@ public boolean require(String feature) throws IOException { // Some features are handled specially - if (feature.equals("continuation")) { - // We always load continuations - return true; - } - if (feature.equals("stringio")) { context.implementationMessage("stringio not yet implemented"); return true;
--- a/graal/com.oracle.truffle.ruby.shell/src/com/oracle/truffle/ruby/shell/CommandLineParser.java Wed Jan 15 19:27:55 2014 +0000 +++ b/graal/com.oracle.truffle.ruby.shell/src/com/oracle/truffle/ruby/shell/CommandLineParser.java Wed Jan 15 19:33:33 2014 +0000 @@ -217,12 +217,6 @@ case "--print-parse-tree": configurationBuilder.setPrintParseTree(true); break; - case "--print-executed-files": - configurationBuilder.setPrintExecutedFiles(true); - break; - case "--print-spilt-instance-variables": - configurationBuilder.setPrintSpiltInstanceVariables(true); - break; case "--print-uninitialized-calls": configurationBuilder.setPrintUninitializedCalls(true); break; @@ -337,9 +331,6 @@ out.println(" --no-intrinsic-method-calls don't turn method calls into intrinsic nodes"); out.println(" --no-jline don't use JLine"); out.println(" --print-parse-tree print the result of parsing"); - out.println(" --print-executed-files print the name of files as they are executed"); - out.println(" --print-missing-intrinsics print method calls that don't have intrinsic nodes"); - out.println(" --print-spilt-instance-variables print each time a native-typed instance variable is spilt to the boxed array"); out.println(" --print-uninitialized-calls print each time a method call is uninitialized"); out.println(" --print-java-exceptions print Java exception back traces at the point of translating them to Ruby exceptions"); out.println(" --print-ruby-exceptions print the Java exception back traces at the point of raising Ruby exceptions");