mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-07 20:43:40 +00:00
runtime: refactor GC mark phase into gcMarkReachable
This is a small refactor to prepare GC marking for multithreaded stop-the-world.
This commit is contained in:
@@ -4,6 +4,11 @@ package runtime
|
||||
|
||||
import "internal/task"
|
||||
|
||||
func gcMarkReachable() {
|
||||
markStack()
|
||||
findGlobals(markRoots)
|
||||
}
|
||||
|
||||
// markStack marks all root pointers found on the stack.
|
||||
//
|
||||
// This implementation is conservative and relies on the stack top (provided by
|
||||
|
||||
Reference in New Issue
Block a user