This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Andrew Archibald <aarchiba@undergrad.math.uwaterloo.ca> writes: > I think we may always want to undump just before execution --- as well > as separate compilation. But regardless, it is important that it be > possible to store precomputed results in an easy-to-load form. And > unfortunately, this form probably includes smobs (eg, compiled > regexps). You need a more 'static' module system to guarantee that the precomputed stuff won't change. Or do you? As for smobs, I think they are really a pain with regards to compilation. Also, as I see it, all the things which use smobs now could use some static 'define-record-type' thingie (on the Scheme level). FWIW, I hear that the record facility was rejected by the R*RS committee because the record types can be generated dynamically, defeating any type-inference optimizations. As for C, it should be possible to have user-defined types tagged with pointers instead of dynamically-assigned numbers. So, instead of: long scm_tc16_my_type_id; ... SCM_NEWCELL(z); SCM_SETCAR(z, scm_tc16_my_type_id); SCM_SETCDR(z, stuff); ... scm_tc16_my_type_id = scm_newsmob(&my_smob); You could say: char * my_type_id = "mumble"; ... SCM_NEWCELL(z); SCM_SETCAR(z, (long)my_type_id); SCM_SETCDR(z, stuff); If this doesn't work now (or has no chance of working ever, or is wrong for some deep reason), I'd like to know why. mike.