github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/cmd/compile/internal/typecheck/syms.go (about)

     1  // Copyright 2009 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package typecheck
     6  
     7  import (
     8  	"github.com/shogo82148/std/cmd/compile/internal/ir"
     9  	"github.com/shogo82148/std/cmd/compile/internal/types"
    10  	"github.com/shogo82148/std/cmd/internal/obj"
    11  )
    12  
    13  // LookupRuntime returns a function or variable declared in
    14  // _builtin/runtime.go. If types_ is non-empty, successive occurrences
    15  // of the "any" placeholder type will be substituted.
    16  func LookupRuntime(name string, types_ ...*types.Type) *ir.Name
    17  
    18  // AutoLabel generates a new Name node for use with
    19  // an automatically generated label.
    20  // prefix is a short mnemonic (e.g. ".s" for switch)
    21  // to help with debugging.
    22  // It should begin with "." to avoid conflicts with
    23  // user labels.
    24  func AutoLabel(prefix string) *types.Sym
    25  
    26  func Lookup(name string) *types.Sym
    27  
    28  // InitRuntime loads the definitions for the low-level runtime functions,
    29  // so that the compiler can generate calls to them,
    30  // but does not make them visible to user code.
    31  func InitRuntime()
    32  
    33  // LookupRuntimeFunc looks up Go function name in package runtime. This function
    34  // must follow the internal calling convention.
    35  func LookupRuntimeFunc(name string) *obj.LSym
    36  
    37  // LookupRuntimeVar looks up a variable (or assembly function) name in package
    38  // runtime. If this is a function, it may have a special calling
    39  // convention.
    40  func LookupRuntimeVar(name string) *obj.LSym
    41  
    42  // LookupRuntimeABI looks up a name in package runtime using the given ABI.
    43  func LookupRuntimeABI(name string, abi obj.ABI) *obj.LSym
    44  
    45  // InitCoverage loads the definitions for routines called
    46  // by code coverage instrumentation (similar to InitRuntime above).
    47  func InitCoverage()
    48  
    49  // LookupCoverage looks up the Go function 'name' in package
    50  // runtime/coverage. This function must follow the internal calling
    51  // convention.
    52  func LookupCoverage(name string) *ir.Name