Created
February 6, 2017 01:16
-
-
Save GerryG/a34efc6ebaab1d9feaa33444fe97cb9f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Not exactly sure what an accumulator is, but these serializers seem to write files | |
General pattern, __X_(un)serialise is the internal, recursive version of each: | |
a: accumulator | |
a uses a, m, r | |
a_i uses a_i, m | |
m: mtree Sematic tree matrix | |
uses m | |
r: receptor | |
uses: m, __a_i, t? | |
t: tree This one calls WRITE (send?) | |
uses only t | |
accumulator.h:void _a_serialize_instances(Instances *i,char *file); | |
accumulator.h:S *__a_serialize_instances(Instances *i); | |
accumulator.c | |
Recursive entry point | |
void __a_serializet(T *t,char *name) { | |
_m_serialize(h.m); | |
__a_serializet(_t_root(G_vm->sem->stores[0].definitions),SEM_FN); | |
__a_serializet(paths,PATHS_FN); | |
_r_serialize(G_vm->r,&surface,&length); | |
_m_serialize(h.m); | |
S *__a_serialize_instances(Instances *instances) { | |
_r_serialize(r,&surface,&length); | |
_m_serialize(h.m); | |
void _a_serialize_instances(Instances *i,char *file) { | |
S *s = __a_serialize_instances(i); | |
Semantic tree matrix | |
mtree.h:S * _m_serialize(M *m); | |
mtree.c | |
S *_m_serialize(M *m) { | |
_m_serialize(sh.m); | |
receptor.h:void _r_serialize(Receptor *r,void **surfaceP,size_t *lengthP); | |
receptor.c | |
_r_serialize(Receptor *r,void **surfaceP,size_t *lengthP) { | |
/* __t_serialize(&r->defs,r->root,surfaceP,sizeof(size_t),buf_size,0); */ | |
_m_serialize(h.m); | |
__a_serialize_instances(&r->instances); | |
tree.h:size_t __t_serialize(SemTable *sem,T *t,void **bufferP,size_t offset,size_t current_size,int compact); | |
tree.h:void _t_serialize(SemTable *sem,T *t,void **surfaceP,size_t *sizeP); | |
tree.c | |
size_t __t_serialize(SemTable *sem,T *t,void **bufferP,size_t offset,size_t current_size,int compact){ | |
__t_serialize(sem,_t_child(t,i),bufferP,offset,current_size,compact); | |
void _t_serialize(SemTable *sem,T *t,void **surfaceP,size_t *lengthP) { | |
__t_serialize(sem,t,surfaceP,0,buf_size,0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment