update pdd26-ast #269

Open
pmichaud opened this Issue Dec 24, 2008 · 5 comments

4 participants

@pmichaud
Parrot Virtual Machine member

Verify that pdd26-ast is up to date with current implementation and design.

Originally http://trac.parrot.org/parrot/ticket/88

@pmichaud
Parrot Virtual Machine member

We probably need some documentation of the PAST::Control node type (perhaps Tene++ can do this) — other than that the current set of documentation is largely up to date as of r37485.

Pm

@leto
Parrot Virtual Machine member

Can we get more specifics about this TT?

@pmichaud
Parrot Virtual Machine member

Tene++ added a PAST::Control type some time ago. The documentation of that type has never been added to pdd26_ast.pod nor to the PAST/Node.pir file that defines it. So, all that needs to be done is to add that documentation and this ticket can be closed.

Pm

@dafrito

Looking at PAST/Node.pir, ddab786 removed the PAST::Control type (merging it into PAST::Node). If that is still the only condition of this ticket, it seems it could be closed.

Looking more broadly, it does seem that pdd26 has fallen out of sync with PAST/Node.pir. It also seems that there are several 'new_class' invocations within Node.pir that do not have corresponding types. Here's the snippet that I'm talking about:

.sub 'onload' :anon :load :init
    ##   create the PAST::Node base class
    .local pmc p6meta, base
    p6meta = new 'P6metaclass'
    base = p6meta.'new_class'('PAST::Node', 'parent'=>'PCT::Node')

    p6meta.'new_class'('PAST::Op', 'parent'=>base)
    p6meta.'new_class'('PAST::Stmts', 'parent'=>base)
    p6meta.'new_class'('PAST::Stmt', 'parent'=>base)
    p6meta.'new_class'('PAST::Val', 'parent'=>base)
    p6meta.'new_class'('PAST::Var', 'parent'=>base)
    p6meta.'new_class'('PAST::Block', 'parent'=>base)
    p6meta.'new_class'('PAST::Control', 'parent'=>base)
    p6meta.'new_class'('PAST::VarList', 'parent'=>base)

    .return ()
.end

Would it be prudent to remove the 'new_class' statements that don't have matching implementations? Of course, that's outside the scope of this ticket.

@Benabik
Parrot Virtual Machine member

@dafrito - if you examine Node.pir, there are methods added to the namespaces for most of those classes. And the ones that don't have methods generally exist as containers to mark some division and have comments to that effect in the file. I don't see a single class in that list that isn't used.

I would suggest someone make a comparison between the PDD26 and the POD for PAST/Node.pir (and probably PCT/Node.pir and POST/Node.pir as well). It shouldn't take terribly long. If the types described in both match, then this ticket can probably be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment