On 29/10/2010, at 1:53 PM, Erick Tryzelaar wrote:

> 
> You can try using "git ref-log" if you lost a commit. Hopefully you
> will recognize the commit header, then you can do "git cherry-pick
> the-hash" to recover the commit.

That would all be even more confusing :)

Now about this:

~/felix>flx --test=build/release-optimized tools/webserver.flx
SYSTEM FAILURE
Binding error, cannot find in table: getcwd_mf_1865 index 1865

I dunno what happened to the mail about this so here it is again rehashed:

The message is wrong, if it couldn't find it in the table how could it know
the name and index?

This entry is synthesised to have a known index, since code like

return if x then y else z endif;

is replaced by

fun synth_1234()= { val result = match x with | true => y | _ => z endmatch; 
return result; }
val result2 = synth_1234;
return result2;

The synthesis is done in flx_desugar and the call uses the index of
the function NOT its name. There is no name binding to do here.
The above code works but this doesn't:


  // current directory
  private fun getcwd: &char * size -> &char = "getcwd($1,$2)";
  fun getcwd():string = {
    var b: array[char,1024]; 
    var p = getcwd(C_hack::cast[&char] (&b),size 1024);
    return if C_hack::isNULL p then "" else string p endif; 
  }


In fact here's the code:

    fun getcwd(): string
    {
      body _rqs_getcwd = c"" requires _rqs_X;
      var b: array[char, 1024];
      var p: typeof((getcwd (((C_hack)::cast[&char] &(b)), (size 1024))));
      p := (getcwd (((C_hack)::cast[&char] &(b)), (size 1024)));
private       inline generated desugar:match fun fun getcwd_mf_1322<1322>(): 
<none>
      {
private         val getcwd_mv_1322<1323>: typeof(((C_hack)::isNULL p));
        getcwd_mv_1322<1323> := ((C_hack)::isNULL p);
        // begin match
private         function getcwd_mc1324<1328>() { getcwd_mv_1322<1323> matches 
|case 1 }
private         match_handler getcwd_mh1324<1327>(|case 1)        {
          return "";
        }
        // match case 1:|case 1
        if((lnot (getcwd_mc1324<1328> ())))goto _ml1326;
        return (getcwd_mh1324<1327> ());
private         function getcwd_mc1326<1331>() { getcwd_mv_1322<1323> matches 
any }
private         match_handler getcwd_mh1326<1330>(any)        {
          return (string p);
        }
        // match case 2:any
_ml1326:
        return (getcwd_mh1326<1330> ());
      }
      return (getcwd_mf_1322<1322> ());
    }

//bound match check f_mc1316<1321>:unit -> bool
SYSTEM FAILURE
Binding error, cannot find in table: getcwd_mf_1322 index 1322

Anyhow, the REAL error is not that we can't find this entry in the table,
since clearly entry 1322 is there, how else would we know its name??

The real problem is a Not_found thrown *inside* the binding function.

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





------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to