changeset 7509:442668d41bc2

fixed warnings
author Doug Simon <doug.simon@oracle.com>
date Mon, 21 Jan 2013 12:23:55 +0100
parents 60c536556fc1
children 225002aba5a5 f7ca24d268c4
files graal/com.oracle.truffle.codegen.processor/src/META-INF/services/javax.annotation.processing.Processor graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/Parser.frame graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/Scanner.frame graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/SimpleLanguage.atg mx/commands.py mxtool/mx.py
diffstat 6 files changed, 27 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.truffle.codegen.processor/src/META-INF/services/javax.annotation.processing.Processor	Fri Jan 18 15:25:06 2013 +0100
+++ b/graal/com.oracle.truffle.codegen.processor/src/META-INF/services/javax.annotation.processing.Processor	Mon Jan 21 12:23:55 2013 +0100
@@ -1,1 +1,1 @@
-com.oracle.truffle.codegen.processor.TruffleProcessor
\ No newline at end of file
+com.oracle.truffle.codegen.processor.TruffleProcessor
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/Parser.frame	Fri Jan 18 15:25:06 2013 +0100
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/Parser.frame	Mon Jan 21 12:23:55 2013 +0100
@@ -45,7 +45,7 @@
     public final Scanner scanner;
     public final Errors errors;
     private final NodeFactory factory;
-	-->declarations
+    -->declarations
     public Parser(Scanner scanner, NodeFactory factory) {
         this.scanner = scanner;
         this.factory = factory;
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/Scanner.frame	Fri Jan 18 15:25:06 2013 +0100
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/Scanner.frame	Mon Jan 21 12:23:55 2013 +0100
@@ -403,7 +403,7 @@
             NextCh();
         }
     }
-	
+
 -->comments
 
     void CheckLiteral() {
@@ -418,7 +418,7 @@
     Token NextToken() {
         while (ch == ' ' || 
 -->scan1
-		) NextCh();
+        ) NextCh();
 -->scan2
         int recKind = noSym;
         int recEnd = pos;
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/SimpleLanguage.atg	Fri Jan 18 15:25:06 2013 +0100
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/SimpleLanguage.atg	Mon Jan 21 12:23:55 2013 +0100
@@ -28,7 +28,7 @@
 =
 Function 
 {
-	 Function
+     Function
 }
 .
 
@@ -86,7 +86,7 @@
 }
 ";"                                             (. result = factory.createPrint(expressions); .)
 .
-							
+
 ReturnStatement<out StatementNode result>
 =
 "return"
@@ -97,8 +97,8 @@
 =
 ValueExpression<out result>
 [
-    ("<" | ">" | "<=" | ">=" | "==" | "!=" )    (.	String op = t.val; .)
-    ValueExpression<out TypedNode right>        (.	result = factory.createBinary(op, result, right); .)
+    ("<" | ">" | "<=" | ">=" | "==" | "!=" )    (.  String op = t.val; .)
+    ValueExpression<out TypedNode right>        (.  result = factory.createBinary(op, result, right); .)
 ]
 .
 
--- a/mx/commands.py	Fri Jan 18 15:25:06 2013 +0100
+++ b/mx/commands.py	Mon Jan 21 12:23:55 2013 +0100
@@ -26,10 +26,9 @@
 #
 # ----------------------------------------------------------------------------------------------------
 
-import os, sys, shutil, zipfile, tempfile, re, time, datetime, platform, subprocess, multiprocessing, types
+import os, sys, shutil, zipfile, tempfile, re, time, datetime, platform, subprocess, multiprocessing
 from os.path import join, exists, dirname, basename
 from argparse import ArgumentParser, REMAINDER
-from threading import Thread
 import mx
 import sanitycheck
 import json
@@ -80,8 +79,8 @@
 
 def _chmodDir(chmodFlags, dirname, fnames):
     os.chmod(dirname, chmodFlags)
-    for file in fnames:
-        os.chmod(os.path.join(dirname, file), chmodFlags)
+    for name in fnames:
+        os.chmod(os.path.join(dirname, name), chmodFlags)
 
 def chmodRecursive(dirname, chmodFlags):
     os.path.walk(dirname, _chmodDir, chmodFlags)
@@ -875,7 +874,7 @@
         count = int(args[0])
         del args[0]
     
-    for n in range(count):
+    for _ in range(count):
         if not vm(['-XX:+DeoptimizeALot', '-XX:+VerifyOops'] + args + ['-version'], vmbuild='fastdebug') == 0:
             mx.abort("Failed")
             
--- a/mxtool/mx.py	Fri Jan 18 15:25:06 2013 +0100
+++ b/mxtool/mx.py	Mon Jan 21 12:23:55 2013 +0100
@@ -172,18 +172,18 @@
         return isinstance(self, Library)
 
 class Project(Dependency):
-    def __init__(self, suite, name, srcDirs, deps, javaCompliance, dir):
+    def __init__(self, suite, name, srcDirs, deps, javaCompliance, d):
         Dependency.__init__(self, suite, name)
         self.srcDirs = srcDirs
         self.deps = deps
         self.checkstyleProj = name
         self.javaCompliance = JavaCompliance(javaCompliance) if javaCompliance is not None else None
         self.native = False
-        self.dir = dir
+        self.dir = d
         
         # Create directories for projects that don't yet exist
-        if not exists(dir):
-            os.mkdir(dir)
+        if not exists(d):
+            os.mkdir(d)
         for s in self.source_dirs():
             if not exists(s):
                 os.mkdir(s)
@@ -412,14 +412,14 @@
             cp.append(path)
 
 class Suite:
-    def __init__(self, dir, primary):
-        self.dir = dir
+    def __init__(self, d, primary):
+        self.dir = d
         self.projects = []
         self.libs = []
         self.includes = []
         self.commands = None
         self.primary = primary
-        mxDir = join(dir, 'mx')
+        mxDir = join(d, 'mx')
         self._load_env(mxDir)
         self._load_commands(mxDir)
         self._load_includes(mxDir)
@@ -471,10 +471,10 @@
             javaCompliance = attrs.pop('javaCompliance', None)
             subDir = attrs.pop('subDir', None);
             if subDir is None:
-                dir = join(self.dir, name)
+                d = join(self.dir, name)
             else:
-                dir = join(self.dir, subDir, name)
-            p = Project(self, name, srcDirs, deps, javaCompliance, dir)
+                d = join(self.dir, subDir, name)
+            p = Project(self, name, srcDirs, deps, javaCompliance, d)
             p.checkstyleProj = attrs.pop('checkstyle', name)
             p.native = attrs.pop('native', '') == 'true'
             if not p.native and p.javaCompliance is None:
@@ -632,13 +632,13 @@
     else:
         abort('Unknown operating system ' + sys.platform)
 
-def _loadSuite(dir, primary=False):
-    mxDir = join(dir, 'mx')
+def _loadSuite(d, primary=False):
+    mxDir = join(d, 'mx')
     if not exists(mxDir) or not isdir(mxDir):
         return None
-    if not _suites.has_key(dir):
-        suite = Suite(dir, primary)
-        _suites[dir] = suite
+    if not _suites.has_key(d):
+        suite = Suite(d, primary)
+        _suites[d] = suite
         return suite
 
 def suites():