On Thursday 03 July 2008 09:26:35 [EMAIL PROTECTED] wrote:
> Modified:
> branches/vtable_self/compilers/imcc/imc.h
> branches/vtable_self/compilers/imcc/imcc.l
> branches/vtable_self/compilers/imcc/imclexer.c
> branches/vtable_self/compilers/imcc/pcc.c
> branches/vtable_self/t/pmc/namespace.t
>
> Log:
> [vtable_has_self] uploading initial patch to IMCC grammar. Modification to
> one test for desired behavior.
>
> Modified: branches/vtable_self/compilers/imcc/imcc.l
> ===========================================================================
> --- branches/vtable_self/compilers/imcc/imcc.l (original)
> +++ branches/vtable_self/compilers/imcc/imcc.l Thu Jul 3 09:26:34 2008
> @@ -557,7 +557,8 @@
> (r =
> IMCC_INFO(interp)->cur_unit->instructions->symregs[0]) && r->pcc_sub)
> {
> - if ((r->pcc_sub->pragma & P_METHOD) &&
> + if (((r->pcc_sub->pragma & P_METHOD) ||
> + (IMCC_INFO(interp)->cur_unit->is_vtable_method)) &&
> !strcmp(yytext, "self")) {
> valp->sr = mk_ident(interp, "self", 'P');
> IMCC_INFO(interp)->cur_unit->type |= IMC_HAS_SELF;
Per the coding standards, continued lines should break before the operator.
I've experimented with aligning && and || vertically with the if, and the
results seem table-icious so far. You might experiment with this and see
what you think.
-- c