help-smalltalk
[Top][All Lists]
Advanced

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

Re: [Help-smalltalk] forking and GC


From: Lyndon Tremblay
Subject: Re: [Help-smalltalk] forking and GC
Date: Tue, 25 Nov 2003 15:41:39 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.4) Gecko/20030718

Very nice. I will prepare a patch against 2.1.5.

Paolo Bonzini wrote:
> My abstract goals here are to provide an environment
> where the bulk executes in real time, using the Emacs lisp
> files to interact with it. The top_level_loop needs to be
> executed, but perhaps I will need to simulate this.

Hmm... it may be possible to run the loop asynchronously. Not on top of my todo list, but not very complex actually. Patches are welcome, just follows these steps:

1) apply the attached patch (it is against my snapshot but should apply more or less cleanly everywhere).

2) support invoking _gst_interpret (NULL); look for is_process_terminating (processOOP)
and stick a "processOOP &&" in front of it.

3) add a mechanism to leave at once the interpreter. Like creating a routine with
  my_flag = 1;
  SET_EXCEPT_FLAG (true);
and, in interp.c

 if (!processOOP && my_flag)
   {
     in_interpreter = false;
     return (NULL);
   }

4) modify file_polling_handler and _gst_async_file_polling so that it can also set my_flag (as a quick&dirty solution, you can do this is node->semaphoreOOP is NULL, but please comment the code).

5) invoke _gst_async_file_polling and (if it returns 0) _gst_interpret (NULL) from poll_and_read instead of doing the poll loop. Please add a preprocessor symbol to the top of input.c to disable this behavior (see comp.c or opt.c for examples).

6) find a better name for my_flag

7) send me the patch, fix anything I've missed :-) and send me the updated patch

Ok, it's not so big apart from steps 6 and 7, but I'll leave it as a homework because you may nevertheless get some good insights and you look like a smart guy (I'm interested in your project). Feel free to mail me.
Thank you. Come the time where the bulk of the design is fleshed, I will gladly show you what I am up to.

My main problem right now is the C callouts. I will verify this without JIT. Hmm. Amazingly, it works, and the same exact speed...

Do you mean that the JIT is as fast as the interpreter? Or that the interpreter is fast enough for you?

Paolo
The interpreter seems to perform at the same speed, and I have been using JIT since before yesterday. Though I am using raw ST code, nothing compiled at runtime yet. All is going well now, and have since continued work. A quick question: Why do CObjects and/or Objects that have C functions defined, needing to be subclassed as variableByteSubclass: or variableWordSubclass:? It may be because I am using [ClassName type] for the callouts..
ps: please always CC the mailing list


Accident, my apologies.

--humasect





reply via email to

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