At 02:25 AM 7/9/2001 -0400, Uri Guttman wrote:
> >>>>> "PJ" == Paul Johnson <[EMAIL PROTECTED]> writes:
>
>   >> how would you propose those callbacks be attached without op codes to do
>   >> the callback? :)
>
>   PJ> Well I was specifying requirements rather than proposing
>   PJ> solutions, but with this being the internals list I suppose I
>   PJ> should have been thinking more about the implementation.  I'm not
>   PJ> aware of any firm decisions having been made in this area though.
>
>well, i am sorta pushing for more work to be done on actually
>implementing some early core stuff. i proposed work on the event system
>even as a learning project to get a portable event system up in perl5.

Cool--so... got that Async I/O and Event PDD done? :)

>   >> i think that is best done with inserting special op codes when enabled
>   >> by a profiling or debug flag.
>
>   PJ> Done by what?  Adding opcodes at all conceivable positions could
>   PJ> be unnecessarily expensive for most applications, and you're bound
>   PJ> to miss something that someone wants.  I would imagine this is
>   PJ> best done on a case by case basis, but maybe you were thinking
>   PJ> that way too.
>
>you only add these special opcodes when you request it with a pragma or
>command line option. most programs don't want profiling, fine grained
>debugging, callbacks in special cases, etc. if you ask for them, you
>must accept the bloat of extra op codes for those special features.

Actually you don't do either. What you do is piggyback on top of opcodes 
that already are in the stream.

There *will* be "begin scope", "begin loop", "End scope", and "End loop" 
opcodes as well as an "end statement" opcode and possibly a "begin 
statement" opcode. (Though I'm less sure of that) There is and will 
probably always be some sort of setup or teardown needed when lexical 
scopes begin or end, as well as when statements end. The "end of X" 
functionality will be done by piggybacking on these opcodes.

Whether the opcodes themselves check flags, or we just override the opcode 
functions when needed (flags sound better since we can lexically scope 
those a lot easier, with less impact on threads and such) is up in the air.

                                        Dan

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

Reply via email to