Commit 0f99322f authored by Masaki Muranaka's avatar Masaki Muranaka

gc.c: Enable DEBUG(x) if GC_DEBUG is defined.

vm.c: Enable DEBUG(x) if VM_DEBUG is defined.
parent 83d91b93
...@@ -147,8 +147,10 @@ gettimeofday_time(void) ...@@ -147,8 +147,10 @@ gettimeofday_time(void)
#ifdef GC_DEBUG #ifdef GC_DEBUG
#include <assert.h> #include <assert.h>
#define gc_assert(expect) assert(expect) #define gc_assert(expect) assert(expect)
#define DEBUG(x) (x)
#else #else
#define gc_assert(expect) ((void)0) #define gc_assert(expect) ((void)0)
#define DEBUG(x)
#endif #endif
#define GC_STEP_SIZE 1024 #define GC_STEP_SIZE 1024
......
...@@ -49,7 +49,11 @@ The value below allows about 60000 recursive calls in the simplest case. */ ...@@ -49,7 +49,11 @@ The value below allows about 60000 recursive calls in the simplest case. */
#define MRB_STACK_MAX ((1<<18) - MRB_STACK_GROWTH) #define MRB_STACK_MAX ((1<<18) - MRB_STACK_GROWTH)
#endif #endif
#ifdef VM_DEBUG
# define DEBUG(x) (x)
#else
# define DEBUG(x)
#endif
static inline void static inline void
stack_copy(mrb_value *dst, const mrb_value *src, size_t size) stack_copy(mrb_value *dst, const mrb_value *src, size_t size)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment