Lines Matching refs:fn
133 static UWord cxt_hash_val(fn_node** fn, UInt size) in cxt_hash_val() argument
137 while(*fn != 0) { in cxt_hash_val()
138 hash = (hash<<7) + (hash>>25) + (UWord)(*fn); in cxt_hash_val()
139 fn--; in cxt_hash_val()
147 static Bool is_cxt(UWord hash, fn_node** fn, Context* cxt) in is_cxt() argument
155 cxt_fn = &(cxt->fn[0]); in is_cxt()
156 while((*fn != 0) && (count>0)) { in is_cxt()
157 if (*cxt_fn != *fn) return False; in is_cxt()
158 fn--; in is_cxt()
168 static Context* new_cxt(fn_node** fn) in new_cxt() argument
176 CLG_ASSERT(fn); in new_cxt()
177 top_fn = *fn; in new_cxt()
196 while(*fn != 0) { in new_cxt()
197 hash = (hash<<7) + (hash>>25) + (UWord)(*fn); in new_cxt()
198 cxt->fn[offset] = *fn; in new_cxt()
200 fn--; in new_cxt()
228 Context* CLG_(get_cxt)(fn_node** fn) in CLG_()
234 CLG_ASSERT(fn != 0); in CLG_()
235 if (*fn == 0) return 0; in CLG_()
236 size = (*fn)->separate_callers+1; in CLG_()
240 (*fn)->name, size); in CLG_()
242 hash = cxt_hash_val(fn, size); in CLG_()
244 if ( ((cxt = (*fn)->last_cxt) != 0) && is_cxt(hash, fn, cxt)) { in CLG_()
255 if (is_cxt(hash,fn,cxt)) break; in CLG_()
260 cxt = new_cxt(fn); in CLG_()
262 (*fn)->last_cxt = cxt; in CLG_()
274 void CLG_(push_cxt)(fn_node* fn) in CLG_()
280 fn ? fn->name : "0x0", in CLG_()
290 if (fn && (*(CLG_(current_fn_stack).top) == fn)) return; in CLG_()
291 if (fn && (fn->group>0) && in CLG_()
292 ((*(CLG_(current_fn_stack).top))->group == fn->group)) return; in CLG_()
309 fn ? fn->name : "0x0"); in CLG_()
314 if (fn && (*(CLG_(current_fn_stack).top) == 0)) { in CLG_()
318 pactive = CLG_(get_fn_entry)(fn->number); in CLG_()
323 *(CLG_(current_fn_stack).top) = fn; in CLG_()
327 fn ? fn->name : "0x0", in CLG_()