Melvin Smith <[EMAIL PROTECTED]> wrote:

> 1) Currently typenames are not checked except with 'new <classname>'

As Dan layed out WRT PMC enums, we might have to defer type checking to
runtime. That is for core PMCs we do strict type checking, other types
get resolved at runtime.

>      C<.local <type> identifier> and C<.param <type> identifier> both assume
>      that anything for type other than (int|float|string) is a PMC.

Yep. Some remarks:

  .local <type> ident

collides with the macro syntax for local labels. So when doing something
here I'd resolve that conflict too and allow only:

   .sym <type> ident   # <type> ::= int|float|string|pmc

I'm not sure but:

   .newsym <type> ident

could be handy too, compiling to new Px, <.Type>

And while at it, imcc should know of lexicals. E.g. when the register
allocator is out of regs, spilling lexicals to an array isn't necessary
- they already have a permanent store in the lexical pad.

> 2) In the absence of some sort of return instruction, subs currently just
>      run off the end of their code and continue merrily.

Steve already did propose to use return decls for this. Done that, we
can toss half of pcc.c and use the symmetry of call and return.

> 3) Strict prototyping mode shortcut (backwards compatible of course):
>     .sub _baz (pmc p, int i)

Fine.

> 4) No implicit global labels with the label :== IDENTIFIER COLON syntax.

That's not easy. While its clear that a .sub is global there are more.
PASM mode comes to my mind and some nasty one: imcc/t/syn/eval_3 ff.

> -Melvin

leo

Reply via email to