[pypy-svn] r51837 - in pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk: . test
tverwaes at codespeak.net
tverwaes at codespeak.net
Sun Feb 24 22:43:04 CET 2008
Author: tverwaes
Date: Sun Feb 24 22:43:02 2008
New Revision: 51837
Modified:
pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/model.py
pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/test/test_miniimage.py
Log:
got the compiling of fib + call to work!!!
Modified: pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/model.py
==============================================================================
--- pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/model.py (original)
+++ pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/model.py Sun Feb 24 22:43:02 2008
@@ -165,10 +165,12 @@
self._vars = [w_nil] * size
def at0(self, index0):
- return self.fetch(index0)
+ # To test, at0 = in varsize part
+ return self.fetch(index0+self.instsize())
def atput0(self, index0, w_value):
- self.store(index0, w_value)
+ # To test, at0 = in varsize part
+ self.store(index0+self.instsize(), w_value)
def fetch(self, n0):
return self._vars[n0]
Modified: pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/test/test_miniimage.py
==============================================================================
--- pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/test/test_miniimage.py (original)
+++ pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/test/test_miniimage.py Sun Feb 24 22:43:02 2008
@@ -246,7 +246,7 @@
ifTrue: [ 1 ]
ifFalse: [ (self - 1) fib + (self - 2) fib ]"""
perform(w(10).getclass(), "compile:classified:notifying:", w(sourcecode), w('pypy'), w(None))
- assert perform(w(10), "fib") == w(89)
+ assert perform(w(10), "fib").equals(w(89))
def w(any):
if any is None:
@@ -278,5 +278,5 @@
interp.step()
#print interp.s_active_context.stack
except interpreter.ReturnFromTopLevel, e:
- return e.object.value
+ return e.object
More information about the Pypy-commit
mailing list