document u3n_prog and u3n_memo

This commit is contained in:
Paul Driver 2018-04-30 13:32:39 -07:00
parent 002a1d8996
commit 30af289c34

View File

@ -6,33 +6,37 @@
*** ***
**/ **/
/* u3n_memo: %memo hint space
*/
typedef struct { typedef struct {
c3_l sip_l; c3_l sip_l;
u3_noun key; u3_noun key;
} u3n_memo; } u3n_memo;
/* u3n_prog: program compiled from nock
*/
typedef struct _u3n_prog { typedef struct _u3n_prog {
struct { struct {
c3_o own_o; c3_o own_o; // program owns ops_y?
c3_w len_w; c3_w len_w; // length of bytecode (bytes)
c3_y* ops_y; c3_y* ops_y; // actual array of bytes
} byc_u; } byc_u; // bytecode
struct { struct {
c3_w len_w; c3_w len_w; // number of literals
u3_noun* non; u3_noun* non; // array of literals
} lit_u; } lit_u; // literals
struct { struct {
c3_w len_w; c3_w len_w; // number of memo slots
u3n_memo* sot_u; u3n_memo* sot_u; // array of memo slots
} mem_u; } mem_u; // memo slot data
struct { struct {
c3_w len_w; c3_w len_w; // number of calls sites
u3j_site* sit_u; u3j_site* sit_u; // array of sites
} cal_u; } cal_u; // call site data
struct { struct {
c3_w len_w; c3_w len_w; // number of registration sites
u3j_rite* rit_u; u3j_rite* rit_u; // array of sites
} reg_u; } reg_u; // registration site data
} u3n_prog; } u3n_prog;
/** Functions. /** Functions.