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


Groups > comp.lang.forth > #29926

Re: Detecting low-level words.

From "Rod Pemberton" <dont_use_email@xnothavet.cqm>
Newsgroups comp.lang.forth
Subject Re: Detecting low-level words.
Date 2014-04-28 01:22 -0400
Organization Aioe.org NNTP Server
Message-ID <op.xe0g7n036zenlw@localhost> (permalink)
References <op.xeyjsmxg6zenlw@localhost> <6da29953-683e-4874-988e-eb208a43796a@googlegroups.com>

Show all headers | View raw


On Sun, 27 Apr 2014 12:29:02 -0400, Mark Wills <markwills1970@gmail.com>  
wrote:

> Assuming a threaded system, tick the word and if it points to DOCOL it's
> a high-level word,  otherwise it's something else.
>
> No standard way to determine it,  and the address of DOCOL could change
> with each release of a particular forth system.
>
> If your system had a word that returned the address of [DOCOL] it would
> be helpful. Say 'DOCOL...
>
> : 'DOCOL ( -- ADDR ) ... ... ... ;
>
> Then it would simply be:
>
> : IsColonDef ( cfa -- flag ) @ 'DOCOL = ;
>
> Test:
>
> ' IsColonDef IsColonDef .
>

It's ENTER instead of DOCOL on my system.  It's setup like DOVAR or DODOES
which returns the address of those routines so it can be compiled.  I may
also have DOCON etc internally, unexposed.

The idea is some word, like SEE, which emits high-level definitions in
terms of the complete sequence of low-level words, not just the uppermost,
high-level definition, like TRACE without execution.  That can then be
analysed for optimization.  I would guess that this idea has been around
for some time and perhaps even been developed by someone.


Rod Pemberton

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


Thread

Detecting low-level words. "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-04-27 00:23 -0400
  Re: Detecting low-level words. "Elizabeth D. Rather" <erather@forth.com> - 2014-04-26 22:56 -1000
  Re: Detecting low-level words. anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-04-27 12:35 +0000
  Detecting low-level words. Mark Wills <markwills1970@gmail.com> - 2014-04-27 09:29 -0700
    Detecting low-level words. Mark Wills <markwills1970@gmail.com> - 2014-04-27 09:30 -0700
    Re: Detecting low-level words. "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-04-28 01:22 -0400
      Re: Detecting low-level words. "Elizabeth D. Rather" <erather@forth.com> - 2014-04-27 22:10 -1000
        Re: Detecting low-level words. "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-04-28 05:58 -0400
          Re: Detecting low-level words. foxaudioresearch@gmail.com - 2014-04-28 19:51 -0700
            Re: Detecting low-level words. "Elizabeth D. Rather" <erather@forth.com> - 2014-04-28 18:22 -1000
              Re: Detecting low-level words. Gary Bergstrom <forthprgrmr@gmail.com> - 2014-04-29 20:59 -0700
                Re: Detecting low-level words. AKK <akk@nospam.org> - 2014-04-30 10:50 +0200
                Re: Detecting low-level words. Roelf Toxopeus <rt4all@notthis.hetnet.nl> - 2014-04-30 13:23 +0200
                Re: Detecting low-level words. mhx@iae.nl - 2014-04-30 11:06 -0700
                Re: Detecting low-level words. Roelf Toxopeus <rt4all@notthis.hetnet.nl> - 2014-04-30 23:15 +0200
          Re: Detecting low-level words. albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-04-30 10:28 +0000
  Re: Detecting low-level words. Stefan Mauerhofer <smauerhofer@androsoft.ch> - 2014-04-27 22:36 -0700

csiph-web