[pypy-svn] r47857 - pypy/dist/pypy/lang/smalltalk/tool
tverwaes at codespeak.net
tverwaes at codespeak.net
Wed Oct 24 20:13:05 CEST 2007
Author: tverwaes
Date: Wed Oct 24 20:13:04 2007
New Revision: 47857
Modified:
pypy/dist/pypy/lang/smalltalk/tool/analyseimage.py
Log:
hacky hacky, we made out first loaded method pass (apparently some
primitive call on self)
Modified: pypy/dist/pypy/lang/smalltalk/tool/analyseimage.py
==============================================================================
--- pypy/dist/pypy/lang/smalltalk/tool/analyseimage.py (original)
+++ pypy/dist/pypy/lang/smalltalk/tool/analyseimage.py Wed Oct 24 20:13:04 2007
@@ -33,17 +33,17 @@
for each in image.objects:
if isinstance(each,sqm.W_CompiledMethod):
- if (amethod == None and
- each.argsize == 0 and
+ if (each.argsize == 0 and amethod == None and
each.tempsize == 0 and
- each.primitive == 1 and skip >= 0):
- amethod = each
-
- if len(amethod.bytes) == 0:
- print "Found method with bodylenght 0"
- amethod = None
- else:
- skip += 1
+ each.primitive == 1):
+
+ if len(each.bytes) == 0:
+ pass
+ else:
+ if skip >= SKIPMETHODS:
+ amethod = each
+ else:
+ skip += 1
#print "%d %d %d" % (each.argsize, each.tempsize, each.primitive)
# receiver, arguments
@@ -55,7 +55,9 @@
w_frame = amethod.createFrame(anObject, [])
interp.activeContext = w_frame
- w_frame.push(interp.TRUE)
+ #w_frame.push(interp.TRUE)
+ w_frame.push(interp.ONE)
+ w_frame.push(interp.TWO)
while True:
try:
@@ -64,6 +66,9 @@
except sqi.ReturnFromTopLevel, e:
return e.object
+# apply to Xth method
+SKIPMETHODS=3 #X
+
def test_do():
testCompiledMethods()
More information about the Pypy-commit
mailing list