Author: Lars Wassermann <[email protected]>
Branch:
Changeset: r27:b5b267b6b378
Date: 2013-02-14 15:47 +0100
http://bitbucket.org/pypy/lang-smalltalk/changeset/b5b267b6b378/
Log: make spyvm translate
diff --git a/spyvm/interpreter.py b/spyvm/interpreter.py
--- a/spyvm/interpreter.py
+++ b/spyvm/interpreter.py
@@ -17,7 +17,7 @@
class IllegalStoreError(Exception):
"""Illegal Store."""
-def get_printable_location(self, pc, w_method):
+def get_printable_location(pc, self, w_method):
return '%d: %s' % (pc, w_method.bytes[pc])
class Interpreter(object):
@@ -26,7 +26,7 @@
cnt = 0
_last_indent = ""
jit_driver = jit.JitDriver(
- greens = ['self', 'pc', 'w_method'],
+ greens = ['pc', 'self', 'w_method'],
reds = ['s_active_context'],
get_printable_location = get_printable_location
)
@@ -228,7 +228,7 @@
code = method.primitive
if interp.should_trace():
print "%sActually calling primitive %d" %
(interp._last_indent, code,)
- if objectmodel.we_are_translated():
+ if False: #objectmodel.we_are_translated():
for i, func in primitives.unrolling_prim_table:
if i == code:
try:
diff --git a/spyvm/primitives.py b/spyvm/primitives.py
--- a/spyvm/primitives.py
+++ b/spyvm/primitives.py
@@ -7,7 +7,7 @@
PrimitiveNotYetWrittenError
from spyvm import wrapper
-from rpython.rlib import rarithmetic, rfloat, unroll
+from rpython.rlib import rarithmetic, rfloat, unroll, jit
def assert_bounds(n0, minimum, maximum):
if not minimum <= n0 < maximum:
@@ -619,6 +619,7 @@
@expose_primitive(INC_GC, unwrap_spec=[object])
@expose_primitive(FULL_GC, unwrap_spec=[object])
[email protected]_look_inside
def func(interp, w_arg): # Squeak pops the arg and ignores it ... go figure
from rpython.rlib import rgc
rgc.collect()
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit