[Fun][Weird][VM] Objects as compiled methods

Frank Sergeant frank at canyon-medical.com
Sun May 18 18:20:20 UTC 2003


Avi Bryant <avi at beta4.com> wrote:

> Yup :).  Incidentally, does anyone know of prior art for doing that kind
> of jumping from VM to meta-interpreter and back, in Smalltalk or other
> similar (OO, bytecode) systems?  There's a company doing exactly that to
> enable call/cc in Java, and I'm curious if their patent application has
> any validity.

My first thought was that your question reminded me of indirect-threaded
Forth implementations, which is the classic style of Forth
implementation.  In an indirect-threaded Forth, each "subroutine"
(called a "word" in Forth) begins with the address of its interpreter. 
Also, consider the similar, but slightly different, direct-threaded
Forth implementation style where every "word" begins with machine code
which is the interpreter for that "word" (it is typically a jump or call
to the interpreter for that class of Forth "word").

Maybe that could be seen as prior art, without needing to squint too
hard?  I suppose this goes back to the late 1960s or early 1970s.  There
was a nice article in Byte (1980? or early 1980s) with a title something
like "Threaded Interpreters" which went into some detail about
indirect-threading, direct-threading, subroutine-threading, and
token-threading.

Someone mentioned "Trap".  Even that might be prior art?  The Motorola
68000, maybe others, called a routine that the programmer could specify,
whenever an invalid opcode was encountered, so an application could
assign meaning to invalid opcodes.

(Just making some notes in case it ever helps anyone to break a
destructive, evil software patent.)


-- Frank



More information about the Squeak-dev mailing list