Update of /cvsroot/jython/jython/Tools/jythonc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20085/Tools/jythonc
Modified Files:
ImportName.py JavaCall.py Object.py ObjectFactory.py
PythonModule.py SrcGenCompiler.py compile.py depend.py jar.py
javac.py main.py proxies.py
Log Message:
removed 0x0c from all files; patch #1218091
Index: ImportName.py
===================================================================
RCS file: /cvsroot/jython/jython/Tools/jythonc/ImportName.py,v
retrieving revision 2.7
retrieving revision 2.8
diff -C2 -d -r2.7 -r2.8
*** ImportName.py 30 May 2002 16:21:38 -0000 2.7
--- ImportName.py 12 Jun 2005 23:43:30 -0000 2.8
***************
*** 10,14 ****
!
def wrapJava(mod):
if isinstance(mod, PyModule):
--- 10,14 ----
!
def wrapJava(mod):
if isinstance(mod, PyModule):
***************
*** 69,73 ****
return []
!
class Namespace:
def __init__(self, mod):
--- 69,73 ----
return []
!
class Namespace:
def __init__(self, mod):
***************
*** 94,98 ****
!
from util import reportPublicPlainClasses
class Package(Namespace):
--- 94,98 ----
!
from util import reportPublicPlainClasses
class Package(Namespace):
***************
*** 109,118 ****
!
class Class(Namespace):
pass
!
class Module(Namespace):
def __init__(self, mod=None, name=None, file=None, path=None):
--- 109,118 ----
!
class Class(Namespace):
pass
!
class Module(Namespace):
def __init__(self, mod=None, name=None, file=None, path=None):
***************
*** 141,145 ****
return "Module(%s, %s, %s)" % (self.name, self.file, self.path)
!
class JavaClass(Namespace):
def __init__(self, mod):
--- 141,145 ----
return "Module(%s, %s, %s)" % (self.name, self.file, self.path)
!
class JavaClass(Namespace):
def __init__(self, mod):
***************
*** 177,181 ****
!
if __name__ == '__main__':
import sys
--- 177,181 ----
!
if __name__ == '__main__':
import sys
Index: JavaCall.py
===================================================================
RCS file: /cvsroot/jython/jython/Tools/jythonc/JavaCall.py,v
retrieving revision 2.3
retrieving revision 2.4
diff -C2 -d -r2.3 -r2.4
*** JavaCall.py 26 Nov 2001 15:21:08 -0000 2.3
--- JavaCall.py 12 Jun 2005 23:43:30 -0000 2.4
***************
*** 5,9 ****
!
funcs = {}
def call(func, this, args=None):
--- 5,9 ----
!
funcs = {}
def call(func, this, args=None):
***************
*** 19,23 ****
!
class Signature:
def __init__(self, name, inTypes, retType, isStatic=0, isPyArgs=0,
--- 19,23 ----
!
class Signature:
def __init__(self, name, inTypes, retType, isStatic=0, isPyArgs=0,
***************
*** 70,74 ****
!
class JavaFunction:
def __init__(self, reflectedFunction):
--- 70,74 ----
!
class JavaFunction:
def __init__(self, reflectedFunction):
***************
*** 127,131 ****
!
if __name__ == '__main__':
f = JavaFunction(org.python.core.PyObject._add)
--- 127,131 ----
!
if __name__ == '__main__':
f = JavaFunction(org.python.core.PyObject._add)
Index: Object.py
===================================================================
RCS file: /cvsroot/jython/jython/Tools/jythonc/Object.py,v
retrieving revision 2.8
retrieving revision 2.9
diff -C2 -d -r2.8 -r2.9
*** Object.py 22 Feb 2005 04:19:29 -0000 2.8
--- Object.py 12 Jun 2005 23:43:30 -0000 2.9
***************
*** 4,8 ****
!
def makeAnys(args):
ret = []
--- 4,8 ----
!
def makeAnys(args):
ret = []
***************
*** 12,16 ****
!
def PyObjectArray(args):
aargs = makeAnys(args)
--- 12,16 ----
!
def PyObjectArray(args):
aargs = makeAnys(args)
***************
*** 24,28 ****
findType(java.lang.Class.forName("[Ljava.lang.String;")))
!
class DelegateMethod:
def __init__(self, method, code):
--- 24,28 ----
findType(java.lang.Class.forName("[Ljava.lang.String;")))
!
class DelegateMethod:
def __init__(self, method, code):
***************
*** 33,37 ****
return apply(self.method, (self.code, )+args)
!
class Object:
def __init__(self, code, value):
--- 33,37 ----
return apply(self.method, (self.code, )+args)
!
class Object:
def __init__(self, code, value):
***************
*** 66,70 ****
!
class JavaObject:
def __init__(self, javaclass):
--- 66,70 ----
!
class JavaObject:
def __init__(self, javaclass):
***************
*** 90,94 ****
!
class JavaInteger(JavaObject):
def __init__(self):
--- 90,94 ----
!
class JavaInteger(JavaObject):
def __init__(self):
***************
*** 99,103 ****
!
class JavaString(JavaObject):
def __init__(self):
--- 99,103 ----
!
class JavaString(JavaObject):
def __init__(self):
***************
*** 108,112 ****
!
PyObject_as_java_class = org.python.core.PyJavaClass.lookup(org.python.core.PyObject) # xxx temporary fix
--- 108,112 ----
!
PyObject_as_java_class = org.python.core.PyJavaClass.lookup(org.python.core.PyObject) # xxx temporary fix
***************
*** 295,299 ****
!
types = {}
def findType(type):
--- 295,299 ----
!
types = {}
def findType(type):
***************
*** 316,320 ****
!
Generic = findType(org.python.core.PyObject)
IntType = findType(java.lang.Integer.TYPE)
--- 316,320 ----
!
Generic = findType(org.python.core.PyObject)
IntType = findType(java.lang.Integer.TYPE)
***************
*** 322,326 ****
!
if __name__ == '__main__':
foo = Object(jast.Identifier("foo"), Generic)
--- 322,326 ----
!
if __name__ == '__main__':
foo = Object(jast.Identifier("foo"), Generic)
Index: ObjectFactory.py
===================================================================
RCS file: /cvsroot/jython/jython/Tools/jythonc/ObjectFactory.py,v
retrieving revision 2.14
retrieving revision 2.15
diff -C2 -d -r2.14 -r2.15
*** ObjectFactory.py 30 May 2002 16:20:13 -0000 2.14
--- ObjectFactory.py 12 Jun 2005 23:43:30 -0000 2.15
***************
*** 5,9 ****
from org.python.parser import ast
!
def makeAnys(args):
ret = []
--- 5,9 ----
from org.python.parser import ast
!
def makeAnys(args):
ret = []
***************
*** 13,17 ****
!
def PyObjectArray(args):
aargs = makeAnys(args)
--- 13,17 ----
!
def PyObjectArray(args):
aargs = makeAnys(args)
***************
*** 21,25 ****
!
class ObjectFactory:
def __init__(self, parent=None):
--- 21,25 ----
!
class ObjectFactory:
def __init__(self, parent=None):
***************
*** 116,125 ****
className = className)
!
class FixedObject(PyObject):
pass
!
class PyConstant(FixedObject):
def __init__(self, value):
--- 116,125 ----
className = className)
!
class FixedObject(PyObject):
pass
!
class PyConstant(FixedObject):
def __init__(self, value):
***************
*** 130,134 ****
!
class PyFunction(FixedObject):
def __init__(self, factory, name, def_compiler,scope, body, doc=None):
--- 130,134 ----
!
class PyFunction(FixedObject):
def __init__(self, factory, name, def_compiler,scope, body, doc=None):
***************
*** 171,175 ****
!
class PyClass(FixedObject):
def __init__(self, factory, name, bases, def_compiler, scope, body, doc=None):
--- 171,175 ----
!
class PyClass(FixedObject):
def __init__(self, factory, name, bases, def_compiler, scope, body, doc=None):
***************
*** 300,304 ****
!
data = """
x=1+1
--- 300,304 ----
!
data = """
x=1+1
Index: PythonModule.py
===================================================================
RCS file: /cvsroot/jython/jython/Tools/jythonc/PythonModule.py,v
retrieving revision 2.21
retrieving revision 2.22
diff -C2 -d -r2.21 -r2.22
*** PythonModule.py 29 Oct 2002 14:22:44 -0000 2.21
--- PythonModule.py 12 Jun 2005 23:43:30 -0000 2.22
***************
*** 12,16 ****
from org.python.compiler import Future
!
"""
class foo
--- 12,16 ----
from org.python.compiler import Future
!
"""
class foo
***************
*** 30,34 ****
!
from java.lang.Character import isJavaIdentifierPart
def legalJavaName(name):
--- 30,34 ----
!
from java.lang.Character import isJavaIdentifierPart
def legalJavaName(name):
***************
*** 45,49 ****
!
def StringArrayOrNull(strs):
--- 45,49 ----
!
def StringArrayOrNull(strs):
***************
*** 225,229 ****
self.superclass, self.interfaces, body)
!
defaultProxyProps = {
"python.options.showJavaExceptions": "true",
--- 225,229 ----
self.superclass, self.interfaces, body)
!
defaultProxyProps = {
"python.options.showJavaExceptions": "true",
***************
*** 236,240 ****
!
class PythonModule:
def getclassname(self, name):
--- 236,240 ----
!
class PythonModule:
def getclassname(self, name):
***************
*** 473,477 ****
return os.path.join(directory, self.name+'.java')
!
if __name__ == '__main__':
pm = PythonModule("baz")
--- 473,477 ----
return os.path.join(directory, self.name+'.java')
!
if __name__ == '__main__':
pm = PythonModule("baz")
Index: SrcGenCompiler.py
===================================================================
RCS file: /cvsroot/jython/jython/Tools/jythonc/SrcGenCompiler.py,v
retrieving revision 2.4
retrieving revision 2.5
diff -C2 -d -r2.4 -r2.5
*** SrcGenCompiler.py 10 Nov 2003 19:11:50 -0000 2.4
--- SrcGenCompiler.py 12 Jun 2005 23:43:30 -0000 2.5
***************
*** 20,24 ****
return None
!
class LocalFrame:
def __init__(self, compiler, scope=None):
--- 20,24 ----
return None
!
class LocalFrame:
def __init__(self, compiler, scope=None):
***************
*** 222,226 ****
!
class GlobalFrame(LocalFrame):
def __init__(self, compiler):
--- 222,226 ----
!
class GlobalFrame(LocalFrame):
def __init__(self, compiler):
***************
*** 239,243 ****
self.opt_globals = not scope.exec and not scope.from_import_star
!
class SrcGenCompiler(Visitor, CompilationContext):
def __init__(self, module, factory, parent=None, frameCtr=None, scope=None,
--- 239,243 ----
self.opt_globals = not scope.exec and not scope.from_import_star
!
class SrcGenCompiler(Visitor, CompilationContext):
def __init__(self, module, factory, parent=None, frameCtr=None, scope=None,
Index: compile.py
===================================================================
RCS file: /cvsroot/jython/jython/Tools/jythonc/compile.py,v
retrieving revision 2.22
retrieving revision 2.23
diff -C2 -d -r2.22 -r2.23
*** compile.py 30 May 2002 16:20:13 -0000 2.22
--- compile.py 12 Jun 2005 23:43:30 -0000 2.23
***************
*** 20,24 ****
!
def getdata(filename):
fp = open(filename, "r")
--- 20,24 ----
!
def getdata(filename):
fp = open(filename, "r")
***************
*** 64,68 ****
!
primitives = {'void' : Void.TYPE,
'int' : Integer.TYPE,
--- 64,68 ----
!
primitives = {'void' : Void.TYPE,
'int' : Integer.TYPE,
***************
*** 76,80 ****
}
!
def insistJavaClass(c):
jc = getJavaClass(c)
--- 76,80 ----
}
!
def insistJavaClass(c):
jc = getJavaClass(c)
***************
*** 86,90 ****
!
primNames = {'void' : 'V',
'int' : 'I',
--- 86,90 ----
!
primNames = {'void' : 'V',
'int' : 'I',
***************
*** 98,102 ****
}
!
##def makeArrayName(c):
## if c.endswith("[]"):
--- 98,102 ----
}
!
##def makeArrayName(c):
## if c.endswith("[]"):
***************
*** 131,138 ****
-
!
def printNames(heading, dict):
items = dict.items()
--- 131,138 ----
!
!
def printNames(heading, dict):
items = dict.items()
***************
*** 156,160 ****
!
class Compiler:
# TBD: Bad! But this modules dicts must be available from deep in
--- 156,160 ----
!
class Compiler:
# TBD: Bad! But this modules dicts must be available from deep in
***************
*** 439,443 ****
!
from java.io import *
--- 439,443 ----
!
from java.io import *
***************
*** 461,465 ****
return c.files, c.javaclasses
!
if __name__ == '__main__':
import sys
--- 461,465 ----
return c.files, c.javaclasses
!
if __name__ == '__main__':
import sys
Index: depend.py
===================================================================
RCS file: /cvsroot/jython/jython/Tools/jythonc/depend.py,v
retrieving revision 2.8
retrieving revision 2.9
diff -C2 -d -r2.8 -r2.9
*** depend.py 26 Nov 2001 15:21:09 -0000 2.8
--- depend.py 12 Jun 2005 23:43:30 -0000 2.9
***************
*** 9,13 ****
!
def fix(n):
DOT = '.'
--- 9,13 ----
!
def fix(n):
DOT = '.'
***************
*** 39,43 ****
!
def dependencies(file):
data = io.DataInputStream(file)
--- 39,43 ----
!
def dependencies(file):
data = io.DataInputStream(file)
***************
*** 113,122 ****
!
def defaultFilter(name):
return not (name[:5] == 'java.' or name[:16] == 'org.python.core.')
!
from org.python.core import PyJavaPackage
from util import lookup, getzip
--- 113,122 ----
!
def defaultFilter(name):
return not (name[:5] == 'java.' or name[:16] == 'org.python.core.')
!
from org.python.core import PyJavaPackage
from util import lookup, getzip
***************
*** 169,173 ****
return self.name[1:]
!
##class ZipEntry:
## def __init__(self, filename, classname):
--- 169,173 ----
return self.name[1:]
!
##class ZipEntry:
## def __init__(self, filename, classname):
***************
*** 184,188 ****
## return zf.getInputStream(entry)
##
! ##
##class DirEntry:
## def __init__(self, dirname, classname):
--- 184,188 ----
## return zf.getInputStream(entry)
##
! ##
##class DirEntry:
## def __init__(self, dirname, classname):
***************
*** 198,202 ****
## return io.FileInputStream(fullname)
!
def depends(name):
if name[0] == '/':
--- 198,202 ----
## return io.FileInputStream(fullname)
!
def depends(name):
if name[0] == '/':
***************
*** 208,212 ****
return ze, ret
!
if __name__ == '__main__':
#print getFile('org.python.modules.strop')
--- 208,212 ----
return ze, ret
!
if __name__ == '__main__':
#print getFile('org.python.modules.strop')
Index: jar.py
===================================================================
RCS file: /cvsroot/jython/jython/Tools/jythonc/jar.py,v
retrieving revision 2.7
retrieving revision 2.8
diff -C2 -d -r2.7 -r2.8
*** jar.py 26 Nov 2001 15:21:09 -0000 2.7
--- jar.py 12 Jun 2005 23:43:30 -0000 2.8
***************
*** 13,17 ****
!
def copy(instream, outstream):
data = jarray.zeros(1024*4, 'b')
--- 13,17 ----
!
def copy(instream, outstream):
data = jarray.zeros(1024*4, 'b')
***************
*** 25,29 ****
!
class JavaArchive:
def __init__(self, packages=[]):
--- 25,29 ----
!
class JavaArchive:
def __init__(self, packages=[]):
***************
*** 164,168 ****
!
if __name__ == '__main__':
root = "c:\\jpython\\tools\\jpythonc2"
--- 164,168 ----
!
if __name__ == '__main__':
root = "c:\\jpython\\tools\\jpythonc2"
Index: javac.py
===================================================================
RCS file: /cvsroot/jython/jython/Tools/jythonc/javac.py,v
retrieving revision 2.14
retrieving revision 2.15
diff -C2 -d -r2.14 -r2.15
*** javac.py 26 Nov 2001 15:21:09 -0000 2.14
--- javac.py 12 Jun 2005 23:43:30 -0000 2.15
***************
*** 6,10 ****
!
def dumpStream(stream, txtarr):
array = jarray.zeros( 1024, 'b' )
--- 6,10 ----
!
def dumpStream(stream, txtarr):
array = jarray.zeros( 1024, 'b' )
***************
*** 16,20 ****
!
def findDefaultJavac():
jhome = System.getProperty("java.home")
--- 16,20 ----
!
def findDefaultJavac():
jhome = System.getProperty("java.home")
***************
*** 32,36 ****
!
import sys
def compile(files, javac=None, cpathopt="-classpath",
--- 32,36 ----
!
import sys
def compile(files, javac=None, cpathopt="-classpath",
***************
*** 108,112 ****
!
if __name__ == '__main__':
files = ["c:\\jpython\\tools\\jpythonc2\\test\\ButtonDemo.java",
--- 108,112 ----
!
if __name__ == '__main__':
files = ["c:\\jpython\\tools\\jpythonc2\\test\\ButtonDemo.java",
Index: main.py
===================================================================
RCS file: /cvsroot/jython/jython/Tools/jythonc/main.py,v
retrieving revision 2.15
retrieving revision 2.16
diff -C2 -d -r2.15 -r2.16
*** main.py 22 Feb 2005 04:19:29 -0000 2.15
--- main.py 12 Jun 2005 23:43:30 -0000 2.16
***************
*** 71,75 ****
!
# Standard usage message printing
def usage(errcode, msg=''):
--- 71,75 ----
!
# Standard usage message printing
def usage(errcode, msg=''):
***************
*** 166,170 ****
!
def addCore(extraPackages):
skiplist = [ 'org.python.core.parser',
--- 166,170 ----
!
def addCore(extraPackages):
skiplist = [ 'org.python.core.parser',
***************
*** 179,183 ****
!
mainclass = basepath = None
--- 179,183 ----
!
mainclass = basepath = None
***************
*** 223,227 ****
!
def copyclass(jc, fromdir, todir):
import jar
--- 223,227 ----
!
def copyclass(jc, fromdir, todir):
import jar
***************
*** 241,245 ****
!
def writeResults(comp, opts):
global mainclass
--- 241,245 ----
!
def writeResults(comp, opts):
global mainclass
Index: proxies.py
===================================================================
RCS file: /cvsroot/jython/jython/Tools/jythonc/proxies.py,v
retrieving revision 2.16
retrieving revision 2.17
diff -C2 -d -r2.16 -r2.17
*** proxies.py 26 Nov 2001 15:21:09 -0000 2.16
--- proxies.py 12 Jun 2005 23:43:30 -0000 2.17
***************
*** 11,15 ****
!
def aget(dict, key, default):
if dict.has_key(key):
--- 11,15 ----
!
def aget(dict, key, default):
if dict.has_key(key):
***************
*** 20,24 ****
return ret
!
#Utility functions for converting between java and python types
def typeName(cls):
--- 20,24 ----
return ret
!
#Utility functions for converting between java and python types
def typeName(cls):
***************
*** 34,38 ****
!
def nullReturn(ret):
if ret == Void.TYPE:
--- 34,38 ----
!
def nullReturn(ret):
if ret == Void.TYPE:
***************
*** 51,55 ****
!
def makeReturn(code, ret):
if ret == Void.TYPE:
--- 51,55 ----
!
def makeReturn(code, ret):
if ret == Void.TYPE:
***************
*** 66,70 ****
!
def makeObject(code, c):
if c in [Integer.TYPE, Byte.TYPE, Short.TYPE, Long.TYPE]:
--- 66,70 ----
!
def makeObject(code, c):
if c in [Integer.TYPE, Byte.TYPE, Short.TYPE, Long.TYPE]:
***************
*** 81,85 ****
!
def filterThrows(throws):
ret = []
--- 81,85 ----
!
def filterThrows(throws):
ret = []
***************
*** 90,94 ****
!
def wrapThrows(stmt, throws, retType):
if len(throws) == 0: return stmt
--- 90,94 ----
!
def wrapThrows(stmt, throws, retType):
if len(throws) == 0: return stmt
***************
*** 112,116 ****
!
class JavaProxy:
def __init__(self, name, supername, bases, methods, module=None,
--- 112,116 ----
!
class JavaProxy:
def __init__(self, name, supername, bases, methods, module=None,
***************
*** 570,574 ****
!
if __name__ == '__main__':
import java
--- 570,574 ----
!
if __name__ == '__main__':
import java
|