On Mon, 2006-10-02 at 20:48 +1000, Jonathan Kelly wrote:
>    
> OK, so I thought perhaps mutual recursion, just to make my head hurt ...

BTW: you can do

flx --debug --force filename

The --debug does debugging stuff, and --force makes it
recompile everything.

> 
> $ flx t2/fibheap.flx
> SYSTEM FAILURE
> [C func body, vars] Can't find index 4128

I get this:

SYSTEM FAILURE
[C func body, vars] Can't find index 4229

and with the debugging:

//Reparent 4229 <-- 3752

and:

//  3749 -> new_DLL_List (function) rec.flx: line 14 col 1 to  line 18
col 1
//    3750 -> T (type variable)
//    3751 -> _rqs_new_DLL_List (insert) rec.flx: line 14 col 1 to  line
18 col 1
//    3752 -> x rec.flx: line 16, cols 5 to 24

so it is talking about the x here:


fun new_DLL_List[T] (n:T):&DLL_List[T] =
{
    var x : DLL_List[T];
    return &x;
}

Well:

//OPTIMISING
COPY USED
Copying 669
Copying 670
Copying 673
Copying 697
Copying 842
Copying 1040
Copying 1063
Copying 1185
Copying 1198
Copying 1202
Copying 1245
Copying 1249
Copying 1254
Copying 1271
Copying 1283
Copying 1462
Copying 1499
Copying 1535
Copying 1571
Copying 1607
Copying 1643
Copying 1685
Copying 1727
Copying 1769
Copying 1811
Copying 1853
Copying 1906
Copying 1959
Copying 2012
Copying 2025
Copying 2032
Copying 2038
Copying 2048
Copying 2490
Copying 2497
Copying 2521
Copying 2629
Copying 2884
Copying 3336
Copying 3350
Copying 3694
Copying 3716
Copying 3738
Copying 3739
Copying 3744
Copying 3749
Copying 3752
Copying 3753
Copying 3770
Copying 3771
//INLINING
//Reparent 4229 <-- 3752
//Reparent 4230 <-- 3753
REMOVED CHILD SYMBOL index_4230
COPY USED
Copying 669
Copying 670
Copying 673
Copying 697
Copying 3739
Copying 3744
Copying 3770
Copying 3771
Copying 4229 <---------------------------being kept here
Removing unused lst2<3770>
//Calculating stackable calls
//Optimisation complete time 0.008
//Generating primitive wrapper closures
//Finding which functions use globals
COPY USED
Copying 3771 <--------------------- only the mainline is left!
//instantiating
//Instance 4234=_init_<3771>[]
//root module's init procedure has name _init_
//instantiation time 0.
//GENERATING Package Requirements
//GENERATING C++: user headers
//GENERATING C++: collect types
//GENERATING C++: type class names
//GENERATING C++: type class definitions
//GENERATING C++: function and procedure classes
//Generating C function inst 4234=_init_<3771>
//GENERATING C++: GC ptr maps & offsets
//GENERATING C++: method bodies
//Generating C procedure body inst 4234=_init_<3771>
SYSTEM FAILURE
[C func body, vars] Can't find index 4229


So it seems the inliner has eliminated almost everything --
after all your code doesn't do anything useful!

but it still shouldn't error out.
-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to