[pypy-svn] r55070 - pypy/branch/smalltalk-shadow-changes/pypy/translator/goal
tverwaes at codespeak.net
tverwaes at codespeak.net
Wed May 21 16:25:36 CEST 2008
Author: tverwaes
Date: Wed May 21 16:25:35 2008
New Revision: 55070
Modified:
pypy/branch/smalltalk-shadow-changes/pypy/translator/goal/targetfibsmalltalk.py
pypy/branch/smalltalk-shadow-changes/pypy/translator/goal/targetimageloadingsmalltalk.py
pypy/branch/smalltalk-shadow-changes/pypy/translator/goal/targettinybenchsmalltalk.py
Log:
checking in new versions of targets
Modified: pypy/branch/smalltalk-shadow-changes/pypy/translator/goal/targetfibsmalltalk.py
==============================================================================
--- pypy/branch/smalltalk-shadow-changes/pypy/translator/goal/targetfibsmalltalk.py (original)
+++ pypy/branch/smalltalk-shadow-changes/pypy/translator/goal/targetfibsmalltalk.py Wed May 21 16:25:35 2008
@@ -17,7 +17,7 @@
def build():
bytecode = ''.join(map(chr, [ 16, 119, 178, 154, 118, 164, 11, 112, 16, 118, 177, 224, 112, 16, 119, 177, 224, 176, 124 ]))
shadow = mockclass(0).as_class_get_shadow()
- method = model.W_CompiledMethod(1, bytecode, 1)
+ method = model.W_CompiledMethod(1, bytecode)
method.literals = fakeliterals("fib:")
shadow.installmethod("fib:", method)
w_object = shadow.new()
Modified: pypy/branch/smalltalk-shadow-changes/pypy/translator/goal/targetimageloadingsmalltalk.py
==============================================================================
--- pypy/branch/smalltalk-shadow-changes/pypy/translator/goal/targetimageloadingsmalltalk.py (original)
+++ pypy/branch/smalltalk-shadow-changes/pypy/translator/goal/targetimageloadingsmalltalk.py Wed May 21 16:25:35 2008
@@ -10,32 +10,19 @@
mockclass = classtable.bootstrap_class
-def new_interpreter(bytes):
- assert isinstance(bytes, str)
- w_method = model.W_CompiledMethod(0, bytes=bytes)
- w_frame = w_method.create_frame(objtable.w_nil, [])
- interp = interpreter.Interpreter()
- interp.w_active_context = w_frame
- return interp
-
-
-
def tinyBenchmarks(image):
interp = interpreter.Interpreter()
w_object = model.W_SmallInteger(0)
# Should get this from w_object
- w_smallint_class = image.special(constants.SO_SMALLINTEGER_CLASS)
s_class = w_object.shadow_of_my_class()
w_method = s_class.lookup("tinyBenchmarks")
assert w_method
w_frame = w_method.create_frame(w_object, [])
- interp.w_active_context = w_frame
+ interp.store_w_active_context(w_frame)
- print w_method
- print "Going to execute %d toplevel bytecodes" % (len(w_method.bytes),)
counter = 0
from pypy.lang.smalltalk.interpreter import BYTECODE_TABLE
Modified: pypy/branch/smalltalk-shadow-changes/pypy/translator/goal/targettinybenchsmalltalk.py
==============================================================================
--- pypy/branch/smalltalk-shadow-changes/pypy/translator/goal/targettinybenchsmalltalk.py (original)
+++ pypy/branch/smalltalk-shadow-changes/pypy/translator/goal/targettinybenchsmalltalk.py Wed May 21 16:25:35 2008
@@ -30,10 +30,8 @@
assert w_method
w_frame = w_method.create_frame(w_object, [])
- interp.w_active_context = w_frame
+ interp.store_w_active_context(w_frame)
- print w_method
- print "Going to execute %d toplevel bytecodes" % (len(w_method.bytes),)
counter = 0
from pypy.lang.smalltalk.interpreter import BYTECODE_TABLE
More information about the Pypy-commit
mailing list