[pypy-svn] r47981 - in pypy/dist/pypy/lang/smalltalk: . test tool

cfbolz at codespeak.net cfbolz at codespeak.net
Thu Oct 25 20:31:17 CEST 2007


Author: cfbolz
Date: Thu Oct 25 20:31:17 2007
New Revision: 47981

Modified:
   pypy/dist/pypy/lang/smalltalk/interpreter.py
   pypy/dist/pypy/lang/smalltalk/model.py
   pypy/dist/pypy/lang/smalltalk/test/test_interpreter.py
   pypy/dist/pypy/lang/smalltalk/test/test_miniimage.py
   pypy/dist/pypy/lang/smalltalk/tool/analyseimage.py
Log:
python coding style: createFrame -> create_frame


Modified: pypy/dist/pypy/lang/smalltalk/interpreter.py
==============================================================================
--- pypy/dist/pypy/lang/smalltalk/interpreter.py	(original)
+++ pypy/dist/pypy/lang/smalltalk/interpreter.py	Thu Oct 25 20:31:17 2007
@@ -140,7 +140,7 @@
                 self.push(w_result)
                 return
         arguments = self.stack[len(self.stack)-argcount:]
-        interp.w_active_context = method.createFrame(receiver, arguments, self)
+        interp.w_active_context = method.create_frame(receiver, arguments, self)
         self.pop_n(argcount + 1)
 
     def _return(self, object, interp):

Modified: pypy/dist/pypy/lang/smalltalk/model.py
==============================================================================
--- pypy/dist/pypy/lang/smalltalk/model.py	(original)
+++ pypy/dist/pypy/lang/smalltalk/model.py	Thu Oct 25 20:31:17 2007
@@ -221,7 +221,7 @@
     def getliteral(self, index):
         return self.literals[index + 1] # header of compiledmethod at index 0
 
-    def createFrame(self, receiver, arguments, sender = None):
+    def create_frame(self, receiver, arguments, sender = None):
         assert len(arguments) == self.argsize
         return W_MethodContext(self, receiver, arguments, sender)
 

Modified: pypy/dist/pypy/lang/smalltalk/test/test_interpreter.py
==============================================================================
--- pypy/dist/pypy/lang/smalltalk/test/test_interpreter.py	(original)
+++ pypy/dist/pypy/lang/smalltalk/test/test_interpreter.py	Thu Oct 25 20:31:17 2007
@@ -33,7 +33,7 @@
     assert isinstance(bytes, str)
     w_method = model.W_CompiledMethod(0, bytes=bytes,
                                       argsize=2, tempsize=1)
-    w_frame = w_method.createFrame(receiver, ["foo", "bar"])
+    w_frame = w_method.create_frame(receiver, ["foo", "bar"])
     interp = interpreter.Interpreter()
     interp.w_active_context = w_frame
     return interp
@@ -41,7 +41,7 @@
 def test_create_frame():
     w_method = model.W_CompiledMethod(0, bytes="hello",
                                       argsize=2, tempsize=1)
-    w_frame = w_method.createFrame("receiver", ["foo", "bar"])
+    w_frame = w_method.create_frame("receiver", ["foo", "bar"])
     assert w_frame.w_receiver == "receiver"
     assert w_frame.gettemp(0) == "foo"
     assert w_frame.gettemp(1) == "bar"

Modified: pypy/dist/pypy/lang/smalltalk/test/test_miniimage.py
==============================================================================
--- pypy/dist/pypy/lang/smalltalk/test/test_miniimage.py	(original)
+++ pypy/dist/pypy/lang/smalltalk/test/test_miniimage.py	Thu Oct 25 20:31:17 2007
@@ -229,7 +229,7 @@
     # w_method = s_class.lookup("abs")
 
     assert w_method
-    w_frame = w_method.createFrame(w_object, [])
+    w_frame = w_method.create_frame(w_object, [])
     interp.w_active_context = w_frame
 
     print w_method

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	Thu Oct 25 20:31:17 2007
@@ -38,7 +38,7 @@
     amethod = w_smallint_class.lookup("abs")
                                   # First literal of the abs method is
                                   # a real smalltalk int
-    w_frame = amethod.createFrame(model.W_SmallInteger(3), [])
+    w_frame = amethod.create_frame(model.W_SmallInteger(3), [])
     interp.activeContext = w_frame
 
     print amethod
@@ -74,7 +74,7 @@
 
                                   # First literal of the abs method is
                                   # a real smalltalk int
-    w_frame = w_method.createFrame(w_object, [w_message])
+    w_frame = w_method.create_frame(w_object, [w_message])
     print "WFRAME: %r" % (w_frame,)
     interp.w_active_context = w_frame
 



More information about the Pypy-commit mailing list