[pypy-svn] r72260 - in pypy/branch/avm/pypy/translator/avm2: . test

magcius at codespeak.net magcius at codespeak.net
Mon Mar 15 21:05:40 CET 2010


Author: magcius
Date: Mon Mar 15 21:05:19 2010
New Revision: 72260

Modified:
   pypy/branch/avm/pypy/translator/avm2/avm2gen.py
   pypy/branch/avm/pypy/translator/avm2/test/entrypoint.py
Log:
More work on the AVM2 translator

Modified: pypy/branch/avm/pypy/translator/avm2/avm2gen.py
==============================================================================
--- pypy/branch/avm/pypy/translator/avm2/avm2gen.py	(original)
+++ pypy/branch/avm/pypy/translator/avm2/avm2gen.py	Mon Mar 15 21:05:19 2010
@@ -27,7 +27,7 @@
     def _get_type(self, TYPE):
         return self.cts.lltype_to_cts(TYPE)
 
-    def get_class_context(self, name, DICT):
+    def _get_class_context(self, name, DICT):
         class_desc = query.get_class_desc(name)
         if class_desc:
             BaseType = class_desc.BaseType

Modified: pypy/branch/avm/pypy/translator/avm2/test/entrypoint.py
==============================================================================
--- pypy/branch/avm/pypy/translator/avm2/test/entrypoint.py	(original)
+++ pypy/branch/avm/pypy/translator/avm2/test/entrypoint.py	Mon Mar 15 21:05:19 2010
@@ -82,15 +82,8 @@
         self.actions.finish()
 
     def do_test(self):
-        self.finish_test()
-        f = open("%s.swf" % (self.name,), "wb")
-        f.write(self.swf.serialize())
-        f.close()
-        f = open("%s.abc" % (self.name,), "wb")
-        f.write(self.abc.serialize())
-        f.close()
-        return browsertest(self.name, self.swf)
-
+        pass
+    
     def epilogue(self):
         pass
 
@@ -98,6 +91,16 @@
         pass
 
 class SWFTestEntryPoint(BaseTestEntryPoint):
+    def do_test(self):
+        self.finish_test()
+        f = open("%s.flash.swf" % (self.name,), "wb")
+        f.write(self.swf.serialize())
+        f.close()
+        f = open("%s.flash.abc" % (self.name,), "wb")
+        f.write(self.abc.serialize())
+        f.close()
+        return browsertest(self.name, self.swf)
+
     def get_edittext(self):
         if not self.actions.HL('edittext'):        
             self.actions.push_this()
@@ -144,6 +147,12 @@
         self.actions.emit('callpropvoid', packagedQName("flash.net", "navigateToURL"), 2)
 
 class TamarinTestEntryPoint(BaseTestEntryPoint):
+    def do_test(self):
+        f = open("%s.tamarin.abc" % (self.name,), "wb")
+        f.write(self.abc.serialize())
+        f.close()
+        asdf
+
     def update_text(self):
         self.actions.push_const("\n")
         self.actions.get_field('text')
@@ -153,6 +162,7 @@
 
     def epilogue(self):
         self.actions.exit_until_type("script")
+        self.actions.context.make_init()
         self.actions.push_var('this')
         self.actions.emit('constructprop', QName("PyPyTest_EntryPoint"), 0)
 



More information about the Pypy-commit mailing list