Path: utzoo!attcan!uunet!cs.utexas.edu!usc!sdd.hp.com!decwrl!ucbvax!sprite.berkeley.edu!tve From: tve@sprite.berkeley.edu (Thorsten von Eicken) Newsgroups: comp.arch Subject: Re: It looks like he's at it again! Message-ID: <37569@ucbvax.BERKELEY.EDU> Date: 14 Jul 90 23:58:32 GMT References: <2328@l.cc.purdue.edu> <1990Jul10.072443.4844@cs.UAlberta.CA> <9896@celit.fps.com> <2338@l.cc.purdue.edu> <9911@celit.fps.com> <24358@estelle.udel.EDU> <3060@osc.COM> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: tve@sprite.berkeley.edu (Thorsten von Eicken) Organization: University of California, Berkeley Lines: 16 In article <3060@osc.COM> jgk@osc.COM (Joe Keane) writes: >One real problem with using C for threaded interpreters is that there is no >way to make an arbitrary jump instruction. If you could `goto' some address >expression there would be no problem. Yep, typically the C program ends up being a hunge switch statement: loop: switch(next_thread) { case 0: .... goto loop; case 1: .... goto loop; } and one hopes that a) a jump table is produced (and not a binary search tree) and b) the compiler doesn't dump core with some silly error when the number of cases reaches into the thousands... Or can anyone suggest a better method? ---- Thorsten von Eicken (tve@sprite.berkeley.edu)