On Jan 17, 2004, at 2:58 AM, Leopold Toetsch wrote:

Damien Neil <[EMAIL PROTECTED]> wrote:

The JVM is a stack machine. JVM opcodes operate on the stack, not on
main memory. The stack is thread-local. In order for a thread to operate
on a variable, therefore, it must first copy it from main store to thread-
local store (the stack).

Silly me, yes of course, that's it.


Parrot, so far as I know, operates in exactly the same way, except that
the thread-local store is a set of registers rather than a stack.

Except that we don't need this mulit-step variable access, because a
P-register can refer to a shared PMC living in a different thread, which
is a different threads interpreter->arena_base memory.

But just like a P-register, a Java stack entry can hold a reference to an object, and in Java there's no thread-based ownership if objects.


So if this parallel is correct, then Java wouldn't need 2-step access either. This is part of why I think this is the wrong interpretation of the JVM spec.

JEff

Reply via email to