[nem-en] patch for matching compiler

Kamil Skalski kamil.skalski at gmail.com
Mon Oct 24 20:58:38 CEST 2005


There was one bug in my last patch (IsTupleMemeber function), I
corrected it, but now I get:

../lib/getopt.n:206:13:206:18: debug: Internal compiler error, please
report a bug to bugs.nemerle.org. You can try modifying program near
this location.
error: internal compiler error: assertion failed in file
typing/MType.n, line 778:
GIST: (Nemerle.Utility.Getopt.CliOption * option[string])
   at Nemerle.Compiler.MType.GetInstantiatedSuperType(TypeInfo super_type)
   at Nemerle.Compiler.ILEmitter.emit(TExpr expr)
   at Nemerle.Compiler.ILEmitter._N_emit_branch29057(_N_closure28987
_N_emit_cp29056, TExpr expr, Label else_label)
   at Nemerle.Compiler.ILEmitter.emit(TExpr expr)

after bootstraping compiler and enabling new matching engine:
./configure --nemerle-flags=-new-matching

Is it some known issue or was it my changes, which caused your code to crash?
It looks like a bug in GetInstantiatedSuperType for me, because it do
not handle tuples, but  as this execution path did not occur earlier,
maybe tuples should not appear here.

>From a brief look at the code it seems that there are some
FieldMember (base_object, field) nodes, where base_object is of Tuple
type. Mayne they were not generated earlier?


2005/10/24, Kamil Skalski <kamil.skalski at gmail.com>:
> > Thanks for comments, I will try your code after work. Anyway
> > your patch is incomplete -- new files are missing (I get them
> > with 'diff -N'):
> >  generation/DecisionTreeCompiler.n
> >  testsuite/positive/new-matching-as.n
> >  testsuite/positive/new-matching-null.n
>
> Right, sorry. I attach the complete patch now.
>
> (I usually work on svn trunk and there I just do 'svn diff' to create
> patches, but unfortunately it requires 'svn add newfile'  first to
> show new files)
>
> --
> Kamil Skalski
> http://nazgul.omega.pl
>
>
>


--
Kamil Skalski
http://nazgul.omega.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new-matching.patch
Type: application/octet-stream
Size: 51801 bytes
Desc: not available
Url : /mailman/pipermail/devel-en/attachments/20051024/5b309aab/new-matching-0001.obj


More information about the devel-en mailing list