• Austin Clements's avatar
    runtime: eliminate write barriers from gentraceback · b43b375c
    Austin Clements authored
    gentraceback is used in many contexts where write barriers are
    disallowed. This currently works because the only write barrier is in
    assigning frame.argmap in setArgInfo and in practice frame is always
    on the stack, so this write barrier is a no-op.
    
    However, we can easily eliminate this write barrier, which will let us
    statically disallow write barriers (using go:nowritebarrierrec
    annotations) in many more situations. As a bonus, this makes the code
    a little more idiomatic.
    
    Updates #10600.
    
    Change-Id: I45ba5cece83697ff79f8537ee6e43eadf1c18c6d
    Reviewed-on: https://go-review.googlesource.com/17003
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarDmitry Vyukov <dvyukov@google.com>
    b43b375c
traceback.go 23.7 KB