Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Safe execution core and ops classification

6 views
Skip to first unread message

Leopold Toetsch

unread,
Mar 23, 2004, 2:16:02 AM3/23/04
to P6I
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

Jerry Gay

unread,
Mar 23, 2004, 8:36:20 AM3/23/04
to Leopold Toetsch, P6I
> - do we expect to have more then 32 different classes?
>
i see 13 operator classes currently

> 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)
>

the attached tarfile contains a script (tools/docs/opslist.pl) should
generate a file, docs/ops/opslist.pod, with the above information

> 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)
>

i'm not sure where to get the info i need to do this. hope the attached
script helps.

> leo
>
--jerry

**************************************************************************
This e-mail and any files transmitted with it may contain privileged or
confidential information. It is solely for use by the individual for whom
it is intended, even if addressed incorrectly. If you received this e-mail
in error, please notify the sender; do not disclose, copy, distribute, or
take any action in reliance on the contents of this information; and delete
it from your system. Any other use of this e-mail is prohibited. Thank you
for your compliance.

0 new messages