Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #19727

Re: RAFTS-like compiler; some progress

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.forth
Subject Re: RAFTS-like compiler; some progress
Date 2013-02-14 12:55 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2013Feb14.135556@mips.complang.tuwien.ac.at> (permalink)
References (2 earlier) <2013Feb9.153819@mips.complang.tuwien.ac.at> <5bed9fa5-cdbb-4cee-9de2-1124424ce6dd@googlegroups.com> <2013Feb11.183944@mips.complang.tuwien.ac.at> <b9bdeb0a-2423-459b-99d8-f3c2d740a0c2@googlegroups.com> <94489a1a-9636-44ce-bbb6-83a1a2ef5db0@z4g2000vbz.googlegroups.com>

Show all headers | View raw


Alex McDonald <blog@rivadpm.com> writes:
>Unreachable and/or dead code can also be generated by compiler
>optimizations that the programmer didn't explicitly write. Here's a
>non-branching example.
>
>: calc-a&b ( n -- n n ) ( this is in a library )
>    dup 0> if 1 else -1 then swap * ;
>...
>: doit calc-a&b nip ;
>( : doit * ; \ what the compiler generates. )

The other test of compiler optimization here is the "SWAP *".  Before
anybody says that this is contrived, there used to be (maybe still is)
an occurence of "SWAP +" in the FSL.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2013: http://www.euroforth.org/ef13/

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

RAFTS-like compiler; some progress Alex McDonald <blog@rivadpm.com> - 2013-02-06 15:55 -0800
  Re: RAFTS-like compiler; some progress Spam@ControlQ.com - 2013-02-08 16:16 -0500
    Re: RAFTS-like compiler; some progress Alex McDonald <blog@rivadpm.com> - 2013-02-08 14:40 -0800
      Re: RAFTS-like compiler; some progress mhx@iae.nl (Marcel Hendrix) - 2013-02-09 10:37 +0200
        Re: RAFTS-like compiler; some progress Roelf Toxopeus <rt4all@notthis.hetnet.nl> - 2013-02-09 12:06 +0100
          Re: RAFTS-like compiler; some progress albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-02-09 15:46 +0000
        Re: RAFTS-like compiler; some progress anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-02-09 14:38 +0000
          Re: RAFTS-like compiler; some progress Brad Eckert <hwfwguy@gmail.com> - 2013-02-11 08:57 -0800
            Re: RAFTS-like compiler; some progress anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-02-11 17:39 +0000
              Re: RAFTS-like compiler; some progress Brad Eckert <hwfwguy@gmail.com> - 2013-02-11 10:48 -0800
                Re: RAFTS-like compiler; some progress Alex McDonald <blog@rivadpm.com> - 2013-02-11 18:56 -0800
                Re: RAFTS-like compiler; some progress Alex McDonald <blog@rivadpm.com> - 2013-02-11 18:58 -0800
                Re: RAFTS-like compiler; some progress anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-02-14 12:55 +0000
      Re: RAFTS-like compiler; some progress anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-02-09 14:44 +0000
        Re: RAFTS-like compiler; some progress Alex McDonald <blog@rivadpm.com> - 2013-02-11 19:09 -0800

csiph-web