From: Rob Pike Date: Sat, 17 Mar 2012 11:50:59 +0000 (+1100) Subject: spec: delete references to unsafe.Reflect,Typeof,Unreflect X-Git-Tag: weekly.2012-03-22~53 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=883a96d9509c62fddc03fedf4b711c738dc7ac9e;p=gostls13.git spec: delete references to unsafe.Reflect,Typeof,Unreflect They have been deleted from package unsafe. Also delete their appearance in exp/types. Fixes #3338. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5847056 --- diff --git a/doc/go_spec.html b/doc/go_spec.html index 808255a38a..9d3ff87b11 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -5403,10 +5403,6 @@ type Pointer *ArbitraryType func Alignof(variable ArbitraryType) uintptr func Offsetof(selector ArbitraryType) uinptr func Sizeof(variable ArbitraryType) uintptr - -func Reflect(val interface{}) (typ runtime.Type, addr uintptr) -func Typeof(val interface{}) (typ interface{}) -func Unreflect(typ runtime.Type, addr uintptr) interface{}

@@ -5446,23 +5442,6 @@ Calls to Alignof, Offsetof, and Sizeof are compile-time constant expressions of type uintptr.

-The functions unsafe.Typeof, -unsafe.Reflect, -and unsafe.Unreflect allow access at run time to the dynamic -types and values stored in interfaces. -Typeof returns a representation of -val's -dynamic type as a runtime.Type. -Reflect allocates a copy of -val's dynamic -value and returns both the type and the address of the copy. -Unreflect inverts Reflect, -creating an -interface value from a type and address. -The reflect package built on these primitives -provides a safe, more convenient way to inspect interface values. -

-

Size and alignment guarantees

diff --git a/src/pkg/exp/types/universe.go b/src/pkg/exp/types/universe.go index 46cff31bce..cb89397b2e 100644 --- a/src/pkg/exp/types/universe.go +++ b/src/pkg/exp/types/universe.go @@ -102,11 +102,6 @@ func init() { defType("Pointer") defFun("Alignof") - defFun("New") - defFun("NewArray") defFun("Offsetof") - defFun("Reflect") defFun("Sizeof") - defFun("Typeof") - defFun("Unreflect") }