Skip to content
Permalink
Browse files

simplify

  • Loading branch information
Alex Gaynor
Alex Gaynor committed Apr 24, 2013
1 parent 616a30b commit 7e63d9ac28ff829a83c35dbf9bd6ee3a3945a720
Showing with 1 addition and 4 deletions.
  1. +1 −4 topaz/interpreter.py
@@ -693,14 +693,11 @@ def RAISE_RETURN(self, space, bytecode, frame, pc):
unroller = RaiseReturnValue(frame.parent_interp, w_returnvalue)
return block.handle(space, frame, unroller)

@jit.unroll_safe
def YIELD(self, space, bytecode, frame, pc, n_args):
if frame.block is None:
raise space.error(space.w_LocalJumpError, "no block given (yield)")
space.getexecutioncontext().last_instr = pc
args_w = [None] * n_args
for i in xrange(n_args - 1, -1, -1):
args_w[i] = frame.pop()
args_w = frame.popitemsreverse(n_args)
w_res = space.invoke_block(frame.block, args_w)
frame.push(w_res)

0 comments on commit 7e63d9a

Please sign in to comment.
You can’t perform that action at this time.