At 06:44 PM 9/18/2001 -0700, Hong Zhang wrote:
> > Proposed: Parrot should never crash due to malformed bytecode.  When
> > choosing between execution speed and bytecode safety, safety should
> > always win.  Careful op design and possibly a validation pass before
> > execution will hopefully keep the speed penalty to a minimum.
>
>We can use similar model as Java bytecode. Because of poor design, the
>Java bytecode requires exponential algorithm to verify the bytecode,
>mainly caused by weak-typing on local variables (where all other parts
>of Java runtime are strongly typed), and the notorious jsr/ret bytecode.
>We should avoid the same kind of mistakes. The bytecode verification
>should be about O(n * ln(n)).

Given how weakly typed so much of Perl (and thus Parrot) is, I'm not sure 
that there's much we can do to verify externally. The best I can think of 
is to have the dangerous ops validate their parameters and the oploop do 
resource checks as appropriate. :(

I may, however, be suffering from a lack of imagination. That'd be OK.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to