# HG changeset patch # User Laurent Daynes # Date 1402643166 -7200 # Node ID 32ddc8096f4c001ad4b0be5b5040249672952709 # Parent 8d164bec9807bbf54a0320a8f6af526c65dfa4f7# Parent 64e17273306181943d7ebe393d0a21b591ecd4cd Merge diff -r 8d164bec9807 -r 32ddc8096f4c CHANGELOG.md --- 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 diff -r 8d164bec9807 -r 32ddc8096f4c graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerImpl.java --- 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(); diff -r 8d164bec9807 -r 32ddc8096f4c graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java --- 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 TraceTruffleCompilationHistogram = new OptionValue<>(false); @Option(help = "Prints out all polymorphic and generic nodes after compilation.") public static final OptionValue TraceTruffleCompilationPolymorphism = new OptionValue<>(false); + @Option(help = "Prints out all polymorphic and generic nodes after compilation.") + public static final OptionValue TraceTruffleCompilationAST = new OptionValue<>(false); @Option(help = "") public static final OptionValue TraceTruffleExpansion = new OptionValue<>(false); @Option(help = "") diff -r 8d164bec9807 -r 32ddc8096f4c mx/mx_graal.py --- 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""" diff -r 8d164bec9807 -r 32ddc8096f4c mxtool/mx.py --- 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