Skip to content

Commit

Permalink
Define TO_DOES constant if the target has a does field.
Browse files Browse the repository at this point in the history
  • Loading branch information
larsbrinkhoff committed Apr 21, 2017
1 parent 9cda437 commit b6e66b2
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions lib/meta.fth
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ include params.fth
: >code code-offset + ;
: >body body-offset + ;

\ Does target have a DOES> field?
[defined] does-offset constant has-does?

0 value 'docol
0 value 'dovar
0 value 'docon
Expand Down Expand Up @@ -140,14 +143,8 @@ h: does> t-compile (does>) ;
cell-size t-constant cell
next-offset t-constant TO_NEXT
code-offset t-constant TO_CODE
also forth
[defined] t-asmjs [if]
previous
does-offset t-constant TO_DOES
[else]
previous
[then]
body-offset t-constant TO_BODY
has-does? [if] does-offset t-constant TO_DOES [then]

'docol t-constant 'docol
'dovar t-constant 'dovar
Expand Down

0 comments on commit b6e66b2

Please sign in to comment.