Get garbage collector working on aarch64

Garbage collection will now happen on arm64 when a function returns,
rather than kicking the can down the road to when the process exits.
This change also does some code cleanup and incorporates suggestions
This commit is contained in:
Justine Tunney 2023-06-07 03:34:45 -07:00
parent 9793d3524f
commit 01fd655097
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
16 changed files with 144 additions and 323 deletions

View file

@ -86,9 +86,7 @@ static void DeferFunction(struct StackFrame *frame, void *fn, void *arg) {
g->p[g->i].arg = (intptr_t)arg;
g->p[g->i].ret = frame->addr;
g->i++;
#ifdef __x86_64__
frame->addr = (intptr_t)__gc;
#endif
}
// the gnu extension macros for _gc / _defer point here