]> gitweb.factorcode.org Git - factor.git/blob - vm/vm.cpp
vm: strip out call-counting profiler
[factor.git] / vm / vm.cpp
1 #include "master.hpp"
2
3 namespace factor
4 {
5
6 factor_vm::factor_vm(THREADHANDLE thread) :
7         nursery(0,0),
8         thread(thread),
9         callback_id(0),
10         c_to_factor_func(NULL),
11         sampling_profiler_p(false),
12         signal_pipe_input(0),
13         signal_pipe_output(0),
14         gc_off(false),
15         current_gc(NULL),
16         current_gc_p(false),
17         current_jit_count(0),
18         gc_events(NULL),
19         fep_p(false),
20         fep_help_was_shown(false),
21         fep_disabled(false),
22         full_output(false),
23         last_nano_count(0),
24         signal_callstack_seg(NULL),
25         faulting_p(false),
26         safepoint()
27 {
28         primitive_reset_dispatch_stats();
29 }
30
31 factor_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 }