PageRenderTime 42ms CodeModel.GetById 33ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/vm/vm.cpp

http://github.com/abeaumont/factor
C++ | 48 lines | 44 code | 4 blank | 0 comment | 2 complexity | d6c336ca48d4b06350d6460f6a46c532 MD5 | raw file
 1#include "master.hpp"
 2
 3namespace factor
 4{
 5
 6factor_vm::factor_vm(THREADHANDLE thread) :
 7	nursery(0,0),
 8	faulting_p(false),
 9	thread(thread),
10	callback_id(0),
11	c_to_factor_func(NULL),
12	sampling_profiler_p(false),
13	signal_pipe_input(0),
14	signal_pipe_output(0),
15	gc_off(false),
16	current_gc(NULL),
17	current_gc_p(false),
18	current_jit_count(0),
19	gc_events(NULL),
20	fep_p(false),
21	fep_help_was_shown(false),
22	fep_disabled(false),
23	full_output(false),
24	last_nano_count(0),
25	signal_callstack_seg(NULL),
26	safepoint()
27{
28	primitive_reset_dispatch_stats();
29}
30
31factor_vm::~factor_vm()
32{
33	delete_contexts();
34	if(signal_callstack_seg)
35	{
36		delete signal_callstack_seg;
37		signal_callstack_seg = NULL;
38	}
39	std::list<void **>::const_iterator iter = function_descriptors.begin();
40	std::list<void **>::const_iterator end = function_descriptors.end();
41	while(iter != end)
42	{
43		delete [] *iter;
44		iter++;
45	}
46}
47
48}