[pypy-svn] r48015 - pypy/dist/pypy/lang/smalltalk

akuhn at codespeak.net akuhn at codespeak.net
Fri Oct 26 01:19:36 CEST 2007


Author: akuhn
Date: Fri Oct 26 01:19:36 2007
New Revision: 48015

Modified:
   pypy/dist/pypy/lang/smalltalk/primitives.py
Log:
started to using speaking names and correctly tagged index names, like n0 and n1

Modified: pypy/dist/pypy/lang/smalltalk/primitives.py
==============================================================================
--- pypy/dist/pypy/lang/smalltalk/primitives.py	(original)
+++ pypy/dist/pypy/lang/smalltalk/primitives.py	Fri Oct 26 01:19:36 2007
@@ -294,10 +294,11 @@
     assert_valid_index(idx-1, w_obj)
     return w_obj, idx-1, w_val
 
- at expose_primitive(AT, unwrap_spec=[object, object])
-def func(interp, w_obj, w_idx):
-    [w_obj, idx] = common_at(w_obj, w_idx)
-    return w_obj.fetch(idx)
+ at expose_primitive(AT, unwrap_spec=[object, int])
+def func(interp, w_obj, n1):
+    n0 = n1 - 1
+    assert_valid_index(n0, w_obj)
+    return w_obj.fetch(n0)
 
 @expose_primitive(AT_PUT, unwrap_spec=[object, object, object])
 def func(interp, w_obj, w_idx, w_val):



More information about the Pypy-commit mailing list