MIRROR: javascript for ๐Ÿœ's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix x86 JIT stack guard ABI mismatch

+4 -4
+1 -1
include/silver/glue.h
··· 4 4 #ifdef ANT_JIT 5 5 #include "silver/engine.h" 6 6 7 - bool jit_helper_stack_overflow(ant_t *js); 7 + int64_t jit_helper_stack_overflow(ant_t *js); 8 8 int64_t jit_helper_is_truthy(ant_t *js, ant_value_t v); 9 9 10 10 ant_value_t jit_helper_add(sv_vm_t *vm, ant_t *js, ant_value_t l, ant_value_t r);
+3 -3
src/silver/glue.c
··· 14 14 #include "ops/comparison.h" 15 15 #include "ops/calls.h" 16 16 17 - bool jit_helper_stack_overflow(ant_t *js) { 17 + int64_t jit_helper_stack_overflow(ant_t *js) { 18 18 volatile char marker; 19 19 uintptr_t curr = (uintptr_t)▮ 20 - if (js->cstk.limit == 0 || js->cstk.base == NULL) return false; 20 + if (js->cstk.limit == 0 || js->cstk.base == NULL) return 0; 21 21 uintptr_t base = (uintptr_t)js->cstk.base; 22 22 size_t used = (base > curr) ? (base - curr) : (curr - base); 23 - return used > js->cstk.limit; 23 + return used > js->cstk.limit ? 1 : 0; 24 24 } 25 25 26 26 ant_value_t jit_helper_stack_overflow_error(sv_vm_t *vm, ant_t *js) {