]> Cypherpunks repositories - gostls13.git/commitdiff
spec: delete references to unsafe.Reflect,Typeof,Unreflect
authorRob Pike <r@golang.org>
Sat, 17 Mar 2012 11:50:59 +0000 (22:50 +1100)
committerRob Pike <r@golang.org>
Sat, 17 Mar 2012 11:50:59 +0000 (22:50 +1100)
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

doc/go_spec.html
src/pkg/exp/types/universe.go

index 808255a38a87a2a3d101b75a9d138a817e24e619..9d3ff87b116c2794bee885184682ec2367017c00 100644 (file)
@@ -1,6 +1,6 @@
 <!--{
        "Title": "The Go Programming Language Specification",
-       "Subtitle": "Version of March 12, 2012",
+       "Subtitle": "Version of March 17, 2012",
        "Path": "/ref/spec"
 }-->
 
@@ -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{}
 </pre>
 
 <p>
@@ -5446,23 +5442,6 @@ Calls to <code>Alignof</code>, <code>Offsetof</code>, and
 <code>Sizeof</code> are compile-time constant expressions of type <code>uintptr</code>.
 </p>
 <p>
-The functions <code>unsafe.Typeof</code>,
-<code>unsafe.Reflect</code>,
-and <code>unsafe.Unreflect</code> allow access at run time to the dynamic
-types and values stored in interfaces.
-<code>Typeof</code> returns a representation of
-<code>val</code>'s
-dynamic type as a <code>runtime.Type</code>.
-<code>Reflect</code> allocates a copy of
-<code>val</code>'s dynamic
-value and returns both the type and the address of the copy.
-<code>Unreflect</code> inverts <code>Reflect</code>,
-creating an
-interface value from a type and address.
-The <a href="/pkg/reflect/"><code>reflect</code> package</a> built on these primitives
-provides a safe, more convenient way to inspect interface values.
-</p>
-
 
 <h3 id="Size_and_alignment_guarantees">Size and alignment guarantees</h3>
 
index 46cff31bce84e8e833483d5e7cbbd96d61bf9c20..cb89397b2e5403d7b46bb5007a653b46a8acf9a9 100644 (file)
@@ -102,11 +102,6 @@ func init() {
        defType("Pointer")
 
        defFun("Alignof")
-       defFun("New")
-       defFun("NewArray")
        defFun("Offsetof")
-       defFun("Reflect")
        defFun("Sizeof")
-       defFun("Typeof")
-       defFun("Unreflect")
 }