#NEWLINE# def get_cache( self ) : #NEWLINE# #INDENT# from . import toolchains #NEWLINE# cache = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# cuinfos = [ ] #NEWLINE# for ( r , d , f ) in os . walk ( self . code_dir ) : #NEWLINE# #INDENT# for filename in fnmatch . filter ( f , 'cuinfo' ) : #NEWLINE# #INDENT# cuinfos . append ( os . path . join ( compiled_fn , filename ) ) #NEWLINE# #UNINDENT# #UNINDENT# for cuinfo in cuinfos : #NEWLINE# #INDENT# cuinfo_file = open ( cuinfo , 'r' ) #NEWLINE# ( input_name , input_type , tag ) = pickle . load ( cuinfo_file ) #NEWLINE# cuinfo_file . close ( ) #NEWLINE# if ( input_name == self . __name__ ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# input_types = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# input_types [ input_name ] = input_type #NEWLINE# ( code , compiled_fn ) = compiler . passes . compile ( self . get_ast ( ) , globals = self . get_globals ( ) , input_types = input_types , tag = tag , code_dir = self . code_dir , toolchains = toolchains , compile = False ) #NEWLINE# signature = ',' . join ( ( [ str ( tag ) ] + [ str ( x ) for x in input_type ] ) ) #NEWLINE# cache [ signature ] = compiled_fn #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return cache