return (a + (b-1)) & ~(b-1);
}
+inline static cell alignment_for(cell a, cell b)
+{
+ return align(a,b) - a;
+}
+
static const cell data_alignment = 16;
#define WORD_SIZE (signed)(sizeof(cell)*8)
{
code_block_unoptimized,
code_block_optimized,
- code_block_profiling,
+ code_block_counting_profiler,
code_block_pic
};
cell header;
cell size() const;
+ template<typename Fixup> cell size(Fixup fixup) const;
+
cell binary_payload_start() const;
+ template<typename Fixup> cell binary_payload_start(Fixup fixup) const;
cell *slots() const { return (cell *)this; }
cell pic_def;
/* TAGGED alternative entry point for direct tail calls. Used for inline caching */
cell pic_tail_def;
- /* TAGGED call count for profiling */
+ /* TAGGED call count for counting_profiler */
cell counter;
/* TAGGED machine code for sub-primitive */
cell subprimitive;
void *entry_point;
/* UNTAGGED compiled code block */
code_block *code;
- /* UNTAGGED profiler stub */
- code_block *profiling;
+ /* UNTAGGED counting_profiler stub */
+ code_block *counting_profiler;
};
/* Assembly code makes assumptions about the layout of this struct */