changeset 17101:a3fa16378eaa

Merge
author Stefan Anzinger <stefan.anzinger@oracle.com>
date Thu, 11 Sep 2014 11:26:23 -0700
parents dbc4d605eb8f (current diff) fc94fd8a28dc (diff)
children 8c9ab783e814
files
diffstat 17 files changed, 45 insertions(+), 58 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/GraalOptions.java	Wed Sep 10 12:55:35 2014 -0700
+++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/GraalOptions.java	Thu Sep 11 11:26:23 2014 -0700
@@ -91,7 +91,7 @@
 
     // graph caching
     @Option(help = "")
-    public static final OptionValue<Boolean> CacheGraphs = new OptionValue<>(true);
+    public static final OptionValue<Boolean> CacheGraphs = new OptionValue<>(false);
 
     //loop transform settings TODO (gd) tune
     @Option(help = "")
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java	Wed Sep 10 12:55:35 2014 -0700
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java	Thu Sep 11 11:26:23 2014 -0700
@@ -168,7 +168,7 @@
             HighTierContext highTierContext = new HighTierContext(providers, assumptions, cache, graphBuilderSuite, optimisticOpts);
             if (graph.start().next() == null) {
                 graphBuilderSuite.apply(graph, highTierContext);
-                new DeadCodeEliminationPhase(OPTIONAL).apply(graph);
+                new DeadCodeEliminationPhase(Optional).apply(graph);
             } else {
                 Debug.dump(graph, "initial state");
             }
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/HighTier.java	Wed Sep 10 12:55:35 2014 -0700
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/HighTier.java	Thu Sep 11 11:26:23 2014 -0700
@@ -58,7 +58,7 @@
                 appendPhase(new IterativeInliningPhase(canonicalizer));
             } else {
                 appendPhase(new InliningPhase(canonicalizer));
-                appendPhase(new DeadCodeEliminationPhase(OPTIONAL));
+                appendPhase(new DeadCodeEliminationPhase(Optional));
 
                 boolean reduceOrEliminate = FlowSensitiveReduction.getValue() || ConditionalElimination.getValue();
                 if (reduceOrEliminate && OptCanonicalizer.getValue()) {
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/LowTier.java	Wed Sep 10 12:55:35 2014 -0700
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/LowTier.java	Thu Sep 11 11:26:23 2014 -0700
@@ -64,6 +64,6 @@
 
         appendPhase(new UseTrappingNullChecksPhase());
 
-        appendPhase(new DeadCodeEliminationPhase(REQUIRED));
+        appendPhase(new DeadCodeEliminationPhase(Required));
     }
 }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java	Wed Sep 10 12:55:35 2014 -0700
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java	Thu Sep 11 11:26:23 2014 -0700
@@ -111,6 +111,6 @@
         GraphUtil.killCFG(start);
 
         Debug.dump(graph, "OnStackReplacement result");
-        new DeadCodeEliminationPhase(OPTIONAL).apply(graph);
+        new DeadCodeEliminationPhase(Optional).apply(graph);
     }
 }
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConvertDeoptimizeToGuardPhase.java	Wed Sep 10 12:55:35 2014 -0700
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConvertDeoptimizeToGuardPhase.java	Thu Sep 11 11:26:23 2014 -0700
@@ -103,7 +103,7 @@
             }
         }
 
