3 ms·
in ur-scheme i assigned a magic number to each boxed type as an easy dynamic type test. procedures are 0xca11ab1e, variables moved onto the heap because they w
by kragen 2y ago
in ur-scheme i assigned a magic number to each boxed type as an easy dynamic type test. procedures are 0xca11ab1e, variables moved onto the heap because they were captured by a closure are 0x1ce11ed, strings of text are 0xbabb1e, cons cells consisting of a car and a cdr are 0x2ce11ed, symbol objects used for naming procedures and variables are 0x1abe1, and all other types are unboxed. aside from being enjoyably silly, this was surprisingly helpful when i was single stepping through the code it generated in gdb. hex dumps are a lot easier to read when you do that
http://www.canonical.org/~kragen/sw/urscheme/compiler.scm.html http://www.canonical.org/~kragen/sw/urscheme/compiler.scm.ht...