From f2772a49353e09e4e00121ca4e538a3b3302a1de Mon Sep 17 00:00:00 2001 From: David Crawshaw Date: Mon, 14 Mar 2016 21:30:43 -0400 Subject: cmd/compile: compute second method type at runtime The type information for a method includes two variants: a func without the receiver, and a func with the receiver as the first parameter. The former is used as part of the dynamic interface checks, but the latter is only returned as a type in the reflect.Method struct. Instead of computing it at compile time, construct it at run time with reflect.FuncOf. Using cl/20701 as a baseline, cmd/go: -480KB, (4.4%) jujud: -5.6MB, (7.8%) For #6853. Change-Id: I1b8c73f3ab894735f53d00cb9c0b506d84d54e92 Reviewed-on: https://go-review.googlesource.com/20709 Run-TryBot: David Crawshaw TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- src/runtime/type.go | 1 - 1 file changed, 1 deletion(-) (limited to 'src/runtime') diff --git a/src/runtime/type.go b/src/runtime/type.go index c504e2d294..c7f11d68c2 100644 --- a/src/runtime/type.go +++ b/src/runtime/type.go @@ -155,7 +155,6 @@ type method struct { name *string pkgpath *string mtyp *_type - typ *_type ifn unsafe.Pointer tfn unsafe.Pointer } -- cgit v1.3