--- Comment #2 from Gareth Charnock <> 2011-01-16 10:15:52 
PST ---
Okay, had time for a little more poking. Execution moves to
DotVarExp::interpret and the endless loop from here:

Expression *AssertExp::interpret(InterState *istate)
{   Expression *e;
    Expression *e1;

    if( this->e1->op == TOKaddress)
    {   // Special case: deal with compiler-inserted assert(&this, "null this")
        AddrExp *ade = (AddrExp *)this->e1;
        if (ade->e1->op == TOKthis && istate->localThis)
            if (ade->e1->op == TOKdotvar  // <--- something is fishy here
                && ((DotVarExp *)(istate->localThis))->e1->op == TOKthis)
                return getVarExp(loc, istate,
                return istate->localThis->interpret(istate);

Apparently the compiler puts in an implicit assert(&this,"this is null") at the
beginning of member functions.

Now ade->e1->op == TOKthis is true by the time execution reaches the inner if
so why is ade->e1->op == TOKdotvar being tested? That statement is always
false. If we replace ade->e1->op == TOKdotvar with true the compiler accepts
the sample program.

The question is, what is getVarExp? and why might return
istate->localThis->interpret(istate); be the wrong thing to do?

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to