From dd95a4e3dbe1e060b59840efd7311e8d5e82c08c Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Mon, 14 Jun 2021 16:26:26 -0700 Subject: [dev.typeparams] cmd/compile: simplify SSA devirtualization This CL implements a few improvements to SSA devirtualization to make it simpler and more general: 1. Change reflectdata.ITabAddr to now immediately generate the wrapper functions and write out the itab symbol data. Previously, these were each handled by separate phases later on. 2. Removes the hack in typecheck where we marked itabs that we expected to need later. Instead, the calls to ITabAddr in walk now handle generating the wrappers. 3. Changes the SSA interface call devirtualization algorithm to just use the itab symbol data (namely, its relocations) to figure out what pointer is available in memory at the given offset. This decouples it somewhat from reflectdata. Change-Id: I8fe06922af8f8a1e7c93f5aff2b60ff59b8e7114 Reviewed-on: https://go-review.googlesource.com/c/go/+/327871 Run-TryBot: Matthew Dempsky TryBot-Result: Go Bot Trust: Matthew Dempsky Reviewed-by: Cherry Mui --- src/cmd/compile/internal/typecheck/typecheck.go | 1 - 1 file changed, 1 deletion(-) (limited to 'src/cmd/compile/internal/typecheck/typecheck.go') diff --git a/src/cmd/compile/internal/typecheck/typecheck.go b/src/cmd/compile/internal/typecheck/typecheck.go index 8454b8d5b3..b1a4e193d6 100644 --- a/src/cmd/compile/internal/typecheck/typecheck.go +++ b/src/cmd/compile/internal/typecheck/typecheck.go @@ -24,7 +24,6 @@ var inimport bool // set during import var TypecheckAllowed bool var ( - NeedITab = func(t, itype *types.Type) {} NeedRuntimeType = func(*types.Type) {} ) -- cgit v1.2.3-54-g00ecf