]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove type.go
authorDmitriy Vyukov <dvyukov@google.com>
Tue, 5 Aug 2014 18:32:24 +0000 (22:32 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Tue, 5 Aug 2014 18:32:24 +0000 (22:32 +0400)
We have an autogenerated version in zruntime_defs.
I am not sure what are the consequences as gdb never printed any values for me.
But it looks unnecessary to manually duplicate it.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews, iant, khr
https://golang.org/cl/115660043

src/cmd/ld/dwarf.c
src/pkg/runtime/type.go [deleted file]
src/pkg/runtime/type.h

index 9277ebc54b6456e0a665cd272e1008d49b52e3f5..3f93f58184669186425365077c13be5ff13cf8a6 100644 (file)
@@ -2049,8 +2049,8 @@ dwarfemitdebugsections(void)
        newattr(die, DW_AT_go_kind, DW_CLS_CONSTANT, KindUintptr, 0);
 
        // Needed by the prettyprinter code for interface inspection.
-       defgotype(lookup_or_diag("type.runtime.rtype"));
-       defgotype(lookup_or_diag("type.runtime.interfaceType"));
+       defgotype(lookup_or_diag("type.runtime._type"));
+       defgotype(lookup_or_diag("type.runtime.interfacetype"));
        defgotype(lookup_or_diag("type.runtime.itab"));
 
        genasmsym(defdwsymb);
diff --git a/src/pkg/runtime/type.go b/src/pkg/runtime/type.go
deleted file mode 100644 (file)
index 4e610db..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
- * Runtime type representation.
- * This file exists only to provide types that 6l can turn into
- * DWARF information for use by gdb.  Nothing else uses these.
- * They should match the same types in ../reflect/type.go.
- * For comments see ../reflect/type.go.
- */
-
-package runtime
-
-import "unsafe"
-
-type rtype struct {
-       size       uintptr
-       hash       uint32
-       _          uint8
-       align      uint8
-       fieldAlign uint8
-       kind       uint8
-       alg        unsafe.Pointer
-       gc         [2]unsafe.Pointer
-       string     *string
-       *uncommonType
-       ptrToThis *rtype
-       zero      unsafe.Pointer
-}
-
-type _method struct {
-       name    *string
-       pkgPath *string
-       mtyp    *rtype
-       typ     *rtype
-       ifn     unsafe.Pointer
-       tfn     unsafe.Pointer
-}
-
-type uncommonType struct {
-       name    *string
-       pkgPath *string
-       methods []_method
-}
-
-type _imethod struct {
-       name    *string
-       pkgPath *string
-       typ     *rtype
-}
-
-type interfaceType struct {
-       rtype
-       methods []_imethod
-}
index 8de0ccba2c5398e802935ca2e5aa9a7551ffca26..2eda291aed003a8f5cc456006dbd1c0cf5ebcd40 100644 (file)
@@ -2,11 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-/*
- * Runtime type representation; master is type.go
- *
- * The Type*s here correspond 1-1 to type.go's *rtype.
- */
+// Runtime type representation.
 
 typedef struct Type Type;
 typedef struct UncommonType UncommonType;
@@ -16,8 +12,7 @@ typedef struct IMethod IMethod;
 typedef struct SliceType SliceType;
 typedef struct FuncType FuncType;
 
-// Needs to be in sync with ../../cmd/ld/decodesym.c:/^commonsize,
-// pkg/reflect/type.go:/type anf type.go:/rtype
+// Needs to be in sync with ../../cmd/ld/decodesym.c:/^commonsize and pkg/reflect/type.go:/type.
 struct Type
 {
        uintptr size;