factor/native/word.h

43 lines
1.1 KiB
C
Raw Normal View History

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;
/* 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-07-16 02:26:21 -04:00
} WORD;
INLINE WORD* untag_word(CELL tagged)
{
type_check(WORD_TYPE,tagged);
return (WORD*)UNTAG(tagged);
}
INLINE CELL tag_word(WORD* word)
{
return RETAG(word,WORD_TYPE);
}
2004-08-05 15:18:31 -04:00
WORD* word(CELL primitive, CELL parameter, CELL plist);
2004-07-16 02:26:21 -04:00
void update_xt(WORD* word);
void primitive_wordp(void);
void primitive_word(void);
void primitive_word_primitive(void);
void primitive_set_word_primitive(void);
void primitive_word_parameter(void);
void primitive_set_word_parameter(void);
void primitive_word_plist(void);
void primitive_set_word_plist(void);
2004-08-23 01:13:09 -04:00
void primitive_word_call_count(void);
void primitive_set_word_call_count(void);
void fixup_word(WORD* word);
void collect_word(WORD* word);