-        new DeadCodeEliminationPhase(OPTIONAL).apply(graph);
+        new DeadCodeEliminationPhase(Optional).apply(graph);
     }
 
     private void visitDeoptBegin(BeginNode deoptBegin, DeoptimizationAction deoptAction, DeoptimizationReason deoptReason, StructuredGraph graph) {
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/DeadCodeEliminationPhase.java	Wed Sep 10 12:55:35 2014 -0700
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/DeadCodeEliminationPhase.java	Thu Sep 11 11:26:23 2014 -0700
@@ -43,8 +43,8 @@
     private static final DebugMetric metricNodesRemoved = Debug.metric("NodesRemoved");
 
     public enum Optionality {
-        OPTIONAL,
-        REQUIRED;
+        Optional,
+        Required;
     }
 
     /**
@@ -52,15 +52,15 @@
      * {@link Options#ReduceDCE}.
      */
     public DeadCodeEliminationPhase() {
-        this(Optionality.REQUIRED);
+        this(Optionality.Required);
     }
 
     /**
      * Creates a dead code elimination phase that will be run only if it is
-     * {@linkplain Optionality#REQUIRED non-optional} or {@link Options#ReduceDCE} is false.
+     * {@linkplain Optionality#Required non-optional} or {@link Options#ReduceDCE} is false.
      */
     public DeadCodeEliminationPhase(Optionality optionality) {
-        this.optional = optionality == Optionality.OPTIONAL;
+        this.optional = optionality == Optionality.Optional;
     }
 
     private final boolean optional;
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FlowSensitiveReduction.java	Wed Sep 10 12:55:35 2014 -0700
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FlowSensitiveReduction.java	Thu Sep 11 11:26:23 2014 -0700
@@ -151,7 +151,7 @@
             for (PostponedDeopt postponed : postponedDeopts) {
                 postponed.doRewrite(falseConstant);
             }
-            new DeadCodeEliminationPhase(OPTIONAL).apply(graph);
+            new DeadCodeEliminationPhase(Optional).apply(graph);
         }
         for (MethodCallTargetNode mcn : graph.getNodes().filter(MethodCallTargetNode.class)) {
             if (mcn.isAlive() && FlowUtil.lacksUsages(mcn)) {
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/info/elem/InlineableGraph.java	Wed Sep 10 12:55:35 2014 -0700
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/info/elem/InlineableGraph.java	Thu Sep 11 11:26:23 2014 -0700
@@ -247,7 +247,7 @@
             }
             assert newGraph.start().next() != null : "graph needs to be populated by the GraphBuilderSuite";
 
-            new DeadCodeEliminationPhase(OPTIONAL).apply(newGraph);
+            new DeadCodeEliminationPhase(Optional).apply(newGraph);
 
             if (OptCanonicalizer.getValue()) {
                 canonicalizer.apply(newGraph, context);
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java	Wed Sep 10 12:55:35 2014 -0700
+++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java	Thu Sep 11 11:26:23 2014 -0700
@@ -512,7 +512,7 @@
                     new CollapseFrameForSingleSideEffectPhase().apply(graph);
                     break;
             }
-            new DeadCodeEliminationPhase(REQUIRED).apply(graph);
+            new DeadCodeEliminationPhase(Required).apply(graph);
         }
 
         /**
@@ -614,7 +614,7 @@
          */
         protected void afterInlining(StructuredGraph graph) {
             new NodeIntrinsificationPhase(providers, snippetReflection).apply(graph);
-            new DeadCodeEliminationPhase(OPTIONAL).apply(graph);
+            new DeadCodeEliminationPhase(Optional).apply(graph);
             if (OptCanonicalizer.getValue()) {
                 new CanonicalizerPhase(true).apply(graph, new PhaseContext(providers, assumptions));
             }
@@ -687,7 +687,7 @@
                     end.disableSafepoint();
                 }
 
-                new DeadCodeEliminationPhase(REQUIRED).apply(graph);
+                new DeadCodeEliminationPhase(Required).apply(graph);
             } catch (Throwable e) {
                 throw Debug.handle(e);
             }
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetTemplate.java	Wed Sep 10 12:55:35 2014 -0700
+++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetTemplate.java	Thu Sep 11 11:26:23 2014 -0700
@@ -671,7 +671,7 @@
             }
         }
 
-        new DeadCodeEliminationPhase(REQUIRED).apply(snippetCopy);
+        new DeadCodeEliminationPhase(Required).apply(snippetCopy);
 
         assert checkAllVarargPlaceholdersAreDeleted(parameterCount, placeholders);
 
--- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/EffectsPhase.java	Wed Sep 10 12:55:35 2014 -0700
+++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/EffectsPhase.java	Thu Sep 11 11:26:23 2014 -0700
@@ -101,7 +101,7 @@
                     Debug.dump(graph, "after " + getName() + " iteration");
                 }
 
