]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: add reflect to TestIntendedInlining
authorDaniel Martí <mvdan@mvdan.cc>
Thu, 28 Sep 2017 19:44:21 +0000 (20:44 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Thu, 28 Sep 2017 21:09:46 +0000 (21:09 +0000)
Add the package to the table and start it off with a few small, basic
functions. Inspired by CL 66331, which added flag.ro.

Updates #21851.

Change-Id: I3995cde1ff7bb09a718110473bed8b193c2232a5
Reviewed-on: https://go-review.googlesource.com/66990
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ilya Tocar <ilya.tocar@intel.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/compile/internal/gc/inl_test.go

index 426417ce794c913ffdd7ad6df0630d5fadf1055c..3fdbf1e49238b3eb06b04e15ba0811f6cc3db1ae 100644 (file)
@@ -113,6 +113,23 @@ func TestIntendedInlining(t *testing.T) {
                        "RuneLen",
                        "ValidRune",
                },
+               "reflect": {
+                       "Value.CanAddr",
+                       "Value.CanSet",
+                       "Value.IsValid",
+                       "add",
+                       "align",
+                       "flag.kind",
+                       "flag.ro",
+
+                       // TODO: these use panic, need mid-stack
+                       // inlining
+                       // "Value.CanInterface",
+                       // "Value.pointer",
+                       // "flag.mustBe",
+                       // "flag.mustBeAssignable",
+                       // "flag.mustBeExported",
+               },
                "regexp": {
                        "(*bitState).push",
                },