home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / compiler / 2259 < prev    next >
Encoding:
Text File  |  1993-01-26  |  2.2 KB  |  50 lines

  1. Newsgroups: comp.compilers
  2. Path: sparky!uunet!world!iecc!compilers-sender
  3. From: mdg@netcom.com (Mark Grand)
  4. Subject: P-Code (was Re: [TDR] Token-Based Compilers)
  5. Reply-To: mdg@netcom.com (Mark Grand)
  6. Organization: Premenos
  7. Date: Tue, 26 Jan 1993 01:18:01 GMT
  8. Approved: compilers@iecc.cambridge.ma.us
  9. Message-ID: <93-01-187@comp.compilers>
  10. References: <93-01-143@comp.compilers> <93-01-164@comp.compilers>
  11. Keywords: design
  12. Sender: compilers-sender@iecc.cambridge.ma.us
  13. Lines: 35
  14.  
  15. pcbeard@ucdavis.edu (Patrick C. Beard) said:
  16. > I believe Microsoft uses P-Code in many of its shipping
  17. > products for the Macintosh. ... I am very interested in finding out what
  18. > the various trade-offs are in compiling to pseudo code. And what type of
  19. > instructions to provide. I am thinking very seriously about
  20. > writing a C interpreter using just such a technique. Has
  21. > anybody any references on designs of P-Code instruction sets?
  22.  
  23. The P-Code that Microsoft uses is for the purpose of minimizing the isze
  24. of the executable.  The p-code that they use is substantially more compact
  25. than native 8086 code.
  26.  
  27. Another circumstance in which p-code is a reasonable choice is when there
  28. is an enormous semantic gap separating the source language from the native
  29. instruction set.  For example, there are a number of specialized languages
  30. for building database related applications.  Because of the large number
  31. of operations they perform related to database manipulation, data
  32. formatting and screen formatting, well over 90% of the time in these
  33. programs is spent inside of the equivalent of a run time library.  For
  34. languages such as these, compiling to machine code does not usually
  35. provide enough of an improvement to justify the effort of implementing a
  36. machine code back end.
  37.  
  38. Yet another advantage of P-Code is that it can provide hardware
  39. independence.  P-Code can be designed so that it can be moved from one
  40. type of computer hardware to another without need for access to source
  41. code.
  42. --
  43. Mark Grand
  44. Premenos Corporation                510-602-2000
  45. 1000 Burnett, Second Floor          mark@premenos.sf.ca.us
  46. Concord, CA   94520
  47. -- 
  48. Send compilers articles to compilers@iecc.cambridge.ma.us or
  49. {ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
  50.