[nem-en] Integration again
Michal Moskal
michal.moskal at gmail.com
Sat Nov 18 10:36:34 CET 2006
On 11/17/06, vc <vc at rsdn.ru> wrote:
> > Could you (or Igor) please explain how and when do you save TExpr? Or
> > point me to the place in the code where it happens?
>
> * In ctor of MethodBuilder
> (http://nemerle.org/svn/nemerle/trunk/ncc/hierarchy/ClassMembers.n line
> 1091) we safe tokens of method body to _bodyTokens.
> * Method ResetBody() (line 768) reset it field and other field (_bodyParsed
> and _bodyTyped).
> * Property BodyTokens check _bodyTokens and return it content or tokenize
> source.
> * Property BodyParsed (line 811) check _bodyParsed and return it content or
> parse tokens (from BodyTokens) to PExpr.
> * Property BodyTyped (line 835) check _bodyTyped and return it content or
> call RunBodyTyper() for type body.
>
> We trace changes in file and if body of some method is changed we call
> ResetBody(). It reset all fields which cache the method AST. In next time
> BodyTokens, BodyParsed and BodyTyped reparse and retype method body.
OK, in r6933 I've added a few asserts in the compiler. Could you check
if you're not violating them?
I also wonder why do you RunDelayedTypings() even if there were errors
in the base typer? I don't think this is going to work very well.
--
Michał
More information about the devel-en
mailing list