]> gitweb.factorcode.org Git - factor.git/blob - vm/vm.cpp
vm: separate 'current_gc_p' from 'current_gc'
[factor.git] / vm / vm.cpp
1 #include "master.hpp"
2
3 namespace factor
4 {
5
6 factor_vm::factor_vm() :
7         nursery(0,0),
8         callback_id(0),
9         c_to_factor_func(NULL),
10         counting_profiler_p(false),
11         sampling_profiler_p(false),
12         safepoint_fep_p(false),
13         gc_off(false),
14         current_gc(NULL),
15         current_gc_p(false),
16         current_jit_p(false),
17         gc_events(NULL),
18         fep_p(false),
19         fep_help_was_shown(false),
20         fep_disabled(false),
21         full_output(false),
22         last_nano_count(0),
23         signal_callstack_seg(NULL),
24         faulting_p(false)
25 {
26         primitive_reset_dispatch_stats();
27 }
28
29 factor_vm::~factor_vm()
30 {
31         delete_contexts();
32         if(signal_callstack_seg)
33         {
34                 delete signal_callstack_seg;
35                 signal_callstack_seg = NULL;
36         }
37         std::list<void **>::const_iterator iter = function_descriptors.begin();
38         std::list<void **>::const_iterator end = function_descriptors.end();
39         while(iter != end)
40         {
41                 delete [] *iter;
42                 iter++;
43         }
44 }
45
46 }