summaryrefslogtreecommitdiff
path: root/mach_dep.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2014-07-13 12:18:16 +0400
committerIvan Maidanski <ivmai@mail.ru>2014-07-13 12:29:48 +0400
commit4eaea0afad5dfd31d1d800138f5afaca1925c775 (patch)
tree72c42c450fc3219ec259763c0695ddea15aaa0b2 /mach_dep.c
parent7d2905e01d7f9831353e1f034aea3692e71f96fc (diff)
downloadbdwgc-4eaea0afad5dfd31d1d800138f5afaca1925c775.tar.gz
Code refactoring of Emscripten platform support (single-threaded)
* alloc.c (min_bytes_allocd): Test STACK_NOT_SCANNED macro instead of __EMSCRIPTEN__ (stack size to scan is zero if STACK_NOT_SCANNED). * include/private/gcconfig.h (ALIGNMENT): Remove duplicate definition for _EMSCRIPTEN__. * include/private/gcconfig.h (STACK_NOT_SCANNED): New macro defined for __EMSCRIPTEN__ target (in addition to OS_TYPE, CPP_WORDSZ, ALIGNMENT, DATASTART, DATAEND). * mach_dep.c (GC_push_regs): Test STACK_NOT_SCANNED macro instead of __EMSCRIPTEN__ (push nothing if STACK_NOT_SCANNED). * mark_rts.c (GC_push_roots): Test STACK_NOT_SCANNED macro instead of __EMSCRIPTEN__ (do not call GC_push_regs_and_stack if STACK_NOT_SCANNED); mark cold_gc_frame argument as potentially unused. * misc.c (GC_clear_stack): Test STACK_NOT_SCANNED macro instead of __EMSCRIPTEN__ (do not clear stack if STACK_NOT_SCANNED). * misc.c (GC_clear_stack): Reformat code.
Diffstat (limited to 'mach_dep.c')
-rw-r--r--mach_dep.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/mach_dep.c b/mach_dep.c
index a882c76d..29e0b8a7 100644
--- a/mach_dep.c
+++ b/mach_dep.c
@@ -103,7 +103,14 @@
# define HAVE_PUSH_REGS
#else /* No asm implementation */
-# if defined(M68K) && defined(AMIGA)
+# ifdef STACK_NOT_SCANNED
+ void GC_push_regs(void)
+ {
+ /* empty */
+ }
+# define HAVE_PUSH_REGS
+
+# elif defined(M68K) && defined(AMIGA)
/* This function is not static because it could also be */
/* erroneously defined in .S file, so this error would be caught */
/* by the linker. */
@@ -181,11 +188,6 @@
}
# define HAVE_PUSH_REGS
# endif /* __MWERKS__ */
-# elif defined(EMSCRIPTEN)
- void GC_push_regs(void)
- {
- }
-# define HAVE_PUSH_REGS
# endif /* MACOS */
#endif /* !USE_ASM_PUSH_REGS */