]> granicus.if.org Git - gc/commitdiff
Document STACK_NOT_SCANNED macro in gcconfig.h (Emscripten)
authorJukka Jylanki <jujjyl@gmail.com>
Wed, 21 Jun 2017 07:22:04 +0000 (10:22 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 21 Jun 2017 07:24:20 +0000 (10:24 +0300)
Issue #163 (bdwgc).

* include/private/gcconfig.h [__EMSCRIPTEN__] (STACK_NOT_SCANNED): Add
comment (explaining the reason of defining this macro).

include/private/gcconfig.h

index 4d1d797d9633978c958804e54cca58b492795ed6..3dc0b28cbee77b7713705bacf653e92d7d564f52 100644 (file)
 #   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