Related articles |
---|
[TDR] Token-Based Compilers tdarcos@mcimail.com (1993-01-20) |
Re: [TDR] Token-Based Compilers pcbeard@ucdavis.edu (1993-01-23) |
P-Code (was Re: [TDR] Token-Based Compilers) mdg@netcom.com (1993-01-26) |
Newsgroups: | comp.compilers |
From: | mdg@netcom.com (Mark Grand) |
Organization: | Premenos |
Date: | Tue, 26 Jan 1993 01:18:01 GMT |
References: | 93-01-143 93-01-164 |
Keywords: | design |
pcbeard@ucdavis.edu (Patrick C. Beard) said:
> I believe Microsoft uses P-Code in many of its shipping
> products for the Macintosh. ... I am very interested in finding out what
> the various trade-offs are in compiling to pseudo code. And what type of
> instructions to provide. I am thinking very seriously about
> writing a C interpreter using just such a technique. Has
> anybody any references on designs of P-Code instruction sets?
The P-Code that Microsoft uses is for the purpose of minimizing the isze
of the executable. The p-code that they use is substantially more compact
than native 8086 code.
Another circumstance in which p-code is a reasonable choice is when there
is an enormous semantic gap separating the source language from the native
instruction set. For example, there are a number of specialized languages
for building database related applications. Because of the large number
of operations they perform related to database manipulation, data
formatting and screen formatting, well over 90% of the time in these
programs is spent inside of the equivalent of a run time library. For
languages such as these, compiling to machine code does not usually
provide enough of an improvement to justify the effort of implementing a
machine code back end.
Yet another advantage of P-Code is that it can provide hardware
independence. P-Code can be designed so that it can be moved from one
type of computer hardware to another without need for access to source
code.
--
Mark Grand
Premenos Corporation 510-602-2000
1000 Burnett, Second Floor mark@premenos.sf.ca.us
Concord, CA 94520
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.