develooper Front page | perl.perl6.internals | Postings from July 2002

Re: [COMMIT] Parrot_Context

Thread Previous
From:
Melvin Smith
Date:
July 4, 2002 16:07
Subject:
Re: [COMMIT] Parrot_Context
Message ID:
5.1.0.14.2.20020704185712.03482d98@pop.mindspring.com
At 12:43 AM 7/5/2002 +0200, Jerome Vouillon wrote:
>On Thu, Jul 04, 2002 at 05:08:25PM -0400, Melvin Smith wrote:
> > Since context switches are not the norm (and register/stack accesses _are_)
> > we decided to use a memcpy to switch them rather than using a
> > pointer to a context.
>
>So, more than 2 kilobyte will be copied for each co-routine call?

(actually a context is currently 684 bytes, but growing)

>(Save the caller context, restore the co-routine context, execute the
>  co-routine, save the co-routine context, restore the caller context.)

This is worth a shot.

*sigh*

I've only so much bandwidth, and I'm making these changes
as incremental as possible. I do like the idea though, but wanted
to at least get the context struct in and working before doing
more radical patches that will affect most of the source tree,
including breaking the JIT.

> > and would also kill the current JIT design.
>
>Because it assumes there is only one interpreter ?
>
>It seems to me it would be just as efficient to keep the interpreter
>pointer in a register, instead of hardcoding the address of the
>interpreter.

Are you volunteering? :)

-Melvin



Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About