]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: add support for a go:noinline directive
authorTodd Neal <todd@tneal.org>
Tue, 25 Aug 2015 00:45:59 +0000 (19:45 -0500)
committerTodd Neal <todd@tneal.org>
Thu, 29 Oct 2015 23:16:27 +0000 (23:16 +0000)
commita92543e1a13f62add68a55a5b2c8f87e40d8a41f
tree5e882c3e7fdddbe4a61d99ead53ab612e770197a
parentc9b8cab16c457fec7cf897c2d37a266e60f99a25
cmd/compile: add support for a go:noinline directive

Some tests need to disable inlining of a function.  It's currently done
in one of a few ways (adding a function call, an empty switch, or a
defer).  Add support for a less fragile 'go:noinline' directive that
prevents inlining.

Fixes #12312

Change-Id: Ife444e13361b4a927709d81aa41e448f32eec8d4
Reviewed-on: https://go-review.googlesource.com/13911
Run-TryBot: Todd Neal <todd@tneal.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/cmd/compile/internal/gc/go.go
src/cmd/compile/internal/gc/go.y
src/cmd/compile/internal/gc/inl.go
src/cmd/compile/internal/gc/lex.go
src/cmd/compile/internal/gc/syntax.go
src/cmd/compile/internal/gc/y.go
test/inline.go