diff --git a/vm/bignum.cpp b/vm/bignum.cpp index 9f85243727..94026ac95f 100755 --- a/vm/bignum.cpp +++ b/vm/bignum.cpp @@ -324,8 +324,8 @@ bignum *factor_vm::bignum_remainder(bignum * numerator, bignum * denominator) } } -/* Allocates memory */ /* cell_to_bignum, fixnum_to_bignum, long_long_to_bignum, ulong_long_to_bignum */ +/* Allocates memory */ #define FOO_TO_BIGNUM(name,type,stype,utype) \ bignum * factor_vm::name##_to_bignum(type n) \ { \ diff --git a/vm/data_heap.cpp b/vm/data_heap.cpp index ddd39d221a..6fa8858f05 100755 --- a/vm/data_heap.cpp +++ b/vm/data_heap.cpp @@ -167,6 +167,7 @@ struct object_accumulator { } }; +/* Allocates memory */ cell factor_vm::instances(cell type) { object_accumulator accum(type); @@ -174,6 +175,7 @@ cell factor_vm::instances(cell type) return std_vector_to_array(accum.objects); } +/* Allocates memory */ void factor_vm::primitive_all_instances() { primitive_full_gc(); diff --git a/vm/factor.cpp b/vm/factor.cpp index dd9be27774..8a345b9a6c 100755 --- a/vm/factor.cpp +++ b/vm/factor.cpp @@ -81,6 +81,7 @@ void factor_vm::init_parameters_from_args(vm_parameters *p, int argc, vm_char ** } /* Compile code in boot image so that we can execute the startup quotation */ +/* Allocates memory */ void factor_vm::prepare_boot_image() { std::cout << "*** Stage 2 early init... " << std::flush; diff --git a/vm/math.cpp b/vm/math.cpp index af973bf467..309def705f 100755 --- a/vm/math.cpp +++ b/vm/math.cpp @@ -474,6 +474,7 @@ double factor_vm::to_double(cell value) /* The fixnum+, fixnum- and fixnum* primitives are defined in cpu_*.S. On overflow, they call these functions. */ +/* Allocates memory */ inline void factor_vm::overflow_fixnum_add(fixnum x, fixnum y) { ctx->replace(tag(fixnum_to_bignum( @@ -485,6 +486,7 @@ VM_C_API void overflow_fixnum_add(fixnum x, fixnum y, factor_vm *parent) parent->overflow_fixnum_add(x,y); } +/* Allocates memory */ inline void factor_vm::overflow_fixnum_subtract(fixnum x, fixnum y) { ctx->replace(tag(fixnum_to_bignum( @@ -496,6 +498,7 @@ VM_C_API void overflow_fixnum_subtract(fixnum x, fixnum y, factor_vm *parent) parent->overflow_fixnum_subtract(x,y); } +/* Allocates memory */ inline void factor_vm::overflow_fixnum_multiply(fixnum x, fixnum y) { bignum *bx = fixnum_to_bignum(x); diff --git a/vm/objects.cpp b/vm/objects.cpp index 4dcf486c07..7c5b7bbfc4 100644 --- a/vm/objects.cpp +++ b/vm/objects.cpp @@ -47,6 +47,7 @@ void factor_vm::primitive_set_slot() write_barrier(slot_ptr); } +/* Allocates memory */ cell factor_vm::clone_object(cell obj_) { data_root obj(obj_,this); @@ -63,6 +64,7 @@ cell factor_vm::clone_object(cell obj_) } } +/* Allocates memory */ void factor_vm::primitive_clone() { ctx->replace(clone_object(ctx->peek())); diff --git a/vm/quotations.cpp b/vm/quotations.cpp index fd8605e1d6..2feddd67bc 100755 --- a/vm/quotations.cpp +++ b/vm/quotations.cpp @@ -156,6 +156,7 @@ void quotation_jit::emit_epilog(bool safepoint, bool stack_frame) if(stack_frame) emit(parent->special_objects[JIT_EPILOG]); } +/* Allocates memory conditionally */ void quotation_jit::emit_quot(cell quot_) { data_root quot(quot_,parent); @@ -341,6 +342,7 @@ code_block *factor_vm::jit_compile_quot(cell owner_, cell quot_, bool relocating return compiled; } +/* Allocates memory */ void factor_vm::jit_compile_quot(cell quot_, bool relocating) { data_root quot(quot_,this); @@ -351,6 +353,7 @@ void factor_vm::jit_compile_quot(cell quot_, bool relocating) } } +/* Allocates memory */ void factor_vm::primitive_jit_compile() { jit_compile_quot(ctx->pop(),true); @@ -361,8 +364,8 @@ void *factor_vm::lazy_jit_compile_entry_point() return untag(special_objects[LAZY_JIT_COMPILE_WORD])->entry_point; } -/* Allocates memory */ /* push a new quotation on the stack */ +/* Allocates memory */ void factor_vm::primitive_array_to_quotation() { quotation *quot = allot(sizeof(quotation)); @@ -398,6 +401,7 @@ fixnum factor_vm::quot_code_offset_to_scan(cell quot_, cell offset) return compiler.get_position(); } +/* Allocates memory */ cell factor_vm::lazy_jit_compile(cell quot_) { data_root quot(quot_,this); @@ -410,6 +414,7 @@ cell factor_vm::lazy_jit_compile(cell quot_) return quot.value(); } +/* Allocates memory */ VM_C_API cell lazy_jit_compile(cell quot, factor_vm *parent) { return parent->lazy_jit_compile(quot); @@ -427,11 +432,13 @@ void factor_vm::primitive_quot_compiled_p() ctx->push(tag_boolean(quot_compiled_p(quot.untagged()))); } +/* Allocates memory */ cell factor_vm::find_all_quotations() { return instances(QUOTATION_TYPE); } +/* Allocates memory */ void factor_vm::initialize_all_quotations() { data_root quotations(find_all_quotations(),this); diff --git a/vm/tuples.cpp b/vm/tuples.cpp index 8d224c93d5..0721b7fcee 100755 --- a/vm/tuples.cpp +++ b/vm/tuples.cpp @@ -3,8 +3,8 @@ namespace factor { -/* Allocates memory */ /* push a new tuple on the stack, filling its slots with f */ +/* Allocates memory */ void factor_vm::primitive_tuple() { data_root layout(ctx->pop(),this); @@ -16,8 +16,8 @@ void factor_vm::primitive_tuple() ctx->push(t.value()); } -/* Allocates memory */ /* push a new tuple on the stack, filling its slots from the stack */ +/* Allocates memory */ void factor_vm::primitive_tuple_boa() { data_root layout(ctx->pop(),this); diff --git a/vm/words.cpp b/vm/words.cpp index 94bd0a7024..39e255741e 100644 --- a/vm/words.cpp +++ b/vm/words.cpp @@ -3,7 +3,8 @@ namespace factor { -/* Compile a word definition with the non-optimizing compiler. Allocates memory */ +/* Compile a word definition with the non-optimizing compiler. */ +/* Allocates memory */ void factor_vm::jit_compile_word(cell word_, cell def_, bool relocating) { data_root word(word_,this); @@ -21,11 +22,13 @@ void factor_vm::jit_compile_word(cell word_, cell def_, bool relocating) if(to_boolean(word->pic_tail_def)) jit_compile_quot(word->pic_tail_def,relocating); } +/* Allocates memory */ cell factor_vm::find_all_words() { return instances(WORD_TYPE); } +/* Allocates memory */ void factor_vm::compile_all_words() { data_root words(find_all_words(),this);