VM: Remove unnecessary _ suffix in constructors

db4
Erik Charlebois 2013-05-12 23:20:43 -04:00
parent 26ff071205
commit 7b1b1eef23
38 changed files with 188 additions and 188 deletions

View File

@ -2,10 +2,10 @@
namespace factor {
aging_collector::aging_collector(factor_vm* parent_)
: copying_collector<aging_space, aging_policy>(parent_,
parent_->data->aging,
aging_policy(parent_)) {}
aging_collector::aging_collector(factor_vm* parent)
: copying_collector<aging_space, aging_policy>(parent,
parent->data->aging,
aging_policy(parent)) {}
void factor_vm::collect_aging() {
/* Promote objects referenced from tenured space to tenured space, copy

View File

@ -5,8 +5,8 @@ struct aging_policy {
aging_space* aging;
tenured_space* tenured;
explicit aging_policy(factor_vm* parent_)
: parent(parent_),
explicit aging_policy(factor_vm* parent)
: parent(parent),
aging(parent->data->aging),
tenured(parent->data->tenured) {}
@ -20,7 +20,7 @@ struct aging_policy {
};
struct aging_collector : copying_collector<aging_space, aging_policy> {
explicit aging_collector(factor_vm* parent_);
explicit aging_collector(factor_vm* parent);
};
}

View File

@ -7,8 +7,8 @@ template <typename Block> struct bump_allocator {
cell end;
cell size;
bump_allocator(cell size_, cell start_)
: here(start_), start(start_), end(start_ + size_), size(size_) {}
bump_allocator(cell size, cell start)
: here(start), start(start), end(start + size), size(size) {}
bool contains_p(Block* block) { return ((cell) block - start) < size; }

View File

@ -2,8 +2,8 @@
namespace factor {
callback_heap::callback_heap(cell size, factor_vm* parent_)
: seg(new segment(size, true)), here(seg->start), parent(parent_) {}
callback_heap::callback_heap(cell size, factor_vm* parent)
: seg(new segment(size, true)), here(seg->start), parent(parent) {}
callback_heap::~callback_heap() {
delete seg;
@ -102,8 +102,8 @@ code_block* callback_heap::add(cell owner, cell return_rewind) {
struct callback_updater {
callback_heap* callbacks;
explicit callback_updater(callback_heap* callbacks_)
: callbacks(callbacks_) {}
explicit callback_updater(callback_heap* callbacks)
: callbacks(callbacks) {}
void operator()(code_block* stub) { callbacks->update(stub); }
};

View File

@ -57,8 +57,8 @@ struct stack_frame_accumulator {
factor_vm* parent;
growable_array frames;
explicit stack_frame_accumulator(factor_vm* parent_)
: parent(parent_), frames(parent_) {}
explicit stack_frame_accumulator(factor_vm* parent)
: parent(parent), frames(parent) {}
void operator()(void* frame_top, cell frame_size, code_block* owner,
void* addr) {

View File

@ -30,10 +30,10 @@ inline void factor_vm::iterate_callstack_object(callstack* stack_,
}
template <typename Iterator>
inline void factor_vm::iterate_callstack_object(callstack* stack_,
inline void factor_vm::iterate_callstack_object(callstack* stack,
Iterator& iterator) {
no_fixup none;
iterate_callstack_object(stack_, iterator, none);
iterate_callstack_object(stack, iterator, none);
}
template <typename Iterator, typename Fixup>

View File

@ -15,8 +15,8 @@ template <typename Fixup> struct code_block_visitor {
factor_vm* parent;
Fixup fixup;
code_block_visitor(factor_vm* parent_, Fixup fixup_)
: parent(parent_), fixup(fixup_) {}
code_block_visitor(factor_vm* parent, Fixup fixup)
: parent(parent), fixup(fixup) {}
code_block* visit_code_block(code_block* compiled);
void visit_object_code_block(object* obj);
@ -36,8 +36,8 @@ template <typename Fixup> struct call_frame_code_block_visitor {
factor_vm* parent;
Fixup fixup;
call_frame_code_block_visitor(factor_vm* parent_, Fixup fixup_)
: parent(parent_), fixup(fixup_) {}
call_frame_code_block_visitor(factor_vm* parent, Fixup fixup)
: parent(parent), fixup(fixup) {}
void operator()(void* frame_top, cell frame_size, code_block* owner,
void* addr) {
@ -75,7 +75,7 @@ void code_block_visitor<Fixup>::visit_object_code_block(object* obj) {
template <typename Fixup> struct embedded_code_pointers_visitor {
Fixup fixup;
explicit embedded_code_pointers_visitor(Fixup fixup_) : fixup(fixup_) {}
explicit embedded_code_pointers_visitor(Fixup fixup) : fixup(fixup) {}
void operator()(instruction_operand op) {
relocation_type type = op.rel_type();

View File

@ -90,9 +90,9 @@ struct update_word_references_relocation_visitor {
factor_vm* parent;
bool reset_inline_caches;
update_word_references_relocation_visitor(factor_vm* parent_,
bool reset_inline_caches_)
: parent(parent_), reset_inline_caches(reset_inline_caches_) {}
update_word_references_relocation_visitor(factor_vm* parent,
bool reset_inline_caches)
: parent(parent), reset_inline_caches(reset_inline_caches) {}
void operator()(instruction_operand op) {
switch (op.rel_type()) {
@ -296,8 +296,8 @@ struct initial_code_block_visitor {
cell literals;
cell literal_index;
initial_code_block_visitor(factor_vm* parent_, cell literals_)
: parent(parent_), literals(literals_), literal_index(0) {}
initial_code_block_visitor(factor_vm* parent, cell literals)
: parent(parent), literals(literals), literal_index(0) {}
cell next_literal() {
return array_nth(untag<array>(literals), literal_index++);
@ -458,9 +458,9 @@ struct find_symbol_at_address_visitor {
cell symbol;
cell library;
find_symbol_at_address_visitor(factor_vm* parent_, cell return_address_)
: parent(parent_),
return_address(return_address_),
find_symbol_at_address_visitor(factor_vm* parent, cell return_address)
: parent(parent),
return_address(return_address),
symbol(false_object),
library(false_object) {}

View File

@ -137,8 +137,8 @@ struct word_updater {
factor_vm* parent;
bool reset_inline_caches;
word_updater(factor_vm* parent_, bool reset_inline_caches_)
: parent(parent_), reset_inline_caches(reset_inline_caches_) {}
word_updater(factor_vm* parent, bool reset_inline_caches)
: parent(parent), reset_inline_caches(reset_inline_caches) {}
void operator()(code_block* compiled, cell size) {
parent->update_word_references(compiled, reset_inline_caches);

View File

@ -7,8 +7,8 @@ struct code_root {
void push() { parent->code_roots.push_back(this); }
code_root(cell value_, factor_vm* parent_)
: value(value_), valid(true), parent(parent_) {
code_root(cell value, factor_vm* parent)
: value(value), valid(true), parent(parent) {
push();
}

View File

@ -12,8 +12,8 @@ struct gc_workhorse : no_fixup {
Policy policy;
code_heap* code;
gc_workhorse(factor_vm* parent_, TargetGeneration* target_, Policy policy_)
: parent(parent_), target(target_), policy(policy_), code(parent->code) {}
gc_workhorse(factor_vm* parent, TargetGeneration* target, Policy policy)
: parent(parent), target(target), policy(policy), code(parent->code) {}
object* resolve_forwarding(object* untagged) {
parent->check_data_pointer(untagged);
@ -76,7 +76,7 @@ struct dummy_unmarker {
struct simple_unmarker {
card unmask;
explicit simple_unmarker(card unmask_) : unmask(unmask_) {}
explicit simple_unmarker(card unmask) : unmask(unmask) {}
void operator()(card* ptr) { *ptr &= ~unmask; }
};
@ -96,12 +96,12 @@ template <typename TargetGeneration, typename Policy> struct collector {
cell decks_scanned;
cell code_blocks_scanned;
collector(factor_vm* parent_, TargetGeneration* target_, Policy policy_)
: parent(parent_),
data(parent_->data),
code(parent_->code),
target(target_),
workhorse(parent, target, policy_),
collector(factor_vm* parent, TargetGeneration* target, Policy policy)
: parent(parent),
data(parent->data),
code(parent->code),
target(target),
workhorse(parent, target, policy),
data_visitor(parent, workhorse),
cards_scanned(0),
decks_scanned(0),

View File

@ -10,14 +10,14 @@ struct compaction_fixup {
const object** data_finger;
const code_block** code_finger;
compaction_fixup(mark_bits<object>* data_forwarding_map_,
mark_bits<code_block>* code_forwarding_map_,
const object** data_finger_,
const code_block** code_finger_)
: data_forwarding_map(data_forwarding_map_),
code_forwarding_map(code_forwarding_map_),
data_finger(data_finger_),
code_finger(code_finger_) {}
compaction_fixup(mark_bits<object>* data_forwarding_map,
mark_bits<code_block>* code_forwarding_map,
const object** data_finger,
const code_block** code_finger)
: data_forwarding_map(data_forwarding_map),
code_forwarding_map(code_forwarding_map),
data_finger(data_finger),
code_finger(code_finger) {}
object* fixup_data(object* obj) {
return data_forwarding_map->forward_block(obj);
@ -61,9 +61,9 @@ struct object_compaction_updater {
compaction_fixup fixup;
object_start_map* starts;
object_compaction_updater(factor_vm* parent_, compaction_fixup fixup_)
: parent(parent_),
fixup(fixup_),
object_compaction_updater(factor_vm* parent, compaction_fixup fixup)
: parent(parent),
fixup(fixup),
starts(&parent->data->tenured->starts) {}
void operator()(object* old_address, object* new_address, cell size) {
@ -82,10 +82,10 @@ template <typename Fixup> struct code_block_compaction_relocation_visitor {
code_block* old_address;
Fixup fixup;
code_block_compaction_relocation_visitor(factor_vm* parent_,
code_block* old_address_,
Fixup fixup_)
: parent(parent_), old_address(old_address_), fixup(fixup_) {}
code_block_compaction_relocation_visitor(factor_vm* parent,
code_block* old_address,
Fixup fixup)
: parent(parent), old_address(old_address), fixup(fixup) {}
void operator()(instruction_operand op) {
cell old_offset = op.rel_offset() + (cell) old_address->entry_point();
@ -129,12 +129,12 @@ template <typename Fixup> struct code_block_compaction_updater {
code_block_visitor<Fixup> code_forwarder;
code_block_compaction_updater(
factor_vm* parent_, Fixup fixup_, slot_visitor<Fixup> data_forwarder_,
code_block_visitor<Fixup> code_forwarder_)
: parent(parent_),
fixup(fixup_),
data_forwarder(data_forwarder_),
code_forwarder(code_forwarder_) {}
factor_vm* parent, Fixup fixup, slot_visitor<Fixup> data_forwarder,
code_block_visitor<Fixup> code_forwarder)
: parent(parent),
fixup(fixup),
data_forwarder(data_forwarder),
code_forwarder(code_forwarder) {}
void operator()(code_block* old_address, code_block* new_address, cell size) {
data_forwarder.visit_code_block_objects(new_address);
@ -233,9 +233,9 @@ struct code_compaction_fixup {
mark_bits<code_block>* code_forwarding_map;
const code_block** code_finger;
code_compaction_fixup(mark_bits<code_block>* code_forwarding_map_,
const code_block** code_finger_)
: code_forwarding_map(code_forwarding_map_), code_finger(code_finger_) {}
code_compaction_fixup(mark_bits<code_block>* code_forwarding_map,
const code_block** code_finger)
: code_forwarding_map(code_forwarding_map), code_finger(code_finger) {}
object* fixup_data(object* obj) { return obj; }
@ -266,8 +266,8 @@ struct object_grow_heap_updater {
code_block_visitor<code_compaction_fixup> code_forwarder;
explicit object_grow_heap_updater(
code_block_visitor<code_compaction_fixup> code_forwarder_)
: code_forwarder(code_forwarder_) {}
code_block_visitor<code_compaction_fixup> code_forwarder)
: code_forwarder(code_forwarder) {}
void operator()(object* obj) { code_forwarder.visit_object_code_block(obj); }
};

View File

@ -4,10 +4,10 @@ template <typename TargetGeneration, typename Policy>
struct copying_collector : collector<TargetGeneration, Policy> {
cell scan;
copying_collector(factor_vm* parent_, TargetGeneration* target_,
Policy policy_)
: collector<TargetGeneration, Policy>(parent_, target_, policy_),
scan(target_->here) {}
copying_collector(factor_vm* parent, TargetGeneration* target,
Policy policy)
: collector<TargetGeneration, Policy>(parent, target, policy),
scan(target->here) {}
void cheneys_algorithm() {
while (scan && scan < this->target->here) {

View File

@ -137,7 +137,7 @@ struct object_accumulator {
cell type;
std::vector<cell> objects;
explicit object_accumulator(cell type_) : type(type_) {}
explicit object_accumulator(cell type) : type(type) {}
void operator()(object* obj) {
if (type == TYPE_COUNT || obj->type() == type)

View File

@ -29,8 +29,8 @@ struct slot_checker {
object* obj;
generation gen;
slot_checker(factor_vm* parent_, object* obj_, generation gen_)
: parent(parent_), obj(obj_), gen(gen_) {}
slot_checker(factor_vm* parent, object* obj, generation gen)
: parent(parent), obj(obj), gen(gen) {}
void check_write_barrier(cell* slot_ptr, generation target, char mask) {
cell object_card_pointer = parent->cards_offset + ((cell) obj >> card_bits);
@ -81,7 +81,7 @@ struct slot_checker {
struct object_checker {
factor_vm* parent;
explicit object_checker(factor_vm* parent_) : parent(parent_) {}
explicit object_checker(factor_vm* parent) : parent(parent) {}
void operator()(object* obj) {
slot_checker checker(parent, obj, generation_of(parent, obj));

View File

@ -7,13 +7,13 @@ template <typename Type> struct data_root : public tagged<Type> {
parent->data_roots.push_back(data_root_range(&this->value_, 1));
}
data_root(cell value_, factor_vm* parent_)
: tagged<Type>(value_), parent(parent_) {
data_root(cell value, factor_vm* parent)
: tagged<Type>(value), parent(parent) {
push();
}
data_root(Type* value_, factor_vm* parent_)
: tagged<Type>(value_), parent(parent_) {
data_root(Type* value, factor_vm* parent)
: tagged<Type>(value), parent(parent) {
push();
}
@ -34,9 +34,9 @@ struct gc_bignum {
bignum** addr;
factor_vm* parent;
gc_bignum(bignum** addr_, factor_vm* parent_) : addr(addr_), parent(parent_) {
if (*addr_)
parent->check_data_pointer(*addr_);
gc_bignum(bignum** addr, factor_vm* parent) : addr(addr), parent(parent) {
if (*addr)
parent->check_data_pointer(*addr);
parent->bignum_roots.push_back((cell) addr);
}

View File

@ -189,7 +189,7 @@ void factor_vm::print_retainstack() {
struct stack_frame_printer {
factor_vm* parent;
explicit stack_frame_printer(factor_vm* parent_) : parent(parent_) {}
explicit stack_frame_printer(factor_vm* parent) : parent(parent) {}
void operator()(void* frame_top, cell frame_size, code_block* owner,
void* addr) {
std::cout << std::endl;
@ -229,7 +229,7 @@ void factor_vm::print_callstack_object(callstack* obj) {
struct padded_address {
cell value;
explicit padded_address(cell value_) : value(value_) {}
explicit padded_address(cell value) : value(value) {}
};
std::ostream& operator<<(std::ostream& out, const padded_address& value) {
@ -280,8 +280,8 @@ struct object_dumper {
factor_vm* parent;
cell type;
object_dumper(factor_vm* parent_, cell type_)
: parent(parent_), type(type_) {}
object_dumper(factor_vm* parent, cell type)
: parent(parent), type(type) {}
void operator()(object* obj) {
if (type == TYPE_COUNT || obj->type() == type) {
@ -303,9 +303,9 @@ struct find_data_reference_slot_visitor {
object* obj;
factor_vm* parent;
find_data_reference_slot_visitor(cell look_for_, object* obj_,
factor_vm* parent_)
: look_for(look_for_), obj(obj_), parent(parent_) {}
find_data_reference_slot_visitor(cell look_for, object* obj,
factor_vm* parent)
: look_for(look_for), obj(obj), parent(parent) {}
void operator()(cell* scan) {
if (look_for == *scan) {
@ -320,8 +320,8 @@ struct dump_edges_slot_visitor {
object* obj;
factor_vm* parent;
dump_edges_slot_visitor(cell, object* obj_, factor_vm* parent_)
: obj(obj_), parent(parent_) {}
dump_edges_slot_visitor(cell, object* obj, factor_vm* parent)
: obj(obj), parent(parent) {}
void operator()(cell* scan) {
if (TAG(*scan) > F_TYPE)
@ -334,8 +334,8 @@ template <typename SlotVisitor> struct data_reference_object_visitor {
cell look_for;
factor_vm* parent;
data_reference_object_visitor(cell look_for_, factor_vm* parent_)
: look_for(look_for_), parent(parent_) {}
data_reference_object_visitor(cell look_for, factor_vm* parent)
: look_for(look_for), parent(parent) {}
void operator()(object* obj) {
SlotVisitor visitor(look_for, obj, parent);
@ -358,8 +358,8 @@ struct code_block_printer {
factor_vm* parent;
cell reloc_size, parameter_size;
explicit code_block_printer(factor_vm* parent_)
: parent(parent_), reloc_size(0), parameter_size(0) {}
explicit code_block_printer(factor_vm* parent)
: parent(parent), reloc_size(0), parameter_size(0) {}
void operator()(code_block* scan, cell size) {
const char* status;

View File

@ -31,11 +31,11 @@ template <typename Block> struct free_list_allocator {
};
template <typename Block>
free_list_allocator<Block>::free_list_allocator(cell size_, cell start_)
: size(size_),
start(start_),
end(start_ + size_),
state(mark_bits<Block>(size_, start_)) {
free_list_allocator<Block>::free_list_allocator(cell size, cell start)
: size(size),
start(start),
end(start + size),
state(mark_bits<Block>(size, start)) {
initial_free_list(0);
}
@ -156,9 +156,9 @@ template <typename Block, typename Iterator> struct heap_compactor {
Iterator& iter;
const Block** finger;
heap_compactor(mark_bits<Block>* state_, Block* address_,
Iterator& iter_, const Block** finger_)
: state(state_), address((char*)address_), iter(iter_), finger(finger_) {}
heap_compactor(mark_bits<Block>* state, Block* address,
Iterator& iter, const Block** finger)
: state(state), address((char*)address), iter(iter), finger(finger) {}
void operator()(Block* block, cell size) {
if (this->state->marked_p(block)) {

View File

@ -2,9 +2,9 @@
namespace factor {
full_collector::full_collector(factor_vm* parent_)
: collector<tenured_space, full_policy>(parent_, parent_->data->tenured,
full_policy(parent_)),
full_collector::full_collector(factor_vm* parent)
: collector<tenured_space, full_policy>(parent, parent->data->tenured,
full_policy(parent)),
code_visitor(parent, workhorse) {}
void full_collector::trace_code_block(code_block* compiled) {

View File

@ -4,8 +4,8 @@ struct full_policy {
factor_vm* parent;
tenured_space* tenured;
explicit full_policy(factor_vm* parent_)
: parent(parent_), tenured(parent->data->tenured) {}
explicit full_policy(factor_vm* parent)
: parent(parent), tenured(parent->data->tenured) {}
bool should_copy_p(object* untagged) {
return !tenured->contains_p(untagged);
@ -25,7 +25,7 @@ struct full_policy {
struct full_collector : collector<tenured_space, full_policy> {
code_block_visitor<gc_workhorse<tenured_space, full_policy> > code_visitor;
explicit full_collector(factor_vm* parent_);
explicit full_collector(factor_vm* parent);
void trace_code_block(code_block* compiled);
void trace_context_code_blocks();
void trace_code_roots();

View File

@ -2,8 +2,8 @@
namespace factor {
gc_event::gc_event(gc_op op_, factor_vm* parent)
: op(op_),
gc_event::gc_event(gc_op op, factor_vm* parent)
: op(op),
cards_scanned(0),
decks_scanned(0),
code_blocks_scanned(0),
@ -57,7 +57,7 @@ void gc_event::ended_gc(factor_vm* parent) {
total_time = (cell)(nano_count() - start_time);
}
gc_state::gc_state(gc_op op_, factor_vm* parent) : op(op_) {
gc_state::gc_state(gc_op op, factor_vm* parent) : op(op) {
if (parent->gc_events) {
event = new gc_event(op, parent);
start_time = nano_count();
@ -194,8 +194,8 @@ struct call_frame_scrubber {
factor_vm* parent;
context* ctx;
call_frame_scrubber(factor_vm* parent_, context* ctx_)
: parent(parent_), ctx(ctx_) {}
call_frame_scrubber(factor_vm* parent, context* ctx)
: parent(parent), ctx(ctx) {}
void operator()(void* frame_top, cell frame_size, code_block* owner,
void* addr) {

View File

@ -27,7 +27,7 @@ struct gc_event {
cell compaction_time;
u64 temp_time;
gc_event(gc_op op_, factor_vm* parent);
gc_event(gc_op op, factor_vm* parent);
void started_card_scan();
void ended_card_scan(cell cards_scanned_, cell decks_scanned_);
void started_code_scan();
@ -46,7 +46,7 @@ struct gc_state {
u64 start_time;
gc_event* event;
gc_state(gc_op op_, factor_vm* parent);
gc_state(gc_op op, factor_vm* parent);
~gc_state();
void start_again(gc_op op_, factor_vm* parent);
};

View File

@ -55,8 +55,8 @@ struct startup_fixup {
cell data_offset;
cell code_offset;
startup_fixup(cell data_offset_, cell code_offset_)
: data_offset(data_offset_), code_offset(code_offset_) {}
startup_fixup(cell data_offset, cell code_offset)
: data_offset(data_offset), code_offset(code_offset) {}
object* fixup_data(object* obj) {
return (object*)((cell) obj + data_offset);
@ -83,11 +83,11 @@ struct start_object_updater {
slot_visitor<startup_fixup> data_visitor;
code_block_visitor<startup_fixup> code_visitor;
start_object_updater(factor_vm* parent_, startup_fixup fixup_)
: parent(parent_),
fixup(fixup_),
data_visitor(slot_visitor<startup_fixup>(parent_, fixup_)),
code_visitor(code_block_visitor<startup_fixup>(parent_, fixup_)) {}
start_object_updater(factor_vm* parent, startup_fixup fixup)
: parent(parent),
fixup(fixup),
data_visitor(slot_visitor<startup_fixup>(parent, fixup)),
code_visitor(code_block_visitor<startup_fixup>(parent, fixup)) {}
void operator()(object* obj, cell size) {
parent->data->tenured->starts.record_object_start_offset(obj);
@ -131,11 +131,11 @@ struct startup_code_block_relocation_visitor {
startup_fixup fixup;
slot_visitor<startup_fixup> data_visitor;
startup_code_block_relocation_visitor(factor_vm* parent_,
startup_fixup fixup_)
: parent(parent_),
fixup(fixup_),
data_visitor(slot_visitor<startup_fixup>(parent_, fixup_)) {}
startup_code_block_relocation_visitor(factor_vm* parent,
startup_fixup fixup)
: parent(parent),
fixup(fixup),
data_visitor(slot_visitor<startup_fixup>(parent, fixup)) {}
void operator()(instruction_operand op) {
code_block* compiled = op.compiled;
@ -175,8 +175,8 @@ struct startup_code_block_updater {
factor_vm* parent;
startup_fixup fixup;
startup_code_block_updater(factor_vm* parent_, startup_fixup fixup_)
: parent(parent_), fixup(fixup_) {}
startup_code_block_updater(factor_vm* parent, startup_fixup fixup)
: parent(parent), fixup(fixup) {}
void operator()(code_block* compiled, cell size) {
slot_visitor<startup_fixup> data_visitor(parent, fixup);

View File

@ -43,8 +43,8 @@ void factor_vm::update_pic_count(cell type) {
struct inline_cache_jit : public jit {
fixnum index;
inline_cache_jit(cell generic_word_, factor_vm* vm)
: jit(code_block_pic, generic_word_, vm) {}
inline_cache_jit(cell generic_word, factor_vm* vm)
: jit(code_block_pic, generic_word, vm) {}
;
void emit_check(cell klass);

View File

@ -2,12 +2,12 @@
namespace factor {
instruction_operand::instruction_operand(relocation_entry rel_,
code_block* compiled_, cell index_)
: rel(rel_),
compiled(compiled_),
index(index_),
pointer((cell) compiled_->entry_point() + rel_.rel_offset()) {}
instruction_operand::instruction_operand(relocation_entry rel,
code_block* compiled, cell index)
: rel(rel),
compiled(compiled),
index(index),
pointer((cell) compiled->entry_point() + rel.rel_offset()) {}
/* Load a 32-bit value from a PowerPC LIS/ORI sequence */
fixnum instruction_operand::load_value_2_2() {

View File

@ -128,8 +128,8 @@ struct instruction_operand {
cell index;
cell pointer;
instruction_operand(relocation_entry rel_, code_block* compiled_,
cell index_);
instruction_operand(relocation_entry rel, code_block* compiled,
cell index);
relocation_type rel_type() { return rel.rel_type(); }

View File

@ -8,9 +8,9 @@ namespace factor {
- polymorphic inline caches (inline_cache.cpp) */
/* Allocates memory */
jit::jit(code_block_type type_, cell owner_, factor_vm* vm)
: type(type_),
owner(owner_, vm),
jit::jit(code_block_type type, cell owner, factor_vm* vm)
: type(type),
owner(owner, vm),
code(vm),
relocation(vm),
parameters(vm),

View File

@ -343,8 +343,8 @@ struct data_root_range {
cell* start;
cell len;
data_root_range(cell* start_, cell len_)
: start(start_), len(len_) {}
data_root_range(cell* start, cell len)
: start(start), len(len) {}
};
}

View File

@ -14,9 +14,9 @@ template <typename Block> struct mark_bits {
void clear_forwarding() { memset(forwarding, 0, bits_size * sizeof(cell)); }
mark_bits(cell size_, cell start_)
: size(size_),
start(start_),
mark_bits(cell size, cell start)
: size(size),
start(start),
bits_size(size / data_alignment / mark_bits_granularity),
marked(new cell[bits_size]),
forwarding(new cell[bits_size]) {

View File

@ -2,10 +2,10 @@
namespace factor {
nursery_collector::nursery_collector(factor_vm* parent_)
: copying_collector<aging_space, nursery_policy>(parent_,
parent_->data->aging,
nursery_policy(parent_)) {}
nursery_collector::nursery_collector(factor_vm* parent)
: copying_collector<aging_space, nursery_policy>(parent,
parent->data->aging,
nursery_policy(parent)) {}
void factor_vm::collect_nursery() {
/* Copy live objects from the nursery (as determined by the root set and

View File

@ -3,7 +3,7 @@ namespace factor {
struct nursery_policy {
factor_vm* parent;
explicit nursery_policy(factor_vm* parent_) : parent(parent_) {}
explicit nursery_policy(factor_vm* parent) : parent(parent) {}
bool should_copy_p(object* obj) { return parent->nursery.contains_p(obj); }
@ -13,7 +13,7 @@ struct nursery_policy {
};
struct nursery_collector : copying_collector<aging_space, nursery_policy> {
explicit nursery_collector(factor_vm* parent_);
explicit nursery_collector(factor_vm* parent);
};
}

View File

@ -2,10 +2,10 @@
namespace factor {
object_start_map::object_start_map(cell size_, cell start_)
: size(size_), start(start_) {
object_start_offsets = new card[addr_to_card(size_)];
object_start_offsets_end = object_start_offsets + addr_to_card(size_);
object_start_map::object_start_map(cell size, cell start)
: size(size), start(start) {
object_start_offsets = new card[addr_to_card(size)];
object_start_offsets_end = object_start_offsets + addr_to_card(size);
clear_object_start_offsets();
}

View File

@ -7,7 +7,7 @@ struct object_start_map {
card* object_start_offsets;
card* object_start_offsets_end;
object_start_map(cell size_, cell start_);
object_start_map(cell size, cell start);
~object_start_map();
cell first_object_in_card(cell card_index);

View File

@ -75,8 +75,8 @@ void factor_vm::primitive_size() {
struct slot_become_fixup : no_fixup {
std::map<object*, object*>* become_map;
slot_become_fixup(std::map<object*, object*>* become_map_)
: become_map(become_map_) {}
slot_become_fixup(std::map<object*, object*>* become_map)
: become_map(become_map) {}
object* fixup_data(object* old) {
std::map<object*, object*>::const_iterator iter = become_map->find(old);
@ -90,8 +90,8 @@ struct slot_become_fixup : no_fixup {
struct object_become_visitor {
slot_visitor<slot_become_fixup>* workhorse;
explicit object_become_visitor(slot_visitor<slot_become_fixup>* workhorse_)
: workhorse(workhorse_) {}
explicit object_become_visitor(slot_visitor<slot_become_fixup>* workhorse)
: workhorse(workhorse) {}
void operator()(object* obj) { workhorse->visit_slots(obj); }
};
@ -100,8 +100,8 @@ struct code_block_become_visitor {
slot_visitor<slot_become_fixup>* workhorse;
explicit code_block_become_visitor(
slot_visitor<slot_become_fixup>* workhorse_)
: workhorse(workhorse_) {}
slot_visitor<slot_become_fixup>* workhorse)
: workhorse(workhorse) {}
void operator()(code_block* compiled, cell size) {
workhorse->visit_code_block_objects(compiled);
@ -112,7 +112,7 @@ struct code_block_become_visitor {
struct code_block_write_barrier_visitor {
code_heap* code;
explicit code_block_write_barrier_visitor(code_heap* code_) : code(code_) {}
explicit code_block_write_barrier_visitor(code_heap* code) : code(code) {}
void operator()(code_block* compiled, cell size) {
code->write_barrier(compiled);

View File

@ -4,11 +4,11 @@ struct quotation_jit : public jit {
data_root<array> elements;
bool compiling, relocate;
quotation_jit(cell owner, bool compiling_, bool relocate_, factor_vm* vm)
quotation_jit(cell owner, bool compiling, bool relocate, factor_vm* vm)
: jit(code_block_unoptimized, owner, vm),
elements(false_object, vm),
compiling(compiling_),
relocate(relocate_) {}
compiling(compiling),
relocate(relocate) {}
;
void init_quotation(cell quot);

View File

@ -109,8 +109,8 @@ template <typename Fixup> struct slot_visitor {
factor_vm* parent;
Fixup fixup;
slot_visitor<Fixup>(factor_vm* parent_, Fixup fixup_)
: parent(parent_), fixup(fixup_) {}
slot_visitor<Fixup>(factor_vm* parent, Fixup fixup)
: parent(parent), fixup(fixup) {}
cell visit_pointer(cell pointer);
void visit_handle(cell* handle);
@ -199,9 +199,9 @@ template <typename Fixup> struct callback_slot_visitor {
callback_heap* callbacks;
slot_visitor<Fixup>* visitor;
callback_slot_visitor(callback_heap* callbacks_,
slot_visitor<Fixup>* visitor_)
: callbacks(callbacks_), visitor(visitor_) {}
callback_slot_visitor(callback_heap* callbacks,
slot_visitor<Fixup>* visitor)
: callbacks(callbacks), visitor(visitor) {}
void operator()(code_block* stub) { visitor->visit_handle(&stub->owner); }
};
@ -263,9 +263,9 @@ template <typename Fixup> struct call_frame_slot_visitor {
factor_vm* parent;
slot_visitor<Fixup>* visitor;
call_frame_slot_visitor(factor_vm* parent_,
slot_visitor<Fixup>* visitor_)
: parent(parent_), visitor(visitor_) {}
call_frame_slot_visitor(factor_vm* parent,
slot_visitor<Fixup>* visitor)
: parent(parent), visitor(visitor) {}
/*
frame top -> [return address]
@ -360,8 +360,8 @@ template <typename Fixup> void slot_visitor<Fixup>::visit_contexts() {
template <typename Fixup> struct literal_references_visitor {
slot_visitor<Fixup>* visitor;
explicit literal_references_visitor(slot_visitor<Fixup>* visitor_)
: visitor(visitor_) {}
explicit literal_references_visitor(slot_visitor<Fixup>* visitor)
: visitor(visitor) {}
void operator()(instruction_operand op) {
if (op.rel_type() == RT_LITERAL)

View File

@ -2,10 +2,10 @@
namespace factor {
to_tenured_collector::to_tenured_collector(factor_vm* parent_)
: collector<tenured_space, to_tenured_policy>(parent_,
parent_->data->tenured,
to_tenured_policy(parent_)) {}
to_tenured_collector::to_tenured_collector(factor_vm* parent)
: collector<tenured_space, to_tenured_policy>(parent,
parent->data->tenured,
to_tenured_policy(parent)) {}
void to_tenured_collector::tenure_reachable_objects() {
std::vector<cell>* mark_stack = &parent->mark_stack;

View File

@ -4,8 +4,8 @@ struct to_tenured_policy {
factor_vm* parent;
tenured_space* tenured;
explicit to_tenured_policy(factor_vm* parent_)
: parent(parent_), tenured(parent->data->tenured) {}
explicit to_tenured_policy(factor_vm* parent)
: parent(parent), tenured(parent->data->tenured) {}
bool should_copy_p(object* untagged) {
return !tenured->contains_p(untagged);
@ -19,7 +19,7 @@ struct to_tenured_policy {
};
struct to_tenured_collector : collector<tenured_space, to_tenured_policy> {
explicit to_tenured_collector(factor_vm* parent_);
explicit to_tenured_collector(factor_vm* parent);
void tenure_reachable_objects();
};