changeset 15844:d1822a8fe26f

minor cleanups
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Wed, 21 May 2014 22:44:46 -0700
parents 747bc4099ad8
children babe4565c371
files graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/match/MatchProcessor.java graal/com.oracle.graal.hotspotvmconfig/src/com/oracle/graal/hotspotvmconfig/HotSpotVMConfigProcessor.java mx/mx_graal.py
diffstat 3 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/match/MatchProcessor.java	Wed May 21 22:22:06 2014 -0700
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/match/MatchProcessor.java	Wed May 21 22:44:46 2014 -0700
@@ -219,7 +219,7 @@
      */
     private static final boolean DEBUG = false;
 
-    private static final String MATCHPROCESSOR_LOG = "/tmp/matchprocessor.log";
+    private static final String LOGFILE = new File(System.getProperty("java.io.tmpdir"), "matchprocessor.log").getPath();
 
     private static PrintWriter log;
 
@@ -230,7 +230,7 @@
     private static synchronized PrintWriter getLog() {
         if (log == null) {
             try {
-                log = new PrintWriter(new FileWriter(MATCHPROCESSOR_LOG, true));
+                log = new PrintWriter(new FileWriter(LOGFILE, true));
             } catch (IOException e) {
                 // Do nothing
             }
--- a/graal/com.oracle.graal.hotspotvmconfig/src/com/oracle/graal/hotspotvmconfig/HotSpotVMConfigProcessor.java	Wed May 21 22:22:06 2014 -0700
+++ b/graal/com.oracle.graal.hotspotvmconfig/src/com/oracle/graal/hotspotvmconfig/HotSpotVMConfigProcessor.java	Wed May 21 22:44:46 2014 -0700
@@ -54,7 +54,7 @@
      */
     private static final boolean DEBUG = true;
 
-    private static final String LOGFILE = "/tmp/hotspotvmconfigprocessor.log";
+    private static final String LOGFILE = new File(System.getProperty("java.io.tmpdir"), "hotspotvmconfigprocessor.log").getPath();
 
     private static PrintWriter log;
 
@@ -109,7 +109,7 @@
 
     //@formatter:off
     String[] prologue = new String[]{
-        "// The normal wrappers boolAt and intxAt skip constant flags",
+        "// The normal wrappers CommandLineFlags::boolAt and CommandLineFlags::intxAt skip constant flags",
         "static bool boolAt(char* name, bool* value) {",
         "  Flag* result = Flag::find_flag(name, strlen(name), true, true);",
         "  if (result == NULL) return false;",
@@ -157,12 +157,12 @@
             out.println();
 
             Set<String> fieldTypes = new HashSet<>();
-            for (String key : annotations.keySet()) {
-                fieldTypes.add(annotations.get(key).getType());
+            for (VMConfigField key : annotations.values()) {
+                fieldTypes.add(key.getType());
             }
             // For each type of field, generate a switch on the length of the symbol and then do a
             // direct compare. In general this reduces each operation to 2 tests plus a string
-            // compare. Being more prefect than that is probably not worth it.
+            // compare. Being more perfect than that is probably not worth it.
             for (String type : fieldTypes) {
                 String sigtype = type.equals("boolean") ? "bool" : type;
                 out.println("    if (fs.signature() == vmSymbols::" + sigtype + "_signature()) {");
--- a/mx/mx_graal.py	Wed May 21 22:22:06 2014 -0700
+++ b/mx/mx_graal.py	Wed May 21 22:44:46 2014 -0700
@@ -690,7 +690,7 @@
             mustBuild = False
             timestamp = os.path.getmtime(timestampFile)
             sources = []
-            for d in ['src', 'make', 'graal/com.oracle.graal.hotspot/src_gen/hotspot']:
+            for d in ['src', 'make', join('graal', 'com.oracle.graal.hotspot', 'src_gen', 'hotspot')]:
                 for root, dirnames, files in os.walk(join(_graal_home, d)):
                     # ignore <graal>/src/share/tools
                     if root == join(_graal_home, 'src', 'share'):