header = (header & 0xFFFFFF) | (frame_size << 20);
}
- template <typename Fixup> cell size(Fixup fixup) const { return size(); }
+ template <typename Fixup> cell size(Fixup fixup) const { (void)fixup; return size(); }
cell entry_point() const { return (cell)(this + 1); }
void flush_icache() { factor::flush_icache((cell)this, size()); }
template <typename Iterator> void each_instruction_operand(Iterator& iter) {
- if (to_boolean(relocation)) {
- byte_array* rels = (byte_array*)UNTAG(relocation);
+ if (!to_boolean(relocation))
+ return;
- cell index = 0;
- cell length = (rels->capacity >> TAG_BITS) / sizeof(relocation_entry);
+ byte_array* rels = untag<byte_array>(relocation);
- for (cell i = 0; i < length; i++) {
- relocation_entry rel = rels->data<relocation_entry>()[i];
- iter(instruction_operand(rel, this, index));
- index += rel.number_of_parameters();
- }
+ cell index = 0;
+ cell length = untag_fixnum(rels->capacity) / sizeof(relocation_entry);
+
+ for (cell i = 0; i < length; i++) {
+ relocation_entry rel = rels->data<relocation_entry>()[i];
+ iter(instruction_operand(rel, this, index));
+ index += rel.number_of_parameters();
}
}