]> granicus.if.org Git - gc/commit
Replace push_one calls with push_many_regs one for Win32 thread context
authorIvan Maidanski <ivmai@mail.ru>
Tue, 10 Sep 2019 08:09:42 +0000 (11:09 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 10 Sep 2019 15:32:05 +0000 (18:32 +0300)
commite5321a993a768ba78edc2fd39387edb360480c83
tree162bb06a01f6dbce3b19f46cc82ab0ef36767662
parent912ec408d9acd4adc529f202cd67fde0ab5e23a7
Replace push_one calls with push_many_regs one for Win32 thread context
(code refactoring)

Also, do not define GC_push_one except for Darwin (and some ancient
targets that use the function).

* include/private/gc_priv.h [MSWIN32 || MSWINCE] (GC_push_one): Do not
declare.
* include/private/gc_priv.h [!MSWIN32 && !MSWINCE] (GC_push_one):
Declare only if AMIGA or MACOS or GC_DARWIN_THREADS.
* include/private/gc_priv.h [GC_WIN32_THREADS] (GC_push_many_regs):
Declare function; add comment.
* mark.c (GC_push_one): Define only if AMIGA or MACOS or
GC_DARWIN_THREADS.
* mark.c [GC_WIN32_THREADS] (GC_push_many_regs): New GC_INNER function.
* win32_threads.c (GC_push_stack_for): Remove i local variable; call
GC_push_many_regs() instead of a loop with GC_push_one() calls (ignore
2 first registers if WOW64_THREAD_CONTEXT_WORKAROUND).
include/private/gc_priv.h
mark.c
win32_threads.c