changeset 16090:32ddc8096f4c

Merge
author Laurent Daynes <Laurent.Daynes@oracle.com>
date Fri, 13 Jun 2014 09:06:06 +0200
parents 8d164bec9807 (current diff) 64e172733061 (diff)
children 69220322bc14
files
diffstat 5 files changed, 20 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGELOG.md	Wed Jun 04 04:08:02 2014 -0700
+++ b/CHANGELOG.md	Fri Jun 13 09:06:06 2014 +0200
@@ -9,6 +9,7 @@
 
 ### Truffle
 * `truffle.jar`: strip out build-time only dependency into a seperated JAR file (`truffle-dsl-processor.jar`)
+* New flag -G:+TraceTruffleCompilationAST to print the AST before compilation.
 * ...
 
 ## Version 0.3
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerImpl.java	Wed Jun 04 04:08:02 2014 -0700
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerImpl.java	Fri Jun 13 09:06:06 2014 +0200
@@ -111,8 +111,11 @@
     public void compileMethodImpl(final OptimizedCallTarget compilable) {
         final StructuredGraph graph;
 
-        if (TraceTruffleCompilation.getValue()) {
+        if (TraceTruffleCompilation.getValue() || TraceTruffleCompilationAST.getValue()) {
             OptimizedCallTargetLog.logOptimizingStart(compilable);
+            if (TraceTruffleCompilationAST.getValue()) {
+                NodeUtil.printCompactTree(OptimizedCallTarget.OUT, compilable.getRootNode());
+            }
         }
 
         long timeCompilationStarted = System.nanoTime();
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java	Wed Jun 04 04:08:02 2014 -0700
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java	Fri Jun 13 09:06:06 2014 +0200
@@ -87,6 +87,8 @@
     public static final OptionValue<Boolean> TraceTruffleCompilationHistogram = new OptionValue<>(false);
     @Option(help = "Prints out all polymorphic and generic nodes after compilation.")
     public static final OptionValue<Boolean> TraceTruffleCompilationPolymorphism = new OptionValue<>(false);
+    @Option(help = "Prints out all polymorphic and generic nodes after compilation.")
+    public static final OptionValue<Boolean> TraceTruffleCompilationAST = new OptionValue<>(false);
     @Option(help = "")
     public static final OptionValue<Boolean> TraceTruffleExpansion = new OptionValue<>(false);
     @Option(help = "")
--- a/mx/mx_graal.py	Wed Jun 04 04:08:02 2014 -0700
+++ b/mx/mx_graal.py	Fri Jun 13 09:06:06 2014 +0200
@@ -168,7 +168,6 @@
         rmIfExists(join(_graal_home, 'build'))
         rmIfExists(join(_graal_home, 'build-nograal'))
         rmIfExists(_jdksDir())
-        rmIfExists(mx.distribution('GRAAL').path)
 
 def export(args):
     """create archives of builds split by vmbuild and vm"""
--- a/mxtool/mx.py	Wed Jun 04 04:08:02 2014 -0700
+++ b/mxtool/mx.py	Fri Jun 13 09:06:06 2014 +0200
@@ -102,7 +102,8 @@
                 existingSource = zf._provenance.get(arcname, None)
                 isOverwrite = False
                 if existingSource and existingSource != source:
-                    log('warning: ' + self.path + ': avoid overwrite of ' + arcname + '\n  new: ' + source + '\n  old: ' + existingSource)
+                    if arcname[-1] != os.path.sep:
+                        log('warning: ' + self.path + ': avoid overwrite of ' + arcname + '\n  new: ' + source + '\n  old: ' + existingSource)
                     isOverwrite = True
                 zf._provenance[arcname] = source
                 return isOverwrite
@@ -2848,6 +2849,7 @@
     parser = parser if suppliedParser else ArgumentParser(prog='mx clean')
     parser.add_argument('--no-native', action='store_false', dest='native', help='do not clean native projects')
     parser.add_argument('--no-java', action='store_false', dest='java', help='do not clean Java projects')
+    parser.add_argument('--no-dist', action='store_false', dest='dist', help='do not delete distributions')
 
     args = parser.parse_args(args)
 
@@ -2857,6 +2859,10 @@
             path = unicode("\\\\?\\" + dirPath)
         shutil.rmtree(path)
 
+    def _rmIfExists(name):
+        if os.path.isfile(name):
+            os.unlink(name)
+
     for p in projects_opt_limit_to_suites():
         if p.native:
             if args.native:
@@ -2880,6 +2886,12 @@
                 if config.exists():
                     os.unlink(config.path)
 
+    if args.dist:
+        for d in _dists.keys():
+            log('Removing distribution {0}...'.format(d))
+            _rmIfExists(distribution(d).path)
+            _rmIfExists(distribution(d).sourcesPath)
+
     if suppliedParser:
         return args