Xref: utzoo comp.lang.c:11396 comp.arch:5567 Path: utzoo!attcan!uunet!husc6!mailrus!cornell!uw-beaver!teknowledge-vaxc!sri-unix!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.lang.c,comp.arch Subject: Re: Programmed code generation: Native vs. Pcode Message-ID: <171@quintus.UUCP> Date: 18 Jul 88 21:42:50 GMT References: <3353@cognos.UUCP> <619@goofy.megatest.UUCP> <429@uwovax.uwo.ca> <12381@ut-sally.UUCP> <1108@ficc.UUCP> <23944@bu-cs.BU.EDU> <5308@june.cs.washington.edu> <23955@bu-cs.BU.EDU> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Organization: Quintus Computer Systems, Inc. Lines: 27 >From: pardo@june.cs.washington.edu (David Keppel) >Many Lisp (Prolog, Smalltalk, ...) systems generate a pseudocode >rather than native instructions. The p-code is run by an an >interpreter rather than the hardware. Thus, as far as the hardware is >concerned, it is only the interpreter and NOT the p-code that is being >executed. (1) There are a couple of commercial Prolog systems which generate native code. In the interests of higher performance for large programs on small (4-8Mbyte) machines, Quintus Prolog is _not_ one of them, but that is another (and perhaps more interesting) story. (2) All the commercial Prolog systems that I know of offer an interface to some other language (Lisp, C, or Pop). So even the systems which use pseudocode rather than native code aren't off the code-modifying hook: if you want to be able to load C code at run time you still have to make additional parts of your address space executable. (But once a region of the address space has turned into code, it need never be changed again.) (3) VMS, SunOS 4.0, and I believe Apollo's AEGIS support dynamic extension of programs by mapping *shareable* library code into a program's address space (System V.3 on a 386 sort of kludges this in too). Would anyone care to explain what architectural features are needed for efficient dynamically mapped shared code? Is position independent code essential, or only better? What popular architectures couldn't do it? If SPARC can do it, is there anything about RISCs which makes it easier/ harder?