Well after some rewriting I'm down to this (in the optimiser):

COPYING join_mv_310 index 311 with old parent 310 to index 8499 with new parent 
308
//Reparent 8499 <-- 311
Gen body caller = 308, callee=join_mf_310<310>
Lazy INLINING join_mf_310<310>(()) into 308 .. INPUT:
join_mv_310<311> := (eq<1553>[string] (p<3791>, sep<1510>));
// begin match
// match case 1:|case 1
if((lnot<2219> (match case 1)(join_mv_310<311>)))goto _ml314;
return (add<3982> (p<3791>, b<3792>));
// match case 2:any
_ml314:
return (add<3982> ((add<3982> (p<3791>, sep<1510>)), b<3792>));
ELIMINATING VARIABLE join_mv_310<8499> -> (eq<1553>[string] (p<3791>, 
sep<1510>))
Removed 1 variables in 2 passes
REMOVED CHILD SYMBOL index_310
REMOVED CHILD SYMBOL index_311
HIB:Examining function join_mf_300<300> for inlinable calls
Renesting children of callee 306 to caller 300
  -- Caller vs len = 0
  -- Callee vs len = 0
Gen body caller = 300, callee=join_mc302<306>
Lazy INLINING join_mc302<306>(()) into 300 .. INPUT:
return (match case 1)(join_mv_300<301>);
Inline tail apply : return (join_mh302<305> ());
Renesting children of callee 305 to caller 300
  -- Caller vs len = 0
  -- Callee vs len = 0
Gen body caller = 300, callee=join_mh302<305>
Lazy INLINING join_mh302<305>(()) into 300 .. INPUT:
return b<3792>;
Inline tail apply : return (join_mh304<308> ());
Renesting children of callee 308 to caller 300
  -- Caller vs len = 0
  -- Callee vs len = 0
SYSTEM FAILURE
Bug8, can't find parent of 310


The bug does NOT mean it can't find the parent of 310, it means it can't find 
the symbol 310.
[If it could, the parent is in it]

The reason is quite clear:

REMOVED CHILD SYMBOL index_310

The symbol has been deleted. The question is: why is this code looking for
a deleted symbol? The symbol is deleted if it has no uses, i.e. it is 
unreachable.
Clearly it got reached. Either the usage closure is missing something (quite 
possible,
the code in the bsym_table plaining IS wrong because it ignores parents, and
a nested function implicitly uses its parent's stack frame), or, it is using 
stale
data.

Note: Erick's new code doesn't just delete a symbol: the function call deletes 
the
symbol AND ALL CHILDREN. So if some routine had a "closure" represented
as a set of all descendants, and tried to delete each one, it would crash badly,
because THAT deletion would be unordered: if you deleted first a parent, then
a child, well the child would already be gone.

Good news: I'm onto it! :)



--
john skaller
skal...@users.sourceforge.net





------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to