With the patches of Jens it's no more far away to provide a Safe run-core option. Still a lot todo, but...

1) Opcode classes

perl5 hasn't really many different: perldoc Opcode | grep ' :[a-z]*

- do we need base_loop? It's IMHO useless - turning off branching ops will break any non-trivival program.

- do we expect to have more then 32 different classes?

Wanted:

A perl script that scans ops-files for opcode classes and spits out:

a) a pod with opcode classes headings and the list of opcodes that belong to that class (at best created from a template, which has some more explanation to that stuff)

b) a C include file that defines bitmask enums for the classes plus some common shortcuts comming from a config file. These enums should then be scanned during Configure and provide a user visible PASM in runtime/parrot/include.
If we have more then 32 classes, we'll use a ParrotSet PMC (which will be handy anyway)


2) Safe ops execution
There are basically 2 ways:
a) check in the compiler *and* in the PBC loader
b) check in the predereferencing code, which sees all opcodes anyway immediately before execution and run Safe always through a prederefed core. That can be CGP or for outermost safety (or when CGoto is missing) the switched core.


3) Lexicals and globals
TBD (e.g. swap in a new global namespace hash, filled with user visible items - or make a get_namespace like operation mandantory, which does the rigth thing)


Thoughts, comments, patches welcome
leo



Reply via email to