From: Jukka Jylanki Date: Wed, 21 Jun 2017 07:22:04 +0000 (+0300) Subject: Document STACK_NOT_SCANNED macro in gcconfig.h (Emscripten) X-Git-Tag: v8.0.0~669 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d4fcdd28a96aeaad707ea8c2c60c43fc9ff55381;p=gc Document STACK_NOT_SCANNED macro in gcconfig.h (Emscripten) Issue #163 (bdwgc). * include/private/gcconfig.h [__EMSCRIPTEN__] (STACK_NOT_SCANNED): Add comment (explaining the reason of defining this macro). --- diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index 4d1d797d..3dc0b28c 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -819,6 +819,13 @@ # define ALIGNMENT 4 # define DATASTART (ptr_t)ALIGNMENT # define DATAEND (ptr_t)ALIGNMENT + /* Since JavaScript/asm.js/WebAssembly is not able to access the */ + /* function call stack or the local data stack, it is not possible */ + /* for GC to perform its stack walking operation to find roots on */ + /* the stack. To work around that, the clients generally only do */ + /* BDWGC steps when the stack is empty so it is known that there */ + /* are no objects that would be found on the stack, and BDWGC is */ + /* compiled with stack walking disabled. */ # define STACK_NOT_SCANNED # endif