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


Groups > comp.lang.forth > #50200

Re: A use for quotations

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.forth
Subject Re: A use for quotations
Date 2016-08-18 07:35 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2016Aug18.093554@mips.complang.tuwien.ac.at> (permalink)
References <noqejl$k6$1@dont-email.me> <1c742f18-8f6a-49cd-96d3-6fe0be6fddfa@googlegroups.com> <np1arh$7o6$1@dont-email.me>

Show all headers | View raw


Gerry Jackson <gerry@jackson9000.fsnet.co.uk> writes:
>Well that not standard ANS Forth/Forth 2012 code. At the risk of being 
>accused of being a brown noser, I prefer to stick to complying with the 
>standard. I have thought that if performance becomes an issue I would 
>provide a lightweight mechanism such as you suggest. I haven't pursued 
>that thought any further - is there a guaranteed non-crashing way of 
>testing whether return stack manipulation works on an ANS Forth system? 

No.  There is not even a crashing way.  Some programs that use
return-address manipulation may work as intended on a system, and some
other programs don't work as intended.  Typical issues in modern
systems are:

* The system uses tail-call elimination or inlining, i.e., the call
  does not push a return address.

* Locals work differently than in the system for which the program was
  developed.  This can be avoided by not using locals in any of the
  words that are involved in the return-address manipulation.

* The code for a word has a different size and representation than
  expected by the program.  This is relevant for programs that try to
  skip code by applying, e.g., CELL+ to a return address to skip code.

* Likewise, if the program tries to compile inline data by ","
  etc. after a return-address manipulating word, and then skipping
  that data by adding to the return address, this does not work if the
  code is somewhere else than ALLOTed data.

- 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 2016: http://www.euroforth.org/ef16/

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


Thread

A use for quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-08-14 19:51 +0100
  Re: A use for quotations Bernd Paysan <bernd.paysan@gmx.de> - 2016-08-14 19:44 +0000
    Re: A use for quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-08-14 22:57 +0100
  Re: A use for quotations hughaguilar96@gmail.com - 2016-08-14 14:05 -0700
    Re: A use for quotations Cecil Bayona <cbayona@cbayona.com> - 2016-08-14 16:16 -0500
  Re: A use for quotations "HAA" <someone@microsoft.com> - 2016-08-17 11:29 +1000
    Re: A use for quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-08-17 10:06 +0100
      Re: A use for quotations "HAA" <someone@microsoft.com> - 2016-08-18 12:18 +1000
        Re: A use for quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-08-19 16:07 +0100
          Re: A use for quotations "Elizabeth D. Rather" <erather@forth.com> - 2016-08-19 09:35 -1000
            Re: A use for quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-08-19 23:03 +0100
          Re: A use for quotations "HAA" <someone@microsoft.com> - 2016-08-20 13:19 +1000
            Re: A use for quotations Coos Haak <htrofhc@gmail.com> - 2016-08-20 14:55 +0200
              Re: A use for quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-08-20 15:38 +0000
              Re: A use for quotations "HAA" <someone@microsoft.com> - 2016-08-22 14:58 +1000
                Re: A use for quotations Julian Fondren <julian.fondren@gmail.com> - 2016-08-22 04:18 -0700
                Re: A use for quotations Coos Haak <htrofhc@gmail.com> - 2016-08-22 15:13 +0200
                Re: A use for quotations "HAA" <someone@microsoft.com> - 2016-08-24 22:20 +1000
                Re: A use for quotations hughaguilar96@gmail.com - 2016-08-24 09:44 -0700
                Re: A use for quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-08-25 10:09 +0100
                Re: A use for quotations "HAA" <someone@microsoft.com> - 2016-08-27 12:24 +1000
  Re: A use for quotations humptydumpty <ouatubi@gmail.com> - 2016-08-17 00:55 -0700
    Re: A use for quotations hughaguilar96@gmail.com - 2016-08-17 02:19 -0700
      Re: A use for quotations humptydumpty <ouatubi@gmail.com> - 2016-08-17 07:49 -0700
        Re: A use for quotations humptydumpty <ouatubi@gmail.com> - 2016-08-17 08:18 -0700
    Re: A use for quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-08-17 10:30 +0100
      Re: A use for quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-08-17 10:34 +0100
        Re: A use for quotations humptydumpty <ouatubi@gmail.com> - 2016-08-17 07:43 -0700
      Re: A use for quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-08-18 07:35 +0000

csiph-web