Front page | perl.perl6.internals |
Postings from July 2002
From: Melvin Smith
July 4, 2002 14:11
Message ID: email@example.com
I added the Parrot_Context struct and inlined all regs and stacks
into it. The save/restore context routines simply copy it in 1 swoop.
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. Using a pointer would slow down the common cases
of access due to an extra dereference.
and would also kill the current JIT design.
So we end up:
Also, keep in mind, save_context currently sets COW on stacks, and
will eventually do the same for register frames.
This is only important for co-routines and continuations. Common subs
shouldn't need to switch in their own context.
[large patch omitted, see firstname.lastname@example.org]
by Melvin Smith