home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / compiler / 1265 < prev    next >
Encoding:
Internet Message Format  |  1992-07-25  |  2.9 KB

  1. Path: sparky!uunet!olivea!decwrl!decwrl!world!iecc!compilers-sender
  2. From: acha@CS.CMU.EDU (Anurag Acharya)
  3. Newsgroups: comp.compilers
  4. Subject: Re: Pros and cons of high-level intermediate languages
  5. Keywords: storage, C, question
  6. Message-ID: <92-07-086@comp.compilers>
  7. Date: 24 Jul 92 15:28:33 GMT
  8. References: <92-07-068@comp.compilers> <92-07-074@comp.compilers>
  9. Sender: compilers-sender@iecc.cambridge.ma.us
  10. Reply-To: acha@CS.CMU.EDU (Anurag Acharya)
  11. Organization: School of Computer Science, Carnegie Mellon University
  12. Lines: 54
  13. Approved: compilers@iecc.cambridge.ma.us
  14.  
  15. Olivier.Ridoux@irisa.fr (Olivier Ridoux)
  16. writes about something called abstract memory that solves problems relating
  17. to GC as well as tail recursion.
  18.  
  19. I would like to know more about "abstract memory" and how it solves these
  20. problems.
  21.  
  22. >>An optimistic final note.  On one hand, the generated code seems to break
  23. > the admitted dimensions of human programming: huge identifiers made of
  24. > several layers of prefixes, tags or module names, huge expression (e.g. in
  25. > our scheme the unification subprogram of every clause is made in a single
  26. > conjunctive expression (&&)), etc.>On the other hand, it is hard knowing
  27. > the limits of an actual C compiler.  However, we never met them.  In our
  28. > experiments, we only met problems with cpp.
  29.  
  30. I am surprised. You must definitely be lucky. C compilers have a host of
  31. limitations. Off the top of my head:
  32.  
  33. 1. Size of individual functions
  34. 2. Number of cases in a switch statement (many compilers allow 500)
  35. 3. Number of typedefs ina file (one compiler had a quaint limit, 768. )
  36. 4. Size of source file
  37. 5. Size of static initializations
  38. 6. Number of symbols in initializations
  39.  
  40. Some compilers allow you to modify these limits by using obscure undocumented
  41. options which differ from compiler to compiler.
  42.  
  43. Wish list:
  44.  
  45. 1. label variables. Any kind of label variables with any resonable
  46. restrictions
  47.  
  48.    (statically scoped, no jumping to inside blocks etc.). This would
  49.    greatly facilitate compilation of both functional languages and parallel
  50.    languages. It would also facilitate parallelizing compilers for other
  51.    languages. To this, add a C compiler that does not limit the size
  52.    of individual functions and you are close to using C as an assembly
  53.    language
  54.  
  55. 2. A portable way of looking at the stack. Supporting  garbage collection
  56.    and call/cc (user-level continuations) would be easier if one could 
  57.    traipse up and down the C stack. Currently, such schemes are machine and
  58.    compiler dependent. 
  59.  
  60. 3. Some form of global register assignment. Some annotation scheme that
  61.    allows me to indicate to the C compiler that I would like a particular
  62.    global variable to be stuck in a register (may be a particular register
  63.    if I am willing to give up portability).
  64.  
  65. anurag
  66. -- 
  67. Send compilers articles to compilers@iecc.cambridge.ma.us or
  68. {ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
  69.