[self-interest] Re: Implementation
Jecel Assumpcao Jr
jecel at lsi.usp.br
Wed Jun 16 19:23:30 UTC 1999
Douglas Atique wrote:
>
> Hello, all. (BTW, I have noticed the list is rather quiet lately.)
> Here is a little question about the VM.
> We know there are three kinds of sends: unary, binary and keyword. I
> have been looking at the runtime part of the VM code and found out about
> an assembly routine named
> oop CallSelf(nmethod method, oop receiver, oop arg)
I only found a C++ routine with that name, in the file runtime/shell.c
though there is a function called EnterSelf that is written in
Sparc assembly.
> which seems to me the part of code that really evaluates a send with
> compiled native methods, returning an oop. As you might have noticed,
> this function takes only one argument. In my opinion, to the send. My
> question is: how can the VM evaluate binary and keyword sends if it can
> give CallSelf only 1 argument?
Actually, binary messages have only one argument so this wouldn't
be a problem. Only keywords messages with two or more arguments
would fail to work here.
> I hope not to be too simplistic, but I am not very fluent in SPARC
> assembly and didn't understand much of the code. It also seems that all
> this is mixed in intricate ways with the Self threading system.
If we look at all the calls that are made to this routine:
memory/oop.c: oop res = CallSelf(this, nm);
memory/oop.c: res = CallSelf(doBlock, nm);
memory/oop.c: res2 = CallSelf(protectBlock, nm2,
original_aborting ? Memory->nilObj : res);
runtime/shell.c: res = CallSelf(Memory->lobbyObj, c);
parser/expr.c: oop res = CallSelf(Memory->lobbyObj, c);
we can see that only one call even makes any use of the argument,
and none need two or more.
-- Jecel
------------------------------------------------------------------------
eGroups.com home: http://www.egroups.com/group/self-interest
http://www.egroups.com - Simplifying group communications
More information about the Self-interest
mailing list