summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vm.c b/src/vm.c
index 92836bf7a..cc35812bc 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -72,16 +72,18 @@ The value below allows about 60000 recursive calls in the simplest case. */
static inline void
stack_clear(mrb_value *from, size_t count)
{
+#ifndef MRB_NAN_BOXING
const mrb_value mrb_value_zero = { { 0 } };
while (count-- > 0) {
-#ifndef MRB_NAN_BOXING
*from++ = mrb_value_zero;
+ }
#else
+ while (count-- > 0) {
SET_NIL_VALUE(*from);
from++;
-#endif
}
+#endif
}
static inline void