cardinal-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Cardinal-dev] Continuation questions.


From: Dan Sugalski
Subject: Re: [Cardinal-dev] Continuation questions.
Date: Thu, 2 May 2002 14:49:55 -0400

At 8:20 PM +0200 5/2/02, Erik Bågfors wrote:
On Thu, 2002-05-02 at 16:29, Dan Sugalski wrote:
 > At 12:40 PM +0200 5/2/02, Erik Bågfors wrote:
 > Or 3) I wasn't clear about being an opcode function. :)

Ahh .. the magic third choice.  :)

Never leave home without one!

 > One of the things we're shooting for is to be able to have the
 functions for opcodes (the stuff currently in core.ops) be writable
 in Parrot assembly as well as C. If you're inside of one of those,
 you can't take a continuation.

 Or, to be more clear, assume you wrote the code to implement the
 set_i_ic op. (The one that puts an integer constant inside an integer
 register) In *that* function, you can't take a continuation. Inside
 normal code--for example, inside a regular function, method call,
 whatever--it's perfectly fine to take a continuation.

Ahh.. now I see.  That makes perfect sense :)  I assume "Inside normal
code" includes inside C-code as well?

Yes. I think the rule's going to be "Continuations always take up at
the start of the next opcode", but that's kind of a no-brainer. You'd
want to make sure you had your stacks and registers and all in proper
shape before you took the continuation, but that's a no-brainer.
(Taking a continuation with the system in an inconsistent state would
be... bad. Something we'll have to watch out for somehow with the
safe mode interpreter)

Any idea when you will have function/method calls working in parrot? :)

We've a mostly-working hash implementation and, while it's not what I
ultimately want, it's good enough to use if its hidden properly.
Since the variable fetching and method calling protocols are
implementation independent, we may be able to go with it soon.
('Specially as we finally have the sub/method calling convention down)

This'll probably be in within a point release or two of parrot. If
not 0.0.6, 0.0.7. (0.0.6 may well be out next week if the reworked
assembler's done by then)
--
                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
address@hidden                         have teddy bears and even
                                      teddy bears get drunk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]