#include "master.hpp" /* push a new tuple on the stack */ F_TUPLE *allot_tuple(CELL layout_) { gc_root layout(layout_); gc_root tuple(allot(tuple_size(layout.untagged()))); tuple->layout = layout.value(); return tuple.untagged(); } PRIMITIVE(tuple) { gc_root layout(dpop()); F_TUPLE *tuple = allot_tuple(layout.value()); F_FIXNUM i; for(i = tuple_size(layout.untagged()) - 1; i >= 0; i--) tuple->data()[i] = F; dpush(tag(tuple)); } /* push a new tuple on the stack, filling its slots from the stack */ PRIMITIVE(tuple_boa) { gc_root layout(dpop()); gc_root tuple(allot_tuple(layout.value())); CELL size = untag_fixnum(layout.untagged()->size) * CELLS; memcpy(tuple->data(),(CELL *)(ds - (size - CELLS)),size); ds -= size; dpush(tuple.value()); }