home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.arch
- Path: sparky!uunet!email!mips.complang.tuwien.ac.at!anton
- From: anton@mips.complang.tuwien.ac.at (Anton Martin Ertl)
- Subject: Re: What's wrong with stack machines?
- Message-ID: <1992Nov6.094639.28441@email.tuwien.ac.at>
- Sender: news@email.tuwien.ac.at
- Nntp-Posting-Host: mips.complang.tuwien.ac.at
- Organization: Institut fuer Computersprachen, Technische Universitaet Wien
- References: <17035@mindlink.bc.ca> <Bx679q.Az9.2@cs.cmu.edu> <1dckvsINN7mb@uniwa.uwa.edu.au>
- Date: Fri, 6 Nov 1992 09:46:39 GMT
- Lines: 64
-
- In article <1dckvsINN7mb@uniwa.uwa.edu.au>, john@gu.uwa.edu.au (John West) writes:
- |> lindsay+@cs.cmu.edu (Donald Lindsay) writes:
- |> >Surely typical stack-language programs can be mechanically
- |> >transformed (recompiled) into non-stack forms.
- |>
- |> And typical non-stack-languages can be transformed into stack forms. So?
- |> You lose a lot of efficiency going both ways. There is no way a conventional
- |> processor is going to run converted stack code as well as a stack machine.
-
- But there is:
-
- @InProceedings{ertl92,
- author = "M. Anton Ertl",
- title = "A New Approach to Forth Native Code Generation",
- crossref = "euroforth92",
- pages = "73--78",
- abstract = "RAFTS is a framework for applying state of the art
- compiler technology to the compilation of Forth. The
- heart of RAFTS is a simple method for transforming
- Forth programs into data flow graphs and static
- single assignment form. Standard code generation and
- optimization techniques can be applied to programs in
- these forms. Specifically, RAFTS uses interprocedural
- register allocation to eliminate nearly all stack
- accesses. It also removes nearly all stack pointer
- updates. Inlining and tail call optimization reduce
- the call overhead. RAFTS compiles all of Forth,
- including difficult cases like unknown stack heights,
- {\tt PICK}, {\tt ROLL} and {\tt EXECUTE}. And last,
- but not least, RAFTS is designed for interactive
- Forth systems; it is not restricted to batch
- compilers"
- }
-
- @Proceedings{euroforth92,
- key = "EuroForth '92",
- booktitle = "EuroForth '92",
- year = "1992",
- organization = "MicroProcessor Engineering",
- address = "Southampton, England"
- }
-
- The EuroForth Proceedings will also appear in the Proceedings of the
- Asilomar FORML conference.
-
- Looking at the work done on Scheme, Prolog, Smalltalk and especially
- SELF, I am convinced that there's hardly any programming language that
- cannot be compiled into efficient code for RISC machines, if you give
- us (the compiler guys) a few years. This is probably true for other
- architectural classes, too. E.g., stack machines.
-
- |> Likewise, a stack machine is going to have a tough time on the converted
- |> non-stack code.
-
- Phil Koopman has done some work on this. See his posting.
-
- |> The problem is that there hasn't been enough work done on stack languages.
-
- Or on stack machines.
-
- - anton
- --
- M. Anton Ertl Some things have to be seen to be believed
- anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen
-