Replace compiler hack for sync package with //go:linkname
Этот коммит содержится в:
родитель
74bd378c29
коммит
674b506bb2
2 изменённых файлов: 13 добавлений и 5 удалений
|
@ -1325,11 +1325,6 @@ func (c *Compiler) parseBuiltin(frame *Frame, args []ssa.Value, callName string)
|
|||
}
|
||||
|
||||
func (c *Compiler) parseFunctionCall(frame *Frame, args []ssa.Value, llvmFn llvm.Value, blocking bool, parentHandle llvm.Value) (llvm.Value, error) {
|
||||
if llvmFn.Name() == "sync.runtime_registerPoolCleanup" || llvmFn.Name() == "sync.runtime_notifyListCheck" {
|
||||
// Ignore these functions calls for now, as a hack.
|
||||
// TODO: implement //go:linkname.
|
||||
return llvm.Value{}, nil
|
||||
}
|
||||
var params []llvm.Value
|
||||
if blocking {
|
||||
if parentHandle.IsNil() {
|
||||
|
|
13
src/runtime/sync.go
Обычный файл
13
src/runtime/sync.go
Обычный файл
|
@ -0,0 +1,13 @@
|
|||
package runtime
|
||||
|
||||
// This file contains support code for the sync package.
|
||||
|
||||
//go:linkname registerPoolCleanup sync.runtime_registerPoolCleanup
|
||||
func registerPoolCleanup(cleanup func()) {
|
||||
// Ignore.
|
||||
}
|
||||
|
||||
//go:linkname notifyListCheck sync.runtime_notifyListCheck
|
||||
func notifyListCheck(size uintptr) {
|
||||
// Ignore.
|
||||
}
|
Загрузка…
Создание таблицы
Сослаться в новой задаче