At 10:22 PM 6/21/2002 +0200, Jerome Vouillon wrote: >On Fri, Jun 21, 2002 at 02:33:33PM -0400, Melvin Smith wrote: > > Now, if you look at it and say we can do a "lightweight" > > interpreter, I think that is what I'm trying to accomplish, but I'm > > calling it Parrot_Context. > >Ok. Then, you should do the converse to what you are mentionning in >your patch: instead of inlining a context in the interpreter structure >(Parrot_Interp), you should add a field in Parrot_Context containing a >pointer to a shared Parrot_Interp structure. (And the bytecode >interpreter should use Parrot_Context wherever it uses Parrot_Interp >at the moment).
I'm not really picky. What benefit would we get? Adding a level of indirection loses a bit of speed in often accessed structure members. So anything that holds the top level struct has 2 levels of indirection in your way. ctx->interp->io Although the benefit of doing it your way might mean less copying of data. Also please remember, patches don't always look elegant since they are incremental. -Melvin