VM: Refactor vm.cpp/hpp to Factor style

db4
Erik Charlebois 2013-05-11 22:31:48 -04:00
parent 8522265169
commit 5614985c3d
2 changed files with 737 additions and 731 deletions

View File

@ -1,48 +1,43 @@
#include "master.hpp" #include "master.hpp"
namespace factor namespace factor {
{
factor_vm::factor_vm(THREADHANDLE thread) : factor_vm::factor_vm(THREADHANDLE thread)
nursery(0,0), : nursery(0, 0),
faulting_p(false), faulting_p(false),
thread(thread), thread(thread),
callback_id(0), callback_id(0),
c_to_factor_func(NULL), c_to_factor_func(NULL),
sampling_profiler_p(false), sampling_profiler_p(false),
signal_pipe_input(0), signal_pipe_input(0),
signal_pipe_output(0), signal_pipe_output(0),
gc_off(false), gc_off(false),
current_gc(NULL), current_gc(NULL),
current_gc_p(false), current_gc_p(false),
current_jit_count(0), current_jit_count(0),
gc_events(NULL), gc_events(NULL),
fep_p(false), fep_p(false),
fep_help_was_shown(false), fep_help_was_shown(false),
fep_disabled(false), fep_disabled(false),
full_output(false), full_output(false),
last_nano_count(0), last_nano_count(0),
signal_callstack_seg(NULL), signal_callstack_seg(NULL),
safepoint() safepoint() {
{ primitive_reset_dispatch_stats();
primitive_reset_dispatch_stats();
} }
factor_vm::~factor_vm() factor_vm::~factor_vm() {
{ delete_contexts();
delete_contexts(); if (signal_callstack_seg) {
if(signal_callstack_seg) delete signal_callstack_seg;
{ signal_callstack_seg = NULL;
delete signal_callstack_seg; }
signal_callstack_seg = NULL; std::list<void**>::const_iterator iter = function_descriptors.begin();
} std::list<void**>::const_iterator end = function_descriptors.end();
std::list<void **>::const_iterator iter = function_descriptors.begin(); while (iter != end) {
std::list<void **>::const_iterator end = function_descriptors.end(); delete[] * iter;
while(iter != end) iter++;
{ }
delete [] *iter;
iter++;
}
} }
} }

1393
vm/vm.hpp

File diff suppressed because it is too large Load Diff