2020-04-14 10:04:09 -04:00
|
|
|
Compilation vs meta-compilation
|
|
|
|
|
|
|
|
Compilation vs meta-compilation. When you compile a word with
|
2020-06-09 22:55:42 -04:00
|
|
|
"[COMPILE] foo", it's straightforward: It writes the address
|
|
|
|
of word foo to HERE.
|
2020-04-14 10:04:09 -04:00
|
|
|
|
|
|
|
When you *meta* compile, it's a bit more mind blowing. It
|
|
|
|
fetches the address of the word specified by the caller, then
|
|
|
|
writes that number as a literal, followed by a reference to
|
|
|
|
",".
|
|
|
|
|
|
|
|
Example: ": foo [COMPILE] bar;" is the equivalent of ": foo bar
|
|
|
|
;" if bar is not an immediate. However, ": foo COMPILE bar ;"
|
|
|
|
is the equivalent of ": foo ['] bar , ;". Got it?
|
2020-06-11 18:12:01 -04:00
|
|
|
|
|
|
|
|