]> Cypherpunks repositories - gostls13.git/commit
cmd/gc, runtime: refactor interface inlining decision into compiler
authorRuss Cox <rsc@golang.org>
Tue, 19 Aug 2014 01:13:11 +0000 (21:13 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 19 Aug 2014 01:13:11 +0000 (21:13 -0400)
commit1806a5732b373e5a9048765db533bcb33952a067
tree5ce3a35d9de9e7f817f82a4dc3f09775bfb643d0
parent2e2beb567cb2a59a8b54d8f2cd3fbd8eb1116013
cmd/gc, runtime: refactor interface inlining decision into compiler

We need to change the interface value representation for
concurrent garbage collection, so that there is no ambiguity
about whether the data word holds a pointer or scalar.

This CL does NOT make any representation changes.

Instead, it removes representation assumptions from
various pieces of code throughout the tree.
The isdirectiface function in cmd/gc/subr.c is now
the only place that decides that policy.
The policy propagates out from there in the reflect
metadata, as a new flag in the internal kind value.

A follow-up CL will change the representation by
changing the isdirectiface function. If that CL causes
problems, it will be easy to roll back.

Update #8405.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews, r
https://golang.org/cl/129090043
18 files changed:
src/cmd/gc/go.h
src/cmd/gc/reflect.c
src/cmd/gc/subr.c
src/cmd/gc/walk.c
src/pkg/database/sql/convert_test.go
src/pkg/reflect/all_test.go
src/pkg/reflect/type.go
src/pkg/reflect/value.go
src/pkg/runtime/alg.go
src/pkg/runtime/heapdump.c
src/pkg/runtime/iface.go
src/pkg/runtime/malloc.c
src/pkg/runtime/malloc.go
src/pkg/runtime/mgc0.c
src/pkg/runtime/stack.c
src/pkg/runtime/typekind.go [new file with mode: 0644]
src/pkg/runtime/typekind.h
test/live.go