summaryrefslogtreecommitdiff
path: root/vendor/github.com/twitchyliquid64/golang-asm/goobj/builtin.go
diff options
context:
space:
mode:
authorLibravatar Terin Stock <terinjokes@gmail.com>2025-03-09 17:47:56 +0100
committerLibravatar Terin Stock <terinjokes@gmail.com>2025-03-10 01:59:49 +0100
commit3ac1ee16f377d31a0fb80c8dae28b6239ac4229e (patch)
treef61faa581feaaeaba2542b9f2b8234a590684413 /vendor/github.com/twitchyliquid64/golang-asm/goobj/builtin.go
parent[chore] update URLs to forked source (diff)
downloadgotosocial-3ac1ee16f377d31a0fb80c8dae28b6239ac4229e.tar.xz
[chore] remove vendor
Diffstat (limited to 'vendor/github.com/twitchyliquid64/golang-asm/goobj/builtin.go')
-rw-r--r--vendor/github.com/twitchyliquid64/golang-asm/goobj/builtin.go45
1 files changed, 0 insertions, 45 deletions
diff --git a/vendor/github.com/twitchyliquid64/golang-asm/goobj/builtin.go b/vendor/github.com/twitchyliquid64/golang-asm/goobj/builtin.go
deleted file mode 100644
index e7d612aeb..000000000
--- a/vendor/github.com/twitchyliquid64/golang-asm/goobj/builtin.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2019 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.
-
-package goobj
-
-// Builtin (compiler-generated) function references appear
-// frequently. We assign special indices for them, so they
-// don't need to be referenced by name.
-
-// NBuiltin returns the number of listed builtin
-// symbols.
-func NBuiltin() int {
- return len(builtins)
-}
-
-// BuiltinName returns the name and ABI of the i-th
-// builtin symbol.
-func BuiltinName(i int) (string, int) {
- return builtins[i].name, builtins[i].abi
-}
-
-// BuiltinIdx returns the index of the builtin with the
-// given name and abi, or -1 if it is not a builtin.
-func BuiltinIdx(name string, abi int) int {
- i, ok := builtinMap[name]
- if !ok {
- return -1
- }
- if builtins[i].abi != abi {
- return -1
- }
- return i
-}
-
-//go:generate go run mkbuiltin.go
-
-var builtinMap map[string]int
-
-func init() {
- builtinMap = make(map[string]int, len(builtins))
- for i, b := range builtins {
- builtinMap[b.name] = i
- }
-}