]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile/internal/gc: separate builtin and real runtime packages
authorMatthew Dempsky <mdempsky@google.com>
Tue, 28 Feb 2017 23:51:29 +0000 (15:51 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Wed, 1 Mar 2017 01:06:32 +0000 (01:06 +0000)
commitb6c600fc9a75fd6f4b6f4478058b95902ae6be94
tree6fd3c75d437b2df111f8f8af3af72e03ba488b23
parent12b6c18139233abd7b1af1fc0a07279d56df3642
cmd/compile/internal/gc: separate builtin and real runtime packages

The builtin runtime package definitions intentionally diverge from the
actual runtime package's, but this only works as long as they never
overlap.

To make it easier to expand the builtin runtime package, this CL now
loads their definitions into a logically separate "go.runtime"
package.  By resetting the package's Prefix field to "runtime", any
references to builtin definitions will still resolve against the real
package runtime.

Fixes #14482.

Passes toolstash -cmp.

Change-Id: I539c0994deaed4506a331f38c5b4d6bc8c95433f
Reviewed-on: https://go-review.googlesource.com/37538
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/gc/go.go
src/cmd/compile/internal/gc/main.go
src/cmd/compile/internal/gc/typecheck.go
src/cmd/compile/internal/gc/walk.go
test/runtime.go