home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / arch / 10447 < prev    next >
Encoding:
Text File  |  1992-11-07  |  3.0 KB  |  77 lines

  1. Newsgroups: comp.arch
  2. Path: sparky!uunet!email!mips.complang.tuwien.ac.at!anton
  3. From: anton@mips.complang.tuwien.ac.at (Anton Martin Ertl)
  4. Subject: Re: What's wrong with stack machines?
  5. Message-ID: <1992Nov6.094639.28441@email.tuwien.ac.at>
  6. Sender: news@email.tuwien.ac.at
  7. Nntp-Posting-Host: mips.complang.tuwien.ac.at
  8. Organization: Institut fuer Computersprachen, Technische Universitaet Wien
  9. References: <17035@mindlink.bc.ca> <Bx679q.Az9.2@cs.cmu.edu> <1dckvsINN7mb@uniwa.uwa.edu.au>
  10. Date: Fri, 6 Nov 1992 09:46:39 GMT
  11. Lines: 64
  12.  
  13. In article <1dckvsINN7mb@uniwa.uwa.edu.au>, john@gu.uwa.edu.au (John West) writes:
  14. |> lindsay+@cs.cmu.edu (Donald Lindsay) writes:
  15. |> >Surely typical stack-language programs can be mechanically
  16. |> >transformed (recompiled) into non-stack forms.
  17. |> 
  18. |> And typical non-stack-languages can be transformed into stack forms. So?
  19. |> You lose a lot of efficiency going both ways. There is no way a conventional
  20. |> processor is going to run converted stack code as well as a stack machine.
  21.  
  22. But there is:
  23.  
  24. @InProceedings{ertl92,
  25.   author =     "M. Anton Ertl",
  26.   title =     "A New Approach to Forth Native Code Generation",
  27.   crossref =    "euroforth92",
  28.   pages =     "73--78",
  29.   abstract =    "RAFTS is a framework for applying state of the art
  30.          compiler technology to the compilation of Forth.  The
  31.          heart of RAFTS is a simple method for transforming
  32.          Forth programs into data flow graphs and static
  33.          single assignment form. Standard code generation and
  34.          optimization techniques can be applied to programs in
  35.          these forms. Specifically, RAFTS uses interprocedural
  36.          register allocation to eliminate nearly all stack
  37.          accesses. It also removes nearly all stack pointer
  38.          updates. Inlining and tail call optimization reduce
  39.          the call overhead. RAFTS compiles all of Forth,
  40.          including difficult cases like unknown stack heights,
  41.          {\tt PICK}, {\tt ROLL} and {\tt EXECUTE}. And last,
  42.          but not least, RAFTS is designed for interactive
  43.          Forth systems; it is not restricted to batch
  44.          compilers"
  45. }
  46.  
  47. @Proceedings{euroforth92,
  48.   key =     "EuroForth '92",
  49.   booktitle =     "EuroForth '92",
  50.   year =     "1992",
  51.   organization =     "MicroProcessor Engineering",
  52.   address =     "Southampton, England"
  53. }
  54.  
  55. The EuroForth Proceedings will also appear in the Proceedings of the
  56. Asilomar FORML conference.
  57.  
  58. Looking at the work done on Scheme, Prolog, Smalltalk and especially
  59. SELF, I am convinced that there's hardly any programming language that
  60. cannot be compiled into efficient code for RISC machines, if you give
  61. us (the compiler guys) a few years. This is probably true for other
  62. architectural classes, too. E.g., stack machines.
  63.  
  64. |> Likewise, a stack machine is going to have a tough time on the converted
  65. |> non-stack code.
  66.  
  67. Phil Koopman has done some work on this. See his posting.
  68.  
  69. |> The problem is that there hasn't been enough work done on stack languages.
  70.  
  71. Or on stack machines.
  72.  
  73. - anton
  74. -- 
  75. M. Anton Ertl                    Some things have to be seen to be believed
  76. anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen
  77.