At 11:13 PM +0200 9/23/03, Leopold Toetsch wrote:
Dan Sugalski <[EMAIL PROTECTED]> wrote:
 I see we've got dynamically loaded bytecode segments. Good. What we don't
 have is those segments automatically running, something I think we need to
 have happen.

 When a bytecode segment is loaded, control should pass to the first
 executable instruction in it, and proceed until it hits an end. (I can see
 making this a ret instead) This seems simpler than having some sort of
 magic label, and will allow loaded bytecode segments to initialize
 themselves if that's what they need.

But how to pass arguments then? Init code might need some.

What arguments, though? This is just a chance to give the segment an initialization run, nothing more.


> Any objections, or shall I just make this happen?

I think a more flexible way is a "magic label", or just "__init" which
can be called explictely or even automatic - if such a label exists.

Ick. No magic labels like that. I'd rather set it so we start executing at the beginning with some set parameters or something, and for segments with no initialization they can just ret back out or something. (I'm not sure full-on calling conventions are required here, but then I'm not sure they aren't either)
--
Dan


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

Reply via email to