logo       

Mostly a Perl task for the interested: msg#00630

lang.perl.perl6.internals

Subject: Mostly a Perl task for the interested

classes/*.c is created by the bytecode compiler classes/pmc2c2.pl. Most of the actual code is in lib/Parrot/Pmc2c.pm.

The created C code could need some improvements:

* the temp_base_vtable should be const.
This is currently not possible, because items like ".whoami" are changed in the temp_base_vtable. But we don't have to do that, as the vtable is cloned a few lines below anyway. So we should create a const table and do the rest of the init stuff in the cloned table.

* same with the MMD init table.

* All constant strings in classes (whoami, isa_str, does_str) and method names in the delegate.c should use the CONST_STRING() macro. That would need some Makefile tweaks too, to add a dependency on the .str file.
Note: foo = CONST_STRING(interpreter, "foo"); should always be on it's own line and not inside a multiline expression.

Thanks,
leo




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise