<s> from pypy . translator . translator import graphof <EOL> HELPERS = { } <EOL> def with_types ( type_list ) : <EOL> def decorator ( func ) : <EOL> HELPERS [ func ] = type_list <EOL> return func <EOL> return decorator <EOL> @ with_types ( [ ] ) <EOL> def throwZeroDivisionError ( ) : <EOL> raise ZeroDivisionError <EOL> @ with_types ( [ ] ) <EOL> def throwIndexError ( ) : <EOL> raise IndexError <EOL> @ with_types ( [ ] ) <EOL> def throwOverflowError ( ) : <EOL> raise OverflowError <EOL> @ with_types ( [ ] ) <EOL> def throwRuntimeError ( ) : <EOL> raise RuntimeError <EOL> @ with_types ( [ ] ) <EOL> def throwMemoryError ( ) : <EOL> raise MemoryError <EOL> @ with_types ( [ ] ) <EOL> def throwValueError ( ) : <EOL> raise ValueError <EOL> @ with_types ( [ ] ) <EOL> def throwUnicodeDecodeError ( ) : <EOL> raise UnicodeDecodeError <EOL> @ with_types ( [ str , str ] ) <EOL> def recordStringString ( a , b ) : <EOL> return ( a , b ) <EOL> @ with_types ( [ float , float ] ) <EOL> def recordFloatFloat ( a , b ) : <EOL> return ( a , b ) <EOL> @ with_types ( [ float , int ] ) <EOL> def recordFloatSigned ( a , b ) : <EOL> return ( a , b ) <EOL> @ with_types ( [ int , int ] ) <EOL> def recordSignedSigned ( a , b ) : <EOL> return ( a , b ) <EOL> def create_interlink_node ( db ) : <EOL> """<STR_LIT>""" <EOL> translator = db . genoo . translator <EOL> for func , type_list in HELPERS . items ( ) : <EOL> translator . annotator . build_types ( func , type_list ) <EOL> translator . rtyper . specialize_more_blocks ( ) <EOL> helpers = { } <EOL> for func in HELPERS . keys ( ) : <EOL> graph = graphof ( translator , func ) <EOL> helpers [ func . func_name ] = db . pending_function ( graph ) <EOL> raise_OSError_graph = translator . rtyper . exceptiondata . fn_raise_OSError . graph <EOL> helpers [ "<STR_LIT>" ] = db . pending_function ( raise_OSError_graph ) <EOL> db . create_interlink_node ( helpers ) </s>
