Author: Raffael Tfirst <raffael.tfi...@gmail.com>
Branch: py3.5-async
Changeset: r85601:7a4cdd986ad0
Date: 2016-07-07 18:03 +0200
http://bitbucket.org/pypy/pypy/changeset/7a4cdd986ad0/

Log:    Implement visit_Await in codegen

diff --git a/pypy/interpreter/astcompiler/codegen.py 
b/pypy/interpreter/astcompiler/codegen.py
--- a/pypy/interpreter/astcompiler/codegen.py
+++ b/pypy/interpreter/astcompiler/codegen.py
@@ -909,6 +909,13 @@
         self.emit_op(ops.GET_ITER)
         self.load_const(self.space.w_None)
         self.emit_op(ops.YIELD_FROM)
+    
+    def visit_Await(self, aw):
+        self.update_position(aw.lineno)
+        aw.value.walkabout(self)
+        self.emit_op(ops.GET_AWAITABLE)
+        self.load_const(self.space.w_None)
+        self.emit_op(ops.YIELD_FROM)
 
     def visit_Num(self, num):
         self.update_position(num.lineno)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to