runtime: drop unused C type reflection code
In particular, drop __go_type_descriptors_equal, which is no longer used, and will be made obsolete by CL 179598. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/179858 From-SVN: r271823
This commit is contained in:
parent
6303331c33
commit
2099d44658
@ -1,4 +1,4 @@
|
|||||||
52176566485e20968394a5cb67a89ac676182594
|
4150db0e4613043e38a146a971e5b0dcacad7c2a
|
||||||
|
|
||||||
The first line of this file holds the git revision number of the last
|
The first line of this file holds the git revision number of the last
|
||||||
merge done from the gofrontend repository.
|
merge done from the gofrontend repository.
|
||||||
|
@ -469,7 +469,6 @@ runtime_files = \
|
|||||||
runtime/go-setenv.c \
|
runtime/go-setenv.c \
|
||||||
runtime/go-signal.c \
|
runtime/go-signal.c \
|
||||||
runtime/go-strslice.c \
|
runtime/go-strslice.c \
|
||||||
runtime/go-typedesc-equal.c \
|
|
||||||
runtime/go-unsafe-pointer.c \
|
runtime/go-unsafe-pointer.c \
|
||||||
runtime/go-unsetenv.c \
|
runtime/go-unsetenv.c \
|
||||||
runtime/go-unwind.c \
|
runtime/go-unwind.c \
|
||||||
|
@ -248,13 +248,12 @@ am__objects_3 = runtime/aeshash.lo runtime/go-assert.lo \
|
|||||||
runtime/go-nanotime.lo runtime/go-now.lo runtime/go-nosys.lo \
|
runtime/go-nanotime.lo runtime/go-now.lo runtime/go-nosys.lo \
|
||||||
runtime/go-reflect-call.lo runtime/go-runtime-error.lo \
|
runtime/go-reflect-call.lo runtime/go-runtime-error.lo \
|
||||||
runtime/go-setenv.lo runtime/go-signal.lo \
|
runtime/go-setenv.lo runtime/go-signal.lo \
|
||||||
runtime/go-strslice.lo runtime/go-typedesc-equal.lo \
|
runtime/go-strslice.lo runtime/go-unsafe-pointer.lo \
|
||||||
runtime/go-unsafe-pointer.lo runtime/go-unsetenv.lo \
|
runtime/go-unsetenv.lo runtime/go-unwind.lo \
|
||||||
runtime/go-unwind.lo runtime/go-varargs.lo \
|
runtime/go-varargs.lo runtime/env_posix.lo runtime/panic.lo \
|
||||||
runtime/env_posix.lo runtime/panic.lo runtime/print.lo \
|
runtime/print.lo runtime/proc.lo runtime/runtime_c.lo \
|
||||||
runtime/proc.lo runtime/runtime_c.lo runtime/stack.lo \
|
runtime/stack.lo runtime/yield.lo runtime/go-context.lo \
|
||||||
runtime/yield.lo runtime/go-context.lo $(am__objects_1) \
|
$(am__objects_1) $(am__objects_2)
|
||||||
$(am__objects_2)
|
|
||||||
am_libgo_llgo_la_OBJECTS = $(am__objects_3)
|
am_libgo_llgo_la_OBJECTS = $(am__objects_3)
|
||||||
libgo_llgo_la_OBJECTS = $(am_libgo_llgo_la_OBJECTS)
|
libgo_llgo_la_OBJECTS = $(am_libgo_llgo_la_OBJECTS)
|
||||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||||
@ -526,7 +525,6 @@ pdfdir = @pdfdir@
|
|||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
psdir = @psdir@
|
psdir = @psdir@
|
||||||
runstatedir = @runstatedir@
|
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
@ -904,7 +902,6 @@ runtime_files = \
|
|||||||
runtime/go-setenv.c \
|
runtime/go-setenv.c \
|
||||||
runtime/go-signal.c \
|
runtime/go-signal.c \
|
||||||
runtime/go-strslice.c \
|
runtime/go-strslice.c \
|
||||||
runtime/go-typedesc-equal.c \
|
|
||||||
runtime/go-unsafe-pointer.c \
|
runtime/go-unsafe-pointer.c \
|
||||||
runtime/go-unsetenv.c \
|
runtime/go-unsetenv.c \
|
||||||
runtime/go-unwind.c \
|
runtime/go-unwind.c \
|
||||||
@ -1367,8 +1364,6 @@ runtime/go-signal.lo: runtime/$(am__dirstamp) \
|
|||||||
runtime/$(DEPDIR)/$(am__dirstamp)
|
runtime/$(DEPDIR)/$(am__dirstamp)
|
||||||
runtime/go-strslice.lo: runtime/$(am__dirstamp) \
|
runtime/go-strslice.lo: runtime/$(am__dirstamp) \
|
||||||
runtime/$(DEPDIR)/$(am__dirstamp)
|
runtime/$(DEPDIR)/$(am__dirstamp)
|
||||||
runtime/go-typedesc-equal.lo: runtime/$(am__dirstamp) \
|
|
||||||
runtime/$(DEPDIR)/$(am__dirstamp)
|
|
||||||
runtime/go-unsafe-pointer.lo: runtime/$(am__dirstamp) \
|
runtime/go-unsafe-pointer.lo: runtime/$(am__dirstamp) \
|
||||||
runtime/$(DEPDIR)/$(am__dirstamp)
|
runtime/$(DEPDIR)/$(am__dirstamp)
|
||||||
runtime/go-unsetenv.lo: runtime/$(am__dirstamp) \
|
runtime/go-unsetenv.lo: runtime/$(am__dirstamp) \
|
||||||
@ -1454,7 +1449,6 @@ distclean-compile:
|
|||||||
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-setenv.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-setenv.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-signal.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-signal.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-strslice.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-strslice.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-typedesc-equal.Plo@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-unsafe-pointer.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-unsafe-pointer.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-unsetenv.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-unsetenv.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-unwind.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-unwind.Plo@am__quote@
|
||||||
|
18
libgo/configure
vendored
18
libgo/configure
vendored
@ -813,7 +813,6 @@ infodir
|
|||||||
docdir
|
docdir
|
||||||
oldincludedir
|
oldincludedir
|
||||||
includedir
|
includedir
|
||||||
runstatedir
|
|
||||||
localstatedir
|
localstatedir
|
||||||
sharedstatedir
|
sharedstatedir
|
||||||
sysconfdir
|
sysconfdir
|
||||||
@ -895,7 +894,6 @@ datadir='${datarootdir}'
|
|||||||
sysconfdir='${prefix}/etc'
|
sysconfdir='${prefix}/etc'
|
||||||
sharedstatedir='${prefix}/com'
|
sharedstatedir='${prefix}/com'
|
||||||
localstatedir='${prefix}/var'
|
localstatedir='${prefix}/var'
|
||||||
runstatedir='${localstatedir}/run'
|
|
||||||
includedir='${prefix}/include'
|
includedir='${prefix}/include'
|
||||||
oldincludedir='/usr/include'
|
oldincludedir='/usr/include'
|
||||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||||
@ -1148,15 +1146,6 @@ do
|
|||||||
| -silent | --silent | --silen | --sile | --sil)
|
| -silent | --silent | --silen | --sile | --sil)
|
||||||
silent=yes ;;
|
silent=yes ;;
|
||||||
|
|
||||||
-runstatedir | --runstatedir | --runstatedi | --runstated \
|
|
||||||
| --runstate | --runstat | --runsta | --runst | --runs \
|
|
||||||
| --run | --ru | --r)
|
|
||||||
ac_prev=runstatedir ;;
|
|
||||||
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
|
||||||
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
|
||||||
| --run=* | --ru=* | --r=*)
|
|
||||||
runstatedir=$ac_optarg ;;
|
|
||||||
|
|
||||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||||
ac_prev=sbindir ;;
|
ac_prev=sbindir ;;
|
||||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||||
@ -1294,7 +1283,7 @@ fi
|
|||||||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||||
libdir localedir mandir runstatedir
|
libdir localedir mandir
|
||||||
do
|
do
|
||||||
eval ac_val=\$$ac_var
|
eval ac_val=\$$ac_var
|
||||||
# Remove trailing slashes.
|
# Remove trailing slashes.
|
||||||
@ -1447,7 +1436,6 @@ Fine tuning of the installation directories:
|
|||||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||||
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
|
||||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||||
--includedir=DIR C header files [PREFIX/include]
|
--includedir=DIR C header files [PREFIX/include]
|
||||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||||
@ -11496,7 +11484,7 @@ else
|
|||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 11499 "configure"
|
#line 11487 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@ -11602,7 +11590,7 @@ else
|
|||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 11605 "configure"
|
#line 11593 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
|
@ -153,53 +153,6 @@ struct __go_uncommon_type
|
|||||||
struct __go_open_array __methods;
|
struct __go_open_array __methods;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* The type descriptor for a fixed array type. */
|
|
||||||
|
|
||||||
struct __go_array_type
|
|
||||||
{
|
|
||||||
/* Starts like all type descriptors. */
|
|
||||||
struct __go_type_descriptor __common;
|
|
||||||
|
|
||||||
/* The element type. */
|
|
||||||
struct __go_type_descriptor *__element_type;
|
|
||||||
|
|
||||||
/* The type of a slice of the same element type. */
|
|
||||||
struct __go_type_descriptor *__slice_type;
|
|
||||||
|
|
||||||
/* The length of the array. */
|
|
||||||
uintptr_t __len;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* The type descriptor for a slice. */
|
|
||||||
|
|
||||||
struct __go_slice_type
|
|
||||||
{
|
|
||||||
/* Starts like all other type descriptors. */
|
|
||||||
struct __go_type_descriptor __common;
|
|
||||||
|
|
||||||
/* The element type. */
|
|
||||||
struct __go_type_descriptor *__element_type;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* The direction of a channel. */
|
|
||||||
#define CHANNEL_RECV_DIR 1
|
|
||||||
#define CHANNEL_SEND_DIR 2
|
|
||||||
#define CHANNEL_BOTH_DIR (CHANNEL_RECV_DIR | CHANNEL_SEND_DIR)
|
|
||||||
|
|
||||||
/* The type descriptor for a channel. */
|
|
||||||
|
|
||||||
struct __go_channel_type
|
|
||||||
{
|
|
||||||
/* Starts like all other type descriptors. */
|
|
||||||
struct __go_type_descriptor __common;
|
|
||||||
|
|
||||||
/* The element type. */
|
|
||||||
const struct __go_type_descriptor *__element_type;
|
|
||||||
|
|
||||||
/* The direction. */
|
|
||||||
uintptr_t __dir;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* The type descriptor for a function. */
|
/* The type descriptor for a function. */
|
||||||
|
|
||||||
struct __go_func_type
|
struct __go_func_type
|
||||||
@ -221,34 +174,6 @@ struct __go_func_type
|
|||||||
struct __go_open_array __out;
|
struct __go_open_array __out;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* A method on an interface type. */
|
|
||||||
|
|
||||||
struct __go_interface_method
|
|
||||||
{
|
|
||||||
/* The name of the method. */
|
|
||||||
const struct String *__name;
|
|
||||||
|
|
||||||
/* This is NULL for an exported method, or the name of the package
|
|
||||||
where it lives. */
|
|
||||||
const struct String *__pkg_path;
|
|
||||||
|
|
||||||
/* The real type of the method. */
|
|
||||||
struct __go_type_descriptor *__type;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* An interface type. */
|
|
||||||
|
|
||||||
struct __go_interface_type
|
|
||||||
{
|
|
||||||
/* Starts like all other type descriptors. */
|
|
||||||
struct __go_type_descriptor __common;
|
|
||||||
|
|
||||||
/* Array of __go_interface_method . The methods are sorted in the
|
|
||||||
same order that they appear in the definition of the
|
|
||||||
interface. */
|
|
||||||
struct __go_open_array __methods;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* A map type. */
|
/* A map type. */
|
||||||
|
|
||||||
struct __go_map_type
|
struct __go_map_type
|
||||||
@ -301,69 +226,4 @@ struct __go_ptr_type
|
|||||||
const struct __go_type_descriptor *__element_type;
|
const struct __go_type_descriptor *__element_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* A field in a structure. */
|
|
||||||
|
|
||||||
struct __go_struct_field
|
|
||||||
{
|
|
||||||
/* The name of the field--NULL for an anonymous field. */
|
|
||||||
const struct String *__name;
|
|
||||||
|
|
||||||
/* This is NULL for an exported method, or the name of the package
|
|
||||||
where it lives. */
|
|
||||||
const struct String *__pkg_path;
|
|
||||||
|
|
||||||
/* The type of the field. */
|
|
||||||
const struct __go_type_descriptor *__type;
|
|
||||||
|
|
||||||
/* The field tag, or NULL. */
|
|
||||||
const struct String *__tag;
|
|
||||||
|
|
||||||
/* The offset of the field in the struct. */
|
|
||||||
uintptr_t __offset;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* A struct type. */
|
|
||||||
|
|
||||||
struct __go_struct_type
|
|
||||||
{
|
|
||||||
/* Starts like all other type descriptors. */
|
|
||||||
struct __go_type_descriptor __common;
|
|
||||||
|
|
||||||
/* An array of struct __go_struct_field. */
|
|
||||||
struct __go_open_array __fields;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Whether a type descriptor is a pointer. */
|
|
||||||
|
|
||||||
static inline _Bool
|
|
||||||
__go_is_pointer_type (const struct __go_type_descriptor *td)
|
|
||||||
{
|
|
||||||
return ((td->__code & GO_CODE_MASK) == GO_PTR
|
|
||||||
|| (td->__code & GO_CODE_MASK) == GO_UNSAFE_POINTER);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Call a type hash function, given the __hashfn value. */
|
|
||||||
|
|
||||||
static inline uintptr_t
|
|
||||||
__go_call_hashfn (const FuncVal *hashfn, const void *p, uintptr_t seed,
|
|
||||||
uintptr_t size)
|
|
||||||
{
|
|
||||||
uintptr_t (*h) (const void *, uintptr_t, uintptr_t) = (void *) hashfn->fn;
|
|
||||||
return __builtin_call_with_static_chain (h (p, seed, size), hashfn);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Call a type equality function, given the __equalfn value. */
|
|
||||||
|
|
||||||
static inline _Bool
|
|
||||||
__go_call_equalfn (const FuncVal *equalfn, const void *p1, const void *p2,
|
|
||||||
uintptr_t size)
|
|
||||||
{
|
|
||||||
_Bool (*e) (const void *, const void *, uintptr_t) = (void *) equalfn->fn;
|
|
||||||
return __builtin_call_with_static_chain (e (p1, p2, size), equalfn);
|
|
||||||
}
|
|
||||||
|
|
||||||
extern _Bool
|
|
||||||
__go_type_descriptors_equal(const struct __go_type_descriptor*,
|
|
||||||
const struct __go_type_descriptor*);
|
|
||||||
|
|
||||||
#endif /* !defined(LIBGO_GO_TYPE_H) */
|
#endif /* !defined(LIBGO_GO_TYPE_H) */
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
/* go-typedesc-equal.c -- return whether two type descriptors are equal.
|
|
||||||
|
|
||||||
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. */
|
|
||||||
|
|
||||||
#include "runtime.h"
|
|
||||||
#include "go-string.h"
|
|
||||||
#include "go-type.h"
|
|
||||||
|
|
||||||
/* Compare type descriptors for equality. This is necessary because
|
|
||||||
types may have different descriptors in different shared libraries.
|
|
||||||
Also, unnamed types may have multiple type descriptors even in a
|
|
||||||
single shared library. */
|
|
||||||
|
|
||||||
_Bool
|
|
||||||
__go_type_descriptors_equal (const struct __go_type_descriptor *td1,
|
|
||||||
const struct __go_type_descriptor *td2)
|
|
||||||
{
|
|
||||||
if (td1 == td2)
|
|
||||||
return 1;
|
|
||||||
/* In a type switch we can get a NULL descriptor. */
|
|
||||||
if (td1 == NULL || td2 == NULL)
|
|
||||||
return 0;
|
|
||||||
if (td1->__code != td2->__code || td1->__hash != td2->__hash)
|
|
||||||
return 0;
|
|
||||||
return __go_ptr_strings_equal (td1->__reflection, td2->__reflection);
|
|
||||||
}
|
|
@ -78,9 +78,7 @@ typedef struct _panic Panic;
|
|||||||
|
|
||||||
typedef struct __go_ptr_type PtrType;
|
typedef struct __go_ptr_type PtrType;
|
||||||
typedef struct __go_func_type FuncType;
|
typedef struct __go_func_type FuncType;
|
||||||
typedef struct __go_interface_type InterfaceType;
|
|
||||||
typedef struct __go_map_type MapType;
|
typedef struct __go_map_type MapType;
|
||||||
typedef struct __go_channel_type ChanType;
|
|
||||||
|
|
||||||
typedef struct tracebackg Traceback;
|
typedef struct tracebackg Traceback;
|
||||||
|
|
||||||
|
@ -276,7 +276,6 @@ pdfdir = @pdfdir@
|
|||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
psdir = @psdir@
|
psdir = @psdir@
|
||||||
runstatedir = @runstatedir@
|
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
|
Loading…
Reference in New Issue
Block a user