From abf7912ae70c2889ec068acb64a515de8d4f2c52 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 4 May 2009 05:07:14 -0500 Subject: [PATCH] Cleanups --- vm/factor.cpp | 3 --- vm/local_roots.hpp | 9 ++++++++- vm/quotations.cpp | 8 ++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/vm/factor.cpp b/vm/factor.cpp index 28f0afacf6..b607adba63 100755 --- a/vm/factor.cpp +++ b/vm/factor.cpp @@ -125,10 +125,7 @@ VM_C_API void init_factor(vm_parameters *p) load_image(p); init_c_io(); init_inline_caching(p->max_pic_size); - -#ifndef FACTOR_DEBUG init_signals(); -#endif if(p->console) open_console(); diff --git a/vm/local_roots.hpp b/vm/local_roots.hpp index 9506a421f5..e074d999e7 100644 --- a/vm/local_roots.hpp +++ b/vm/local_roots.hpp @@ -20,7 +20,14 @@ struct gc_root : public tagged const gc_root& operator=(const T *x) { tagged::operator=(x); return *this; } const gc_root& operator=(const cell &x) { tagged::operator=(x); return *this; } - ~gc_root() { cell old = gc_local_pop(); assert(old == (cell)this); } + ~gc_root() { +#ifdef FACTOR_DEBUG + cell old = gc_local_pop(); + assert(old == (cell)this); +#else + gc_local_pop(); +#endif + } }; /* A similar hack for the bignum implementation */ diff --git a/vm/quotations.cpp b/vm/quotations.cpp index 2b9a37a6f7..c87cf8dc82 100755 --- a/vm/quotations.cpp +++ b/vm/quotations.cpp @@ -323,11 +323,11 @@ fixnum quot_code_offset_to_scan(cell quot_, cell offset) gc_root quot(quot_); gc_root array(quot->array); - quotation_jit jit(quot.value(),false,false); - jit.compute_position(offset); - jit.iterate_quotation(); + quotation_jit compiler(quot.value(),false,false); + compiler.compute_position(offset); + compiler.iterate_quotation(); - return jit.get_position(); + return compiler.get_position(); } VM_ASM_API cell lazy_jit_compile_impl(cell quot_, stack_frame *stack)