]> gitweb.factorcode.org Git - factor.git/blob - vm/vm.cpp
VM: removes the delete_contexts method
[factor.git] / vm / vm.cpp
1 #include "master.hpp"
2
3 namespace factor {
4
5 factor_vm::factor_vm(THREADHANDLE thread)
6     : nursery(0, 0),
7       faulting_p(false),
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       safepoint() {
26   primitive_reset_dispatch_stats();
27 }
28
29 factor_vm::~factor_vm() {
30   FACTOR_ASSERT(!ctx);
31   FACTOR_FOR_EACH(unused_contexts) {
32     delete *iter;
33   }
34   if (signal_callstack_seg) {
35     delete signal_callstack_seg;
36     signal_callstack_seg = NULL;
37   }
38   FACTOR_FOR_EACH(function_descriptors) {
39     delete[] * iter;
40   }
41 }
42
43 }