Browse Source

Enable wasm pointer tracking for gc=none.

pull/3291/head
Anuraag Agrawal 2 years ago
committed by Ron Evans
parent
commit
0b3a7280fa
  1. 2
      compileopts/config.go
  2. 5
      src/runtime/gc_stack_portable.go

2
compileopts/config.go

@ -105,6 +105,8 @@ func (c *Config) GC() string {
// that can be traced by the garbage collector.
func (c *Config) NeedsStackObjects() bool {
switch c.GC() {
case "none":
fallthrough
case "conservative":
for _, tag := range c.BuildTags() {
if tag == "tinygo.wasm" {

5
src/runtime/gc_stack_portable.go

@ -1,5 +1,6 @@
//go:build gc.conservative && tinygo.wasm
// +build gc.conservative,tinygo.wasm
//go:build (gc.conservative || gc.none) && tinygo.wasm
// +build gc.conservative gc.none
// +build tinygo.wasm
package runtime

Loading…
Cancel
Save