2004-07-16 02:26:21 -04:00
|
|
|
typedef void (*XT)(void);
|
|
|
|
|
|
|
|
typedef struct {
|
2004-07-27 23:29:37 -04:00
|
|
|
/* TAGGED header */
|
|
|
|
CELL header;
|
2004-12-28 00:04:20 -05:00
|
|
|
/* TAGGED hashcode */
|
2004-08-29 04:03:16 -04:00
|
|
|
CELL hashcode;
|
2004-07-27 23:29:37 -04:00
|
|
|
/* untagged execution token: jump here to execute word */
|
2004-07-16 02:26:21 -04:00
|
|
|
CELL xt;
|
2004-07-27 23:29:37 -04:00
|
|
|
/* untagged on-disk primitive number */
|
2004-07-16 02:26:21 -04:00
|
|
|
CELL primitive;
|
|
|
|
/* TAGGED parameter to xt; used for colon definitions */
|
|
|
|
CELL parameter;
|
|
|
|
/* TAGGED property list for library code */
|
|
|
|
CELL plist;
|
2004-08-23 01:13:09 -04:00
|
|
|
/* UNTAGGED call count incremented by profiler */
|
|
|
|
CELL call_count;
|
2004-08-29 03:20:19 -04:00
|
|
|
/* UNTAGGED amount of memory allocated in word */
|
|
|
|
CELL allot_count;
|
2004-12-10 21:46:42 -05:00
|
|
|
} F_WORD;
|
2004-07-16 02:26:21 -04:00
|
|
|
|
2004-12-10 21:46:42 -05:00
|
|
|
INLINE F_WORD* untag_word(CELL tagged)
|
2004-07-16 02:26:21 -04:00
|
|
|
{
|
|
|
|
type_check(WORD_TYPE,tagged);
|
2004-12-10 21:46:42 -05:00
|
|
|
return (F_WORD*)UNTAG(tagged);
|
2004-07-16 02:26:21 -04:00
|
|
|
}
|
|
|
|
|
2004-12-10 21:46:42 -05:00
|
|
|
INLINE CELL tag_word(F_WORD* word)
|
2004-07-16 02:26:21 -04:00
|
|
|
{
|
|
|
|
return RETAG(word,WORD_TYPE);
|
|
|
|
}
|
|
|
|
|
2004-12-10 21:46:42 -05:00
|
|
|
void update_xt(F_WORD* word);
|
2004-07-16 02:26:21 -04:00
|
|
|
void primitive_word(void);
|
2004-12-24 02:52:02 -05:00
|
|
|
void primitive_update_xt(void);
|
2004-10-04 23:58:53 -04:00
|
|
|
void primitive_word_compiledp(void);
|
2004-12-24 02:52:02 -05:00
|
|
|
void primitive_to_word(void);
|
2004-12-10 21:46:42 -05:00
|
|
|
void fixup_word(F_WORD* word);
|
|
|
|
void collect_word(F_WORD* word);
|