[pypy-svn] r65933 - pypy/branch/pyjitpl5/pypy/jit/tl/spli

fijal at codespeak.net fijal at codespeak.net
Wed Jun 24 21:02:45 CEST 2009


Author: fijal
Date: Wed Jun 24 21:02:43 2009
New Revision: 65933

Modified:
   pypy/branch/pyjitpl5/pypy/jit/tl/spli/objects.py
   pypy/branch/pyjitpl5/pypy/jit/tl/spli/targetspli.py
Log:
* add repr
* minor fixes


Modified: pypy/branch/pyjitpl5/pypy/jit/tl/spli/objects.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/tl/spli/objects.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/tl/spli/objects.py	Wed Jun 24 21:02:43 2009
@@ -59,6 +59,8 @@
     def as_str(self):
         raise W_TypeError
 
+    def repr(self):
+        raise InvalidOperation
 
 class Bool(SPLIObject):
 
@@ -68,6 +70,8 @@
     def is_true(self):
         return self.value
 
+    def repr(self):
+        return str(self.value)
 
 class Int(SPLIObject):
 
@@ -83,6 +87,8 @@
     def as_int(self):
         return self.value
 
+    def repr(self):
+        return str(self.value)
 
 class Str(SPLIObject):
 
@@ -95,6 +101,8 @@
     def add(self, other):
         return Str(self.value + other.as_str())
 
+    def repr(self):
+        return self.value
 
 class SPLINone(SPLIObject):
     pass

Modified: pypy/branch/pyjitpl5/pypy/jit/tl/spli/targetspli.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/tl/spli/targetspli.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/tl/spli/targetspli.py	Wed Jun 24 21:02:43 2009
@@ -18,6 +18,7 @@
     frame = interpreter.SPLIFrame(co)
     res = frame.run()
     print res.repr()
+    return 0
 
 def target(drver, args):
     return entry_point, None



More information about the Pypy-commit mailing list