<s> """<STR_LIT>""" <EOL> from pypy . tool . pairtype import extendabletype <EOL> from pypy . interpreter import eval , baseobjspace , pycode <EOL> from pypy . interpreter . argument import Arguments <EOL> from pypy . interpreter . error import OperationError <EOL> from pypy . interpreter . executioncontext import ExecutionContext <EOL> from pypy . interpreter import pytraceback <EOL> import opcode <EOL> from pypy . rlib . objectmodel import we_are_translated , instantiate <EOL> from pypy . rlib . jit import we_are_jitted , hint <EOL> from pypy . rlib . debug import make_sure_not_resized <EOL> from pypy . rlib import jit <EOL> g = globals ( ) <EOL> for op in '''<STR_LIT>''' . split ( ) : <EOL> g [ op ] = opcode . opmap [ op ] <EOL> HAVE_ARGUMENT = opcode . HAVE_ARGUMENT <EOL> class PyFrame ( eval . Frame ) : <EOL> """<STR_LIT>""" <EOL> __metaclass__ = extendabletype <EOL> frame_finished_execution = False <EOL> last_instr = - <NUM_LIT:1> <EOL> last_exception = None <EOL> w_f_trace = None <EOL> instr_lb = <NUM_LIT:0> <EOL> instr_ub = - <NUM_LIT:1> <EOL> instr_prev = - <NUM_LIT:1> <EOL> is_being_profiled = False <EOL> def __init__ ( self , space , code , w_globals , closure ) : <EOL> self = hint ( self , access_directly = True , fresh_virtualizable = True ) <EOL> assert isinstance ( code , pycode . PyCode ) <EOL> self . pycode = code <EOL> eval . Frame . __init__ ( self , space , w_globals , code . co_nlocals ) <EOL> self . valuestack_w = [ None ] * code . co_stacksize <EOL> self . valuestackdepth = <NUM_LIT:0> <EOL> self . lastblock = None <EOL> self . blockcount = <NUM_LIT:0> <EOL> if space . config . objspace . honor__builtins__ : <EOL> self . builtin = space . builtin . pick_builtin ( w_globals ) <EOL> self . initialize_frame_scopes ( closure , code ) <EOL> self . fastlocals_w = [ None ] * self . numlocals <EOL> make_sure_not_resized ( self . fastlocals_w ) <EOL> self . f_lineno = code . co_firstlineno <EOL> ExecutionContext . _init_chaining_attributes ( self ) <EOL> def append_block ( self , block ) : <EOL> block . previous = self . lastblock <EOL> self . lastblock = block <EOL> self . blockcount += <NUM_LIT:1> <EOL> def pop_block ( self ) : <EOL> block = self . lastblock <EOL> self . lastblock = block . previous <EOL> self . blockcount -= <NUM_LIT:1> <EOL> return block <EOL> def get_blocklist ( self ) : <EOL> """<STR_LIT>""" <EOL> lst = [ None ] * self . blockcount <EOL> block = self . lastblock <EOL> i = <NUM_LIT:0> <EOL> while block is not None : <EOL> lst [ i ] = block <EOL> i += <NUM_LIT:1> <EOL> block = block . previous <EOL> return lst <EOL> def set_blocklist ( self , lst ) : <EOL> self . lastblock = None <EOL> self . blockcount = <NUM_LIT:0> <EOL> i = len ( lst ) <EOL> while i > <NUM_LIT:0> : <EOL> block = lst [ i - <NUM_LIT:1> ] <EOL> i -= <NUM_LIT:1> <EOL> self . append_block ( block ) <EOL> def get_builtin ( self ) : <EOL> if self . space . config . objspace . honor__builtins__ : <EOL> return self . builtin <EOL> else : <EOL> return self . space . builtin <EOL> def initialize_frame_scopes ( self , closure , code ) : <EOL> flags = code . co_flags <EOL> if flags & pycode . CO_OPTIMIZED : <EOL> return <EOL> if flags & pycode . CO_NEWLOCALS : <EOL> self . w_locals = self . space . newdict ( ) <EOL> else : <EOL> assert self . w_globals is not None <EOL> self . w_locals = self . w_globals <EOL> def run ( self ) : <EOL> """<STR_LIT>""" <EOL> if self . getcode ( ) . co_flags & pycode . CO_GENERATOR : <EOL> from pypy . interpreter . generator import GeneratorIterator <EOL> return self . space . wrap ( GeneratorIterator ( self ) ) <EOL> else : <EOL> return self . execute_frame ( ) <EOL> def execute_generator_frame ( self , w_inputvalue , ex = False ) : <EOL> if self . pycode . magic >= <NUM_LIT> and self . last_instr != - <NUM_LIT:1> and not ex : <EOL> self . pushvalue ( w_inputvalue ) <EOL> return self . execute_frame ( ) <EOL> def execute_frame ( self ) : <EOL> """<STR_LIT>""" <EOL> from pypy . rlib import rstack <EOL> assert isinstance ( self , self . space . FrameClass ) <EOL> executioncontext = self . space . getexecutioncontext ( ) <EOL> executioncontext . enter ( self ) <EOL> try : <EOL> if not we_are_jitted ( ) : <EOL> executioncontext . call_trace ( self ) <EOL> next_instr = self . last_instr + <NUM_LIT:1> <EOL> try : <EOL> w_exitvalue = self . dispatch ( self . pycode , next_instr , <EOL> executioncontext ) <EOL> rstack . resume_point ( "<STR_LIT>" , self , executioncontext , <EOL> returns = w_exitvalue ) <EOL> except Exception : <EOL> if not we_are_jitted ( ) : <EOL> executioncontext . return_trace ( self , self . space . w_None ) <EOL> raise <EOL> if not we_are_jitted ( ) : <EOL> executioncontext . return_trace ( self , w_exitvalue ) <EOL> self . last_exception = None <EOL> finally : <EOL> executioncontext . leave ( self ) <EOL> return w_exitvalue <EOL> execute_frame . insert_stack_check_here = True <EOL> def pushvalue ( self , w_object ) : <EOL> depth = self . valuestackdepth <EOL> self . valuestack_w [ depth ] = w_object <EOL> self . valuestackdepth = hint ( depth + <NUM_LIT:1> , promote = True ) <EOL> def popvalue ( self ) : <EOL> depth = self . valuestackdepth - <NUM_LIT:1> <EOL> assert depth >= <NUM_LIT:0> , "<STR_LIT>" <EOL> w_object = self . valuestack_w [ depth ] <EOL> self . valuestack_w [ depth ] = None <EOL> self . valuestackdepth = hint ( depth , promote = True ) <EOL> return w_object <EOL> def _new_popvalues ( ) : <EOL> @ jit . unroll_safe <EOL> def popvalues ( self , n ) : <EOL> values_w = [ None ] * n <EOL> while True : <EOL> n -= <NUM_LIT:1> <EOL> if n < <NUM_LIT:0> : <EOL> break <EOL> values_w [ n ] = self . popvalue ( ) <EOL> return values_w <EOL> return popvalues <EOL> popvalues = _new_popvalues ( ) <EOL> popvalues_mutable = _new_popvalues ( ) <EOL> del _new_popvalues <EOL> @ jit . unroll_safe <EOL> def peekvalues ( self , n ) : <EOL> values_w = [ None ] * n <EOL> base = self . valuestackdepth - n <EOL> assert base >= <NUM_LIT:0> <EOL> while True : <EOL> n -= <NUM_LIT:1> <EOL> if n < <NUM_LIT:0> : <EOL> break <EOL> values_w [ n ] = self . valuestack_w [ base + n ] <EOL> return values_w <EOL> @ jit . unroll_safe <EOL> def dropvalues ( self , n ) : <EOL> n = hint ( n , promote = True ) <EOL> finaldepth = self . valuestackdepth - n <EOL> assert finaldepth >= <NUM_LIT:0> , "<STR_LIT>" <EOL> while True : <EOL> n -= <NUM_LIT:1> <EOL> if n < <NUM_LIT:0> : <EOL> break <EOL> self . valuestack_w [ finaldepth + n ] = None <EOL> self . valuestackdepth = finaldepth <EOL> @ jit . unroll_safe <EOL> def pushrevvalues ( self , n , values_w ) : <EOL> make_sure_not_resized ( values_w ) <EOL> while True : <EOL> n -= <NUM_LIT:1> <EOL> if n < <NUM_LIT:0> : <EOL> break <EOL> self . pushvalue ( values_w [ n ] ) <EOL> @ jit . unroll_safe <EOL> def dupvalues ( self , n ) : <EOL> delta = n - <NUM_LIT:1> <EOL> while True : <EOL> n -= <NUM_LIT:1> <EOL> if n < <NUM_LIT:0> : <EOL> break <EOL> w_value = self . peekvalue ( delta ) <EOL> self . pushvalue ( w_value ) <EOL> def peekvalue ( self , index_from_top = <NUM_LIT:0> ) : <EOL> index_from_top = hint ( index_from_top , promote = True ) <EOL> index = self . valuestackdepth + ~ index_from_top <EOL> assert index >= <NUM_LIT:0> , "<STR_LIT>" <EOL> return self . valuestack_w [ index ] <EOL> def settopvalue ( self , w_object , index_from_top = <NUM_LIT:0> ) : <EOL> index_from_top = hint ( index_from_top , promote = True ) <EOL> index = self . valuestackdepth + ~ index_from_top <EOL> assert index >= <NUM_LIT:0> , "<STR_LIT>" <EOL> self . valuestack_w [ index ] = w_object <EOL> @ jit . unroll_safe <EOL> def dropvaluesuntil ( self , finaldepth ) : <EOL> depth = self . valuestackdepth - <NUM_LIT:1> <EOL> finaldepth = hint ( finaldepth , promote = True ) <EOL> while depth >= finaldepth : <EOL> self . valuestack_w [ depth ] = None <EOL> depth -= <NUM_LIT:1> <EOL> self . valuestackdepth = finaldepth <EOL> def savevaluestack ( self ) : <EOL> return self . valuestack_w [ : self . valuestackdepth ] <EOL> def restorevaluestack ( self , items_w ) : <EOL> assert None not in items_w <EOL> self . valuestack_w [ : len ( items_w ) ] = items_w <EOL> self . dropvaluesuntil ( len ( items_w ) ) <EOL> def make_arguments ( self , nargs ) : <EOL> return Arguments ( self . space , self . peekvalues ( nargs ) ) <EOL> def argument_factory ( self , arguments , keywords , keywords_w , w_star , w_starstar ) : <EOL> return Arguments ( self . space , arguments , keywords , keywords_w , w_star , w_starstar ) <EOL> @ jit . dont_look_inside <EOL> def descr__reduce__ ( self , space ) : <EOL> from pypy . interpreter . mixedmodule import MixedModule <EOL> from pypy . module . _pickle_support import maker <EOL> w_mod = space . getbuiltinmodule ( '<STR_LIT>' ) <EOL> mod = space . interp_w ( MixedModule , w_mod ) <EOL> new_inst = mod . get ( '<STR_LIT>' ) <EOL> w = space . wrap <EOL> nt = space . newtuple <EOL> cells = self . _getcells ( ) <EOL> if cells is None : <EOL> w_cells = space . w_None <EOL> else : <EOL> w_cells = space . newlist ( [ space . wrap ( cell ) for cell in cells ] ) <EOL> if self . w_f_trace is None : <EOL> f_lineno = self . get_last_lineno ( ) <EOL> else : <EOL> f_lineno = self . f_lineno <EOL> values_w = self . valuestack_w [ <NUM_LIT:0> : self . valuestackdepth ] <EOL> w_valuestack = maker . slp_into_tuple_with_nulls ( space , values_w ) <EOL> w_blockstack = nt ( [ block . _get_state_ ( space ) for block in self . get_blocklist ( ) ] ) <EOL> w_fastlocals = maker . slp_into_tuple_with_nulls ( space , self . fastlocals_w ) <EOL> if self . last_exception is None : <EOL> w_exc_value = space . w_None <EOL> w_tb = space . w_None <EOL> else : <EOL> w_exc_value = self . last_exception . w_value <EOL> w_tb = w ( self . last_exception . application_traceback ) <EOL> tup_state = [ <EOL> w ( self . f_back ( ) ) , <EOL> w ( self . get_builtin ( ) ) , <EOL> w ( self . pycode ) , <EOL> w_valuestack , <EOL> w_blockstack , <EOL> w_exc_value , <EOL> w_tb , <EOL> self . w_globals , <EOL> w ( self . last_instr ) , <EOL> w ( self . frame_finished_execution ) , <EOL> w ( f_lineno ) , <EOL> w_fastlocals , <EOL> space . w_None , <EOL> space . w_None , <EOL> w ( self . instr_lb ) , <EOL> w ( self . instr_ub ) , <EOL> w ( self . instr_prev ) , <EOL> w_cells , <EOL> ] <EOL> return nt ( [ new_inst , nt ( [ ] ) , nt ( tup_state ) ] ) <EOL> @ jit . dont_look_inside <EOL> def descr__setstate__ ( self , space , w_args ) : <EOL> from pypy . module . _pickle_support import maker <EOL> from pypy . interpreter . pycode import PyCode <EOL> from pypy . interpreter . module import Module <EOL> args_w = space . unpackiterable ( w_args ) <EOL> w_f_back , w_builtin , w_pycode , w_valuestack , w_blockstack , w_exc_value , w_tb , w_globals , w_last_instr , w_finished , w_f_lineno , w_fastlocals , w_f_locals , w_f_trace , w_instr_lb , w_instr_ub , w_instr_prev , w_cells = args_w <EOL> new_frame = self <EOL> pycode = space . interp_w ( PyCode , w_pycode ) <EOL> if space . is_w ( w_cells , space . w_None ) : <EOL> closure = None <EOL> cellvars = [ ] <EOL> else : <EOL> from pypy . interpreter . nestedscope import Cell <EOL> cells_w = space . unpackiterable ( w_cells ) <EOL> cells = [ space . interp_w ( Cell , w_cell ) for w_cell in cells_w ] <EOL> ncellvars = len ( pycode . co_cellvars ) <EOL> cellvars = cells [ : ncellvars ] <EOL> closure = cells [ ncellvars : ] <EOL> PyFrame . __init__ ( self , space , pycode , w_globals , closure ) <EOL> new_frame . f_back_some = space . interp_w ( PyFrame , w_f_back , can_be_None = True ) <EOL> new_frame . f_back_forced = True <EOL> new_frame . builtin = space . interp_w ( Module , w_builtin ) <EOL> new_frame . set_blocklist ( [ unpickle_block ( space , w_blk ) <EOL> for w_blk in space . unpackiterable ( w_blockstack ) ] ) <EOL> values_w = maker . slp_from_tuple_with_nulls ( space , w_valuestack ) <EOL> for w_value in values_w : <EOL> new_frame . pushvalue ( w_value ) <EOL> if space . is_w ( w_exc_value , space . w_None ) : <EOL> new_frame . last_exception = None <EOL> else : <EOL> from pypy . interpreter . pytraceback import PyTraceback <EOL> tb = space . interp_w ( PyTraceback , w_tb ) <EOL> new_frame . last_exception = OperationError ( space . type ( w_exc_value ) , <EOL> w_exc_value , tb <EOL> ) <EOL> new_frame . last_instr = space . int_w ( w_last_instr ) <EOL> new_frame . frame_finished_execution = space . is_true ( w_finished ) <EOL> new_frame . f_lineno = space . int_w ( w_f_lineno ) <EOL> new_frame . fastlocals_w = maker . slp_from_tuple_with_nulls ( space , w_fastlocals ) <EOL> if space . is_w ( w_f_trace , space . w_None ) : <EOL> new_frame . w_f_trace = None <EOL> else : <EOL> new_frame . w_f_trace = w_f_trace <EOL> new_frame . instr_lb = space . int_w ( w_instr_lb ) <EOL> new_frame . instr_ub = space . int_w ( w_instr_ub ) <EOL> new_frame . instr_prev = space . int_w ( w_instr_prev ) <EOL> self . _setcellvars ( cellvars ) <EOL> space . frame_trace_action . fire ( ) <EOL> def hide ( self ) : <EOL> return self . pycode . hidden_applevel <EOL> def getcode ( self ) : <EOL> return hint ( self . pycode , promote = True ) <EOL> @ jit . dont_look_inside <EOL> def getfastscope ( self ) : <EOL> "<STR_LIT>" <EOL> return self . fastlocals_w <EOL> def setfastscope ( self , scope_w ) : <EOL> """<STR_LIT>""" <EOL> scope_len = len ( scope_w ) <EOL> if scope_len > len ( self . fastlocals_w ) : <EOL> raise ValueError , "<STR_LIT>" <EOL> for i in range ( scope_len ) : <EOL> self . fastlocals_w [ i ] = scope_w [ i ] <EOL> self . init_cells ( ) <EOL> def init_cells ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def getclosure ( self ) : <EOL> return None <EOL> def _getcells ( self ) : <EOL> return None <EOL> def _setcellvars ( self , cellvars ) : <EOL> pass <EOL> def f_back ( self ) : <EOL> return ExecutionContext . _extract_back_from_frame ( self ) <EOL> def force_f_back ( self ) : <EOL> return ExecutionContext . _force_back_of_frame ( self ) <EOL> def fget_f_lineno ( space , self ) : <EOL> "<STR_LIT>" <EOL> if self . w_f_trace is None : <EOL> return space . wrap ( self . get_last_lineno ( ) ) <EOL> else : <EOL> return space . wrap ( self . f_lineno ) <EOL> def fset_f_lineno ( space , self , w_new_lineno ) : <EOL> "<STR_LIT>" <EOL> try : <EOL> new_lineno = space . int_w ( w_new_lineno ) <EOL> except OperationError , e : <EOL> raise OperationError ( space . w_ValueError , <EOL> space . wrap ( "<STR_LIT>" ) ) <EOL> if self . w_f_trace is None : <EOL> raise OperationError ( space . w_ValueError , <EOL> space . wrap ( "<STR_LIT>" ) ) <EOL> if new_lineno < self . pycode . co_firstlineno : <EOL> raise OperationError ( space . w_ValueError , <EOL> space . wrap ( "<STR_LIT>" % new_lineno ) ) <EOL> code = self . pycode . co_code <EOL> addr = <NUM_LIT:0> <EOL> line = self . pycode . co_firstlineno <EOL> new_lasti = - <NUM_LIT:1> <EOL> offset = <NUM_LIT:0> <EOL> lnotab = self . pycode . co_lnotab <EOL> for offset in xrange ( <NUM_LIT:0> , len ( lnotab ) , <NUM_LIT:2> ) : <EOL> addr += ord ( lnotab [ offset ] ) <EOL> line += ord ( lnotab [ offset + <NUM_LIT:1> ] ) <EOL> if line >= new_lineno : <EOL> new_lasti = addr <EOL> new_lineno = line <EOL> break <EOL> if new_lasti == - <NUM_LIT:1> : <EOL> raise OperationError ( space . w_ValueError , <EOL> space . wrap ( "<STR_LIT>" % new_lineno ) ) <EOL> if ord ( code [ new_lasti ] ) in ( DUP_TOP , POP_TOP ) : <EOL> raise OperationError ( space . w_ValueError , <EOL> space . wrap ( "<STR_LIT>" ) ) <EOL> f_lasti_setup_addr = - <NUM_LIT:1> <EOL> new_lasti_setup_addr = - <NUM_LIT:1> <EOL> blockstack = [ ] <EOL> addr = <NUM_LIT:0> <EOL> while addr < len ( code ) : <EOL> op = ord ( code [ addr ] ) <EOL> if op in ( SETUP_LOOP , SETUP_EXCEPT , SETUP_FINALLY ) : <EOL> blockstack . append ( [ addr , False ] ) <EOL> elif op == POP_BLOCK : <EOL> setup_op = ord ( code [ blockstack [ - <NUM_LIT:1> ] [ <NUM_LIT:0> ] ] ) <EOL> if setup_op == SETUP_FINALLY : <EOL> blockstack [ - <NUM_LIT:1> ] [ <NUM_LIT:1> ] = True <EOL> else : <EOL> blockstack . pop ( ) <EOL> elif op == END_FINALLY : <EOL> if len ( blockstack ) > <NUM_LIT:0> : <EOL> setup_op = ord ( code [ blockstack [ - <NUM_LIT:1> ] [ <NUM_LIT:0> ] ] ) <EOL> if setup_op == SETUP_FINALLY : <EOL> blockstack . pop ( ) <EOL> if addr == new_lasti or addr == self . last_instr : <EOL> for ii in range ( len ( blockstack ) ) : <EOL> setup_addr , in_finally = blockstack [ ~ ii ] <EOL> if in_finally : <EOL> if addr == new_lasti : <EOL> new_lasti_setup_addr = setup_addr <EOL> if addr == self . last_instr : <EOL> f_lasti_setup_addr = setup_addr <EOL> break <EOL> if op >= HAVE_ARGUMENT : <EOL> addr += <NUM_LIT:3> <EOL> else : <EOL> addr += <NUM_LIT:1> <EOL> assert len ( blockstack ) == <NUM_LIT:0> <EOL> if new_lasti_setup_addr != f_lasti_setup_addr : <EOL> raise OperationError ( space . w_ValueError , <EOL> space . wrap ( "<STR_LIT>" % <EOL> ( f_lasti_setup_addr , new_lasti_setup_addr ) ) ) <EOL> if new_lasti < self . last_instr : <EOL> min_addr = new_lasti <EOL> max_addr = self . last_instr <EOL> else : <EOL> min_addr = self . last_instr <EOL> max_addr = new_lasti <EOL> delta_iblock = min_delta_iblock = <NUM_LIT:0> <EOL> addr = min_addr <EOL> while addr < max_addr : <EOL> op = ord ( code [ addr ] ) <EOL> if op in ( SETUP_LOOP , SETUP_EXCEPT , SETUP_FINALLY ) : <EOL> delta_iblock += <NUM_LIT:1> <EOL> elif op == POP_BLOCK : <EOL> delta_iblock -= <NUM_LIT:1> <EOL> if delta_iblock < min_delta_iblock : <EOL> min_delta_iblock = delta_iblock <EOL> if op >= opcode . HAVE_ARGUMENT : <EOL> addr += <NUM_LIT:3> <EOL> else : <EOL> addr += <NUM_LIT:1> <EOL> f_iblock = self . blockcount <EOL> min_iblock = f_iblock + min_delta_iblock <EOL> if new_lasti > self . last_instr : <EOL> new_iblock = f_iblock + delta_iblock <EOL> else : <EOL> new_iblock = f_iblock - delta_iblock <EOL> if new_iblock > min_iblock : <EOL> raise OperationError ( space . w_ValueError , <EOL> space . wrap ( "<STR_LIT>" ) ) <EOL> while f_iblock > new_iblock : <EOL> block = self . pop_block ( ) <EOL> block . cleanup ( self ) <EOL> f_iblock -= <NUM_LIT:1> <EOL> self . f_lineno = new_lineno <EOL> self . last_instr = new_lasti <EOL> def get_last_lineno ( self ) : <EOL> "<STR_LIT>" <EOL> return pytraceback . offset2lineno ( self . pycode , self . last_instr ) <EOL> def fget_f_builtins ( space , self ) : <EOL> return self . get_builtin ( ) . getdict ( ) <EOL> def fget_f_back ( space , self ) : <EOL> return self . space . wrap ( self . f_back ( ) ) <EOL> def fget_f_lasti ( space , self ) : <EOL> return self . space . wrap ( self . last_instr ) <EOL> def fget_f_trace ( space , self ) : <EOL> return self . w_f_trace <EOL> def fset_f_trace ( space , self , w_trace ) : <EOL> if space . is_w ( w_trace , space . w_None ) : <EOL> self . w_f_trace = None <EOL> else : <EOL> self . w_f_trace = w_trace <EOL> self . f_lineno = self . get_last_lineno ( ) <EOL> space . frame_trace_action . fire ( ) <EOL> def fdel_f_trace ( space , self ) : <EOL> self . w_f_trace = None <EOL> def fget_f_exc_type ( space , self ) : <EOL> if self . last_exception is not None : <EOL> f = self . f_back ( ) <EOL> while f is not None and f . last_exception is None : <EOL> f = f . f_back ( ) <EOL> if f is not None : <EOL> return f . last_exception . w_type <EOL> return space . w_None <EOL> def fget_f_exc_value ( space , self ) : <EOL> if self . last_exception is not None : <EOL> f = self . f_back ( ) <EOL> while f is not None and f . last_exception is None : <EOL> f = f . f_back ( ) <EOL> if f is not None : <EOL> return f . last_exception . w_value <EOL> return space . w_None <EOL> def fget_f_exc_traceback ( space , self ) : <EOL> if self . last_exception is not None : <EOL> f = self . f_back ( ) <EOL> while f is not None and f . last_exception is None : <EOL> f = f . f_back ( ) <EOL> if f is not None : <EOL> return space . wrap ( f . last_exception . application_traceback ) <EOL> return space . w_None <EOL> def fget_f_restricted ( space , self ) : <EOL> if space . config . objspace . honor__builtins__ : <EOL> return space . wrap ( self . builtin is not space . builtin ) <EOL> return space . w_False <EOL> def get_block_class ( opname ) : <EOL> from pypy . interpreter . pyopcode import block_classes <EOL> return block_classes [ opname ] <EOL> def unpickle_block ( space , w_tup ) : <EOL> w_opname , w_handlerposition , w_valuestackdepth = space . unpackiterable ( w_tup ) <EOL> opname = space . str_w ( w_opname ) <EOL> handlerposition = space . int_w ( w_handlerposition ) <EOL> valuestackdepth = space . int_w ( w_valuestackdepth ) <EOL> assert valuestackdepth >= <NUM_LIT:0> <EOL> blk = instantiate ( get_block_class ( opname ) ) <EOL> blk . handlerposition = handlerposition <EOL> blk . valuestackdepth = valuestackdepth <EOL> return blk </s>
