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


Groups > comp.lang.forth > #39430

Re: COMPILE, and :NONAME

From "Alex McDonald" <blog@rivadpm.com>
Newsgroups comp.lang.forth
Subject Re: COMPILE, and :NONAME
Date 2015-05-29 19:36 +0100
Organization A noiseless patient Spider
Message-ID <mkabho$gjv$1@dont-email.me> (permalink)
References (1 earlier) <2015May29.152552@mips.complang.tuwien.ac.at> <mk9sli$lep$1@dont-email.me> <2015May29.164556@mips.complang.tuwien.ac.at> <mka2tf$dve$1@dont-email.me> <2015May29.192130@mips.complang.tuwien.ac.at>

Show all headers | View raw


on 29/05/2015 18:21:27,  wrote:
> "Alex McDonald" <blog@rivadpm.com> writes:
>>That's what I have, slightly modified.
>>
>> lfield: head.ct    \ [ ' compile,   ] <-+ or execute for immediate
>> lfield: head.xtptr \ [ xt ptr field ]   | xt pointer
>>lfield: : head.comp \ [ ' xt-call, ] | how to compile, normally a call
>>
>>The compilation token is followed by HEAD.COMP (the comp field), and an
>>XT backpointer points at the compilation token. I now point all :NONAMEs
>>at a dummy compilation token
>>
>>0 , 0 , ' xt-call,
>>
>>and COMPILE, does
>>
>>: >ct    ( xt -- ct ) ( move from the XT to the compilation token) ;
>>: compile, ( xt -- ) dup >ct head.comp @ execute ;
> 
> Yes, that should work.  I consider your terminology confusing; Didn't
> you explain in another posting that what you call the ct here is the
> nt? I would find that less confusing.

I apologise for the confusion. The CT pair is part of the NT, as is the
COMP field (it follows). NAME>COMPILE produces ( nt -- nt ' NT-COMPILE, |
NT-EXECUTE ) rather than ( nt -- xt ' COMPILE, | EXECUTE ). It could
produce ( nt -- ct ' CT-COMPILE, | CT-EXECUTE ). There's reason in this
madness, as treating the NT and CT as separate allows changes without
having to replumb the entire header architecture. 

> 
> - anton

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


Thread

COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-05-29 12:48 +0100
  Re: COMPILE, and :NONAME Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-05-29 14:15 +0100
    Re: COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-05-29 15:23 +0100
  Re: COMPILE, and :NONAME anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-05-29 13:25 +0000
    Re: COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-05-29 15:22 +0100
      Re: COMPILE, and :NONAME anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-05-29 14:45 +0000
        Re: COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-05-29 17:09 +0100
          Re: COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-05-29 17:13 +0100
          Re: COMPILE, and :NONAME anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-05-29 17:21 +0000
            Re: COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-05-29 19:36 +0100
        Re: COMPILE, and :NONAME Bernd Paysan <bernd.paysan@gmx.de> - 2015-05-29 22:47 +0200
          Re: COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-05-29 23:23 +0100
            Re: COMPILE, and :NONAME Bernd Paysan <bernd.paysan@gmx.de> - 2015-05-30 02:03 +0200
              Re: COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-05-30 20:58 +0100
            Re: COMPILE, and :NONAME anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-05-30 11:56 +0000
              Re: COMPILE, and :NONAME albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-05-30 13:34 +0000
              Re: COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-05-30 20:54 +0100
                Re: COMPILE, and :NONAME foxaudioresearch@gmail.com - 2015-06-01 17:34 -0700
                Re: COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-06-02 15:54 +0100
              Re: COMPILE, and :NONAME Bernd Paysan <bernd.paysan@gmx.de> - 2015-05-30 23:45 +0200

csiph-web