mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
gc.c: force STACK_GROW_DIRECTION for emscripten
The configure script fails to guess the direction on emscripten. Perhaps this is because of https://github.com/kripken/emscripten/issues/2093 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
50700c4d3c
commit
b4b4b94367
1 changed files with 5 additions and 0 deletions
5
gc.c
5
gc.c
|
@ -3996,6 +3996,11 @@ init_mark_stack(mark_stack_t *stack)
|
||||||
#define STACK_END (ec->machine.stack_end)
|
#define STACK_END (ec->machine.stack_end)
|
||||||
#define STACK_LEVEL_MAX (ec->machine.stack_maxsize/sizeof(VALUE))
|
#define STACK_LEVEL_MAX (ec->machine.stack_maxsize/sizeof(VALUE))
|
||||||
|
|
||||||
|
#ifdef __EMSCRIPTEN__
|
||||||
|
#undef STACK_GROW_DIRECTION
|
||||||
|
#define STACK_GROW_DIRECTION 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#if STACK_GROW_DIRECTION < 0
|
#if STACK_GROW_DIRECTION < 0
|
||||||
# define STACK_LENGTH (size_t)(STACK_START - STACK_END)
|
# define STACK_LENGTH (size_t)(STACK_START - STACK_END)
|
||||||
#elif STACK_GROW_DIRECTION > 0
|
#elif STACK_GROW_DIRECTION > 0
|
||||||
|
|
Loading…
Reference in a new issue