-                new DeadCodeEliminationPhase(REQUIRED).apply(graph);
+                new DeadCodeEliminationPhase(Required).apply(graph);
 
                 Set<Node> changedNodes = listener.getNodes();
                 for (Node node : graph.getNodes()) {
--- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/IterativeInliningPhase.java	Wed Sep 10 12:55:35 2014 -0700
+++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/IterativeInliningPhase.java	Thu Sep 11 11:26:23 2014 -0700
@@ -71,7 +71,7 @@
                 inlining.apply(graph, context);
                 progress |= inlining.getInliningCount() > 0;
 
-                new DeadCodeEliminationPhase(OPTIONAL).apply(graph);
+                new DeadCodeEliminationPhase(Optional).apply(graph);
 
                 boolean reduceOrEliminate = FlowSensitiveReduction.getValue() || ConditionalElimination.getValue();
                 if (reduceOrEliminate && OptCanonicalizer.getValue()) {
--- a/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/source/BytesSourceSectionTest.java	Wed Sep 10 12:55:35 2014 -0700
+++ b/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/source/BytesSourceSectionTest.java	Thu Sep 11 11:26:23 2014 -0700
@@ -34,7 +34,7 @@
 
     @Test
     public void testSectionsFromLineNumberASCII() {
-        final byte[] bytes = "foo\nbar\nbaz\n".getBytes(StandardCharsets.UTF_8);
+        final byte[] bytes = "foo\nbar\nbaz\n".getBytes(StandardCharsets.US_ASCII);
         final Source source = Source.fromBytes(bytes, "description", new BytesDecoder.UTF8BytesDecoder());
         assertEquals("foo", source.createSection("identifier", 1).getCode());
         assertEquals("bar", source.createSection("identifier", 2).getCode());
@@ -43,7 +43,7 @@
 
     @Test
     public void testSectionsFromOffsetsASCII() {
-        final byte[] bytes = "foo\nbar\nbaz\n".getBytes(StandardCharsets.UTF_8);
+        final byte[] bytes = "foo\nbar\nbaz\n".getBytes(StandardCharsets.US_ASCII);
         final Source source = Source.fromBytes(bytes, "description", new BytesDecoder.UTF8BytesDecoder());
         assertEquals("foo", source.createSection("identifier", 0, 3).getCode());
         assertEquals("bar", source.createSection("identifier", 4, 3).getCode());
@@ -51,28 +51,8 @@
     }
 
     @Test
-    public void testSectionsFromLineNumberUTF8() {
-        // ☃ is three bytes in UTF8
-        final byte[] bytes = "foo\n☃\nbaz\n".getBytes(StandardCharsets.UTF_8);
-        final Source source = Source.fromBytes(bytes, "description", new BytesDecoder.UTF8BytesDecoder());
-        assertEquals("foo", source.createSection("identifier", 1).getCode());
-        assertEquals("☃", source.createSection("identifier", 2).getCode());
-        assertEquals("baz", source.createSection("identifier", 3).getCode());
-    }
-
-    @Test
-    public void testSectionsFromOffsetsUTF8() {
-        // ☃ is three bytes in UTF8
-        final byte[] bytes = "foo\n☃\nbaz\n".getBytes(StandardCharsets.UTF_8);
-        final Source source = Source.fromBytes(bytes, "description", new BytesDecoder.UTF8BytesDecoder());
-        assertEquals("foo", source.createSection("identifier", 0, 3).getCode());
-        assertEquals("☃", source.createSection("identifier", 4, 3).getCode());
-        assertEquals("baz", source.createSection("identifier", 8, 3).getCode());
-    }
-
-    @Test
     public void testOffset() {
-        final byte[] bytes = "xxxfoo\nbar\nbaz\nxxx".getBytes(StandardCharsets.UTF_8);
+        final byte[] bytes = "xxxfoo\nbar\nbaz\nxxx".getBytes(StandardCharsets.US_ASCII);
         final Source source = Source.fromBytes(bytes, 3, bytes.length - 6, "description", new BytesDecoder.UTF8BytesDecoder());
         assertEquals("foo", source.createSection("identifier", 0, 3).getCode());
         assertEquals("bar", source.createSection("identifier", 4, 3).getCode());
--- a/mxtool/mx	Wed Sep 10 12:55:35 2014 -0700
+++ b/mxtool/mx	Thu Sep 11 11:26:23 2014 -0700
@@ -28,7 +28,7 @@
 dir=`/bin/pwd`
 
 # Resolve location of this script so that mx.py can be found in the same directory
-source="$(basename $0)"
+source="${BASH_SOURCE[0]}"
 while [ -h "$source" ] ; do source="$(readlink "$source")"; done
 dir="$( cd -P "$( dirname "$source" )" && pwd )"
 
--- a/mxtool/mx.py	Wed Sep 10 12:55:35 2014 -0700
+++ b/mxtool/mx.py	Thu Sep 11 11:26:23 2014 -0700
@@ -4100,11 +4100,13 @@
             srcDir = join(p.dir, src)
             if not exists(srcDir):
                 os.mkdir(srcDir)
+            ref = 'file.reference.' + p.name + '-' + src
+            print >> out, ref + '=' + src
             if mainSrc:
-                print >> out, 'src.dir=' + srcDir
+                print >> out, 'src.dir=${' + ref + '}'
                 mainSrc = False
             else:
-                print >> out, 'src.' + src + '.dir=' + srcDir
+                print >> out, 'src.' + src + '.dir=${' + ref + '}'
 
         javacClasspath = []
 
@@ -4125,19 +4127,24 @@
 
             if dep.isLibrary():
                 path = dep.get_path(resolve=True)
-                libFiles.append(path)
+                if path:
+                    if os.sep == '\\':
+                        path = path.replace('\\', '\\\\')
+                    ref = 'file.reference.' + dep.name + '-bin'
+                    print >> out, ref + '=' + path
+                    libFiles.append(path)
 
             elif dep.isProject():
-                path = join(dep.dir, 'dist', dep.name + '.jar')
-
-            if path:
-                if os.sep == '\\':
-                    path = path.replace('\\', '\\\\')
-
-                if not dep in annotationProcessorOnlyDeps:
-                    javacClasspath.append(path)
-                else:
-                    annotationProcessorReferences.append(path)
+                n = dep.name.replace('.', '_')
+                relDepPath = os.path.relpath(dep.dir, p.dir).replace(os.sep, '/')
+                ref = 'reference.' + n + '.jar'
+                print >> out, 'project.' + n + '=' + relDepPath
+                print >> out, ref + '=${project.' + n + '}/dist/' + dep.name + '.jar'
+
+            if not dep in annotationProcessorOnlyDeps:
+                javacClasspath.append('${' + ref + '}')
+            else:
+                annotationProcessorReferences.append('${' + ref + '}')
 
         print >> out, 'javac.classpath=\\\n    ' + (os.pathsep + '\\\n    ').join(javacClasspath)
         print >> out, 'javac.processorpath=' + (os.pathsep + '\\\n    ').join(['${javac.classpath}'] + annotationProcessorReferences)
--- a/src/cpu/sparc/vm/sharedRuntime_sparc.cpp	Wed Sep 10 12:55:35 2014 -0700
+++ b/src/cpu/sparc/vm/sharedRuntime_sparc.cpp	Thu Sep 11 11:26:23 2014 -0700
@@ -1029,9 +1029,9 @@
                                     int comp_args_on_stack,
                                     const BasicType *sig_bt,
                                     const VMRegPair *regs,
-                                    int frame_extension_arguments) {
+                                    int frame_extension_argument) {
   AdapterGenerator agen(masm);
-  agen.gen_i2c_adapter(total_args_passed, comp_args_on_stack, sig_bt, regs, frame_extension_arguments);
+  agen.gen_i2c_adapter(total_args_passed, comp_args_on_stack, sig_bt, regs, frame_extension_argument);
 }
 
 // ---------------------------------------------------------------