#NEWLINE# def _clear_dependency_cache( self , ctx ) : #NEWLINE# #INDENT# node_state = cython . declare ( NodeState ) #NEWLINE# other_state = cython . declare ( NodeState ) #NEWLINE# caller = cython . declare ( MDFNode ) #NEWLINE# parent = ( ctx . get_parent ( ) or node_state ) #NEWLINE# shifted_contexts = parent . get_shifted_contexts ( ) #NEWLINE# node_state = self . _states [ ctx . _id_obj ] #NEWLINE# to_clear = cqueue ( ) #NEWLINE# cqueue_push ( to_clear , ( self , node_state ) ) #NEWLINE# seen = set ( ) #NEWLINE# while ( len ( to_clear ) > 0 ) : #NEWLINE# #INDENT# ( caller , node_state ) = cqueue_popleft ( to_clear ) #NEWLINE# if ( node_state in seen ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# seen . add ( node_state ) #NEWLINE# node_state . depends_on_cache . clear ( ) #NEWLINE# node_state . override_cache = None #NEWLINE# node_state . alt_context = None #NEWLINE# for other_state in caller . _states . itervalues ( ) : #NEWLINE# #INDENT# if ( ( other_state . alt_context is not None ) and ( other_state . alt_context . _id == node_state . ctx_id ) ) : #NEWLINE# #INDENT# other_state . alt_context = None #NEWLINE# #UNINDENT# #UNINDENT# for ( ctx_id , callers ) in node_state . callers . iteritems ( ) : #NEWLINE# #INDENT# for caller in callers : #NEWLINE# #INDENT# node_state = caller . _states [ ctx_id ] #NEWLINE# cqueue_push ( to_clear , ( caller , node_state ) )