]> Cypherpunks repositories - gostls13.git/commitdiff
internal/abi: repair broken self-bootstrap
authorDavid Chase <drchase@google.com>
Mon, 23 Jan 2023 18:29:32 +0000 (13:29 -0500)
committerDavid Chase <drchase@google.com>
Mon, 23 Jan 2023 19:14:57 +0000 (19:14 +0000)
Fixes bug caused by https://go.dev/cl/462115

Change-Id: Id91a139db827f2962be837b8fd218e7b895ce8b9
Reviewed-on: https://go-review.googlesource.com/c/go/+/463175
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/internal/abi/funcpc.go
src/internal/abi/stub.s [new file with mode: 0644]

index f617e2d757bf5a7f9fb944cea383e0fd5456d19b..4db848ee1590df54a69e06094d4d64f2acecbb6c 100644 (file)
@@ -2,14 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build !compiler_bootstrap
-// +build !compiler_bootstrap
-
 package abi
 
-// The bootstrapping compiler doesn't understand "any" in the function signatures,
-// and also does not implement these intrinsics.
-
 // FuncPC* intrinsics.
 //
 // CAREFUL: In programs with plugins, FuncPC* can return different values
@@ -23,7 +17,7 @@ package abi
 // compile-time error.
 //
 // Implemented as a compile intrinsic.
-func FuncPCABI0(f any) uintptr
+func FuncPCABI0(f interface{}) uintptr
 
 // FuncPCABIInternal returns the entry PC of the function f. If f is a
 // direct reference of a function, it must be defined as ABIInternal.
@@ -32,4 +26,4 @@ func FuncPCABI0(f any) uintptr
 // the behavior is undefined.
 //
 // Implemented as a compile intrinsic.
-func FuncPCABIInternal(f any) uintptr
+func FuncPCABIInternal(f interface{}) uintptr
diff --git a/src/internal/abi/stub.s b/src/internal/abi/stub.s
new file mode 100644 (file)
index 0000000..5bad98d
--- /dev/null
@@ -0,0 +1,7 @@
+// Copyright 2023 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.
+
+// This file silences errors about body-less functions
+// that are provided by intrinsics in the latest version of the compiler,
+// but may not be known to the bootstrap compiler.