mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
Revert "cmd/compile: constant-fold loads from constant dictionaries and types"
This reverts CL 486895. Reason for revert: This breaks internal tests at Google, see b/280035614. Change-Id: I48772a44f5f6070a7f06b5704e9f9aa272b5f978 Reviewed-on: https://go-review.googlesource.com/c/go/+/490156 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Stapelberg <stapelberg@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Michael Stapelberg <stapelberg@google.com> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
71ad46cd2a
commit
f046180890
6 changed files with 55 additions and 453 deletions
|
|
@ -465,7 +465,7 @@ type LSym struct {
|
|||
P []byte
|
||||
R []Reloc
|
||||
|
||||
Extra *interface{} // *FuncInfo, *FileInfo, or *TypeInfo, if present
|
||||
Extra *interface{} // *FuncInfo or *FileInfo, if present
|
||||
|
||||
Pkg string
|
||||
PkgIdx int32
|
||||
|
|
@ -564,22 +564,6 @@ func (s *LSym) File() *FileInfo {
|
|||
return f
|
||||
}
|
||||
|
||||
// A TypeInfo contains information for a symbol
|
||||
// that contains a runtime._type.
|
||||
type TypeInfo struct {
|
||||
Type interface{} // a *cmd/compile/internal/types.Type
|
||||
}
|
||||
|
||||
func (s *LSym) NewTypeInfo() *TypeInfo {
|
||||
if s.Extra != nil {
|
||||
panic(fmt.Sprintf("invalid use of LSym - NewTypeInfo with Extra of type %T", *s.Extra))
|
||||
}
|
||||
t := new(TypeInfo)
|
||||
s.Extra = new(interface{})
|
||||
*s.Extra = t
|
||||
return t
|
||||
}
|
||||
|
||||
// WasmImport represents a WebAssembly (WASM) imported function with
|
||||
// parameters and results translated into WASM types based on the Go function
|
||||
// declaration.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue