update modernc.org/sqlite to v1.37.0-concurrrency-workaround (#3958)

This commit is contained in:
kim
2025-04-01 15:24:11 +00:00
committed by GitHub
parent 9c31e213ca
commit fdf23a91de
64 changed files with 1070 additions and 8220 deletions

12
go.mod
View File

@@ -8,7 +8,7 @@ toolchain go1.23.3
replace github.com/go-swagger/go-swagger => codeberg.org/superseriousbusiness/go-swagger v0.31.0-gts-go1.23-fix
// Replace modernc/sqlite with our version that fixes the concurrency INTERRUPT issue
replace modernc.org/sqlite => gitlab.com/NyaaaWhatsUpDoc/sqlite v1.36.2-concurrency-workaround
replace modernc.org/sqlite => gitlab.com/NyaaaWhatsUpDoc/sqlite v1.37.0-concurrency-workaround
require (
codeberg.org/gruf/go-bytes v1.0.2
@@ -211,16 +211,16 @@ require (
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/arch v0.13.0 // indirect
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
golang.org/x/mod v0.23.0 // indirect
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect
golang.org/x/mod v0.24.0 // indirect
golang.org/x/sync v0.12.0 // indirect
golang.org/x/tools v0.30.0 // indirect
golang.org/x/tools v0.31.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a // indirect
google.golang.org/grpc v1.71.0 // indirect
google.golang.org/protobuf v1.36.5 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
modernc.org/libc v1.61.13 // indirect
modernc.org/libc v1.62.1 // indirect
modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.8.2 // indirect
modernc.org/memory v1.9.1 // indirect
)

36
go.sum generated
View File

@@ -483,8 +483,8 @@ github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDf
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yuin/goldmark v1.7.8 h1:iERMLn0/QJeHFhxSt3p6PeN9mGnvIKSpG9YYorDMnic=
github.com/yuin/goldmark v1.7.8/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
gitlab.com/NyaaaWhatsUpDoc/sqlite v1.36.2-concurrency-workaround h1:1NAPhEPvJJbD+qwXi+IWtfvntCZRWF9frtqeQLtf+TE=
gitlab.com/NyaaaWhatsUpDoc/sqlite v1.36.2-concurrency-workaround/go.mod h1:ADySlx7K4FdY5MaJcEv86hTJ0PjedAloTUuif0YS3ws=
gitlab.com/NyaaaWhatsUpDoc/sqlite v1.37.0-concurrency-workaround h1:QbfrBqNKgAFSSK89fYf547vxDQuz8p6iJUzzAMrusNk=
gitlab.com/NyaaaWhatsUpDoc/sqlite v1.37.0-concurrency-workaround/go.mod h1:5YiWv+YviqGMuGw4V+PNplcyaJ5v+vQd7TQOgkACoJM=
go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80=
go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c=
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
@@ -527,8 +527,8 @@ golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34=
golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc=
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ=
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 h1:nDVHiLt8aIbd/VzvPWN6kSOPE7+F/fNFDSXLVYkE/Iw=
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394/go.mod h1:sIifuuw/Yco/y6yb6+bDNfyeQ/MdPUy/hKEMYQV17cM=
golang.org/x/image v0.24.0 h1:AN7zRgVsbvmTfNyqIbbOraYL8mSwcKncEj8ofjgzcMQ=
golang.org/x/image v0.24.0/go.mod h1:4b/ITuLfqYq1hqZcjofwctIhi7sZh2WaCjvsBNjjya8=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
@@ -536,8 +536,8 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM=
golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
@@ -616,8 +616,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY=
golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY=
golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU=
golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a h1:nwKuGPlUAt+aR+pcrkfFRrTU1BVrSmYyYMxYbUIVHr0=
google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a/go.mod h1:3kWAYMk1I75K4vykHtKt2ycnOgpA6974V7bREqbsenU=
@@ -640,20 +640,20 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
modernc.org/cc/v4 v4.24.4 h1:TFkx1s6dCkQpd6dKurBNmpo+G8Zl4Sq/ztJ+2+DEsh0=
modernc.org/cc/v4 v4.24.4/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0=
modernc.org/ccgo/v4 v4.23.16 h1:Z2N+kk38b7SfySC1ZkpGLN2vthNJP1+ZzGZIlH7uBxo=
modernc.org/ccgo/v4 v4.23.16/go.mod h1:nNma8goMTY7aQZQNTyN9AIoJfxav4nvTnvKThAeMDdo=
modernc.org/cc/v4 v4.25.2 h1:T2oH7sZdGvTaie0BRNFbIYsabzCxUQg8nLqCdQ2i0ic=
modernc.org/cc/v4 v4.25.2/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0=
modernc.org/ccgo/v4 v4.25.1 h1:TFSzPrAGmDsdnhT9X2UrcPMI3N/mJ9/X9ykKXwLhDsU=
modernc.org/ccgo/v4 v4.25.1/go.mod h1:njjuAYiPflywOOrm3B7kCB444ONP5pAVr8PIEoE0uDw=
modernc.org/fileutil v1.3.0 h1:gQ5SIzK3H9kdfai/5x41oQiKValumqNTDXMvKo62HvE=
modernc.org/fileutil v1.3.0/go.mod h1:XatxS8fZi3pS8/hKG2GH/ArUogfxjpEKs3Ku3aK4JyQ=
modernc.org/gc/v2 v2.6.3 h1:aJVhcqAte49LF+mGveZ5KPlsp4tdGdAOT4sipJXADjw=
modernc.org/gc/v2 v2.6.3/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito=
modernc.org/libc v1.61.13 h1:3LRd6ZO1ezsFiX1y+bHd1ipyEHIJKvuprv0sLTBwLW8=
modernc.org/libc v1.61.13/go.mod h1:8F/uJWL/3nNil0Lgt1Dpz+GgkApWh04N3el3hxJcA6E=
modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI=
modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito=
modernc.org/libc v1.62.1 h1:s0+fv5E3FymN8eJVmnk0llBe6rOxCu/DEU+XygRbS8s=
modernc.org/libc v1.62.1/go.mod h1:iXhATfJQLjG3NWy56a6WVU73lWOcdYVxsvwCgoPljuo=
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
modernc.org/memory v1.8.2 h1:cL9L4bcoAObu4NkxOlKWBWtNHIsnnACGF/TbqQ6sbcI=
modernc.org/memory v1.8.2/go.mod h1:ZbjSvMO5NQ1A2i3bWeDiVMxIorXwdClKE/0SZ+BMotU=
modernc.org/memory v1.9.1 h1:V/Z1solwAVmMW1yttq3nDdZPJqV1rM05Ccq6KMSZ34g=
modernc.org/memory v1.9.1/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
modernc.org/opt v0.1.4 h1:2kNGMRiUjrp4LcaPuLY2PzUfqM/w9N23quVwhKt5Qm8=
modernc.org/opt v0.1.4/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns=
modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w=

4
vendor/golang.org/x/exp/LICENSE generated vendored
View File

@@ -1,4 +1,4 @@
Copyright (c) 2009 The Go Authors. All rights reserved.
Copyright 2009 The Go Authors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
* Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

View File

@@ -6,6 +6,8 @@
// with type parameters.
package constraints
import "cmp"
// Signed is a constraint that permits any signed integer type.
// If future releases of Go add new predeclared signed integer types,
// this constraint will be modified to include them.
@@ -45,6 +47,8 @@ type Complex interface {
// that supports the operators < <= >= >.
// If future releases of Go add new ordered types,
// this constraint will be modified to include them.
type Ordered interface {
Integer | Float | ~string
}
//
// This type is redundant since Go 1.21 introduced [cmp.Ordered].
//
//go:fix inline
type Ordered = cmp.Ordered

View File

@@ -183,7 +183,7 @@ type application struct {
func (a *application) apply(parent ast.Node, name string, iter *iterator, n ast.Node) {
// convert typed nil into untyped nil
if v := reflect.ValueOf(n); v.Kind() == reflect.Ptr && v.IsNil() {
if v := reflect.ValueOf(n); v.Kind() == reflect.Pointer && v.IsNil() {
n = nil
}

View File

@@ -8,4 +8,6 @@ import "go/ast"
// Unparen returns e with any enclosing parentheses stripped.
// Deprecated: use [ast.Unparen].
//
//go:fix inline
func Unparen(e ast.Expr) ast.Expr { return ast.Unparen(e) }

View File

@@ -141,6 +141,8 @@ const (
LoadAllSyntax = LoadSyntax | NeedDeps
// Deprecated: NeedExportsFile is a historical misspelling of NeedExportFile.
//
//go:fix inline
NeedExportsFile = NeedExportFile
)
@@ -161,7 +163,7 @@ type Config struct {
// If the user provides a logger, debug logging is enabled.
// If the GOPACKAGESDEBUG environment variable is set to true,
// but the logger is nil, default to log.Printf.
Logf func(format string, args ...interface{})
Logf func(format string, args ...any)
// Dir is the directory in which to run the build system's query tool
// that provides information about the packages.
@@ -564,13 +566,13 @@ type ModuleError struct {
}
func init() {
packagesinternal.GetDepsErrors = func(p interface{}) []*packagesinternal.PackageError {
packagesinternal.GetDepsErrors = func(p any) []*packagesinternal.PackageError {
return p.(*Package).depsErrors
}
packagesinternal.SetModFile = func(config interface{}, value string) {
packagesinternal.SetModFile = func(config any, value string) {
config.(*Config).modFile = value
}
packagesinternal.SetModFlag = func(config interface{}, value string) {
packagesinternal.SetModFlag = func(config any, value string) {
config.(*Config).modFlag = value
}
packagesinternal.TypecheckCgo = int(typecheckCgo)
@@ -739,7 +741,7 @@ func newLoader(cfg *Config) *loader {
if debug {
ld.Config.Logf = log.Printf
} else {
ld.Config.Logf = func(format string, args ...interface{}) {}
ld.Config.Logf = func(format string, args ...any) {}
}
}
if ld.Config.Mode == 0 {

View File

@@ -389,8 +389,13 @@ func (hasher) hashTypeName(tname *types.TypeName) uint32 {
// path, and whether or not it is a package-level typename. It
// is rare for a package to define multiple local types with
// the same name.)
hash := uintptr(unsafe.Pointer(tname))
return uint32(hash ^ (hash >> 32))
ptr := uintptr(unsafe.Pointer(tname))
if unsafe.Sizeof(ptr) == 8 {
hash := uint64(ptr)
return uint32(hash ^ (hash >> 32))
} else {
return uint32(ptr)
}
}
// shallowHash computes a hash of t without looking at any of its

View File

@@ -32,7 +32,7 @@ func (k *Value) Format(w io.Writer, buf []byte, l label.Label) {
}
// Get can be used to get a label for the key from a label.Map.
func (k *Value) Get(lm label.Map) interface{} {
func (k *Value) Get(lm label.Map) any {
if t := lm.Find(k); t.Valid() {
return k.From(t)
}
@@ -40,10 +40,10 @@ func (k *Value) Get(lm label.Map) interface{} {
}
// From can be used to get a value from a Label.
func (k *Value) From(t label.Label) interface{} { return t.UnpackValue() }
func (k *Value) From(t label.Label) any { return t.UnpackValue() }
// Of creates a new Label with this key and the supplied value.
func (k *Value) Of(value interface{}) label.Label { return label.OfValue(k, value) }
func (k *Value) Of(value any) label.Label { return label.OfValue(k, value) }
// Tag represents a key for tagging labels that have no value.
// These are used when the existence of the label is the entire information it

View File

@@ -32,7 +32,7 @@ type Key interface {
type Label struct {
key Key
packed uint64
untyped interface{}
untyped any
}
// Map is the interface to a collection of Labels indexed by key.
@@ -76,13 +76,13 @@ type mapChain struct {
// OfValue creates a new label from the key and value.
// This method is for implementing new key types, label creation should
// normally be done with the Of method of the key.
func OfValue(k Key, value interface{}) Label { return Label{key: k, untyped: value} }
func OfValue(k Key, value any) Label { return Label{key: k, untyped: value} }
// UnpackValue assumes the label was built using LabelOfValue and returns the value
// that was passed to that constructor.
// This method is for implementing new key types, for type safety normal
// access should be done with the From method of the key.
func (t Label) UnpackValue() interface{} { return t.untyped }
func (t Label) UnpackValue() any { return t.untyped }
// Of64 creates a new label from a key and a uint64. This is often
// used for non uint64 values that can be packed into a uint64.

View File

@@ -14,7 +14,7 @@ import (
"sync"
)
func errorf(format string, args ...interface{}) {
func errorf(format string, args ...any) {
panic(fmt.Sprintf(format, args...))
}

View File

@@ -310,7 +310,7 @@ func IImportShallow(fset *token.FileSet, getPackages GetPackagesFunc, data []byt
}
// ReportFunc is the type of a function used to report formatted bugs.
type ReportFunc = func(string, ...interface{})
type ReportFunc = func(string, ...any)
// Current bundled export format version. Increase with each format change.
// 0: initial implementation
@@ -597,7 +597,7 @@ type filePositions struct {
needed []uint64 // unordered list of needed file offsets
}
func (p *iexporter) trace(format string, args ...interface{}) {
func (p *iexporter) trace(format string, args ...any) {
if !trace {
// Call sites should also be guarded, but having this check here allows
// easily enabling/disabling debug trace statements.
@@ -1583,6 +1583,6 @@ func (e internalError) Error() string { return "gcimporter: " + string(e) }
// "internalErrorf" as the former is used for bugs, whose cause is
// internal inconsistency, whereas the latter is used for ordinary
// situations like bad input, whose cause is external.
func internalErrorf(format string, args ...interface{}) error {
func internalErrorf(format string, args ...any) error {
return internalError(fmt.Sprintf(format, args...))
}

View File

@@ -400,7 +400,7 @@ type iimporter struct {
indent int // for tracing support
}
func (p *iimporter) trace(format string, args ...interface{}) {
func (p *iimporter) trace(format string, args ...any) {
if !trace {
// Call sites should also be guarded, but having this check here allows
// easily enabling/disabling debug trace statements.

View File

@@ -574,7 +574,7 @@ func (pr *pkgReader) objIdx(idx pkgbits.Index) (*types.Package, string) {
recv := types.NewVar(fn.Pos(), fn.Pkg(), "", named)
typesinternal.SetVarKind(recv, typesinternal.RecvVar)
methods[i] = types.NewFunc(fn.Pos(), fn.Pkg(), fn.Name(), types.NewSignature(recv, sig.Params(), sig.Results(), sig.Variadic()))
methods[i] = types.NewFunc(fn.Pos(), fn.Pkg(), fn.Name(), types.NewSignatureType(recv, nil, nil, sig.Params(), sig.Results(), sig.Variadic()))
}
embeds := make([]types.Type, iface.NumEmbeddeds())

View File

@@ -22,7 +22,7 @@ import (
// Options controls the behavior of a Walk call.
type Options struct {
// If Logf is non-nil, debug logging is enabled through this function.
Logf func(format string, args ...interface{})
Logf func(format string, args ...any)
// Search module caches. Also disables legacy goimports ignore rules.
ModulesEnabled bool
@@ -81,7 +81,7 @@ func WalkSkip(roots []Root, add func(root Root, dir string), skip func(root Root
// walkDir creates a walker and starts fastwalk with this walker.
func walkDir(root Root, add func(Root, string), skip func(root Root, dir string) bool, opts Options) {
if opts.Logf == nil {
opts.Logf = func(format string, args ...interface{}) {}
opts.Logf = func(format string, args ...any) {}
}
if _, err := os.Stat(root.Path); os.IsNotExist(err) {
opts.Logf("skipping nonexistent directory: %v", root.Path)

View File

@@ -559,7 +559,7 @@ func fixImportsDefault(fset *token.FileSet, f *ast.File, filename string, env *P
return err
}
apply(fset, f, fixes)
return err
return nil
}
// getFixes gets the import fixes that need to be made to f in order to fix the imports.
@@ -1030,7 +1030,7 @@ func (e *ProcessEnv) GetResolver() (Resolver, error) {
//
// For gopls, we can optionally explicitly choose a resolver type, since we
// already know the view type.
if len(e.Env["GOMOD"]) == 0 && len(e.Env["GOWORK"]) == 0 {
if e.Env["GOMOD"] == "" && (e.Env["GOWORK"] == "" || e.Env["GOWORK"] == "off") {
e.resolver = newGopathResolver(e)
e.logf("created gopath resolver")
} else if r, err := newModuleResolver(e, e.ModCache); err != nil {

View File

@@ -17,4 +17,4 @@ var TypecheckCgo int
var DepsErrors int // must be set as a LoadMode to call GetDepsErrors
var SetModFlag = func(config any, value string) {}
var SetModFile = func(config interface{}, value string) {}
var SetModFile = func(config any, value string) {}

359
vendor/golang.org/x/tools/internal/stdlib/deps.go generated vendored Normal file
View File

@@ -0,0 +1,359 @@
// Copyright 2025 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.
// Code generated by generate.go. DO NOT EDIT.
package stdlib
type pkginfo struct {
name string
deps string // list of indices of dependencies, as varint-encoded deltas
}
var deps = [...]pkginfo{
{"archive/tar", "\x03k\x03E5\x01\v\x01#\x01\x01\x02\x05\t\x02\x01\x02\x02\v"},
{"archive/zip", "\x02\x04a\a\x16\x0205\x01+\x05\x01\x10\x03\x02\r\x04"},
{"bufio", "\x03k}E\x13"},
{"bytes", "n+R\x03\fG\x02\x02"},
{"cmp", ""},
{"compress/bzip2", "\x02\x02\xe7\x01B"},
{"compress/flate", "\x02l\x03z\r\x024\x01\x03"},
{"compress/gzip", "\x02\x04a\a\x03\x15eT"},
{"compress/lzw", "\x02l\x03z"},
{"compress/zlib", "\x02\x04a\a\x03\x13\x01f"},
{"container/heap", "\xae\x02"},
{"container/list", ""},
{"container/ring", ""},
{"context", "n\\h\x01\f"},
{"crypto", "\x84\x01gD"},
{"crypto/aes", "\x10\n\a\x8e\x02"},
{"crypto/cipher", "\x03\x1e\x01\x01\x1d\x11\x1d,Q"},
{"crypto/des", "\x10\x13\x1d.,\x95\x01\x03"},
{"crypto/dsa", "@\x04*}\x0e"},
{"crypto/ecdh", "\x03\v\f\x0e\x04\x14\x04\r\x1d}"},
{"crypto/ecdsa", "\x0e\x05\x03\x04\x01\x0e\x16\x01\x04\f\x01\x1d}\x0e\x04K\x01"},
{"crypto/ed25519", "\x0e\x1c\x16\n\a\x1d}D"},
{"crypto/elliptic", "0>}\x0e9"},
{"crypto/fips140", " \x05\x91\x01"},
{"crypto/hkdf", "-\x12\x01.\x16"},
{"crypto/hmac", "\x1a\x14\x11\x01\x113"},
{"crypto/internal/boring", "\x0e\x02\rg"},
{"crypto/internal/boring/bbig", "\x1a\xdf\x01L"},
{"crypto/internal/boring/bcache", "\xb3\x02\x12"},
{"crypto/internal/boring/sig", ""},
{"crypto/internal/cryptotest", "\x03\r\n)\x0e\x1a\x06\x13\x12#\a\t\x11\x11\x11\x1b\x01\f\f\x05\n"},
{"crypto/internal/entropy", "E"},
{"crypto/internal/fips140", ">0}9\f\x15"},
{"crypto/internal/fips140/aes", "\x03\x1d\x03\x02\x13\x04\x01\x01\x05+\x8c\x015"},
{"crypto/internal/fips140/aes/gcm", " \x01\x02\x02\x02\x11\x04\x01\x06+\x8a\x01"},
{"crypto/internal/fips140/alias", "\xc5\x02"},
{"crypto/internal/fips140/bigmod", "%\x17\x01\x06+\x8c\x01"},
{"crypto/internal/fips140/check", " \x0e\x06\b\x02\xad\x01Z"},
{"crypto/internal/fips140/check/checktest", "%\xff\x01!"},
{"crypto/internal/fips140/drbg", "\x03\x1c\x01\x01\x04\x13\x04\b\x01)}\x0f8"},
{"crypto/internal/fips140/ecdh", "\x03\x1d\x05\x02\t\f2}\x0f8"},
{"crypto/internal/fips140/ecdsa", "\x03\x1d\x04\x01\x02\a\x02\x068}G"},
{"crypto/internal/fips140/ed25519", "\x03\x1d\x05\x02\x04\v8\xc1\x01\x03"},
{"crypto/internal/fips140/edwards25519", "%\a\f\x042\x8c\x018"},
{"crypto/internal/fips140/edwards25519/field", "%\x13\x042\x8c\x01"},
{"crypto/internal/fips140/hkdf", "\x03\x1d\x05\t\x06:"},
{"crypto/internal/fips140/hmac", "\x03\x1d\x14\x01\x018"},
{"crypto/internal/fips140/mlkem", "\x03\x1d\x05\x02\x0e\x03\x042"},
{"crypto/internal/fips140/nistec", "%\f\a\x042\x8c\x01*\x0e\x13"},
{"crypto/internal/fips140/nistec/fiat", "%\x136\x8c\x01"},
{"crypto/internal/fips140/pbkdf2", "\x03\x1d\x05\t\x06:"},
{"crypto/internal/fips140/rsa", "\x03\x1d\x04\x01\x02\r\x01\x01\x026}G"},
{"crypto/internal/fips140/sha256", "\x03\x1d\x1c\x01\x06+\x8c\x01"},
{"crypto/internal/fips140/sha3", "\x03\x1d\x18\x04\x011\x8c\x01K"},
{"crypto/internal/fips140/sha512", "\x03\x1d\x1c\x01\x06+\x8c\x01"},
{"crypto/internal/fips140/ssh", " \x05"},
{"crypto/internal/fips140/subtle", "#\x19\xbe\x01"},
{"crypto/internal/fips140/tls12", "\x03\x1d\x05\t\x06\x028"},
{"crypto/internal/fips140/tls13", "\x03\x1d\x05\b\a\b2"},
{"crypto/internal/fips140deps", ""},
{"crypto/internal/fips140deps/byteorder", "\x9a\x01"},
{"crypto/internal/fips140deps/cpu", "\xae\x01\a"},
{"crypto/internal/fips140deps/godebug", "\xb6\x01"},
{"crypto/internal/fips140hash", "5\x1a5\xc1\x01"},
{"crypto/internal/fips140only", "'\r\x01\x01N25"},
{"crypto/internal/fips140test", ""},
{"crypto/internal/hpke", "\x0e\x01\x01\x03\x1a\x1d$,`M"},
{"crypto/internal/impl", "\xb0\x02"},
{"crypto/internal/randutil", "\xeb\x01\x12"},
{"crypto/internal/sysrand", "\xd7\x01@\x1b\x01\f\x06"},
{"crypto/internal/sysrand/internal/seccomp", "n"},
{"crypto/md5", "\x0e2.\x16\x16`"},
{"crypto/mlkem", "/"},
{"crypto/pbkdf2", "2\r\x01.\x16"},
{"crypto/rand", "\x1a\x06\a\x19\x04\x01)}\x0eL"},
{"crypto/rc4", "#\x1d.\xc1\x01"},
{"crypto/rsa", "\x0e\f\x01\t\x0f\f\x01\x04\x06\a\x1d\x03\x1325\r\x01"},
{"crypto/sha1", "\x0e\f&.\x16\x16\x14L"},
{"crypto/sha256", "\x0e\f\x1aP"},
{"crypto/sha3", "\x0e'O\xc1\x01"},
{"crypto/sha512", "\x0e\f\x1cN"},
{"crypto/subtle", "8\x98\x01T"},
{"crypto/tls", "\x03\b\x02\x01\x01\x01\x01\x02\x01\x01\x01\x03\x01\a\x01\v\x02\n\x01\b\x05\x03\x01\x01\x01\x01\x02\x01\x02\x01\x18\x02\x03\x13\x16\x14\b5\x16\x16\r\t\x01\x01\x01\x02\x01\f\x06\x02\x01"},
{"crypto/tls/internal/fips140tls", " \x93\x02"},
{"crypto/x509", "\x03\v\x01\x01\x01\x01\x01\x01\x01\x011\x03\x02\x01\x01\x02\x05\x01\x0e\x06\x02\x02\x03E5\x03\t\x01\x01\x01\a\x10\x05\t\x05\v\x01\x02\r\x02\x01\x01\x02\x03\x01"},
{"crypto/x509/internal/macos", "\x03k'\x8f\x01\v\x10\x06"},
{"crypto/x509/pkix", "d\x06\a\x88\x01F"},
{"database/sql", "\x03\nK\x16\x03z\f\x06\"\x05\t\x02\x03\x01\f\x02\x02\x02"},
{"database/sql/driver", "\ra\x03\xae\x01\x10\x10"},
{"debug/buildinfo", "\x03X\x02\x01\x01\b\a\x03`\x18\x02\x01+\x10\x1e"},
{"debug/dwarf", "\x03d\a\x03z1\x12\x01\x01"},
{"debug/elf", "\x03\x06Q\r\a\x03`\x19\x01,\x18\x01\x15"},
{"debug/gosym", "\x03d\n\xbd\x01\x01\x01\x02"},
{"debug/macho", "\x03\x06Q\r\n`\x1a,\x18\x01"},
{"debug/pe", "\x03\x06Q\r\a\x03`\x1a,\x18\x01\x15"},
{"debug/plan9obj", "g\a\x03`\x1a,"},
{"embed", "n+:\x18\x01S"},
{"embed/internal/embedtest", ""},
{"encoding", ""},
{"encoding/ascii85", "\xeb\x01D"},
{"encoding/asn1", "\x03k\x03\x87\x01\x01&\x0e\x02\x01\x0f\x03\x01"},
{"encoding/base32", "\xeb\x01B\x02"},
{"encoding/base64", "\x9a\x01QB\x02"},
{"encoding/binary", "n}\r'\x0e\x05"},
{"encoding/csv", "\x02\x01k\x03zE\x11\x02"},
{"encoding/gob", "\x02`\x05\a\x03`\x1a\f\x01\x02\x1d\b\x13\x01\x0e\x02"},
{"encoding/hex", "n\x03zB\x03"},
{"encoding/json", "\x03\x01^\x04\b\x03z\r'\x0e\x02\x01\x02\x0f\x01\x01\x02"},
{"encoding/pem", "\x03c\b}B\x03"},
{"encoding/xml", "\x02\x01_\f\x03z4\x05\v\x01\x02\x0f\x02"},
{"errors", "\xca\x01{"},
{"expvar", "kK9\t\n\x15\r\t\x02\x03\x01\x10"},
{"flag", "b\f\x03z,\b\x05\t\x02\x01\x0f"},
{"fmt", "nE8\r\x1f\b\x0e\x02\x03\x11"},
{"go/ast", "\x03\x01m\x0f\x01j\x03)\b\x0e\x02\x01"},
{"go/ast/internal/tests", ""},
{"go/build", "\x02\x01k\x03\x01\x03\x02\a\x02\x01\x17\x1e\x04\x02\t\x14\x12\x01+\x01\x04\x01\a\t\x02\x01\x11\x02\x02"},
{"go/build/constraint", "n\xc1\x01\x01\x11\x02"},
{"go/constant", "q\x10w\x01\x015\x01\x02\x11"},
{"go/doc", "\x04m\x01\x06\t=-1\x11\x02\x01\x11\x02"},
{"go/doc/comment", "\x03n\xbc\x01\x01\x01\x01\x11\x02"},
{"go/format", "\x03n\x01\f\x01\x02jE"},
{"go/importer", "t\a\x01\x01\x04\x01i9"},
{"go/internal/gccgoimporter", "\x02\x01X\x13\x03\x05\v\x01g\x02,\x01\x05\x12\x01\v\b"},
{"go/internal/gcimporter", "\x02o\x10\x01/\x05\x0e',\x16\x03\x02"},
{"go/internal/srcimporter", "q\x01\x02\n\x03\x01i,\x01\x05\x13\x02\x13"},
{"go/parser", "\x03k\x03\x01\x03\v\x01j\x01+\x06\x13"},
{"go/printer", "q\x01\x03\x03\tj\r\x1f\x16\x02\x01\x02\n\x05\x02"},
{"go/scanner", "\x03n\x10j2\x11\x01\x12\x02"},
{"go/token", "\x04m\xbc\x01\x02\x03\x01\x0e\x02"},
{"go/types", "\x03\x01\x06d\x03\x01\x04\b\x03\x02\x15\x1e\x06+\x04\x03\n%\a\t\x01\x01\x01\x02\x01\x0e\x02\x02"},
{"go/version", "\xbb\x01u"},
{"hash", "\xeb\x01"},
{"hash/adler32", "n\x16\x16"},
{"hash/crc32", "n\x16\x16\x14\x84\x01\x01"},
{"hash/crc64", "n\x16\x16\x98\x01"},
{"hash/fnv", "n\x16\x16`"},
{"hash/maphash", "\x95\x01\x05\x1b\x03@M"},
{"html", "\xb0\x02\x02\x11"},
{"html/template", "\x03h\x06\x19,5\x01\v \x05\x01\x02\x03\r\x01\x02\v\x01\x03\x02"},
{"image", "\x02l\x1f^\x0f5\x03\x01"},
{"image/color", ""},
{"image/color/palette", "\x8d\x01"},
{"image/draw", "\x8c\x01\x01\x04"},
{"image/gif", "\x02\x01\x05f\x03\x1b\x01\x01\x01\vQ"},
{"image/internal/imageutil", "\x8c\x01"},
{"image/jpeg", "\x02l\x1e\x01\x04Z"},
{"image/png", "\x02\a^\n\x13\x02\x06\x01^D"},
{"index/suffixarray", "\x03d\a}\r*\v\x01"},
{"internal/abi", "\xb5\x01\x90\x01"},
{"internal/asan", "\xc5\x02"},
{"internal/bisect", "\xa4\x02\x0e\x01"},
{"internal/buildcfg", "qG_\x06\x02\x05\v\x01"},
{"internal/bytealg", "\xae\x01\x97\x01"},
{"internal/byteorder", ""},
{"internal/cfg", ""},
{"internal/chacha8rand", "\x9a\x01\x1b\x90\x01"},
{"internal/copyright", ""},
{"internal/coverage", ""},
{"internal/coverage/calloc", ""},
{"internal/coverage/cfile", "k\x06\x17\x16\x01\x02\x01\x01\x01\x01\x01\x01\x01$\x01\x1e,\x06\a\v\x01\x03\f\x06"},
{"internal/coverage/cformat", "\x04m-\x04I\f6\x01\x02\f"},
{"internal/coverage/cmerge", "q-Z"},
{"internal/coverage/decodecounter", "g\n-\v\x02@,\x18\x16"},
{"internal/coverage/decodemeta", "\x02e\n\x17\x16\v\x02@,"},
{"internal/coverage/encodecounter", "\x02e\n-\f\x01\x02>\f \x16"},
{"internal/coverage/encodemeta", "\x02\x01d\n\x13\x04\x16\r\x02>,."},
{"internal/coverage/pods", "\x04m-y\x06\x05\v\x02\x01"},
{"internal/coverage/rtcov", "\xc5\x02"},
{"internal/coverage/slicereader", "g\nzZ"},
{"internal/coverage/slicewriter", "qz"},
{"internal/coverage/stringtab", "q8\x04>"},
{"internal/coverage/test", ""},
{"internal/coverage/uleb128", ""},
{"internal/cpu", "\xc5\x02"},
{"internal/dag", "\x04m\xbc\x01\x03"},
{"internal/diff", "\x03n\xbd\x01\x02"},
{"internal/exportdata", "\x02\x01k\x03\x03]\x1a,\x01\x05\x12\x01\x02"},
{"internal/filepathlite", "n+:\x19A"},
{"internal/fmtsort", "\x04\x9b\x02\x0e"},
{"internal/fuzz", "\x03\nA\x19\x04\x03\x03\x01\f\x0355\r\x02\x1d\x01\x05\x02\x05\v\x01\x02\x01\x01\v\x04\x02"},
{"internal/goarch", ""},
{"internal/godebug", "\x97\x01 {\x01\x12"},
{"internal/godebugs", ""},
{"internal/goexperiment", ""},
{"internal/goos", ""},
{"internal/goroot", "\x97\x02\x01\x05\x13\x02"},
{"internal/gover", "\x04"},
{"internal/goversion", ""},
{"internal/itoa", ""},
{"internal/lazyregexp", "\x97\x02\v\x0e\x02"},
{"internal/lazytemplate", "\xeb\x01,\x19\x02\v"},
{"internal/msan", "\xc5\x02"},
{"internal/nettrace", ""},
{"internal/obscuretestdata", "f\x85\x01,"},
{"internal/oserror", "n"},
{"internal/pkgbits", "\x03K\x19\a\x03\x05\vj\x0e\x1e\r\v\x01"},
{"internal/platform", ""},
{"internal/poll", "nO\x1a\x149\x0e\x01\x01\v\x06"},
{"internal/profile", "\x03\x04g\x03z7\f\x01\x01\x0f"},
{"internal/profilerecord", ""},
{"internal/race", "\x95\x01\xb0\x01"},
{"internal/reflectlite", "\x95\x01 3<!"},
{"internal/routebsd", "n,w\x13\x10\x11"},
{"internal/runtime/atomic", "\xae\x01\x97\x01"},
{"internal/runtime/exithook", "\xcc\x01y"},
{"internal/runtime/maps", "\x95\x01\x01\x1f\v\t\x06\x01u"},
{"internal/runtime/math", "\xb5\x01"},
{"internal/runtime/sys", "\xae\x01\a\x04"},
{"internal/saferio", "\xeb\x01Z"},
{"internal/singleflight", "\xb2\x02"},
{"internal/stringslite", "\x99\x01\xac\x01"},
{"internal/sync", "\x95\x01 \x14j\x12"},
{"internal/synctest", "\xc5\x02"},
{"internal/syscall/execenv", "\xb4\x02"},
{"internal/syscall/unix", "\x95\x01\x8f\x01\x10\x11"},
{"internal/sysinfo", "\xae\x01\x84\x01\x02"},
{"internal/syslist", ""},
{"internal/testenv", "\x03\na\x02\x01*\x1a\x10'+\x01\x05\a\v\x01\x02\x02\x01\n"},
{"internal/testlog", "\xb2\x02\x01\x12"},
{"internal/testpty", "n\x03f@\x1d"},
{"internal/trace", "\x02\x01\x01\x06]\a\x03n\x03\x03\x06\x03\n5\x01\x02\x0f\x06"},
{"internal/trace/internal/testgen", "\x03d\nl\x03\x02\x03\x011\v\x0e"},
{"internal/trace/internal/tracev1", "\x03\x01c\a\x03t\x06\r5\x01"},
{"internal/trace/raw", "\x02e\nq\x03\x06D\x01\x11"},
{"internal/trace/testtrace", "\x02\x01k\x03l\x03\x06\x057\v\x02\x01"},
{"internal/trace/tracev2", ""},
{"internal/trace/traceviewer", "\x02^\v\x06\x1a<\x16\a\a\x04\t\n\x15\x01\x05\a\v\x01\x02\r"},
{"internal/trace/traceviewer/format", ""},
{"internal/trace/version", "qq\t"},
{"internal/txtar", "\x03n\xa6\x01\x19"},
{"internal/types/errors", "\xaf\x02"},
{"internal/unsafeheader", "\xc5\x02"},
{"internal/xcoff", "Z\r\a\x03`\x1a,\x18\x01"},
{"internal/zstd", "g\a\x03z\x0f"},
{"io", "n\xc4\x01"},
{"io/fs", "n+*(1\x11\x12\x04"},
{"io/ioutil", "\xeb\x01\x01+\x16\x03"},
{"iter", "\xc9\x01[!"},
{"log", "qz\x05'\r\x0e\x01\f"},
{"log/internal", ""},
{"log/slog", "\x03\nU\t\x03\x03z\x04\x01\x02\x02\x04'\x05\t\x02\x01\x02\x01\f\x02\x02\x02"},
{"log/slog/internal", ""},
{"log/slog/internal/benchmarks", "\ra\x03z\x06\x03;\x10"},
{"log/slog/internal/buffer", "\xb2\x02"},
{"log/slog/internal/slogtest", "\xf1\x01"},
{"log/syslog", "n\x03~\x12\x16\x19\x02\r"},
{"maps", "\xee\x01W"},
{"math", "\xfa\x01K"},
{"math/big", "\x03k\x03)Q\r\x02\x021\x02\x01\x02\x13"},
{"math/bits", "\xc5\x02"},
{"math/cmplx", "\xf8\x01\x02"},
{"math/rand", "\xb6\x01B:\x01\x12"},
{"math/rand/v2", "n,\x02\\\x02K"},
{"mime", "\x02\x01c\b\x03z\f \x16\x03\x02\x0f\x02"},
{"mime/multipart", "\x02\x01G$\x03E5\f\x01\x06\x02\x15\x02\x06\x10\x02\x01\x15"},
{"mime/quotedprintable", "\x02\x01nz"},
{"net", "\x04\ta+\x1d\a\x04\x05\x05\a\x01\x04\x14\x01%\x06\r\t\x05\x01\x01\v\x06\a"},
{"net/http", "\x02\x01\x04\x04\x02=\b\x14\x01\a\x03E5\x01\x03\b\x01\x02\x02\x02\x01\x02\x06\x02\x01\x01\n\x01\x01\x05\x01\x02\x05\t\x01\x01\x01\x02\x01\f\x02\x02\x02\b\x01\x01\x01"},
{"net/http/cgi", "\x02P\x1c\x03z\x04\b\n\x01\x13\x01\x01\x01\x04\x01\x05\x02\t\x02\x01\x0f\x0e"},
{"net/http/cookiejar", "\x04j\x03\x90\x01\x01\b\f\x17\x03\x02\r\x04"},
{"net/http/fcgi", "\x02\x01\nZ\a\x03z\x16\x01\x01\x14\x19\x02\r"},
{"net/http/httptest", "\x02\x01\nE\x02\x1c\x01z\x04\x12\x01\n\t\x02\x18\x01\x02\r\x0e"},
{"net/http/httptrace", "\rEo@\x14\n "},
{"net/http/httputil", "\x02\x01\na\x03z\x04\x0f\x03\x01\x05\x02\x01\v\x01\x1a\x02\r\x0e"},
{"net/http/internal", "\x02\x01k\x03z"},
{"net/http/internal/ascii", "\xb0\x02\x11"},
{"net/http/internal/httpcommon", "\ra\x03\x96\x01\x0e\x01\x18\x01\x01\x02\x1b\x02"},
{"net/http/internal/testcert", "\xb0\x02"},
{"net/http/pprof", "\x02\x01\nd\x19,\x11$\x04\x13\x14\x01\r\x06\x02\x01\x02\x01\x0f"},
{"net/internal/cgotest", "\xd7\x01n"},
{"net/internal/socktest", "q\xc1\x01\x02"},
{"net/mail", "\x02l\x03z\x04\x0f\x03\x14\x1b\x02\r\x04"},
{"net/netip", "\x04j+\x01#;\x025\x15"},
{"net/rpc", "\x02g\x05\x03\x10\n`\x04\x12\x01\x1d\x0e\x03\x02"},
{"net/rpc/jsonrpc", "k\x03\x03z\x16\x11 "},
{"net/smtp", "\x19.\v\x14\b\x03z\x16\x14\x1b"},
{"net/textproto", "\x02\x01k\x03z\r\t.\x01\x02\x13"},
{"net/url", "n\x03\x86\x01%\x11\x02\x01\x15"},
{"os", "n+\x19\v\t\r\x03\x01\x04\x10\x018\t\x05\x01\x01\v\x06"},
{"os/exec", "\x03\naH \x01\x14\x01+\x06\a\v\x01\x04\v"},
{"os/exec/internal/fdtest", "\xb4\x02"},
{"os/signal", "\r\x8a\x02\x16\x05\x02"},
{"os/user", "qfM\v\x01\x02\x02\x11"},
{"path", "n+\xaa\x01"},
{"path/filepath", "n+\x19:+\r\t\x03\x04\x0f"},
{"plugin", "n\xc4\x01\x13"},
{"reflect", "n'\x04\x1c\b\f\x05\x02\x18\x06\n,\v\x03\x0f\x02\x02"},
{"reflect/internal/example1", ""},
{"reflect/internal/example2", ""},
{"regexp", "\x03\xe8\x018\n\x02\x01\x02\x0f\x02"},
{"regexp/syntax", "\xad\x02\x01\x01\x01\x11\x02"},
{"runtime", "\x95\x01\x04\x01\x02\f\x06\a\x02\x01\x01\x0f\x04\x01\x01\x01\x01\x03\x0fc"},
{"runtime/cgo", "\xd0\x01b\x01\x12"},
{"runtime/coverage", "\xa0\x01K"},
{"runtime/debug", "qUQ\r\t\x02\x01\x0f\x06"},
{"runtime/internal/wasitest", ""},
{"runtime/metrics", "\xb7\x01A,!"},
{"runtime/pprof", "\x02\x01\x01\x03\x06Z\a\x03$3#\r\x1f\r\t\x01\x01\x01\x02\x02\b\x03\x06"},
{"runtime/race", ""},
{"runtime/trace", "\rdz9\x0e\x01\x12"},
{"slices", "\x04\xea\x01\fK"},
{"sort", "\xca\x0103"},
{"strconv", "n+:%\x02I"},
{"strings", "n'\x04:\x18\x03\f8\x0f\x02\x02"},
{"structs", ""},
{"sync", "\xc9\x01\vP\x0f\x12"},
{"sync/atomic", "\xc5\x02"},
{"syscall", "n'\x01\x03\x01\x1b\b\x03\x03\x06[\x0e\x01\x12"},
{"testing", "\x03\na\x02\x01X\x0f\x13\r\x04\x1b\x06\x02\x05\x03\x05\x01\x02\x01\x02\x01\f\x02\x02\x02"},
{"testing/fstest", "n\x03z\x01\v%\x11\x03\b\a"},
{"testing/internal/testdeps", "\x02\v\xa7\x01'\x10,\x03\x05\x03\b\x06\x02\r"},
{"testing/iotest", "\x03k\x03z\x04"},
{"testing/quick", "p\x01\x87\x01\x04#\x11\x0f"},
{"testing/slogtest", "\ra\x03\x80\x01.\x05\x11\n"},
{"text/scanner", "\x03nz,*\x02"},
{"text/tabwriter", "qzX"},
{"text/template", "n\x03B8\x01\v\x1f\x01\x05\x01\x02\x05\f\x02\f\x03\x02"},
{"text/template/parse", "\x03n\xb3\x01\v\x01\x11\x02"},
{"time", "n+\x1d\x1d'*\x0e\x02\x11"},
{"time/tzdata", "n\xc6\x01\x11"},
{"unicode", ""},
{"unicode/utf16", ""},
{"unicode/utf8", ""},
{"unique", "\x95\x01>\x01P\x0e\x13\x12"},
{"unsafe", ""},
{"vendor/golang.org/x/crypto/chacha20", "\x10W\a\x8c\x01*&"},
{"vendor/golang.org/x/crypto/chacha20poly1305", "\x10W\a\xd8\x01\x04\x01"},
{"vendor/golang.org/x/crypto/cryptobyte", "d\n\x03\x88\x01& \n"},
{"vendor/golang.org/x/crypto/cryptobyte/asn1", ""},
{"vendor/golang.org/x/crypto/internal/alias", "\xc5\x02"},
{"vendor/golang.org/x/crypto/internal/poly1305", "Q\x16\x93\x01"},
{"vendor/golang.org/x/net/dns/dnsmessage", "n"},
{"vendor/golang.org/x/net/http/httpguts", "\x81\x02\x14\x1b\x13\r"},
{"vendor/golang.org/x/net/http/httpproxy", "n\x03\x90\x01\x15\x01\x19\x13\r"},
{"vendor/golang.org/x/net/http2/hpack", "\x03k\x03zG"},
{"vendor/golang.org/x/net/idna", "q\x87\x018\x13\x10\x02\x01"},
{"vendor/golang.org/x/net/nettest", "\x03d\a\x03z\x11\x05\x16\x01\f\v\x01\x02\x02\x01\n"},
{"vendor/golang.org/x/sys/cpu", "\x97\x02\r\v\x01\x15"},
{"vendor/golang.org/x/text/secure/bidirule", "n\xd5\x01\x11\x01"},
{"vendor/golang.org/x/text/transform", "\x03k}X"},
{"vendor/golang.org/x/text/unicode/bidi", "\x03\bf~?\x15"},
{"vendor/golang.org/x/text/unicode/norm", "g\nzG\x11\x11"},
{"weak", "\x95\x01\x8f\x01!"},
}

89
vendor/golang.org/x/tools/internal/stdlib/import.go generated vendored Normal file
View File

@@ -0,0 +1,89 @@
// Copyright 2025 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 stdlib
// This file provides the API for the import graph of the standard library.
//
// Be aware that the compiler-generated code for every package
// implicitly depends on package "runtime" and a handful of others
// (see runtimePkgs in GOROOT/src/cmd/internal/objabi/pkgspecial.go).
import (
"encoding/binary"
"iter"
"slices"
"strings"
)
// Imports returns the sequence of packages directly imported by the
// named standard packages, in name order.
// The imports of an unknown package are the empty set.
//
// The graph is built into the application and may differ from the
// graph in the Go source tree being analyzed by the application.
func Imports(pkgs ...string) iter.Seq[string] {
return func(yield func(string) bool) {
for _, pkg := range pkgs {
if i, ok := find(pkg); ok {
var depIndex uint64
for data := []byte(deps[i].deps); len(data) > 0; {
delta, n := binary.Uvarint(data)
depIndex += delta
if !yield(deps[depIndex].name) {
return
}
data = data[n:]
}
}
}
}
}
// Dependencies returns the set of all dependencies of the named
// standard packages, including the initial package,
// in a deterministic topological order.
// The dependencies of an unknown package are the empty set.
//
// The graph is built into the application and may differ from the
// graph in the Go source tree being analyzed by the application.
func Dependencies(pkgs ...string) iter.Seq[string] {
return func(yield func(string) bool) {
for _, pkg := range pkgs {
if i, ok := find(pkg); ok {
var seen [1 + len(deps)/8]byte // bit set of seen packages
var visit func(i int) bool
visit = func(i int) bool {
bit := byte(1) << (i % 8)
if seen[i/8]&bit == 0 {
seen[i/8] |= bit
var depIndex uint64
for data := []byte(deps[i].deps); len(data) > 0; {
delta, n := binary.Uvarint(data)
depIndex += delta
if !visit(int(depIndex)) {
return false
}
data = data[n:]
}
if !yield(deps[i].name) {
return false
}
}
return true
}
if !visit(i) {
return
}
}
}
}
}
// find returns the index of pkg in the deps table.
func find(pkg string) (int, bool) {
return slices.BinarySearchFunc(deps[:], pkg, func(p pkginfo, n string) int {
return strings.Compare(p.name, n)
})
}

View File

@@ -1,4 +1,4 @@
// Copyright 2024 The Go Authors. All rights reserved.
// Copyright 2025 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.
@@ -2151,6 +2151,8 @@ var PackageSymbols = map[string][]Symbol{
{"(Type).String", Method, 0},
{"(Version).GoString", Method, 0},
{"(Version).String", Method, 0},
{"(VersionIndex).Index", Method, 24},
{"(VersionIndex).IsHidden", Method, 24},
{"ARM_MAGIC_TRAMP_NUMBER", Const, 0},
{"COMPRESS_HIOS", Const, 6},
{"COMPRESS_HIPROC", Const, 6},
@@ -3834,6 +3836,7 @@ var PackageSymbols = map[string][]Symbol{
{"SymType", Type, 0},
{"SymVis", Type, 0},
{"Symbol", Type, 0},
{"Symbol.HasVersion", Field, 24},
{"Symbol.Info", Field, 0},
{"Symbol.Library", Field, 13},
{"Symbol.Name", Field, 0},
@@ -3843,18 +3846,12 @@ var PackageSymbols = map[string][]Symbol{
{"Symbol.Value", Field, 0},
{"Symbol.Version", Field, 13},
{"Symbol.VersionIndex", Field, 24},
{"Symbol.VersionScope", Field, 24},
{"SymbolVersionScope", Type, 24},
{"Type", Type, 0},
{"VER_FLG_BASE", Const, 24},
{"VER_FLG_INFO", Const, 24},
{"VER_FLG_WEAK", Const, 24},
{"Version", Type, 0},
{"VersionScopeGlobal", Const, 24},
{"VersionScopeHidden", Const, 24},
{"VersionScopeLocal", Const, 24},
{"VersionScopeNone", Const, 24},
{"VersionScopeSpecific", Const, 24},
{"VersionIndex", Type, 24},
},
"debug/gosym": {
{"(*DecodingError).Error", Method, 0},
@@ -7122,6 +7119,7 @@ var PackageSymbols = map[string][]Symbol{
{"FormatFileInfo", Func, 21},
{"Glob", Func, 16},
{"GlobFS", Type, 16},
{"Lstat", Func, 25},
{"ModeAppend", Const, 16},
{"ModeCharDevice", Const, 16},
{"ModeDevice", Const, 16},
@@ -7146,6 +7144,8 @@ var PackageSymbols = map[string][]Symbol{
{"ReadDirFile", Type, 16},
{"ReadFile", Func, 16},
{"ReadFileFS", Type, 16},
{"ReadLink", Func, 25},
{"ReadLinkFS", Type, 25},
{"SkipAll", Var, 20},
{"SkipDir", Var, 16},
{"Stat", Func, 16},
@@ -9149,6 +9149,8 @@ var PackageSymbols = map[string][]Symbol{
{"(*ProcessState).SysUsage", Method, 0},
{"(*ProcessState).SystemTime", Method, 0},
{"(*ProcessState).UserTime", Method, 0},
{"(*Root).Chmod", Method, 25},
{"(*Root).Chown", Method, 25},
{"(*Root).Close", Method, 24},
{"(*Root).Create", Method, 24},
{"(*Root).FS", Method, 24},
@@ -16757,9 +16759,11 @@ var PackageSymbols = map[string][]Symbol{
},
"testing/fstest": {
{"(MapFS).Glob", Method, 16},
{"(MapFS).Lstat", Method, 25},
{"(MapFS).Open", Method, 16},
{"(MapFS).ReadDir", Method, 16},
{"(MapFS).ReadFile", Method, 16},
{"(MapFS).ReadLink", Method, 25},
{"(MapFS).Stat", Method, 16},
{"(MapFS).Sub", Method, 16},
{"MapFS", Type, 16},

View File

@@ -6,7 +6,7 @@
// Package stdlib provides a table of all exported symbols in the
// standard library, along with the version at which they first
// appeared.
// appeared. It also provides the import graph of std packages.
package stdlib
import (

View File

@@ -120,7 +120,7 @@ type termSet struct {
terms termlist
}
func indentf(depth int, format string, args ...interface{}) {
func indentf(depth int, format string, args ...any) {
fmt.Fprintf(os.Stderr, strings.Repeat(".", depth)+format+"\n", args...)
}

View File

@@ -32,12 +32,14 @@ func SetUsesCgo(conf *types.Config) bool {
return true
}
// ReadGo116ErrorData extracts additional information from types.Error values
// ErrorCodeStartEnd extracts additional information from types.Error values
// generated by Go version 1.16 and later: the error code, start position, and
// end position. If all positions are valid, start <= err.Pos <= end.
//
// If the data could not be read, the final result parameter will be false.
func ReadGo116ErrorData(err types.Error) (code ErrorCode, start, end token.Pos, ok bool) {
//
// TODO(adonovan): eliminate start/end when proposal #71803 is accepted.
func ErrorCodeStartEnd(err types.Error) (code ErrorCode, start, end token.Pos, ok bool) {
var data [3]int
// By coincidence all of these fields are ints, which simplifies things.
v := reflect.ValueOf(err)

View File

@@ -16,7 +16,8 @@ Jason DeBettencourt <jasond17@gmail.com>
Koichi Shiraishi <zchee.io@gmail.com>
Marius Orcsik <marius@federated.id>
Patricio Whittingslow <graded.sp@gmail.com>
Roman Khafizianov <roman@any.org>
Scot C Bontrager <scot@indievisible.org>
Steffen Butzer <steffen(dot)butzer@outlook.com>
W. Michael Petullo <mike@flyn.org>
ZHU Zijia <piggynl@outlook.com>
ZHU Zijia <piggynl@outlook.com>

View File

@@ -1,5 +1,5 @@
set -e
for tag in none libc.dmesg libc.membrk libc.memgrind libc.strace
for tag in none libc.dmesg libc.membrk libc.memgrind libc.strace libc.memexpvar
do
echo "-tags=$tag"
echo "GOOS=darwin GOARCH=amd64"

View File

@@ -13867,7 +13867,7 @@ func X__ctype_get_mb_cur_max(tls *TLS) (r Tsize_t) {
}
var v1 int32
_ = v1
if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) {
if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) {
v1 = int32(4)
} else {
v1 = int32(1)
@@ -24948,7 +24948,7 @@ func X__reset_tls(tls *TLS) {
var mem, p uintptr
var self Tpthread_t
_, _, _, _, _ = i, mem, n, p, self
self = ___get_tp(tls)
self = uintptr(___get_tp(tls))
n = *(*Tuintptr_t)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(self)).Fdtv))
if n != 0 {
p = X__libc.Ftls_head
@@ -24984,7 +24984,7 @@ func X__init_ssp(tls *TLS, entropy uintptr) {
* still be detected. Endianness is taken care of
* automatically. */
*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__stack_chk_guard)) + 1)) = uint8(0)
(*t__pthread)(unsafe.Pointer(___get_tp(tls))).Fcanary = X__stack_chk_guard
(*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Fcanary = X__stack_chk_guard
}
func X__stack_chk_fail(tls *TLS) {
@@ -25593,7 +25593,7 @@ func Xstrerror(tls *TLS, e int32) (r uintptr) {
trc("tls=%v e=%v, (%v:)", tls, e, origin(2))
defer func() { trc("-> %v", r) }()
}
return X__strerror_l(tls, e, (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)
return X__strerror_l(tls, e, (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)
}
func Xstrerror_l(tls *TLS, e int32, loc Tlocale_t) (r uintptr) {
@@ -31053,7 +31053,7 @@ func X__lctrans_cur(tls *TLS, msg uintptr) (r uintptr) {
trc("tls=%v msg=%v, (%v:)", tls, msg, origin(2))
defer func() { trc("-> %v", r) }()
}
return X__lctrans_impl(tls, msg, *(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale + 5*8)))
return X__lctrans_impl(tls, msg, *(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale + 5*8)))
}
func _swapc(tls *TLS, x Tuint32_t, c int32) (r Tuint32_t) {
@@ -31654,7 +31654,7 @@ func Xdcngettext(tls *TLS, domainname uintptr, msgid1 uintptr, msgid2 uintptr, n
var _ /* z at bp+8 */ uintptr
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = alt_modlen, catlen, catname, csp, dirlen, dirname, domlen, l, lm, loc, loclen, locname, locp, map1, modlen, modname, name, np, old, old_cats, old_errno, p3, plural, q, r, r1, rem, rule, trans, v, v10, v11, v12, v14, v15, v17, v18, v21, v23, v26, v3, v5, v6, v8, v9
defer func() { Xrealloc(tls, name, 0) }()
loc = (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale
loc = (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale
old_errno = *(*int32)(unsafe.Pointer(X__errno_location(tls)))
/* match gnu gettext behaviour */
if !(msgid1 != 0) {
@@ -98326,7 +98326,7 @@ func Xiconv(tls *TLS, cd Ticonv_t, in uintptr, inb uintptr, out uintptr, outb ui
*(*Tmbstate_t)(unsafe.Pointer(bp + 24)) = Tmbstate_t{}
type1 = *(*uint8)(unsafe.Pointer(map1 + uintptr(-Int32FromInt32(1))))
totype = *(*uint8)(unsafe.Pointer(tomap + uintptr(-Int32FromInt32(1))))
ploc = ___get_tp(tls) + 152
ploc = uintptr(___get_tp(tls)) + 152
loc = *(*Tlocale_t)(unsafe.Pointer(ploc))
if !(in != 0) || !(*(*uintptr)(unsafe.Pointer(in)) != 0) || !(*(*Tsize_t)(unsafe.Pointer(inb)) != 0) {
return uint64(0)
@@ -99360,7 +99360,7 @@ func X__nl_langinfo(tls *TLS, item Tnl_item) (r uintptr) {
trc("tls=%v item=%v, (%v:)", tls, item, origin(2))
defer func() { trc("-> %v", r) }()
}
return X__nl_langinfo_l(tls, item, (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)
return X__nl_langinfo_l(tls, item, (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)
}
func Xnl_langinfo(tls *TLS, item Tnl_item) (r uintptr) {
@@ -100078,7 +100078,7 @@ func Xstrcoll(tls *TLS, l uintptr, r uintptr) (r1 int32) {
trc("tls=%v l=%v r=%v, (%v:)", tls, l, r, origin(2))
defer func() { trc("-> %v", r1) }()
}
return X__strcoll_l(tls, l, r, (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)
return X__strcoll_l(tls, l, r, (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)
}
func Xstrcoll_l(tls *TLS, l uintptr, r uintptr, loc Tlocale_t) (r1 int32) {
@@ -100244,7 +100244,7 @@ func Xstrfmon(tls *TLS, s uintptr, n Tsize_t, fmt uintptr, va uintptr) (r Tssize
var ret Tssize_t
_, _ = ap, ret
ap = va
ret = _vstrfmon_l(tls, s, n, (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale, fmt, ap)
ret = _vstrfmon_l(tls, s, n, (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale, fmt, ap)
_ = ap
return ret
}
@@ -100319,7 +100319,7 @@ func Xstrxfrm(tls *TLS, dest uintptr, src uintptr, n Tsize_t) (r Tsize_t) {
trc("tls=%v dest=%v src=%v n=%v, (%v:)", tls, dest, src, n, origin(2))
defer func() { trc("-> %v", r) }()
}
return X__strxfrm_l(tls, dest, src, n, (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)
return X__strxfrm_l(tls, dest, src, n, (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)
}
// C documentation
@@ -100408,7 +100408,7 @@ func X__uselocale(tls *TLS, new1 Tlocale_t) (r Tlocale_t) {
var global, old, v1, v2 Tlocale_t
var self Tpthread_t
_, _, _, _, _ = global, old, self, v1, v2
self = ___get_tp(tls)
self = uintptr(___get_tp(tls))
old = (*t__pthread)(unsafe.Pointer(self)).Flocale
global = uintptr(unsafe.Pointer(&X__libc)) + 56
if new1 != 0 {
@@ -100451,7 +100451,7 @@ func Xwcscoll(tls *TLS, l uintptr, r uintptr) (r1 int32) {
trc("tls=%v l=%v r=%v, (%v:)", tls, l, r, origin(2))
defer func() { trc("-> %v", r1) }()
}
return X__wcscoll_l(tls, l, r, (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)
return X__wcscoll_l(tls, l, r, (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)
}
// C documentation
@@ -100492,7 +100492,7 @@ func Xwcsxfrm(tls *TLS, dest uintptr, src uintptr, n Tsize_t) (r Tsize_t) {
trc("tls=%v dest=%v src=%v n=%v, (%v:)", tls, dest, src, n, origin(2))
defer func() { trc("-> %v", r) }()
}
return X__wcsxfrm_l(tls, dest, src, n, (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)
return X__wcsxfrm_l(tls, dest, src, n, (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)
}
// C documentation
@@ -102254,7 +102254,7 @@ func Xasinh(tls *TLS, x3 float64) (r float64) {
if uint64(8) == uint64(8) {
y1 = x3 + Float64FromFloat32(1.329227995784916e+36)
} else {
y2 = x3 + Float64FromFloat32(1.329227995784916e+36)
y2 = float64(x3 + Float64FromFloat32(1.329227995784916e+36))
}
}
}
@@ -103035,7 +103035,7 @@ func Xcbrt(tls *TLS, x float64) (r1 float64) {
hx = hx/uint32(3) + _B1
}
p1 = bp
*(*Tuint64_t)(unsafe.Pointer(p1)) = *(*Tuint64_t)(unsafe.Pointer(p1)) & (Uint64FromUint64(1) << Int32FromInt32(63))
*(*Tuint64_t)(unsafe.Pointer(p1)) = Tuint64_t(*(*Tuint64_t)(unsafe.Pointer(p1)) & (Uint64FromUint64(1) << Int32FromInt32(63)))
*(*Tuint64_t)(unsafe.Pointer(bp)) |= uint64(hx) << int32(32)
t = *(*float64)(unsafe.Pointer(bp))
/*
@@ -103061,7 +103061,7 @@ func Xcbrt(tls *TLS, x float64) (r1 float64) {
* before the final error is larger than 0.667 ulps.
*/
*(*float64)(unsafe.Pointer(bp)) = t
*(*Tuint64_t)(unsafe.Pointer(bp)) = (*(*Tuint64_t)(unsafe.Pointer(bp)) + Uint64FromUint32(0x80000000)) & uint64(0xffffffffc0000000)
*(*Tuint64_t)(unsafe.Pointer(bp)) = uint64(*(*Tuint64_t)(unsafe.Pointer(bp))+Uint64FromUint32(0x80000000)) & uint64(0xffffffffc0000000)
t = *(*float64)(unsafe.Pointer(bp))
/* one step Newton iteration to 53 bits with error < 0.667 ulps */
s = t * t /* t*t is exact */
@@ -103313,9 +103313,9 @@ func Xcopysign(tls *TLS, x float64, y float64) (r float64) {
}{}
*(*float64)(unsafe.Pointer(bp + 8)) = y
p1 = bp
*(*Tuint64_t)(unsafe.Pointer(p1)) = *(*Tuint64_t)(unsafe.Pointer(p1)) & (-Uint64FromUint64(1) / Uint64FromInt32(2))
*(*Tuint64_t)(unsafe.Pointer(p1)) = Tuint64_t(*(*Tuint64_t)(unsafe.Pointer(p1)) & (-Uint64FromUint64(1) / Uint64FromInt32(2)))
p2 = bp
*(*Tuint64_t)(unsafe.Pointer(p2)) = *(*Tuint64_t)(unsafe.Pointer(p2)) | *(*Tuint64_t)(unsafe.Pointer(bp + 8))&(Uint64FromUint64(1)<<Int32FromInt32(63))
*(*Tuint64_t)(unsafe.Pointer(p2)) = Tuint64_t(*(*Tuint64_t)(unsafe.Pointer(p2)) | *(*Tuint64_t)(unsafe.Pointer(bp + 8))&(Uint64FromUint64(1)<<Int32FromInt32(63)))
return *(*float64)(unsafe.Pointer(bp))
}
@@ -103388,7 +103388,7 @@ func Xcos(tls *TLS, x3 float64) (r float64) {
if uint64(8) == uint64(8) {
y1 = x3 + Float64FromFloat32(1.329227995784916e+36)
} else {
y2 = x3 + Float64FromFloat32(1.329227995784916e+36)
y2 = float64(x3 + Float64FromFloat32(1.329227995784916e+36))
}
}
return float64(1)
@@ -103553,7 +103553,7 @@ func Xcosh(tls *TLS, x3 float64) (r float64) {
if uint64(8) == uint64(8) {
y1 = x3 + Float64FromFloat32(1.329227995784916e+36)
} else {
y2 = x3 + Float64FromFloat32(1.329227995784916e+36)
y2 = float64(x3 + Float64FromFloat32(1.329227995784916e+36))
}
}
return Float64FromInt32(1)
@@ -104050,7 +104050,7 @@ func _specialcase(tls *TLS, tmp Tdouble_t, sbits Tuint64_t, ki Tuint64_t) (r flo
_, _, _, _, _, _, _, _, _, _, _ = hi, lo, scale, y, y1, y2, y3, v1, v3, v5, v7
if ki&uint64(0x80000000) == uint64(0) {
/* k > 0, the exponent of scale might have overflowed by <= 460. */
sbits = sbits - Uint64FromUint64(1009)<<Int32FromInt32(52)
sbits = Tuint64_t(sbits - Uint64FromUint64(1009)<<Int32FromInt32(52))
scale = *(*float64)(unsafe.Pointer(&sbits))
y3 = float64(5.486124068793689e+303) * (scale + scale*tmp)
y = y3
@@ -104060,7 +104060,7 @@ func _specialcase(tls *TLS, tmp Tdouble_t, sbits Tuint64_t, ki Tuint64_t) (r flo
return v1
}
/* k < 0, need special care in the subnormal range. */
sbits = sbits + Uint64FromUint64(1022)<<Int32FromInt32(52)
sbits = Tuint64_t(sbits + Uint64FromUint64(1022)<<Int32FromInt32(52))
scale = *(*float64)(unsafe.Pointer(&sbits))
y3 = scale + scale*tmp
if y3 < float64(1) {
@@ -104340,7 +104340,7 @@ func _specialcase1(tls *TLS, tmp Tdouble_t, sbits Tuint64_t, ki Tuint64_t) (r fl
_, _, _, _, _, _, _, _, _, _, _ = hi, lo, scale, y, y1, y2, y3, v1, v3, v5, v7
if ki&uint64(0x80000000) == uint64(0) {
/* k > 0, the exponent of scale might have overflowed by 1. */
sbits = sbits - Uint64FromUint64(1)<<Int32FromInt32(52)
sbits = Tuint64_t(sbits - Uint64FromUint64(1)<<Int32FromInt32(52))
scale = *(*float64)(unsafe.Pointer(&sbits))
y3 = Float64FromInt32(2) * (scale + scale*tmp)
y = y3
@@ -104350,7 +104350,7 @@ func _specialcase1(tls *TLS, tmp Tdouble_t, sbits Tuint64_t, ki Tuint64_t) (r fl
return v1
}
/* k < 0, need special care in the subnormal range. */
sbits = sbits + Uint64FromUint64(1022)<<Int32FromInt32(52)
sbits = Tuint64_t(sbits + Uint64FromUint64(1022)<<Int32FromInt32(52))
scale = *(*float64)(unsafe.Pointer(&sbits))
y3 = scale + scale*tmp
if y3 < float64(1) {
@@ -104960,7 +104960,7 @@ func Xfabs(tls *TLS, x float64) (r float64) {
}{}
*(*float64)(unsafe.Pointer(bp)) = x
p1 = bp
*(*Tuint64_t)(unsafe.Pointer(p1)) = *(*Tuint64_t)(unsafe.Pointer(p1)) & (-Uint64FromUint64(1) / Uint64FromInt32(2))
*(*Tuint64_t)(unsafe.Pointer(p1)) = Tuint64_t(*(*Tuint64_t)(unsafe.Pointer(p1)) & (-Uint64FromUint64(1) / Uint64FromInt32(2)))
return *(*float64)(unsafe.Pointer(bp))
}
@@ -105284,8 +105284,8 @@ func _normalize(tls *TLS, x float64) (r Tnum) {
}
e = v2
}
ix = ix & (Uint64FromUint64(1)<<Int32FromInt32(52) - Uint64FromInt32(1))
ix = ix | Uint64FromUint64(1)<<Int32FromInt32(52)
ix = Tuint64_t(ix & (Uint64FromUint64(1)<<Int32FromInt32(52) - Uint64FromInt32(1)))
ix = Tuint64_t(ix | Uint64FromUint64(1)<<Int32FromInt32(52))
ix <<= uint64(1)
e -= Int32FromInt32(0x3ff) + Int32FromInt32(52) + Int32FromInt32(1)
return Tnum{
@@ -105808,8 +105808,8 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) {
}
uxi <<= Uint64FromInt32(-ex + int32(1))
} else {
uxi = uxi & (-Uint64FromUint64(1) >> Int32FromInt32(12))
uxi = uxi | Uint64FromUint64(1)<<Int32FromInt32(52)
uxi = Tuint64_t(uxi & (-Uint64FromUint64(1) >> Int32FromInt32(12)))
uxi = Tuint64_t(uxi | Uint64FromUint64(1)<<Int32FromInt32(52))
}
if !(ey != 0) {
i = *(*Tuint64_t)(unsafe.Pointer(bp + 16)) << int32(12)
@@ -105826,9 +105826,9 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) {
*(*Tuint64_t)(unsafe.Pointer(bp + 16)) <<= Uint64FromInt32(-ey + int32(1))
} else {
p6 = bp + 16
*(*Tuint64_t)(unsafe.Pointer(p6)) = *(*Tuint64_t)(unsafe.Pointer(p6)) & (-Uint64FromUint64(1) >> Int32FromInt32(12))
*(*Tuint64_t)(unsafe.Pointer(p6)) = Tuint64_t(*(*Tuint64_t)(unsafe.Pointer(p6)) & (-Uint64FromUint64(1) >> Int32FromInt32(12)))
p7 = bp + 16
*(*Tuint64_t)(unsafe.Pointer(p7)) = *(*Tuint64_t)(unsafe.Pointer(p7)) | Uint64FromUint64(1)<<Int32FromInt32(52)
*(*Tuint64_t)(unsafe.Pointer(p7)) = Tuint64_t(*(*Tuint64_t)(unsafe.Pointer(p7)) | Uint64FromUint64(1)<<Int32FromInt32(52))
}
/* x mod y */
for {
@@ -105867,7 +105867,7 @@ func Xfmod(tls *TLS, x float64, y float64) (r float64) {
}
/* scale result */
if ex > 0 {
uxi = uxi - Uint64FromUint64(1)<<Int32FromInt32(52)
uxi = Tuint64_t(uxi - Uint64FromUint64(1)<<Int32FromInt32(52))
uxi |= Uint64FromInt32(ex) << int32(52)
} else {
uxi >>= Uint64FromInt32(-ex + int32(1))
@@ -106064,9 +106064,9 @@ func Xfrexp(tls *TLS, x float64, e uintptr) (r float64) {
}
*(*int32)(unsafe.Pointer(e)) = ee - int32(0x3fe)
p1 = bp
*(*Tuint64_t)(unsafe.Pointer(p1)) = *(*Tuint64_t)(unsafe.Pointer(p1)) & Uint64FromUint64(0x800fffffffffffff)
*(*Tuint64_t)(unsafe.Pointer(p1)) = Tuint64_t(*(*Tuint64_t)(unsafe.Pointer(p1)) & Uint64FromUint64(0x800fffffffffffff))
p2 = bp
*(*Tuint64_t)(unsafe.Pointer(p2)) = *(*Tuint64_t)(unsafe.Pointer(p2)) | Uint64FromUint64(0x3fe0000000000000)
*(*Tuint64_t)(unsafe.Pointer(p2)) = Tuint64_t(*(*Tuint64_t)(unsafe.Pointer(p2)) | Uint64FromUint64(0x3fe0000000000000))
return *(*float64)(unsafe.Pointer(bp))
}
@@ -106179,9 +106179,9 @@ func Xhypot(tls *TLS, x float64, y float64) (r float64) {
*(*float64)(unsafe.Pointer(bp + 8)) = y
/* arrange |x| >= |y| */
p1 = bp
*(*Tuint64_t)(unsafe.Pointer(p1)) = *(*Tuint64_t)(unsafe.Pointer(p1)) & (-Uint64FromUint64(1) >> Int32FromInt32(1))
*(*Tuint64_t)(unsafe.Pointer(p1)) = Tuint64_t(*(*Tuint64_t)(unsafe.Pointer(p1)) & (-Uint64FromUint64(1) >> Int32FromInt32(1)))
p2 = bp + 8
*(*Tuint64_t)(unsafe.Pointer(p2)) = *(*Tuint64_t)(unsafe.Pointer(p2)) & (-Uint64FromUint64(1) >> Int32FromInt32(1))
*(*Tuint64_t)(unsafe.Pointer(p2)) = Tuint64_t(*(*Tuint64_t)(unsafe.Pointer(p2)) & (-Uint64FromUint64(1) >> Int32FromInt32(1)))
if *(*Tuint64_t)(unsafe.Pointer(bp)) < *(*Tuint64_t)(unsafe.Pointer(bp + 8)) {
ut = *(*struct {
Fi [0]Tuint64_t
@@ -109056,7 +109056,7 @@ func Xlog(tls *TLS, x1 float64) (r1 float64) {
/* x is subnormal, normalize it. */
v9 = x1 * float64(4.503599627370496e+15)
ix = *(*Tuint64_t)(unsafe.Pointer(&v9))
ix = ix - Uint64FromUint64(52)<<Int32FromInt32(52)
ix = Tuint64_t(ix - Uint64FromUint64(52)<<Int32FromInt32(52))
}
/* x = 2^k z; where z is in range [OFF,2*OFF) and exact.
The range is split into N subintervals.
@@ -109064,7 +109064,7 @@ func Xlog(tls *TLS, x1 float64) (r1 float64) {
tmp = ix - uint64(OFF)
i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<<Int32FromInt32(LOG_TABLE_BITS)))
k = int32(Int64FromUint64(tmp) >> int32(52)) /* arithmetic shift */
iz = ix - tmp&(Uint64FromUint64(0xfff)<<Int32FromInt32(52))
iz = uint64(ix - tmp&(Uint64FromUint64(0xfff)<<Int32FromInt32(52)))
invc = (*(*struct {
Finvc float64
Flogc float64
@@ -109077,7 +109077,7 @@ func Xlog(tls *TLS, x1 float64) (r1 float64) {
/* log(x) = log1p(z/c-1) + log(c) + k*Ln2. */
/* r ~= z/c - 1, |r| < 1/(2*N). */
/* rounding error: 0x1p-55/N. */
r = X__builtin_fma(tls, z, invc, -Float64FromFloat64(1))
r = float64(X__builtin_fma(tls, z, invc, -Float64FromFloat64(1)))
kd = float64(k)
/* hi + lo = r + log(c) + k*Ln2. */
w = kd*X__log_data.Fln2hi + logc
@@ -109530,7 +109530,7 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) {
}
r = x1 - float64(1)
hi = r * X__log2_data.Finvln2hi
lo = r*X__log2_data.Finvln2lo + X__builtin_fma(tls, r, X__log2_data.Finvln2hi, -hi)
lo = r*X__log2_data.Finvln2lo + float64(X__builtin_fma(tls, r, X__log2_data.Finvln2hi, -hi))
r2 = r * r /* rounding error: 0x1p-62. */
r4 = r2 * r2
/* Worst-case error is less than 0.54 ULP (0.55 ULP without fma). */
@@ -109560,7 +109560,7 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) {
/* x is subnormal, normalize it. */
v9 = x1 * float64(4.503599627370496e+15)
ix = *(*Tuint64_t)(unsafe.Pointer(&v9))
ix = ix - Uint64FromUint64(52)<<Int32FromInt32(52)
ix = Tuint64_t(ix - Uint64FromUint64(52)<<Int32FromInt32(52))
}
/* x = 2^k z; where z is in range [OFF,2*OFF) and exact.
The range is split into N subintervals.
@@ -109568,7 +109568,7 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) {
tmp = ix - uint64(OFF)
i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(LOG2_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<<Int32FromInt32(LOG2_TABLE_BITS)))
k = int32(Int64FromUint64(tmp) >> int32(52)) /* arithmetic shift */
iz = ix - tmp&(Uint64FromUint64(0xfff)<<Int32FromInt32(52))
iz = uint64(ix - tmp&(Uint64FromUint64(0xfff)<<Int32FromInt32(52)))
invc = (*(*struct {
Finvc float64
Flogc float64
@@ -109582,9 +109582,9 @@ func Xlog2(tls *TLS, x1 float64) (r1 float64) {
/* log2(x) = log2(z/c) + log2(c) + k. */
/* r ~= z/c - 1, |r| < 1/(2*N). */
/* rounding error: 0x1p-55/N. */
r = X__builtin_fma(tls, z, invc, -Float64FromFloat64(1))
r = float64(X__builtin_fma(tls, z, invc, -Float64FromFloat64(1)))
t1 = r * X__log2_data.Finvln2hi
t2 = r*X__log2_data.Finvln2lo + X__builtin_fma(tls, r, X__log2_data.Finvln2hi, -t1)
t2 = r*X__log2_data.Finvln2lo + float64(X__builtin_fma(tls, r, X__log2_data.Finvln2hi, -t1))
/* hi + lo = r/ln2 + log2(c) + k. */
t3 = kd + logc
hi = t3 + t1
@@ -110001,21 +110001,21 @@ func Xmodf(tls *TLS, x float64, iptr uintptr) (r float64) {
return x
}
p1 = bp
*(*Tuint64_t)(unsafe.Pointer(p1)) = *(*Tuint64_t)(unsafe.Pointer(p1)) & (Uint64FromUint64(1) << Int32FromInt32(63))
*(*Tuint64_t)(unsafe.Pointer(p1)) = Tuint64_t(*(*Tuint64_t)(unsafe.Pointer(p1)) & (Uint64FromUint64(1) << Int32FromInt32(63)))
return *(*float64)(unsafe.Pointer(bp))
}
/* no integral part*/
if e < 0 {
p2 = bp
*(*Tuint64_t)(unsafe.Pointer(p2)) = *(*Tuint64_t)(unsafe.Pointer(p2)) & (Uint64FromUint64(1) << Int32FromInt32(63))
*(*Tuint64_t)(unsafe.Pointer(p2)) = Tuint64_t(*(*Tuint64_t)(unsafe.Pointer(p2)) & (Uint64FromUint64(1) << Int32FromInt32(63)))
*(*float64)(unsafe.Pointer(iptr)) = *(*float64)(unsafe.Pointer(bp))
return x
}
mask = -Uint64FromUint64(1) >> Int32FromInt32(12) >> e
mask = uint64(-Uint64FromUint64(1) >> Int32FromInt32(12) >> e)
if *(*Tuint64_t)(unsafe.Pointer(bp))&mask == uint64(0) {
*(*float64)(unsafe.Pointer(iptr)) = x
p3 = bp
*(*Tuint64_t)(unsafe.Pointer(p3)) = *(*Tuint64_t)(unsafe.Pointer(p3)) & (Uint64FromUint64(1) << Int32FromInt32(63))
*(*Tuint64_t)(unsafe.Pointer(p3)) = Tuint64_t(*(*Tuint64_t)(unsafe.Pointer(p3)) & (Uint64FromUint64(1) << Int32FromInt32(63)))
return *(*float64)(unsafe.Pointer(bp))
}
*(*Tuint64_t)(unsafe.Pointer(bp)) &= ^mask
@@ -110170,13 +110170,13 @@ _2:
if *(*Tuint64_t)(unsafe.Pointer(bp + 8)) == *(*Tuint64_t)(unsafe.Pointer(bp + 16)) {
return y3
}
ax = *(*Tuint64_t)(unsafe.Pointer(bp + 8)) & (-Uint64FromUint64(1) / Uint64FromInt32(2))
ay = *(*Tuint64_t)(unsafe.Pointer(bp + 16)) & (-Uint64FromUint64(1) / Uint64FromInt32(2))
ax = uint64(*(*Tuint64_t)(unsafe.Pointer(bp + 8)) & (-Uint64FromUint64(1) / Uint64FromInt32(2)))
ay = uint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16)) & (-Uint64FromUint64(1) / Uint64FromInt32(2)))
if ax == uint64(0) {
if ay == uint64(0) {
return y3
}
*(*Tuint64_t)(unsafe.Pointer(bp + 8)) = *(*Tuint64_t)(unsafe.Pointer(bp + 16))&(Uint64FromUint64(1)<<Int32FromInt32(63)) | uint64(1)
*(*Tuint64_t)(unsafe.Pointer(bp + 8)) = uint64(*(*Tuint64_t)(unsafe.Pointer(bp + 16))&(Uint64FromUint64(1)<<Int32FromInt32(63)) | uint64(1))
} else {
if ax > ay || (*(*Tuint64_t)(unsafe.Pointer(bp + 8))^*(*Tuint64_t)(unsafe.Pointer(bp + 16)))&(Uint64FromUint64(1)<<Int32FromInt32(63)) != 0 {
*(*Tuint64_t)(unsafe.Pointer(bp + 8))--
@@ -110481,7 +110481,7 @@ func _log_inline(tls *TLS, ix Tuint64_t, tail uintptr) (r1 Tdouble_t) {
tmp = ix - uint64(OFF2)
i = Int32FromUint64(tmp >> (Int32FromInt32(52) - Int32FromInt32(POW_LOG_TABLE_BITS)) % Uint64FromInt32(Int32FromInt32(1)<<Int32FromInt32(POW_LOG_TABLE_BITS)))
k = int32(Int64FromUint64(tmp) >> int32(52)) /* arithmetic shift */
iz = ix - tmp&(Uint64FromUint64(0xfff)<<Int32FromInt32(52))
iz = uint64(ix - tmp&(Uint64FromUint64(0xfff)<<Int32FromInt32(52)))
z = *(*float64)(unsafe.Pointer(&iz))
kd = float64(k)
/* log(x) = k*Ln2 + log(c) + log1p(z/c-1). */
@@ -110505,7 +110505,7 @@ func _log_inline(tls *TLS, ix Tuint64_t, tail uintptr) (r1 Tdouble_t) {
})(unsafe.Pointer(uintptr(unsafe.Pointer(&X__pow_log_data)) + 72 + uintptr(i)*32))).Flogctail
/* Note: 1/c is j/N or j/N/2 where j is an integer in [N,2N) and
|z/c - 1| < 1/N, so r = z/c - 1 is exactly representible. */
r = X__builtin_fma(tls, z, invc, -Float64FromFloat64(1))
r = float64(X__builtin_fma(tls, z, invc, -Float64FromFloat64(1)))
/* k*Ln2 + log(c) + r. */
t1 = kd*X__pow_log_data.Fln2hi + logc
t2 = t1 + r
@@ -110516,7 +110516,7 @@ func _log_inline(tls *TLS, ix Tuint64_t, tail uintptr) (r1 Tdouble_t) {
ar3 = r * ar2
/* k*Ln2 + log(c) + r + A[0]*r*r. */
hi = t2 + ar2
lo3 = X__builtin_fma(tls, ar, r, -ar2)
lo3 = float64(X__builtin_fma(tls, ar, r, -ar2))
lo4 = t2 - hi + ar2
/* p = log1p(r) - r - A[0]*r*r. */
p = ar3 * (*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__pow_log_data)) + 16 + 1*8)) + r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__pow_log_data)) + 16 + 2*8)) + ar2*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__pow_log_data)) + 16 + 3*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__pow_log_data)) + 16 + 4*8))+ar2*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__pow_log_data)) + 16 + 5*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&X__pow_log_data)) + 16 + 6*8)))))
@@ -110542,7 +110542,7 @@ func _specialcase2(tls *TLS, tmp Tdouble_t, sbits Tuint64_t, ki Tuint64_t) (r fl
_, _, _, _, _, _, _, _, _, _, _, _, _ = hi, lo, one, scale, y, y1, y2, y3, v1, v3, v5, v6, v8
if ki&uint64(0x80000000) == uint64(0) {
/* k > 0, the exponent of scale might have overflowed by <= 460. */
sbits = sbits - Uint64FromUint64(1009)<<Int32FromInt32(52)
sbits = Tuint64_t(sbits - Uint64FromUint64(1009)<<Int32FromInt32(52))
scale = *(*float64)(unsafe.Pointer(&sbits))
y3 = float64(5.486124068793689e+303) * (scale + scale*tmp)
y = y3
@@ -110552,7 +110552,7 @@ func _specialcase2(tls *TLS, tmp Tdouble_t, sbits Tuint64_t, ki Tuint64_t) (r fl
return v1
}
/* k < 0, need special care in the subnormal range. */
sbits = sbits + Uint64FromUint64(1022)<<Int32FromInt32(52)
sbits = Tuint64_t(sbits + Uint64FromUint64(1022)<<Int32FromInt32(52))
/* Note: sbits is signed scale. */
scale = *(*float64)(unsafe.Pointer(&sbits))
y3 = scale + scale*tmp
@@ -110812,12 +110812,12 @@ func Xpow(tls *TLS, x1 float64, y1 float64) (r float64) {
v15 = x1 * float64(4.503599627370496e+15)
ix = *(*Tuint64_t)(unsafe.Pointer(&v15))
ix &= uint64(0x7fffffffffffffff)
ix = ix - Uint64FromUint64(52)<<Int32FromInt32(52)
ix = Tuint64_t(ix - Uint64FromUint64(52)<<Int32FromInt32(52))
}
}
hi = _log_inline(tls, ix, bp)
ehi = y1 * hi
elo = y1**(*Tdouble_t)(unsafe.Pointer(bp)) + X__builtin_fma(tls, y1, hi, -ehi)
elo = y1**(*Tdouble_t)(unsafe.Pointer(bp)) + float64(X__builtin_fma(tls, y1, hi, -ehi))
return _exp_inline(tls, ehi, elo, sign_bias)
}
@@ -111183,8 +111183,8 @@ func Xremquo(tls *TLS, x float64, y float64, quo uintptr) (r float64) {
}
uxi <<= Uint64FromInt32(-ex + int32(1))
} else {
uxi = uxi & (-Uint64FromUint64(1) >> Int32FromInt32(12))
uxi = uxi | Uint64FromUint64(1)<<Int32FromInt32(52)
uxi = Tuint64_t(uxi & (-Uint64FromUint64(1) >> Int32FromInt32(12)))
uxi = Tuint64_t(uxi | Uint64FromUint64(1)<<Int32FromInt32(52))
}
if !(ey != 0) {
i = *(*Tuint64_t)(unsafe.Pointer(bp + 16)) << int32(12)
@@ -111201,9 +111201,9 @@ func Xremquo(tls *TLS, x float64, y float64, quo uintptr) (r float64) {
*(*Tuint64_t)(unsafe.Pointer(bp + 16)) <<= Uint64FromInt32(-ey + int32(1))
} else {
p6 = bp + 16
*(*Tuint64_t)(unsafe.Pointer(p6)) = *(*Tuint64_t)(unsafe.Pointer(p6)) & (-Uint64FromUint64(1) >> Int32FromInt32(12))
*(*Tuint64_t)(unsafe.Pointer(p6)) = Tuint64_t(*(*Tuint64_t)(unsafe.Pointer(p6)) & (-Uint64FromUint64(1) >> Int32FromInt32(12)))
p7 = bp + 16
*(*Tuint64_t)(unsafe.Pointer(p7)) = *(*Tuint64_t)(unsafe.Pointer(p7)) | Uint64FromUint64(1)<<Int32FromInt32(52)
*(*Tuint64_t)(unsafe.Pointer(p7)) = Tuint64_t(*(*Tuint64_t)(unsafe.Pointer(p7)) | Uint64FromUint64(1)<<Int32FromInt32(52))
}
q = uint32(0)
if ex < ey {
@@ -111253,7 +111253,7 @@ end:
;
/* scale result and decide between |x| and |x|-|y| */
if ex > 0 {
uxi = uxi - Uint64FromUint64(1)<<Int32FromInt32(52)
uxi = Tuint64_t(uxi - Uint64FromUint64(1)<<Int32FromInt32(52))
uxi |= Uint64FromInt32(ex) << int32(52)
} else {
uxi >>= Uint64FromInt32(-ex + int32(1))
@@ -111611,7 +111611,7 @@ func Xround(tls *TLS, x3 float64) (r float64) {
if uint64(8) == uint64(8) {
y1 = x3 + _toint6
} else {
y2 = x3 + _toint6
y2 = float64(x3 + _toint6)
}
}
return Float64FromInt32(0) * *(*float64)(unsafe.Pointer(bp))
@@ -113368,7 +113368,7 @@ func Xtrunc(tls *TLS, x3 float64) (r float64) {
if e < int32(12) {
e = int32(1)
}
m = -Uint64FromUint64(1) >> e
m = uint64(-Uint64FromUint64(1) >> e)
if *(*Tuint64_t)(unsafe.Pointer(bp))&m == uint64(0) {
return x3
}
@@ -113378,7 +113378,7 @@ func Xtrunc(tls *TLS, x3 float64) (r float64) {
if uint64(8) == uint64(8) {
y1 = x3 + Float64FromFloat32(1.329227995784916e+36)
} else {
y2 = x3 + Float64FromFloat32(1.329227995784916e+36)
y2 = float64(x3 + Float64FromFloat32(1.329227995784916e+36))
}
}
*(*Tuint64_t)(unsafe.Pointer(bp)) &= ^m
@@ -116571,7 +116571,7 @@ func Xbtowc(tls *TLS, c int32) (r Twint_t) {
if Uint32FromInt32(b) < uint32(128) {
v1 = Uint32FromInt32(b)
} else {
if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) {
if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) {
v3 = int32(4)
} else {
v3 = int32(1)
@@ -116772,7 +116772,7 @@ func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t, st uintptr) (r Tsize
*(*Twchar_t)(unsafe.Pointer(wc)) = v1
return BoolUint64(!!(v1 != 0))
}
if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) {
if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) {
v2 = int32(4)
} else {
v2 = int32(1)
@@ -116943,7 +116943,7 @@ func Xmbsrtowcs(tls *TLS, ws uintptr, src uintptr, wn Tsize_t, st uintptr) (r Ts
goto resume0
}
}
if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) {
if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) {
v3 = int32(4)
} else {
v3 = int32(1)
@@ -117171,7 +117171,7 @@ func Xmbtowc(tls *TLS, wc uintptr, src uintptr, n Tsize_t) (r int32) {
*(*Twchar_t)(unsafe.Pointer(wc)) = v1
return BoolInt32(!!(v1 != 0))
}
if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) {
if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) {
v2 = int32(4)
} else {
v2 = int32(1)
@@ -117241,7 +117241,7 @@ func Xwcrtomb(tls *TLS, s uintptr, wc Twchar_t, st uintptr) (r Tsize_t) {
*(*uint8)(unsafe.Pointer(s)) = uint8(wc)
return uint64(1)
} else {
if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) {
if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) {
v1 = int32(4)
} else {
v1 = int32(1)
@@ -117448,7 +117448,7 @@ func Xwctob(tls *TLS, c Twint_t) (r int32) {
if c < uint32(128) {
return Int32FromUint32(c)
}
if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) {
if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) {
v1 = int32(4)
} else {
v1 = int32(1)
@@ -121074,10 +121074,10 @@ func X__h_errno_location(tls *TLS) (r uintptr) {
trc("tls=%v, (%v:)", tls, origin(2))
defer func() { trc("-> %v", r) }()
}
if !((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Fstack != 0) {
if !((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Fstack != 0) {
return uintptr(unsafe.Pointer(&Xh_errno))
}
return ___get_tp(tls) + 144
return uintptr(___get_tp(tls)) + 144
}
func Xherror(tls *TLS, msg uintptr) {
@@ -127885,7 +127885,7 @@ func _fnmatch_internal(tls *TLS, pat uintptr, m Tsize_t, str uintptr, n Tsize_t,
break
}
if v9 = uint32(*(*uint8)(unsafe.Pointer(s + uintptr(-Int32FromInt32(1))))) < uint32(128); !v9 {
if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) {
if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) {
v8 = int32(4)
} else {
v8 = int32(1)
@@ -134350,7 +134350,7 @@ func Xraise(tls *TLS, sig int32) (r int32) {
var _ /* set at bp+0 */ Tsigset_t
_ = ret
X__block_app_sigs(tls, bp)
ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_tkill), int64((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid), int64(sig)))))
ret = int32(X__syscall_ret(tls, Uint64FromInt64(X__syscall2(tls, int64(SYS_tkill), int64((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Ftid), int64(sig)))))
X__restore_sigs(tls, bp)
return ret
}
@@ -135144,13 +135144,13 @@ func _fstatat_statx(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r
return ret
}
*(*Tstat)(unsafe.Pointer(st)) = Tstat{
Fst_dev: uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_dev_major)&Uint64FromUint64(0xfffff000)<<Int32FromInt32(32) | uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_dev_major)&Uint64FromUint64(0x00000fff)<<Int32FromInt32(8) | uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_dev_minor)&Uint64FromUint64(0xffffff00)<<Int32FromInt32(12) | uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_dev_minor)&Uint64FromUint64(0x000000ff),
Fst_dev: uint64(uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_dev_major)&Uint64FromUint64(0xfffff000)<<Int32FromInt32(32) | uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_dev_major)&Uint64FromUint64(0x00000fff)<<Int32FromInt32(8) | uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_dev_minor)&Uint64FromUint64(0xffffff00)<<Int32FromInt32(12) | uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_dev_minor)&Uint64FromUint64(0x000000ff)),
Fst_ino: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_ino,
Fst_mode: uint32((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_mode),
Fst_nlink: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_nlink,
Fst_uid: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_uid,
Fst_gid: (*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_gid,
Fst_rdev: uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_rdev_major)&Uint64FromUint64(0xfffff000)<<Int32FromInt32(32) | uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_rdev_major)&Uint64FromUint64(0x00000fff)<<Int32FromInt32(8) | uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_rdev_minor)&Uint64FromUint64(0xffffff00)<<Int32FromInt32(12) | uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_rdev_minor)&Uint64FromUint64(0x000000ff),
Fst_rdev: uint64(uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_rdev_major)&Uint64FromUint64(0xfffff000)<<Int32FromInt32(32) | uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_rdev_major)&Uint64FromUint64(0x00000fff)<<Int32FromInt32(8) | uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_rdev_minor)&Uint64FromUint64(0xffffff00)<<Int32FromInt32(12) | uint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_rdev_minor)&Uint64FromUint64(0x000000ff)),
Fst_size: Int64FromUint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_size),
Fst_blksize: Int32FromUint32((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_blksize),
Fst_blocks: Int64FromUint64((*(*Tstatx1)(unsafe.Pointer(bp))).Fstx_blocks),
@@ -136438,7 +136438,7 @@ func Xfgetc(tls *TLS, f1 uintptr) (r int32) {
_, _, _, _, _, _ = l, v1, v2, v4, v5, v6
v1 = f1
l = AtomicLoadPInt32(v1 + 140)
if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid {
if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Ftid {
if (*TFILE)(unsafe.Pointer(v1)).Frpos != (*TFILE)(unsafe.Pointer(v1)).Frend {
v6 = v1 + 8
v5 = *(*uintptr)(unsafe.Pointer(v6))
@@ -136682,7 +136682,7 @@ func X__fgetwc_unlocked(tls *TLS, f uintptr) (r Twint_t) {
var ploc uintptr
var wc Twchar_t
_, _, _ = loc, ploc, wc
ploc = ___get_tp(tls) + 152
ploc = uintptr(___get_tp(tls)) + 152
loc = *(*Tlocale_t)(unsafe.Pointer(ploc))
if (*TFILE)(unsafe.Pointer(f)).Fmode <= 0 {
Xfwide(tls, f, int32(1))
@@ -136833,7 +136833,7 @@ func Xflockfile(tls *TLS, f uintptr) {
return
}
___lockfile(tls, f)
X__register_locked_file(tls, f, ___get_tp(tls))
X__register_locked_file(tls, f, uintptr(___get_tp(tls)))
}
type Tcookie = struct {
@@ -137333,7 +137333,7 @@ func Xfputc(tls *TLS, c1 int32, f1 uintptr) (r int32) {
v1 = c1
v2 = f1
l = AtomicLoadPInt32(v2 + 140)
if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid {
if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Ftid {
if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend {
v6 = Uint8FromInt32(v1)
v8 = v2 + 40
@@ -137385,7 +137385,7 @@ func X__fputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t) {
var v2 uint8
var _ /* mbc at bp+0 */ [4]uint8
_, _, _, _, _, _, _ = l, loc, ploc, v1, v2, v3, v4
ploc = ___get_tp(tls) + 152
ploc = uintptr(___get_tp(tls)) + 152
loc = *(*Tlocale_t)(unsafe.Pointer(ploc))
if (*TFILE)(unsafe.Pointer(f)).Fmode <= 0 {
Xfwide(tls, f, int32(1))
@@ -137477,7 +137477,7 @@ func Xfputws(tls *TLS, _ws uintptr, f uintptr) (r int32) {
var _ /* buf at bp+8 */ [1024]uint8
_, _, _, _, _, _, _ = __need_unlock, l, loc, ploc, v1, v2, v3
l = uint64(0)
ploc = ___get_tp(tls) + 152
ploc = uintptr(___get_tp(tls)) + 152
loc = *(*Tlocale_t)(unsafe.Pointer(ploc))
if AtomicLoadPInt32(f+140) >= 0 {
v1 = ___lockfile(tls, f)
@@ -137853,7 +137853,7 @@ func X__do_orphaned_stdio_locks(tls *TLS) {
}
var f uintptr
_ = f
f = (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Fstdio_locks
f = (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Fstdio_locks
for {
if !(f != 0) {
break
@@ -137881,7 +137881,7 @@ func X__unlist_locked_file(tls *TLS, f uintptr) {
if (*TFILE)(unsafe.Pointer(f)).Fprev_locked != 0 {
(*TFILE)(unsafe.Pointer((*TFILE)(unsafe.Pointer(f)).Fprev_locked)).Fnext_locked = (*TFILE)(unsafe.Pointer(f)).Fnext_locked
} else {
(*t__pthread)(unsafe.Pointer(___get_tp(tls))).Fstdio_locks = (*TFILE)(unsafe.Pointer(f)).Fnext_locked
(*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Fstdio_locks = (*TFILE)(unsafe.Pointer(f)).Fnext_locked
}
}
}
@@ -137909,7 +137909,7 @@ func Xftrylockfile(tls *TLS, f uintptr) (r1 int32) {
var v10 bool
var v2 uintptr
_, _, _, _, _, _, _, _, _, _, _, _ = old, owner, r, self, tid, v, v1, v10, v2, v3, v6, v8
self = ___get_tp(tls)
self = uintptr(___get_tp(tls))
tid = (*t__pthread)(unsafe.Pointer(self)).Ftid
owner = AtomicLoadPInt32(f + 140)
if owner & ^Int32FromInt32(MAYBE_WAITERS) == tid {
@@ -137991,7 +137991,7 @@ func Xfwide(tls *TLS, f uintptr, mode int32) (r int32) {
__need_unlock = v1
if mode != 0 {
if !((*TFILE)(unsafe.Pointer(f)).Flocale != 0) {
if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)) != 0) {
if !!(*(*uintptr)(unsafe.Pointer((*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)) != 0) {
v3 = int32(4)
} else {
v3 = int32(1)
@@ -138228,7 +138228,7 @@ func Xgetc(tls *TLS, f1 uintptr) (r int32) {
_, _, _, _, _, _ = l, v1, v2, v4, v5, v6
v1 = f1
l = AtomicLoadPInt32(v1 + 140)
if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid {
if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Ftid {
if (*TFILE)(unsafe.Pointer(v1)).Frpos != (*TFILE)(unsafe.Pointer(v1)).Frend {
v6 = v1 + 8
v5 = *(*uintptr)(unsafe.Pointer(v6))
@@ -138383,7 +138383,7 @@ func Xgetchar(tls *TLS) (r int32) {
_, _, _, _, _, _ = l, v1, v2, v4, v5, v6
v1 = uintptr(unsafe.Pointer(&X__stdin_FILE))
l = AtomicLoadPInt32(v1 + 140)
if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid {
if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Ftid {
if (*TFILE)(unsafe.Pointer(v1)).Frpos != (*TFILE)(unsafe.Pointer(v1)).Frend {
v6 = v1 + 8
v5 = *(*uintptr)(unsafe.Pointer(v6))
@@ -139130,7 +139130,7 @@ func Xputc(tls *TLS, c1 int32, f1 uintptr) (r int32) {
v1 = c1
v2 = f1
l = AtomicLoadPInt32(v2 + 140)
if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid {
if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Ftid {
if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend {
v6 = Uint8FromInt32(v1)
v8 = v2 + 40
@@ -139295,7 +139295,7 @@ func Xputchar(tls *TLS, c1 int32) (r int32) {
v1 = c1
v2 = uintptr(unsafe.Pointer(&X__stdout_FILE))
l = AtomicLoadPInt32(v2 + 140)
if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Ftid {
if l < 0 || l != 0 && l & ^Int32FromInt32(MAYBE_WAITERS) == (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Ftid {
if Int32FromUint8(Uint8FromInt32(v1)) != (*TFILE)(unsafe.Pointer(v2)).Flbf && (*TFILE)(unsafe.Pointer(v2)).Fwpos != (*TFILE)(unsafe.Pointer(v2)).Fwend {
v6 = Uint8FromInt32(v1)
v8 = v2 + 40
@@ -139822,7 +139822,7 @@ func Xungetwc(tls *TLS, c Twint_t, f uintptr) (r Twint_t) {
var v3 bool
var _ /* mbc at bp+0 */ [4]uint8
_, _, _, _, _, _, _, _, _, _ = __need_unlock, l, loc, ploc, v1, v2, v3, v4, v5, p6
ploc = ___get_tp(tls) + 152
ploc = uintptr(___get_tp(tls)) + 152
loc = *(*Tlocale_t)(unsafe.Pointer(ploc))
if AtomicLoadPInt32(f+140) >= 0 {
v1 = ___lockfile(tls, f)
@@ -140074,7 +140074,7 @@ func _pop_arg(tls *TLS, arg uintptr, type1 int32, ap uintptr) {
case int32(_ULONG):
(*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap)))
case int32(_ULLONG):
(*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap)))
(*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))))
case int32(_SHORT):
(*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt16(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))))
case int32(_USHORT):
@@ -140096,7 +140096,7 @@ func _pop_arg(tls *TLS, arg uintptr, type1 int32, ap uintptr) {
case int32(_UIPTR):
(*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))))
case int32(_DBL):
*(*float64)(unsafe.Pointer(arg)) = VaFloat64(&*(*Tva_list)(unsafe.Pointer(ap)))
*(*float64)(unsafe.Pointer(arg)) = float64(VaFloat64(&*(*Tva_list)(unsafe.Pointer(ap))))
case int32(_LDBL):
*(*float64)(unsafe.Pointer(arg)) = VaFloat64(&*(*Tva_list)(unsafe.Pointer(ap)))
}
@@ -142251,7 +142251,7 @@ func _pop_arg1(tls *TLS, arg uintptr, type1 int32, ap uintptr) {
case int32(_ULONG):
(*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap)))
case int32(_ULLONG):
(*Targ)(unsafe.Pointer(arg)).Fi = VaUint64(&*(*Tva_list)(unsafe.Pointer(ap)))
(*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUint64(&*(*Tva_list)(unsafe.Pointer(ap))))
case int32(_SHORT):
(*Targ)(unsafe.Pointer(arg)).Fi = Uint64FromInt16(int16(VaInt32(&*(*Tva_list)(unsafe.Pointer(ap)))))
case int32(_USHORT):
@@ -142273,7 +142273,7 @@ func _pop_arg1(tls *TLS, arg uintptr, type1 int32, ap uintptr) {
case int32(_UIPTR):
(*Targ)(unsafe.Pointer(arg)).Fi = uint64(VaUintptr(&*(*Tva_list)(unsafe.Pointer(ap))))
case int32(_DBL):
*(*float64)(unsafe.Pointer(arg)) = VaFloat64(&*(*Tva_list)(unsafe.Pointer(ap)))
*(*float64)(unsafe.Pointer(arg)) = float64(VaFloat64(&*(*Tva_list)(unsafe.Pointer(ap))))
case int32(_LDBL):
*(*float64)(unsafe.Pointer(arg)) = VaFloat64(&*(*Tva_list)(unsafe.Pointer(ap)))
}
@@ -144435,7 +144435,7 @@ func Xstrtoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint64) {
trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
defer func() { trc("-> %v", r) }()
}
return _strtox1(tls, s, p, base, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))
return _strtox1(tls, s, p, base, uint64(Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)))
}
func Xstrtol(tls *TLS, s uintptr, p uintptr, base int32) (r int64) {
@@ -144443,7 +144443,7 @@ func Xstrtol(tls *TLS, s uintptr, p uintptr, base int32) (r int64) {
trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
defer func() { trc("-> %v", r) }()
}
return Int64FromUint64(_strtox1(tls, s, p, base, Uint64FromUint64(0)+Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1))))
return Int64FromUint64(_strtox1(tls, s, p, base, uint64(Uint64FromUint64(0)+Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))))
}
func Xstrtoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) {
@@ -144715,7 +144715,7 @@ func Xwcstoul(tls *TLS, s uintptr, p uintptr, base int32) (r uint64) {
trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
defer func() { trc("-> %v", r) }()
}
return _wcstox1(tls, s, p, base, Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1))
return _wcstox1(tls, s, p, base, uint64(Uint64FromUint64(2)*Uint64FromInt64(0x7fffffffffffffff)+Uint64FromInt32(1)))
}
func Xwcstol(tls *TLS, s uintptr, p uintptr, base int32) (r int64) {
@@ -144723,7 +144723,7 @@ func Xwcstol(tls *TLS, s uintptr, p uintptr, base int32) (r int64) {
trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
defer func() { trc("-> %v", r) }()
}
return Int64FromUint64(_wcstox1(tls, s, p, base, Uint64FromUint64(0)+Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1))))
return Int64FromUint64(_wcstox1(tls, s, p, base, uint64(Uint64FromUint64(0)+Uint64FromInt64(-Int64FromInt64(0x7fffffffffffffff)-Int64FromInt32(1)))))
}
func Xwcstoimax(tls *TLS, s uintptr, p uintptr, base int32) (r Tintmax_t) {
@@ -148815,7 +148815,7 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) {
if local != 0 {
off = Int32FromUint32(_zi_read32(tls, _types+uintptr(int32(6)*Int32FromUint8(*(*uint8)(unsafe.Pointer(_index + uintptr(m-uint64(1))))))))
}
if t-int64(off) < Int64FromUint64(x) {
if t-int64(off) < int64(Int64FromUint64(x)) {
n /= uint64(2)
} else {
a = m
@@ -148855,7 +148855,7 @@ func _scan_trans(tls *TLS, t int64, local int32, alt uintptr) (r Tsize_t) {
}
/* If t is before first transition, use the above-found type
* and the index-zero (after transition) type as the alt. */
if t-int64(off) < Int64FromUint64(x) {
if t-int64(off) < int64(Int64FromUint64(x)) {
if alt != 0 {
*(*Tsize_t)(unsafe.Pointer(alt)) = uint64(*(*uint8)(unsafe.Pointer(_index)))
}
@@ -149975,7 +149975,7 @@ func Xstrftime(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr) (r Tsize_t
trc("tls=%v s=%v n=%v f=%v tm=%v, (%v:)", tls, s, n, f, tm, origin(2))
defer func() { trc("-> %v", r) }()
}
return X__strftime_l(tls, s, n, f, tm, (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)
return X__strftime_l(tls, s, n, f, tm, (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)
}
func Xstrftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tlocale_t) (r Tsize_t) {
@@ -150719,7 +150719,7 @@ func Xwcsftime(tls *TLS, wcs uintptr, n Tsize_t, f uintptr, tm uintptr) (r Tsize
trc("tls=%v wcs=%v n=%v f=%v tm=%v, (%v:)", tls, wcs, n, f, tm, origin(2))
defer func() { trc("-> %v", r) }()
}
return X__wcsftime_l(tls, wcs, n, f, tm, (*t__pthread)(unsafe.Pointer(___get_tp(tls))).Flocale)
return X__wcsftime_l(tls, wcs, n, f, tm, (*t__pthread)(unsafe.Pointer(uintptr(___get_tp(tls)))).Flocale)
}
func Xwcsftime_l(tls *TLS, s uintptr, n Tsize_t, f uintptr, tm uintptr, loc Tlocale_t) (r Tsize_t) {

View File

@@ -318,8 +318,9 @@ const __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 = 1
const __GCC_IEC_559 = 2
const __GCC_IEC_559_COMPLEX = 2
const __GNUC_EXECUTION_CHARSET_NAME = "UTF-8"
const __GNUC_MINOR__ = 1
const __GNUC_PATCHLEVEL__ = 0
const __GNUC_MINOR__ = 2
const __GNUC_PATCHLEVEL__ = 1
const __GNUC_RH_RELEASE__ = 6
const __GNUC_STDC_INLINE__ = 1
const __GNUC_WIDE_EXECUTION_CHARSET_NAME = "UTF-32LE"
const __GNUC__ = 14
@@ -530,7 +531,7 @@ const __UTA_FBIT__ = 64
const __UTA_IBIT__ = 64
const __UTQ_FBIT__ = 128
const __UTQ_IBIT__ = 0
const __VERSION__ = "14.1.0 20240507 (Red Hat 14.1.0-1)"
const __VERSION__ = "14.2.1 20241104 (Red Hat 14.2.1-6)"
const __WCHAR_MAX__ = 2147483647
const __WCHAR_MIN__ = -2147483648
const __WCHAR_TYPE__ = 0

26
vendor/modernc.org/libc/etc.go generated vendored
View File

@@ -592,32 +592,6 @@ func roundup(n, to uintptr) uintptr {
return n
}
func GoString(s uintptr) string {
if s == 0 {
return ""
}
var buf []byte
for {
b := *(*byte)(unsafe.Pointer(s))
if b == 0 {
return string(buf)
}
buf = append(buf, b)
s++
}
}
// GoBytes returns a byte slice from a C char* having length len bytes.
func GoBytes(s uintptr, len int) []byte {
if len == 0 {
return nil
}
return (*RawMem)(unsafe.Pointer(s))[:len:len]
}
func Bool(v bool) bool { return v }
func Bool32(b bool) int32 {

18
vendor/modernc.org/libc/libc_all.go generated vendored
View File

@@ -32,3 +32,21 @@ func X__sync_sub_and_fetch[T constraints.Integer](t *TLS, p uintptr, v T) T {
panic(todo(""))
}
}
// GoString returns the value of a C string at s.
func GoString(s uintptr) string {
if s == 0 {
return ""
}
p := s
for *(*byte)(unsafe.Pointer(p)) != 0 {
p++
}
return string(unsafe.Slice((*byte)(unsafe.Pointer(s)), p-s))
}
// GoBytes returns a byte slice from a C char* having length len bytes.
func GoBytes(s uintptr, len int) []byte {
return unsafe.Slice((*byte)(unsafe.Pointer(s)), len)
}

23
vendor/modernc.org/libc/libc_musl.go generated vendored
View File

@@ -229,29 +229,6 @@ func CString(s string) (uintptr, error) {
return p, nil
}
// GoBytes returns a byte slice from a C char* having length len bytes.
func GoBytes(s uintptr, len int) []byte {
return unsafe.Slice((*byte)(unsafe.Pointer(s)), len)
}
// GoString returns the value of a C string at s.
func GoString(s uintptr) string {
if s == 0 {
return ""
}
var buf []byte
for {
b := *(*byte)(unsafe.Pointer(s))
if b == 0 {
return string(buf)
}
buf = append(buf, b)
s++
}
}
func mustMalloc(sz Tsize_t) (r uintptr) {
if r = Xmalloc(nil, sz); r != 0 || sz == 0 {
return r

19
vendor/modernc.org/libc/mem.go generated vendored
View File

@@ -121,6 +121,25 @@ func UsableSize(p uintptr) types.Size_t {
return types.Size_t(memory.UintptrUsableSize(p))
}
type MemAllocatorStat struct {
Allocs int
Bytes int
Mmaps int
}
// MemStat returns the global memory allocator statistics.
// should be compiled with the memory.counters build tag for the data to be available.
func MemStat() MemAllocatorStat {
allocMu.Lock()
defer allocMu.Unlock()
return MemAllocatorStat{
Allocs: allocator.Allocs,
Bytes: allocator.Bytes,
Mmaps: allocator.Mmaps,
}
}
// MemAuditStart locks the memory allocator, initializes and enables memory
// auditing. Finaly it unlocks the memory allocator.
//

11
vendor/modernc.org/libc/mem_brk.go generated vendored
View File

@@ -93,6 +93,17 @@ func UsableSize(p uintptr) types.Size_t {
return types.Size_t(*(*uintptr)(unsafe.Pointer(p - uintptrSize)))
}
type MemAllocatorStat struct {
Allocs int
Bytes int
Mmaps int
}
// MemStat no-op for this build tag
func MemStat() MemAllocatorStat {
return MemAllocatorStat{}
}
// MemAuditStart locks the memory allocator, initializes and enables memory
// auditing. Finaly it unlocks the memory allocator.
//

View File

@@ -281,6 +281,17 @@ func UsableSize(p uintptr) Tsize_t {
return heapUsable[p]
}
type MemAllocatorStat struct {
Allocs int
Bytes int
Mmaps int
}
// MemStat no-op for this build tag
func MemStat() MemAllocatorStat {
return MemAllocatorStat{}
}
// MemAuditStart locks the memory allocator, initializes and enables memory
// auditing. Finaly it unlocks the memory allocator.
//

12
vendor/modernc.org/libc/mem_expvar.go generated vendored Normal file
View File

@@ -0,0 +1,12 @@
//go:build libc.memexpvar
package libc
import "expvar"
func init() {
// make sure to build with -tags=memory.counters to have the actual data accumulated in memory allocator
expvar.Publish("memory.allocator", expvar.Func(func() interface{} {
return MemStat()
}))
}

19
vendor/modernc.org/libc/mem_musl.go generated vendored
View File

@@ -127,6 +127,25 @@ func UsableSize(p uintptr) Tsize_t {
return Tsize_t(memory.UintptrUsableSize(p))
}
type MemAllocatorStat struct {
Allocs int
Bytes int
Mmaps int
}
// MemStat returns the global memory allocator statistics.
// should be compiled with the memory.counters build tag for the data to be available.
func MemStat() MemAllocatorStat {
allocatorMu.Lock()
defer allocatorMu.Unlock()
return MemAllocatorStat{
Allocs: allocator.Allocs,
Bytes: allocator.Bytes,
Mmaps: allocator.Mmaps,
}
}
// MemAuditStart locks the memory allocator, initializes and enables memory
// auditing. Finaly it unlocks the memory allocator.
//

11
vendor/modernc.org/libc/memgrind.go generated vendored
View File

@@ -269,6 +269,17 @@ func UsableSize(p uintptr) types.Size_t {
return types.Size_t(memory.UintptrUsableSize(p))
}
type MemAllocatorStat struct {
Allocs int
Bytes int
Mmaps int
}
// MemStat no-op for this build tag
func MemStat() MemAllocatorStat {
return MemAllocatorStat{}
}
// MemAuditStart locks the memory allocator, initializes and enables memory
// auditing. Finally it unlocks the memory allocator.
//

View File

@@ -269,6 +269,17 @@ func UsableSize(p uintptr) Tsize_t {
return Tsize_t(memory.UintptrUsableSize(p))
}
type MemAllocatorStat struct {
Allocs int
Bytes int
Mmaps int
}
// MemStat no-op for this build tag
func MemStat() MemAllocatorStat {
return MemAllocatorStat{}
}
func Xmalloc_usable_size(tls *TLS, p uintptr) (r Tsize_t) {
return UsableSize(p)
}

File diff suppressed because it is too large Load Diff

View File

@@ -22,14 +22,26 @@ type pthreadCleanupItem struct {
routine, arg uintptr
}
// C version is 40 bytes (64b) and 24 bytes (32b).
type pthreadMutex struct { // 64b 32b
sync.Mutex // 0 8 0 8
count int32 // 8 4 8 4
mType uint32 // 12 4 12 4
outer sync.Mutex // 16 8 16 8
owner int32 // 24 4 24 4
// 28 28
// C original, unpatched version
//
// include/alltypes.h.in:86:TYPEDEF struct {
// union {
// int __i[sizeof(long)==8?10:6];
// volatile int __vi[sizeof(long)==8?10:6];
// volatile void *volatile __p[sizeof(long)==8?5:6];
// } __u;
// } pthread_mutex_t;
//TODO(jnml) can remove __ccgo_room patches now.
// We overlay the C version with our version below. It must not be larger than
// the C version.
type pthreadMutex struct { // gc 64b 32b | tinygo 64b 32b
sync.Mutex // 0 8 0 4 | 0 16 0 8
count int32 // 8 4 4 4 | 16 4 8 4
typ uint32 // 12 4 8 4 | 20 4 12 4
owner int32 // 16 4 12 4 | 24 4 16 4
// 20 16 | 28 20
}
type pthreadConds struct {
@@ -39,7 +51,6 @@ type pthreadConds struct {
var (
// Ensure there's enough space for unsafe type conversions.
_ [unsafe.Sizeof(sync.Mutex{}) - __CCGO_SIZEOF_GO_MUTEX]byte
_ [unsafe.Sizeof(Tpthread_mutex_t{}) - unsafe.Sizeof(pthreadMutex{})]byte
_ [unsafe.Sizeof(Tpthread_attr_t{}) - unsafe.Sizeof(pthreadAttr{})]byte
@@ -255,103 +266,75 @@ func Xpthread_self(tls *TLS) uintptr {
func Xpthread_mutex_init(tls *TLS, m, a uintptr) int32 {
*(*Tpthread_mutex_t)(unsafe.Pointer(m)) = Tpthread_mutex_t{}
if a != 0 {
(*pthreadMutex)(unsafe.Pointer(m)).mType = (*Tpthread_mutexattr_t)(unsafe.Pointer(a)).F__attr
(*pthreadMutex)(unsafe.Pointer(m)).typ = (*Tpthread_mutexattr_t)(unsafe.Pointer(a)).F__attr
}
return 0
}
func Xpthread_mutex_destroy(tls *TLS, mutex uintptr) int32 {
func Xpthread_mutex_destroy(tls *TLS, m uintptr) int32 {
*(*Tpthread_mutex_t)(unsafe.Pointer(m)) = Tpthread_mutex_t{}
return 0
}
func Xpthread_mutex_lock(tls *TLS, m uintptr) int32 {
(*pthreadMutex)(unsafe.Pointer(m)).outer.Lock()
owner := (*pthreadMutex)(unsafe.Pointer(m)).owner
typ := (*pthreadMutex)(unsafe.Pointer(m)).mType
switch typ {
switch typ := (*pthreadMutex)(unsafe.Pointer(m)).typ; typ {
case PTHREAD_MUTEX_NORMAL:
(*pthreadMutex)(unsafe.Pointer(m)).owner = tls.ID
(*pthreadMutex)(unsafe.Pointer(m)).outer.Unlock()
(*pthreadMutex)(unsafe.Pointer(m)).Lock()
return 0
case PTHREAD_MUTEX_RECURSIVE:
switch owner {
case 0:
if atomic.CompareAndSwapInt32(&((*pthreadMutex)(unsafe.Pointer(m)).owner), 0, tls.ID) {
(*pthreadMutex)(unsafe.Pointer(m)).count = 1
(*pthreadMutex)(unsafe.Pointer(m)).owner = tls.ID
(*pthreadMutex)(unsafe.Pointer(m)).outer.Unlock()
(*pthreadMutex)(unsafe.Pointer(m)).Lock()
return 0
case tls.ID:
(*pthreadMutex)(unsafe.Pointer(m)).count++
(*pthreadMutex)(unsafe.Pointer(m)).outer.Unlock()
return 0
default:
wait:
(*pthreadMutex)(unsafe.Pointer(m)).outer.Unlock()
(*pthreadMutex)(unsafe.Pointer(m)).Lock()
(*pthreadMutex)(unsafe.Pointer(m)).outer.Lock()
if (*pthreadMutex)(unsafe.Pointer(m)).owner != 0 {
goto wait
}
(*pthreadMutex)(unsafe.Pointer(m)).count = 1
(*pthreadMutex)(unsafe.Pointer(m)).owner = tls.ID
(*pthreadMutex)(unsafe.Pointer(m)).outer.Unlock()
return 0
}
if atomic.LoadInt32(&((*pthreadMutex)(unsafe.Pointer(m)).owner)) == tls.ID {
(*pthreadMutex)(unsafe.Pointer(m)).count++
return 0
}
for {
(*pthreadMutex)(unsafe.Pointer(m)).Lock()
if atomic.CompareAndSwapInt32(&((*pthreadMutex)(unsafe.Pointer(m)).owner), 0, tls.ID) {
(*pthreadMutex)(unsafe.Pointer(m)).count = 1
return 0
}
(*pthreadMutex)(unsafe.Pointer(m)).Unlock()
}
default:
panic(todo("typ=%v", typ))
panic(todo("", typ))
}
return 0
}
func Xpthread_mutex_trylock(tls *TLS, m uintptr) int32 {
(*pthreadMutex)(unsafe.Pointer(m)).outer.Lock()
owner := (*pthreadMutex)(unsafe.Pointer(m)).owner
typ := (*pthreadMutex)(unsafe.Pointer(m)).mType
switch typ {
switch typ := (*pthreadMutex)(unsafe.Pointer(m)).typ; typ {
case PTHREAD_MUTEX_NORMAL:
if owner != 0 {
(*pthreadMutex)(unsafe.Pointer(m)).outer.Unlock()
return EBUSY
if (*pthreadMutex)(unsafe.Pointer(m)).TryLock() {
return 0
}
(*pthreadMutex)(unsafe.Pointer(m)).owner = tls.ID
(*pthreadMutex)(unsafe.Pointer(m)).outer.Unlock()
(*pthreadMutex)(unsafe.Pointer(m)).Lock()
return 0
return EBUSY
default:
panic(todo("typ=%v", typ))
}
}
func Xpthread_mutex_unlock(tls *TLS, m uintptr) int32 {
(*pthreadMutex)(unsafe.Pointer(m)).outer.Lock()
count := (*pthreadMutex)(unsafe.Pointer(m)).count
owner := (*pthreadMutex)(unsafe.Pointer(m)).owner
typ := (*pthreadMutex)(unsafe.Pointer(m)).mType
switch typ {
switch typ := (*pthreadMutex)(unsafe.Pointer(m)).typ; typ {
case PTHREAD_MUTEX_NORMAL:
(*pthreadMutex)(unsafe.Pointer(m)).outer.Unlock()
(*pthreadMutex)(unsafe.Pointer(m)).Unlock()
return 0
case PTHREAD_MUTEX_RECURSIVE:
switch owner {
case tls.ID:
switch count {
case 1:
(*pthreadMutex)(unsafe.Pointer(m)).owner = 0
(*pthreadMutex)(unsafe.Pointer(m)).outer.Unlock()
(*pthreadMutex)(unsafe.Pointer(m)).Unlock()
return 0
default:
(*pthreadMutex)(unsafe.Pointer(m)).count--
(*pthreadMutex)(unsafe.Pointer(m)).outer.Unlock()
return 0
}
default:
panic(todo("", owner, tls.ID))
if atomic.LoadInt32(&((*pthreadMutex)(unsafe.Pointer(m)).owner)) != tls.ID {
return EPERM
}
if atomic.AddInt32(&((*pthreadMutex)(unsafe.Pointer(m)).count), -1) == 0 {
atomic.StoreInt32(&((*pthreadMutex)(unsafe.Pointer(m)).owner), 0)
(*pthreadMutex)(unsafe.Pointer(m)).Unlock()
}
return 0
default:
panic(todo("", typ))
}
@@ -404,9 +387,8 @@ func Xpthread_cond_timedwait(tls *TLS, c, m, ts uintptr) (r int32) {
}
}()
switch typ := (*pthreadMutex)(unsafe.Pointer(m)).mType; typ {
switch typ := (*pthreadMutex)(unsafe.Pointer(m)).typ; typ {
case PTHREAD_MUTEX_NORMAL:
(*pthreadMutex)(unsafe.Pointer(m)).owner = 0
(*pthreadMutex)(unsafe.Pointer(m)).Unlock()
select {
case <-ch:
@@ -414,7 +396,6 @@ func Xpthread_cond_timedwait(tls *TLS, c, m, ts uintptr) (r int32) {
case <-to:
r = ETIMEDOUT
}
(*pthreadMutex)(unsafe.Pointer(m)).owner = tls.ID
(*pthreadMutex)(unsafe.Pointer(m)).Lock()
return r
default:

1
vendor/modernc.org/memory/LICENSE-LOGO generated vendored Normal file
View File

@@ -0,0 +1 @@
https://commons.wikimedia.org/wiki/File:Memory_infra_logo.png

29
vendor/modernc.org/memory/Makefile generated vendored
View File

@@ -37,30 +37,59 @@ editor:
build_all_targets:
GOOS=darwin GOARCH=amd64 go build
GOOS=darwin GOARCH=amd64 staticcheck
GOOS=darwin GOARCH=arm64 go build
GOOS=darwin GOARCH=arm64 staticcheck
GOOS=freebsd GOARCH=386 go build
GOOS=freebsd GOARCH=386 staticcheck
GOOS=freebsd GOARCH=amd64 go build
GOOS=freebsd GOARCH=amd64 staticcheck
GOOS=freebsd GOARCH=arm go build
GOOS=freebsd GOARCH=arm staticcheck
GOOS=freebsd GOARCH=arm64 go build
GOOS=freebsd GOARCH=arm64 staticcheck
GOOS=illumos GOARCH=amd64 go build
GOOS=illumos GOARCH=amd64 staticcheck
GOOS=linux GOARCH=386 go build
GOOS=linux GOARCH=386 staticcheck
GOOS=linux GOARCH=amd64 go build
GOOS=linux GOARCH=amd64 staticcheck
GOOS=linux GOARCH=arm go build
GOOS=linux GOARCH=arm staticcheck
GOOS=linux GOARCH=arm64 go build
GOOS=linux GOARCH=arm64 staticcheck
GOOS=linux GOARCH=loong64 go build
GOOS=linux GOARCH=loong64 staticcheck
GOOS=linux GOARCH=mips go build
GOOS=linux GOARCH=mips staticcheck
GOOS=linux GOARCH=mips64le go build
GOOS=linux GOARCH=mips64le staticcheck
GOOS=linux GOARCH=mipsle go build
GOOS=linux GOARCH=mipsle staticcheck
GOOS=linux GOARCH=ppc64le go build
GOOS=linux GOARCH=ppc64le staticcheck
GOOS=linux GOARCH=riscv64 go build
GOOS=linux GOARCH=riscv64 staticcheck
GOOS=linux GOARCH=s390x go build
GOOS=linux GOARCH=s390x staticcheck
GOOS=netbsd GOARCH=386 go build
GOOS=netbsd GOARCH=386 staticcheck
GOOS=netbsd GOARCH=amd64 go build
GOOS=netbsd GOARCH=amd64 staticcheck
GOOS=netbsd GOARCH=arm go build
GOOS=netbsd GOARCH=arm staticcheck
GOOS=openbsd GOARCH=386 go build
GOOS=openbsd GOARCH=386 staticcheck
GOOS=openbsd GOARCH=amd64 go build
GOOS=openbsd GOARCH=amd64 staticcheck
GOOS=openbsd GOARCH=arm64 go build
GOOS=openbsd GOARCH=arm64 staticcheck
GOOS=windows GOARCH=386 go build
GOOS=windows GOARCH=386 staticcheck
GOOS=windows GOARCH=amd64 go build
GOOS=windows GOARCH=amd64 staticcheck
GOOS=windows GOARCH=arm64 go build
GOOS=windows GOARCH=arm64 staticcheck
internalError:
egrep -ho '"internal error.*"' *.go | sort | cat -n

View File

@@ -1,4 +1,4 @@
# memory
![logo-png](logo.png)
Package memory implements a memory allocator.
@@ -10,4 +10,4 @@ Installation
$ go get modernc.org/memory
Documentation: [godoc.org/modernc.org/memory](http://godoc.org/modernc.org/memory)
[![Go Reference](https://pkg.go.dev/badge/modernc.org/memory.0.svg)](https://pkg.go.dev/modernc.org/memory)

BIN
vendor/modernc.org/memory/logo.png generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

20
vendor/modernc.org/memory/memory.go generated vendored
View File

@@ -57,7 +57,6 @@ import (
"fmt"
"math/bits"
"os"
"reflect"
"unsafe"
)
@@ -352,12 +351,7 @@ func (a *Allocator) Calloc(size int) (r []byte, err error) {
return nil, err
}
var b []byte
sh := (*reflect.SliceHeader)(unsafe.Pointer(&b))
sh.Cap = usableSize(p)
sh.Data = p
sh.Len = size
return b, nil
return (*rawmem)(unsafe.Pointer(p))[:size:usableSize(p)], nil
}
// Close releases all OS resources used by a and sets it to its zero value.
@@ -396,11 +390,7 @@ func (a *Allocator) Malloc(size int) (r []byte, err error) {
return nil, err
}
sh := (*reflect.SliceHeader)(unsafe.Pointer(&r))
sh.Cap = usableSize(p)
sh.Data = p
sh.Len = size
return r, nil
return (*rawmem)(unsafe.Pointer(p))[:size:usableSize(p)], nil
}
// Realloc changes the size of the backing array of b to size bytes or returns
@@ -422,11 +412,7 @@ func (a *Allocator) Realloc(b []byte, size int) (r []byte, err error) {
return nil, err
}
sh := (*reflect.SliceHeader)(unsafe.Pointer(&r))
sh.Cap = usableSize(p)
sh.Data = p
sh.Len = size
return r, nil
return (*rawmem)(unsafe.Pointer(p))[:size:usableSize(p)], nil
}
// UsableSize reports the size of the memory block allocated at p, which must

View File

@@ -1,19 +0,0 @@
// Copyright 2017 The Memory Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build amd64 || arm64
// +build amd64 arm64
package memory
import (
_ "unsafe"
)
// Function syscall.mmap for darwin and openbsd calls internal/abi.FuncPCABI0,
// which is implemented as a compile intrinsic so the code cannot be reused.
// Using go:linkname directive to link mmapSyscall to syscall.mmap
//go:linkname mmapSyscall syscall.mmap
func mmapSyscall(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)

View File

@@ -1,22 +0,0 @@
// Copyright 2009 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-GO file.
//go:build (freebsd && 386) || (freebsd && arm)
// +build freebsd,386 freebsd,arm
package memory
import (
"syscall"
)
// https://cs.opensource.google/go/go/+/refs/tags/go1.17.8:src/syscall/zsyscall_freebsd_386.go
func mmapSyscall(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
r0, _, e1 := syscall.Syscall9(syscall.SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
ret = uintptr(r0)
if e1 != 0 {
err = e1
}
return
}

View File

@@ -1,22 +0,0 @@
// Copyright 2009 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-GO file.
//go:build (freebsd && amd64) || (freebsd && arm64)
// +build freebsd,amd64 freebsd,arm64
package memory
import (
"syscall"
)
// https://cs.opensource.google/go/go/+/refs/tags/go1.17.8:src/syscall/zsyscall_freebsd_amd64.go;l=1337-1346
func mmapSyscall(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
r0, _, e1 := syscall.Syscall6(syscall.SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
ret = uintptr(r0)
if e1 != 0 {
err = e1
}
return
}

View File

@@ -1,91 +0,0 @@
// Copyright 2011 Evan Shaw. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE-MMAP-GO file.
// Modifications (c) 2022 The Memory Authors.
package memory // import "modernc.org/memory"
import (
"os"
"syscall"
_ "unsafe"
)
const (
pageSizeLog = 20
// $ find /usr/include -name syscall.h
// /usr/include/sys/syscall.h
// $ grep -ni munmap /usr/include/sys/syscall.h
// 293:#define SYS_munmap 117
// $ grep -ni mmap /usr/include/sys/syscall.h
// 291:#define SYS_mmap 115
// 303:#define SYS_mmapobj 127
// 442:#define SYS_mmap64 214
// $
// $ uname -a
// SunOS omnios64 5.11 omnios-r151044-d3b715b9d1 i86pc i386 i86pc
// $
sys_MUNMAP = 117
sys_MMAP = 214
)
var (
osPageMask = osPageSize - 1
osPageSize = os.Getpagesize()
)
//go:linkname mmapSyscall syscall.mmap
func mmapSyscall(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
func unmap(addr uintptr, size int) error {
_, _, errno := syscall.Syscall(sys_MUNMAP, addr, uintptr(size), 0)
if errno != 0 {
return errno
}
return nil
}
// pageSize aligned.
func mmap(size int) (uintptr, int, error) {
size = roundup(size, osPageSize)
// The actual mmap syscall varies by architecture. mmapSyscall provides same
// functionality as the unexported funtion syscall.mmap and is declared in
// mmap_*_*.go and mmap_fallback.go. To add support for a new architecture,
// check function mmap in src/syscall/syscall_*_*.go or
// src/syscall/zsyscall_*_*.go in Go's source code.
p, err := mmapSyscall(0, uintptr(size+pageSize), syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_PRIVATE|syscall.MAP_ANON, -1, 0)
if err != nil {
return 0, 0, err
}
n := size + pageSize
if p&uintptr(osPageMask) != 0 {
panic("internal error")
}
mod := int(p) & pageMask
if mod != 0 {
m := pageSize - mod
if err := unmap(p, m); err != nil {
return 0, 0, err
}
n -= m
p += uintptr(m)
}
if p&uintptr(pageMask) != 0 {
panic("internal error")
}
if n-size != 0 {
if err := unmap(p+uintptr(size), n-size); err != nil {
return 0, 0, err
}
}
return p, size, nil
}

View File

@@ -1,35 +0,0 @@
// Copyright 2009 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-GO file.
//go:build linux && (386 || arm || mips || mipsle)
// +build linux
// +build 386 arm mips mipsle
package memory
import (
"syscall"
)
// Function syscall.mmap and syscall.mmap2 are same for linux/386, linux/arm,
// linux/mips and linux/mipsle
// https://cs.opensource.google/go/go/+/refs/tags/go1.17.8:src/syscall/syscall_linux_386.go;l=99-105
func mmapSyscall(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
page := uintptr(offset / 4096)
if offset != int64(page)*4096 {
return 0, syscall.EINVAL
}
return mmap2Syscall(addr, length, prot, flags, fd, page)
}
// https://cs.opensource.google/go/go/+/refs/tags/go1.17.8:src/syscall/zsyscall_linux_386.go;l=1361-1370
func mmap2Syscall(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
r0, _, e1 := syscall.Syscall6(syscall.SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
xaddr = uintptr(r0)
if e1 != 0 {
err = e1
}
return
}

View File

@@ -1,26 +0,0 @@
// Copyright 2009 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-GO file.
//go:build linux && (amd64 || arm64 || mips64 || mips64le || riscv64 || ppc64le || loong64)
// +build linux
// +build amd64 arm64 mips64 mips64le riscv64 ppc64le loong64
package memory
import (
"syscall"
)
// Function syscall.mmap is same for linux/amd64, linux/arm64, linux/mips64,
// linux/mips64le and linux/riscv64.
// https://cs.opensource.google/go/go/+/refs/tags/go1.17.8:src/syscall/zsyscall_linux_amd64.go;l=1575-1584
func mmapSyscall(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
r0, _, e1 := syscall.Syscall6(syscall.SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
xaddr = uintptr(r0)
if e1 != 0 {
err = e1
}
return
}

View File

@@ -1,23 +0,0 @@
// Copyright 2009 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-GO file.
package memory
import (
"syscall"
"unsafe"
)
// https://cs.opensource.google/go/go/+/refs/tags/go1.17.8:src/syscall/syscall_linux_s390x.go;l=105-115
// Linux on s390x uses the old mmap interface, which requires arguments to be passed in a struct.
// mmap2 also requires arguments to be passed in a struct; it is currently not exposed in <asm/unistd.h>.
func mmapSyscall(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
mmap_args := [6]uintptr{addr, length, uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)}
r0, _, e1 := syscall.Syscall(syscall.SYS_MMAP, uintptr(unsafe.Pointer(&mmap_args[0])), 0, 0)
xaddr = uintptr(r0)
if e1 != 0 {
err = e1
}
return
}

View File

@@ -1,22 +0,0 @@
// Copyright 2009 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-GO file.
//go:build (netbsd && 386) || (netbsd && arm)
// +build netbsd,386 netbsd,arm
package memory
import (
"syscall"
)
// https://cs.opensource.google/go/go/+/refs/tags/go1.17.8:src/syscall/zsyscall_freebsd_386.go
func mmapSyscall(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
r0, _, e1 := syscall.Syscall9(syscall.SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
ret = uintptr(r0)
if e1 != 0 {
err = e1
}
return
}

View File

@@ -1,22 +0,0 @@
// Copyright 2009 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-GO file.
//go:build netbsd && amd64
// +build netbsd,amd64
package memory
import (
"syscall"
)
// https://cs.opensource.google/go/go/+/refs/tags/go1.17.8:src/syscall/zsyscall_netbsd_amd64.go;l=1190
func mmapSyscall(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
r0, _, e1 := syscall.Syscall9(syscall.SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
ret = uintptr(r0)
if e1 != 0 {
err = e1
}
return
}

View File

@@ -1,97 +0,0 @@
// Copyright 2011 Evan Shaw. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE-MMAP-GO file.
// Modifications (c) 2024 The Memory Authors.
// Copyright 2024 The Memory Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build openbsd && (386 || amd64 || arm64)
package memory
import (
"fmt"
"os"
"sync"
"unsafe"
"golang.org/x/sys/unix"
)
// track what can be unmapped
var allocmap map[uintptr][]byte
var m sync.Mutex
const pageSizeLog = 20
var (
osPageMask = osPageSize - 1
osPageSize = os.Getpagesize()
)
func init() {
allocmap = make(map[uintptr][]byte)
}
func unmap(addr uintptr, size int) error {
if trace {
fmt.Fprintf(os.Stderr, "unmap %#x\n", addr)
}
a, ok := allocmap[addr]
if !ok {
if trace {
fmt.Fprintf(os.Stderr, "unmap %#x: not found\n", addr)
}
// panic("unmap called on unknown mapping")
return nil
}
if err := unix.Munmap(a); err != nil {
if trace {
fmt.Fprintf(os.Stderr, "unmap: %s\n", err.Error())
}
// panic(err.Error())
return err
}
m.Lock()
delete(allocmap, addr)
m.Unlock()
return nil
}
func mmap(size int) (uintptr, int, error) {
roundsize := roundup(size, osPageSize) + pageSize
b, err := unix.Mmap(-1, 0, roundsize, unix.PROT_READ|unix.PROT_WRITE, unix.MAP_PRIVATE|unix.MAP_ANON)
if err != nil {
return 0, 0, err
}
p := uintptr(unsafe.Pointer(&b[0]))
if trace {
fmt.Fprintf(os.Stderr, "mmap actual @%#x size: %#x\n", p, roundsize)
}
// waste all the space until the next page
r := (p + uintptr(pageSize)) &^ uintptr(pageMask)
nsize := (roundsize) - int((r - p))
if nsize < size {
panic("didn't allocate enough to meet initial request!")
}
if trace {
fmt.Fprintf(os.Stderr, "mmap page-rounded @%#x size: %#x\n", r, nsize)
}
m.Lock()
allocmap[r] = b
m.Unlock()
return r, nsize, nil
}

View File

@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE-MMAP-GO file.
//go:build darwin || dragonfly || freebsd || linux || (solaris && !illumos) || netbsd
// +build darwin dragonfly freebsd linux solaris,!illumos netbsd
//go:build unix
// Modifications (c) 2017 The Memory Authors.
package memory // import "modernc.org/memory"
import (
"golang.org/x/sys/unix"
"os"
"syscall"
"unsafe"
)
const pageSizeLog = 20
@@ -22,28 +22,18 @@ var (
)
func unmap(addr uintptr, size int) error {
_, _, errno := syscall.Syscall(syscall.SYS_MUNMAP, addr, uintptr(size), 0)
if errno != 0 {
return errno
}
return nil
return unix.MunmapPtr(unsafe.Pointer(addr), uintptr(size))
}
// pageSize aligned.
func mmap(size int) (uintptr, int, error) {
size = roundup(size, osPageSize)
// The actual mmap syscall varies by architecture. mmapSyscall provides same
// functionality as the unexported funtion syscall.mmap and is declared in
// mmap_*_*.go and mmap_fallback.go. To add support for a new architecture,
// check function mmap in src/syscall/syscall_*_*.go or
// src/syscall/zsyscall_*_*.go in Go's source code.
p, err := mmapSyscall(0, uintptr(size+pageSize), syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_PRIVATE|syscall.MAP_ANON, -1, 0)
up, err := unix.MmapPtr(-1, 0, nil, uintptr(size+pageSize), unix.PROT_READ|unix.PROT_WRITE, unix.MAP_PRIVATE|unix.MAP_ANON)
if err != nil {
return 0, 0, err
}
p := uintptr(up)
n := size + pageSize
if p&uintptr(osPageMask) != 0 {
panic("internal error")

View File

@@ -5,8 +5,8 @@
package memory // import "modernc.org/memory"
import (
"os"
syscall "golang.org/x/sys/windows"
"os"
)
const (

4
vendor/modernc.org/sqlite/Makefile generated vendored
View File

@@ -56,13 +56,13 @@ clean:
go clean
edit:
@if [ -f "Session.vim" ]; then gvim -S & else gvim -p Makefile go.mod builder.json all_test.go vendor_libsqlite3.go & fi
@if [ -f "Session.vim" ]; then gvim -S & else gvim -p Makefile go.mod builder.json all_test.go & fi
editor:
gofmt -l -s -w .
go test -c -o /dev/null
go build -v -o /dev/null ./...
go build -o /dev/null vendor_libsqlite3.go
cd vendor_libsqlite3 && go build -o /dev/null main.go
test:
go test -v -timeout 24h

View File

@@ -59,170 +59,40 @@ var (
}{mutexNotheld})),
}
MutexCounters = libc.NewPerfCounter([]string{
"enter-fast",
"enter-recursive",
"enter-recursive-loop",
"try-fast",
"try-recursive",
})
MutexEnterCallers = libc.NewStackCapture(4)
mutexApp10 mutex
mutexApp20 mutex
mutexApp30 mutex
mutexLRU0 mutex
mutexMaster0 mutex
mutexMem0 mutex
mutexOpen0 mutex
mutexPMem0 mutex
mutexPRNG0 mutex
mutexVFS10 mutex
mutexVFS20 mutex
mutexVFS30 mutex
mutexes mutexPool
mutexApp1 = mutexes.alloc(false)
mutexApp2 = mutexes.alloc(false)
mutexApp3 = mutexes.alloc(false)
mutexLRU = mutexes.alloc(false)
mutexMaster = mutexes.alloc(false)
mutexMem = mutexes.alloc(false)
mutexOpen = mutexes.alloc(false)
mutexPMem = mutexes.alloc(false)
mutexPRNG = mutexes.alloc(false)
mutexVFS1 = mutexes.alloc(false)
mutexVFS2 = mutexes.alloc(false)
mutexVFS3 = mutexes.alloc(false)
mutexApp1 = uintptr(unsafe.Pointer(&mutexApp10))
mutexApp2 = uintptr(unsafe.Pointer(&mutexApp20))
mutexApp3 = uintptr(unsafe.Pointer(&mutexApp30))
mutexLRU = uintptr(unsafe.Pointer(&mutexLRU0))
mutexMaster = uintptr(unsafe.Pointer(&mutexMaster0))
mutexMem = uintptr(unsafe.Pointer(&mutexMem0))
mutexOpen = uintptr(unsafe.Pointer(&mutexOpen0))
mutexPMem = uintptr(unsafe.Pointer(&mutexPMem0))
mutexPRNG = uintptr(unsafe.Pointer(&mutexPRNG0))
mutexVFS1 = uintptr(unsafe.Pointer(&mutexVFS10))
mutexVFS2 = uintptr(unsafe.Pointer(&mutexVFS20))
mutexVFS3 = uintptr(unsafe.Pointer(&mutexVFS30))
)
type mutexPool struct {
sync.Mutex
a []*[256]mutex
freeList []int
}
func mutexFromPtr(p uintptr) *mutex {
if p == 0 {
return nil
}
ix := p - 1
mutexes.Lock()
defer mutexes.Unlock()
return &mutexes.a[ix>>8][ix&255]
}
func (m *mutexPool) alloc(recursive bool) uintptr {
m.Lock()
defer m.Unlock()
n := len(m.freeList)
if n == 0 {
outer := len(m.a) << 8
m.a = append(m.a, &[256]mutex{})
for i := 0; i < 256; i++ {
m.freeList = append(m.freeList, outer+i)
}
n = len(m.freeList)
}
ix := m.freeList[n-1]
outer := ix >> 8
inner := ix & 255
m.freeList = m.freeList[:n-1]
p := &m.a[outer][inner]
p.poolIndex = ix
p.recursive = recursive
return uintptr(ix) + 1
}
func (m *mutexPool) free(p uintptr) {
ptr := mutexFromPtr(p)
ix := ptr.poolIndex
*ptr = mutex{}
m.Lock()
defer m.Unlock()
m.freeList = append(m.freeList, ix)
}
type mutex struct {
sync.Mutex
wait sync.Mutex
poolIndex int
cnt int32
id int32
cnt int32
id int32 // tls.ID
recursive bool
}
func (m *mutex) enter(id int32) {
// MutexEnterCallers.Record()
if !m.recursive {
// MutexCounters.Inc(0)
m.Lock()
m.id = id
return
}
// MutexCounters.Inc(1)
for {
m.Lock()
switch m.id {
case 0:
m.cnt = 1
m.id = id
m.wait.Lock()
m.Unlock()
return
case id:
m.cnt++
m.Unlock()
return
}
// MutexCounters.Inc(2)
m.Unlock()
m.wait.Lock()
//lint:ignore SA2001 TODO report staticcheck issue
m.wait.Unlock()
}
}
func (m *mutex) try(id int32) int32 {
if !m.recursive {
// MutexCounters.Inc(3)
return SQLITE_BUSY
}
// MutexCounters.Inc(4)
m.Lock()
switch m.id {
case 0:
m.cnt = 1
m.id = id
m.wait.Lock()
m.Unlock()
return SQLITE_OK
case id:
m.cnt++
m.Unlock()
return SQLITE_OK
}
m.Unlock()
return SQLITE_BUSY
}
func (m *mutex) leave(id int32) {
if !m.recursive {
m.id = 0
m.Unlock()
return
}
m.Lock()
m.cnt--
if m.cnt == 0 {
m.id = 0
m.wait.Unlock()
}
m.Unlock()
}
// int (*xMutexInit)(void);
//
// The xMutexInit method defined by this structure is invoked as part of system
@@ -287,14 +157,15 @@ func mutexEnd(tls *libc.TLS) int32 { return SQLITE_OK }
// SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc() returns a
// different mutex on every call. For the static mutex types, the same mutex is
// returned on every call that has the same type number.
func mutexAlloc(tls *libc.TLS, typ int32) uintptr {
defer func() {
}()
func mutexAlloc(tls *libc.TLS, typ int32) (r uintptr) {
switch typ {
case SQLITE_MUTEX_FAST:
return mutexes.alloc(false)
r = libc.Xcalloc(tls, 1, types.Size_t(unsafe.Sizeof(mutex{})))
return r
case SQLITE_MUTEX_RECURSIVE:
return mutexes.alloc(true)
r = libc.Xcalloc(tls, 1, types.Size_t(unsafe.Sizeof(mutex{})))
(*mutex)(unsafe.Pointer(r)).recursive = true
return r
case SQLITE_MUTEX_STATIC_MASTER:
return mutexMaster
case SQLITE_MUTEX_STATIC_MEM:
@@ -325,7 +196,9 @@ func mutexAlloc(tls *libc.TLS, typ int32) uintptr {
}
// void (*xMutexFree)(sqlite3_mutex *);
func mutexFree(tls *libc.TLS, m uintptr) { mutexes.free(m) }
func mutexFree(tls *libc.TLS, m uintptr) {
libc.Xfree(tls, m)
}
// The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt to enter
// a mutex. If another thread is already within the mutex,
@@ -346,7 +219,34 @@ func mutexEnter(tls *libc.TLS, m uintptr) {
if m == 0 {
return
}
mutexFromPtr(m).enter(tls.ID)
if !(*mutex)(unsafe.Pointer(m)).recursive {
(*mutex)(unsafe.Pointer(m)).Lock()
(*mutex)(unsafe.Pointer(m)).id = tls.ID
return
}
id := tls.ID
if atomic.CompareAndSwapInt32(&(*mutex)(unsafe.Pointer(m)).id, 0, id) {
(*mutex)(unsafe.Pointer(m)).cnt = 1
(*mutex)(unsafe.Pointer(m)).Lock()
return
}
if atomic.LoadInt32(&(*mutex)(unsafe.Pointer(m)).id) == id {
(*mutex)(unsafe.Pointer(m)).cnt++
return
}
for {
(*mutex)(unsafe.Pointer(m)).Lock()
if atomic.CompareAndSwapInt32(&(*mutex)(unsafe.Pointer(m)).id, 0, id) {
(*mutex)(unsafe.Pointer(m)).cnt = 1
return
}
(*mutex)(unsafe.Pointer(m)).Unlock()
}
}
// int (*xMutexTry)(sqlite3_mutex *);
@@ -355,7 +255,13 @@ func mutexTry(tls *libc.TLS, m uintptr) int32 {
return SQLITE_OK
}
return mutexFromPtr(m).try(tls.ID)
if !(*mutex)(unsafe.Pointer(m)).recursive {
if (*mutex)(unsafe.Pointer(m)).TryLock() {
return SQLITE_OK
}
}
return SQLITE_BUSY
}
// void (*xMutexLeave)(sqlite3_mutex *);
@@ -364,7 +270,16 @@ func mutexLeave(tls *libc.TLS, m uintptr) {
return
}
mutexFromPtr(m).leave(tls.ID)
if !(*mutex)(unsafe.Pointer(m)).recursive {
(*mutex)(unsafe.Pointer(m)).id = 0
(*mutex)(unsafe.Pointer(m)).Unlock()
return
}
if atomic.AddInt32(&(*mutex)(unsafe.Pointer(m)).cnt, -1) == 0 {
atomic.StoreInt32(&(*mutex)(unsafe.Pointer(m)).id, 0)
(*mutex)(unsafe.Pointer(m)).Unlock()
}
}
// The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines are intended
@@ -397,7 +312,7 @@ func mutexHeld(tls *libc.TLS, m uintptr) int32 {
return 1
}
return libc.Bool32(atomic.LoadInt32(&mutexFromPtr(m).id) == tls.ID)
return libc.Bool32(atomic.LoadInt32(&(*mutex)(unsafe.Pointer(m)).id) == tls.ID)
}
// int (*xMutexNotheld)(sqlite3_mutex *);
@@ -406,5 +321,5 @@ func mutexNotheld(tls *libc.TLS, m uintptr) int32 {
return 1
}
return libc.Bool32(atomic.LoadInt32(&mutexFromPtr(m).id) != tls.ID)
return libc.Bool32(atomic.LoadInt32(&(*mutex)(unsafe.Pointer(m)).id) != tls.ID)
}

View File

@@ -113738,8 +113738,8 @@ var mu mutex
func init() { mu.recursive = true }
func Xsqlite3_initialize(tls *libc.TLS) int32 {
mu.enter(tls.ID)
defer mu.leave(tls.ID)
mutexEnter(tls, uintptr(unsafe.Pointer(&mu)))
defer mutexLeave(tls, uintptr(unsafe.Pointer(&mu)))
var pMainMtx uintptr
var rc int32

View File

@@ -113799,8 +113799,8 @@ var mu mutex
func init() { mu.recursive = true }
func Xsqlite3_initialize(tls *libc.TLS) int32 {
mu.enter(tls.ID)
defer mu.leave(tls.ID)
mutexEnter(tls, uintptr(unsafe.Pointer(&mu)))
defer mutexLeave(tls, uintptr(unsafe.Pointer(&mu)))
var pMainMtx uintptr
var rc int32

View File

@@ -14386,10 +14386,10 @@ func _toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) (r int32) {
(*(*TDateTime)(unsafe.Pointer(bp + 64))).FY += iYearDiff
(*(*TDateTime)(unsafe.Pointer(bp + 64))).FvalidJD = uint8(0)
_computeJD(tls, bp+64)
*(*Ttime_t)(unsafe.Pointer(bp)) = int64((*(*TDateTime)(unsafe.Pointer(bp + 64))).FiJD/libc.Int64FromInt32(1000) - libc.Int64FromInt32(21086676)*libc.Int64FromInt32(10000))
*(*Ttime_t)(unsafe.Pointer(bp)) = (*(*TDateTime)(unsafe.Pointer(bp + 64))).FiJD/libc.Int64FromInt32(1000) - libc.Int64FromInt32(21086676)*libc.Int64FromInt32(10000)
} else {
iYearDiff = 0
*(*Ttime_t)(unsafe.Pointer(bp)) = int64((*TDateTime)(unsafe.Pointer(p)).FiJD/libc.Int64FromInt32(1000) - libc.Int64FromInt32(21086676)*libc.Int64FromInt32(10000))
*(*Ttime_t)(unsafe.Pointer(bp)) = (*TDateTime)(unsafe.Pointer(p)).FiJD/libc.Int64FromInt32(1000) - libc.Int64FromInt32(21086676)*libc.Int64FromInt32(10000)
}
if _osLocaltime(tls, bp, bp+8) != 0 {
Xsqlite3_result_error(tls, pCtx, __ccgo_ts+1212, -int32(1))
@@ -18748,7 +18748,7 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li
if libc.Int32FromUint8(flag_long) == int32(2) {
v = libc.VaInt64(&ap)
} else {
v = int64(libc.VaInt64(&ap))
v = libc.VaInt64(&ap)
}
} else {
v = int64(libc.VaInt32(&ap))
@@ -18770,7 +18770,7 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li
if libc.Int32FromUint8(flag_long) == int32(2) {
longvalue = libc.VaUint64(&ap)
} else {
longvalue = uint64(libc.VaUint64(&ap))
longvalue = libc.VaUint64(&ap)
}
} else {
longvalue = uint64(libc.VaUint32(&ap))
@@ -27188,7 +27188,7 @@ func _unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) (r int32) {
goto shm_open_err
}
nShmFilename = int32(6) + libc.Int32FromUint64(libc.Xstrlen(tls, zBasePath))
pShmNode = Xsqlite3_malloc64(tls, uint64(uint64(96)+libc.Uint64FromInt32(nShmFilename)))
pShmNode = Xsqlite3_malloc64(tls, uint64(96)+libc.Uint64FromInt32(nShmFilename))
if pShmNode == uintptr(0) {
rc = int32(SQLITE_NOMEM)
goto shm_open_err
@@ -27363,7 +27363,7 @@ func _unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExte
} else {
v2 = libc.Int32FromInt32(PROT_READ) | libc.Int32FromInt32(PROT_WRITE)
}
pMem = (*(*func(*libc.TLS, uintptr, Tsize_t, int32, int32, int32, Toff_t) uintptr)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(22)].FpCurrent})))(tls, uintptr(0), libc.Uint64FromInt32(nMap), v2, int32(MAP_SHARED), (*TunixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(int64(szRegion)*libc.Int64FromUint16((*TunixShmNode)(unsafe.Pointer(pShmNode)).FnRegion)))
pMem = (*(*func(*libc.TLS, uintptr, Tsize_t, int32, int32, int32, Toff_t) uintptr)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(22)].FpCurrent})))(tls, uintptr(0), libc.Uint64FromInt32(nMap), v2, int32(MAP_SHARED), (*TunixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(szRegion)*libc.Int64FromUint16((*TunixShmNode)(unsafe.Pointer(pShmNode)).FnRegion))
if pMem == uintptr(-libc.Int32FromInt32(1)) {
rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(21)<<libc.Int32FromInt32(8), __ccgo_ts+3620, (*TunixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, int32(43513))
goto shmpage_out
@@ -29973,12 +29973,12 @@ func _memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags i
i++
}
if p == uintptr(0) {
p = _sqlite3Malloc(tls, uint64(uint64(72)+libc.Uint64FromInt32(szName)+uint64(3)))
p = _sqlite3Malloc(tls, uint64(72)+libc.Uint64FromInt32(szName)+uint64(3))
if p == uintptr(0) {
Xsqlite3_mutex_leave(tls, pVfsMutex)
return int32(SQLITE_NOMEM)
}
apNew = _sqlite3Realloc(tls, _memdb_g.FapMemStore, uint64(uint64(8)*libc.Uint64FromInt32(_memdb_g.FnMemStore+libc.Int32FromInt32(1))))
apNew = _sqlite3Realloc(tls, _memdb_g.FapMemStore, uint64(8)*libc.Uint64FromInt32(_memdb_g.FnMemStore+libc.Int32FromInt32(1)))
if apNew == uintptr(0) {
Xsqlite3_free(tls, p)
Xsqlite3_mutex_leave(tls, pVfsMutex)
@@ -38246,7 +38246,7 @@ func _sqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename u
** specific formatting and order of the various filenames, so if the format
** changes here, be sure to change it there as well.
*/
pPtr = _sqlite3MallocZero(tls, uint64((libc.Uint64FromInt64(312)+libc.Uint64FromInt32(7))&libc.Uint64FromInt32(^libc.Int32FromInt32(7))+libc.Uint64FromInt32((pcacheSize+libc.Int32FromInt32(7)) & ^libc.Int32FromInt32(7))+libc.Uint64FromInt32(((*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile+libc.Int32FromInt32(7)) & ^libc.Int32FromInt32(7))+libc.Uint64FromInt32(journalFileSize*int32(2))+uint64(__SIZEOF_POINTER__)+uint64(4)+libc.Uint64FromInt32(nPathname)+uint64(1)+libc.Uint64FromInt32(nUriByte)+libc.Uint64FromInt32(nPathname)+uint64(8)+uint64(1)+libc.Uint64FromInt32(nPathname)+uint64(4)+uint64(1)+uint64(3)))
pPtr = _sqlite3MallocZero(tls, (libc.Uint64FromInt64(312)+libc.Uint64FromInt32(7))&libc.Uint64FromInt32(^libc.Int32FromInt32(7))+libc.Uint64FromInt32((pcacheSize+libc.Int32FromInt32(7)) & ^libc.Int32FromInt32(7))+libc.Uint64FromInt32(((*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile+libc.Int32FromInt32(7)) & ^libc.Int32FromInt32(7))+libc.Uint64FromInt32(journalFileSize*int32(2))+uint64(__SIZEOF_POINTER__)+uint64(4)+libc.Uint64FromInt32(nPathname)+uint64(1)+libc.Uint64FromInt32(nUriByte)+libc.Uint64FromInt32(nPathname)+uint64(8)+uint64(1)+libc.Uint64FromInt32(nPathname)+uint64(4)+uint64(1)+uint64(3))
if !(pPtr != 0) {
_sqlite3DbFree(tls, uintptr(0), zPathname)
return int32(SQLITE_NOMEM)
@@ -40011,7 +40011,7 @@ func _pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) (r int
** if the allocation fails. Otherwise, zero the new portion in case a
** malloc failure occurs while populating it in the for(...) loop below.
*/
aNew = _sqlite3Realloc(tls, (*TPager)(unsafe.Pointer(pPager)).FaSavepoint, uint64(uint64(56)*libc.Uint64FromInt32(nSavepoint)))
aNew = _sqlite3Realloc(tls, (*TPager)(unsafe.Pointer(pPager)).FaSavepoint, uint64(56)*libc.Uint64FromInt32(nSavepoint))
if !(aNew != 0) {
return int32(SQLITE_NOMEM)
}
@@ -41488,7 +41488,7 @@ func _walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintp
}
/* Request a pointer to the required page from the VFS */
if libc.Int32FromUint8((*TWal)(unsafe.Pointer(pWal)).FexclusiveMode) == int32(WAL_HEAPMEMORY_MODE) {
*(*uintptr)(unsafe.Pointer((*TWal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*8)) = _sqlite3MallocZero(tls, uint64(libc.Uint64FromInt64(2)*libc.Uint64FromInt32(libc.Int32FromInt32(HASHTABLE_NPAGE)*libc.Int32FromInt32(2))+libc.Uint64FromInt32(HASHTABLE_NPAGE)*libc.Uint64FromInt64(4)))
*(*uintptr)(unsafe.Pointer((*TWal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*8)) = _sqlite3MallocZero(tls, libc.Uint64FromInt64(2)*libc.Uint64FromInt32(libc.Int32FromInt32(HASHTABLE_NPAGE)*libc.Int32FromInt32(2))+libc.Uint64FromInt32(HASHTABLE_NPAGE)*libc.Uint64FromInt64(4))
if !(*(*uintptr)(unsafe.Pointer((*TWal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*8)) != 0) {
rc = int32(SQLITE_NOMEM)
}
@@ -42111,7 +42111,7 @@ func _walIndexRecover(tls *libc.TLS, pWal uintptr) (r int32) {
}
/* Malloc a buffer to read frames into. */
szFrame = szPage + int32(WAL_FRAME_HDRSIZE)
aFrame = Xsqlite3_malloc64(tls, uint64(libc.Uint64FromInt32(szFrame)+(libc.Uint64FromInt64(2)*libc.Uint64FromInt32(libc.Int32FromInt32(HASHTABLE_NPAGE)*libc.Int32FromInt32(2))+libc.Uint64FromInt32(HASHTABLE_NPAGE)*libc.Uint64FromInt64(4))))
aFrame = Xsqlite3_malloc64(tls, libc.Uint64FromInt32(szFrame)+(libc.Uint64FromInt64(2)*libc.Uint64FromInt32(libc.Int32FromInt32(HASHTABLE_NPAGE)*libc.Int32FromInt32(2))+libc.Uint64FromInt32(HASHTABLE_NPAGE)*libc.Uint64FromInt64(4)))
if !(aFrame != 0) {
rc = int32(SQLITE_NOMEM)
goto recovery_error
@@ -42323,7 +42323,7 @@ func _sqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintpt
*/
/* Allocate an instance of struct Wal to return. */
*(*uintptr)(unsafe.Pointer(ppWal)) = uintptr(0)
pRet = _sqlite3MallocZero(tls, uint64(uint64(160)+libc.Uint64FromInt32((*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)))
pRet = _sqlite3MallocZero(tls, uint64(160)+libc.Uint64FromInt32((*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile))
if !(pRet != 0) {
return int32(SQLITE_NOMEM)
}
@@ -48006,7 +48006,7 @@ func _zeroPage(tls *libc.TLS, pPage uintptr, flags int32) {
if libc.Int32FromUint16((*TBtShared)(unsafe.Pointer(pBt)).FbtsFlags)&int32(BTS_FAST_SECURE) != 0 {
libc.Xmemset(tls, data+uintptr(hdr), 0, uint64((*TBtShared)(unsafe.Pointer(pBt)).FusableSize-uint32(hdr)))
}
*(*uint8)(unsafe.Pointer(data + uintptr(hdr))) = uint8(libc.Uint8FromInt32(flags))
*(*uint8)(unsafe.Pointer(data + uintptr(hdr))) = libc.Uint8FromInt32(flags)
if flags&int32(PTF_LEAF) == 0 {
v1 = int32(12)
} else {
@@ -50792,7 +50792,7 @@ func _accessPayload(tls *libc.TLS, pCur uintptr, offset Tu32, amt Tu32, pBuf uin
if _sqlite3FaultSim(tls, int32(413)) != 0 {
aNew = uintptr(0)
} else {
aNew = _sqlite3Realloc(tls, (*TBtCursor)(unsafe.Pointer(pCur)).FaOverflow, uint64(libc.Uint64FromInt32(nOvfl*int32(2))*uint64(4)))
aNew = _sqlite3Realloc(tls, (*TBtCursor)(unsafe.Pointer(pCur)).FaOverflow, libc.Uint64FromInt32(nOvfl*int32(2))*uint64(4))
}
if aNew == uintptr(0) {
return int32(SQLITE_NOMEM)
@@ -59384,7 +59384,7 @@ func _valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc Tu8, aff Tu8,
return SQLITE_OK
}
if pList != 0 {
apVal = _sqlite3DbMallocZero(tls, db, uint64(uint64(8)*libc.Uint64FromInt32(nVal)))
apVal = _sqlite3DbMallocZero(tls, db, uint64(8)*libc.Uint64FromInt32(nVal))
if apVal == uintptr(0) {
rc = int32(SQLITE_NOMEM)
goto value_from_function_out
@@ -60518,7 +60518,7 @@ func _resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) {
var nNewSize int32
_ = nNewSize
nNewSize = int32(10) - (*TParse)(unsafe.Pointer(p)).FnLabel
(*TParse)(unsafe.Pointer(p)).FaLabel = _sqlite3DbReallocOrFree(tls, (*TParse)(unsafe.Pointer(p)).Fdb, (*TParse)(unsafe.Pointer(p)).FaLabel, uint64(libc.Uint64FromInt32(nNewSize)*uint64(4)))
(*TParse)(unsafe.Pointer(p)).FaLabel = _sqlite3DbReallocOrFree(tls, (*TParse)(unsafe.Pointer(p)).Fdb, (*TParse)(unsafe.Pointer(p)).FaLabel, libc.Uint64FromInt32(nNewSize)*uint64(4))
if (*TParse)(unsafe.Pointer(p)).FaLabel == uintptr(0) {
(*TParse)(unsafe.Pointer(p)).FnLabelAlloc = 0
} else {
@@ -62091,7 +62091,7 @@ func _sqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) {
v1 = libc.Uint16FromInt32(nResColumn)
(*TVdbe)(unsafe.Pointer(p)).FnResAlloc = v1
(*TVdbe)(unsafe.Pointer(p)).FnResColumn = v1
(*TVdbe)(unsafe.Pointer(p)).FaColName = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(56)*libc.Uint64FromInt32(n)))
(*TVdbe)(unsafe.Pointer(p)).FaColName = _sqlite3DbMallocRawNN(tls, db, uint64(56)*libc.Uint64FromInt32(n))
if (*TVdbe)(unsafe.Pointer(p)).FaColName == uintptr(0) {
return
}
@@ -67056,7 +67056,7 @@ func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp
** caller may modify the value text encoding.
*/
if !((*TPreUpdate)(unsafe.Pointer(p)).FaNew != 0) {
(*TPreUpdate)(unsafe.Pointer(p)).FaNew = _sqlite3DbMallocZero(tls, db, uint64(uint64(56)*libc.Uint64FromInt16((*TVdbeCursor)(unsafe.Pointer((*TPreUpdate)(unsafe.Pointer(p)).FpCsr)).FnField)))
(*TPreUpdate)(unsafe.Pointer(p)).FaNew = _sqlite3DbMallocZero(tls, db, uint64(56)*libc.Uint64FromInt16((*TVdbeCursor)(unsafe.Pointer((*TPreUpdate)(unsafe.Pointer(p)).FpCsr)).FnField))
if !((*TPreUpdate)(unsafe.Pointer(p)).FaNew != 0) {
rc = int32(SQLITE_NOMEM)
goto preupdate_new_out
@@ -70886,7 +70886,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
goto abort_due_to_error
}
/* Create a new savepoint structure. */
pNew = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(32)+libc.Uint64FromInt32(nName)+uint64(1)))
pNew = _sqlite3DbMallocRawNN(tls, db, uint64(32)+libc.Uint64FromInt32(nName)+uint64(1))
if pNew != 0 {
(*TSavepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32
libc.Xmemcpy(tls, (*TSavepoint)(unsafe.Pointer(pNew)).FzName, zName, libc.Uint64FromInt32(nName+int32(1)))
@@ -74134,7 +74134,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
**
** Note: We could avoid this by using a regular memory cell from aMem[] for
** the accumulator, instead of allocating one here. */
nAlloc = uint64(libc.Uint64FromInt64(56) + libc.Uint64FromInt32(n4-libc.Int32FromInt32(1))*libc.Uint64FromInt64(8))
nAlloc = libc.Uint64FromInt64(56) + libc.Uint64FromInt32(n4-libc.Int32FromInt32(1))*libc.Uint64FromInt64(8)
pCtx = _sqlite3DbMallocRawNN(tls, db, nAlloc+uint64(56))
if pCtx == uintptr(0) {
goto no_mem
@@ -83153,7 +83153,7 @@ func _sqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequ
nExtra = libc.Int32FromUint32((*TToken)(unsafe.Pointer(pToken)).Fn + uint32(1)) /* tag-20240227-a */
}
}
pNew = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(72)+libc.Uint64FromInt32(nExtra)))
pNew = _sqlite3DbMallocRawNN(tls, db, uint64(72)+libc.Uint64FromInt32(nExtra))
if pNew != 0 {
libc.Xmemset(tls, pNew, 0, uint64(72))
(*TExpr)(unsafe.Pointer(pNew)).Fop = libc.Uint8FromInt32(op)
@@ -84205,7 +84205,7 @@ func _sqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) (r uintptr) {
if p == uintptr(0) {
return uintptr(0)
}
pNew = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(16)+libc.Uint64FromInt32((*TIdList)(unsafe.Pointer(p)).FnId-libc.Int32FromInt32(1))*uint64(8)))
pNew = _sqlite3DbMallocRawNN(tls, db, uint64(16)+libc.Uint64FromInt32((*TIdList)(unsafe.Pointer(p)).FnId-libc.Int32FromInt32(1))*uint64(8))
if pNew == uintptr(0) {
return uintptr(0)
}
@@ -84337,7 +84337,7 @@ var _zeroItem = TExprList_item{}
func _sqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) (r uintptr) {
var pItem, pList uintptr
_, _ = pItem, pList
pList = _sqlite3DbMallocRawNN(tls, db, uint64(libc.Uint64FromInt64(40)+libc.Uint64FromInt64(32)*libc.Uint64FromInt32(4)))
pList = _sqlite3DbMallocRawNN(tls, db, libc.Uint64FromInt64(40)+libc.Uint64FromInt64(32)*libc.Uint64FromInt32(4))
if pList == uintptr(0) {
_sqlite3ExprDelete(tls, db, pExpr)
return uintptr(0)
@@ -84355,7 +84355,7 @@ func _sqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr
var v1 int32
_, _, _, _ = pItem, pNew, v1, v2
*(*int32)(unsafe.Pointer(pList + 4)) *= int32(2)
pNew = _sqlite3DbRealloc(tls, db, pList, uint64(uint64(40)+libc.Uint64FromInt32((*TExprList)(unsafe.Pointer(pList)).FnAlloc-libc.Int32FromInt32(1))*uint64(32)))
pNew = _sqlite3DbRealloc(tls, db, pList, uint64(40)+libc.Uint64FromInt32((*TExprList)(unsafe.Pointer(pList)).FnAlloc-libc.Int32FromInt32(1))*uint64(32))
if pNew == uintptr(0) {
_sqlite3ExprListDelete(tls, db, pList)
_sqlite3ExprDelete(tls, db, pExpr)
@@ -86452,7 +86452,7 @@ func _sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFals
}
zAff = _exprINAffinity(tls, pParse, pExpr)
nVector = _sqlite3ExprVectorSize(tls, (*TExpr)(unsafe.Pointer(pExpr)).FpLeft)
aiMap = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(libc.Uint64FromInt32(nVector)*uint64(4)))
aiMap = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, libc.Uint64FromInt32(nVector)*uint64(4))
if (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 {
goto sqlite3ExprCodeIN_oom_error
}
@@ -90423,7 +90423,7 @@ func _sqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) {
(*TTable)(unsafe.Pointer(pNew)).FnTabRef = uint32(1)
(*TTable)(unsafe.Pointer(pNew)).FnCol = (*TTable)(unsafe.Pointer(pTab)).FnCol
nAlloc = (int32((*TTable)(unsafe.Pointer(pNew)).FnCol)-int32(1))/int32(8)*int32(8) + int32(8)
(*TTable)(unsafe.Pointer(pNew)).FaCol = _sqlite3DbMallocZero(tls, db, uint64(uint64(16)*libc.Uint64FromInt32(nAlloc)))
(*TTable)(unsafe.Pointer(pNew)).FaCol = _sqlite3DbMallocZero(tls, db, uint64(16)*libc.Uint64FromInt32(nAlloc))
(*TTable)(unsafe.Pointer(pNew)).FzName = _sqlite3MPrintf(tls, db, __ccgo_ts+10968, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
if !((*TTable)(unsafe.Pointer(pNew)).FaCol != 0) || !((*TTable)(unsafe.Pointer(pNew)).FzName != 0) {
goto exit_begin_add_column
@@ -93580,7 +93580,7 @@ func _analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uint
return
}
if (*Tsqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 {
pStat1 = _sqlite3DbMallocZero(tls, db, uint64(libc.Uint64FromInt64(104)+libc.Uint64FromInt32(13)))
pStat1 = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64(104)+libc.Uint64FromInt32(13))
if pStat1 == uintptr(0) {
return
}
@@ -93707,7 +93707,7 @@ func _analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uint
addrNextRow = _sqlite3VdbeCurrentAddr(tls, v)
if nColTest > 0 {
endDistinctTest = _sqlite3VdbeMakeLabel(tls, pParse) /* Array of jump instruction addresses */
aGotoChng = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(4)*libc.Uint64FromInt32(nColTest)))
aGotoChng = _sqlite3DbMallocRawNN(tls, db, uint64(4)*libc.Uint64FromInt32(nColTest))
if aGotoChng == uintptr(0) {
goto _13
}
@@ -94226,7 +94226,7 @@ func _analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, Not
** sqlite_stat1 entries for this index. In that case just clobber
** the old data with the new instead of allocating a new array. */
if (*TIndex)(unsafe.Pointer(pIndex)).FaiRowEst == uintptr(0) {
(*TIndex)(unsafe.Pointer(pIndex)).FaiRowEst = _sqlite3MallocZero(tls, uint64(uint64(8)*libc.Uint64FromInt32(nCol)))
(*TIndex)(unsafe.Pointer(pIndex)).FaiRowEst = _sqlite3MallocZero(tls, uint64(8)*libc.Uint64FromInt32(nCol))
if (*TIndex)(unsafe.Pointer(pIndex)).FaiRowEst == uintptr(0) {
_sqlite3OomFault(tls, (*TanalysisInfo)(unsafe.Pointer(pInfo)).Fdb)
}
@@ -94429,8 +94429,8 @@ func _loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb u
(*TIndex)(unsafe.Pointer(pIdx)).FnSampleCol = nIdxCol
(*TIndex)(unsafe.Pointer(pIdx)).FmxSample = nSample
nByte = libc.Int64FromUint64((libc.Uint64FromInt64(40)*libc.Uint64FromInt32(nSample) + libc.Uint64FromInt32(7)) & libc.Uint64FromInt32(^libc.Int32FromInt32(7)))
nByte = Ti64(uint64(nByte) + uint64(libc.Uint64FromInt64(8)*libc.Uint64FromInt32(nIdxCol)*libc.Uint64FromInt32(3)*libc.Uint64FromInt32(nSample)))
nByte = Ti64(uint64(nByte) + uint64(libc.Uint64FromInt32(nIdxCol)*libc.Uint64FromInt64(8))) /* Space for Index.aAvgEq[] */
nByte = Ti64(uint64(nByte) + libc.Uint64FromInt64(8)*libc.Uint64FromInt32(nIdxCol)*libc.Uint64FromInt32(3)*libc.Uint64FromInt32(nSample))
nByte = Ti64(uint64(nByte) + libc.Uint64FromInt32(nIdxCol)*libc.Uint64FromInt64(8)) /* Space for Index.aAvgEq[] */
(*TIndex)(unsafe.Pointer(pIdx)).FaSample = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64(nByte))
if (*TIndex)(unsafe.Pointer(pIdx)).FaSample == uintptr(0) {
Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp)))
@@ -94830,13 +94830,13 @@ func _attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) {
** hash tables.
*/
if (*Tsqlite3)(unsafe.Pointer(db)).FaDb == db+696 {
aNew = _sqlite3DbMallocRawNN(tls, db, uint64(libc.Uint64FromInt64(32)*libc.Uint64FromInt32(3)))
aNew = _sqlite3DbMallocRawNN(tls, db, libc.Uint64FromInt64(32)*libc.Uint64FromInt32(3))
if aNew == uintptr(0) {
return
}
libc.Xmemcpy(tls, aNew, (*Tsqlite3)(unsafe.Pointer(db)).FaDb, libc.Uint64FromInt64(32)*libc.Uint64FromInt32(2))
} else {
aNew = _sqlite3DbRealloc(tls, db, (*Tsqlite3)(unsafe.Pointer(db)).FaDb, uint64(uint64(32)*libc.Uint64FromInt32((*Tsqlite3)(unsafe.Pointer(db)).FnDb+libc.Int32FromInt32(1))))
aNew = _sqlite3DbRealloc(tls, db, (*Tsqlite3)(unsafe.Pointer(db)).FaDb, uint64(32)*libc.Uint64FromInt32((*Tsqlite3)(unsafe.Pointer(db)).FnDb+libc.Int32FromInt32(1)))
if aNew == uintptr(0) {
return
}
@@ -100766,7 +100766,7 @@ func _sqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u
return uintptr(0)
}
} else {
pNew = _sqlite3DbRealloc(tls, db, pList, uint64(uint64(16)+libc.Uint64FromInt32((*TIdList)(unsafe.Pointer(pList)).FnId)*uint64(8)))
pNew = _sqlite3DbRealloc(tls, db, pList, uint64(16)+libc.Uint64FromInt32((*TIdList)(unsafe.Pointer(pList)).FnId)*uint64(8))
if pNew == uintptr(0) {
_sqlite3IdListDelete(tls, db, pList)
return uintptr(0)
@@ -102222,7 +102222,7 @@ func _findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) (
pColl = _sqlite3HashFind(tls, db+648, zName)
if uintptr(0) == pColl && create != 0 {
nName = _sqlite3Strlen30(tls, zName) + int32(1)
pColl = _sqlite3DbMallocZero(tls, db, uint64(libc.Uint64FromInt32(3)*libc.Uint64FromInt64(40)+libc.Uint64FromInt32(nName)))
pColl = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt32(3)*libc.Uint64FromInt64(40)+libc.Uint64FromInt32(nName))
if pColl != 0 {
pDel = uintptr(0)
(*(*TCollSeq)(unsafe.Pointer(pColl))).FzName = pColl + 3*40
@@ -102572,7 +102572,7 @@ func _sqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32,
** new entry to the hash table and return it.
*/
if v2 = createFlag != 0 && bestScore < int32(FUNC_PERFECT_MATCH); v2 {
v1 = _sqlite3DbMallocZero(tls, db, uint64(uint64(72)+libc.Uint64FromInt32(nName)+uint64(1)))
v1 = _sqlite3DbMallocZero(tls, db, uint64(72)+libc.Uint64FromInt32(nName)+uint64(1))
pBest = v1
}
if v2 && v1 != uintptr(0) {
@@ -105384,7 +105384,7 @@ func _trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
nChar++
}
if nChar > 0 {
azChar = _contextMalloc(tls, context, libc.Int64FromUint64(libc.Uint64FromInt64(int64(nChar))*uint64(libc.Uint64FromInt64(8)+libc.Uint64FromInt64(4))))
azChar = _contextMalloc(tls, context, libc.Int64FromUint64(libc.Uint64FromInt64(int64(nChar))*(libc.Uint64FromInt64(8)+libc.Uint64FromInt64(4))))
if azChar == uintptr(0) {
return
}
@@ -106118,7 +106118,7 @@ func _groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr)
pnsl = (*TGroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths
if pnsl == uintptr(0) {
/* First separator length variation seen, start tracking them. */
pnsl = Xsqlite3_malloc64(tls, uint64(libc.Uint64FromInt32((*TGroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum+libc.Int32FromInt32(1))*uint64(4)))
pnsl = Xsqlite3_malloc64(tls, libc.Uint64FromInt32((*TGroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum+libc.Int32FromInt32(1))*uint64(4))
if pnsl != uintptr(0) {
i = 0
nA = (*TGroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum - int32(1)
@@ -106129,7 +106129,7 @@ func _groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr)
}
}
} else {
pnsl = Xsqlite3_realloc64(tls, pnsl, uint64(libc.Uint64FromInt32((*TGroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum)*uint64(4)))
pnsl = Xsqlite3_realloc64(tls, pnsl, libc.Uint64FromInt32((*TGroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum)*uint64(4))
}
if pnsl != uintptr(0) {
if (*TGroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum > 0 {
@@ -107487,7 +107487,7 @@ func _sqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey
}
} else {
if paiCol != 0 {
aiCol = _sqlite3DbMallocRawNN(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(libc.Uint64FromInt32(nCol)*uint64(4)))
aiCol = _sqlite3DbMallocRawNN(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, libc.Uint64FromInt32(nCol)*uint64(4))
if !(aiCol != 0) {
return int32(1)
}
@@ -108775,7 +108775,7 @@ func _fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr
/* Disable lookaside memory allocation */
(*Tsqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++
(*Tsqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = uint16(0)
pTrigger = _sqlite3DbMallocZero(tls, db, uint64(libc.Uint64FromInt64(72)+libc.Uint64FromInt64(96)+libc.Uint64FromInt32(nFrom)+uint64(1)))
pTrigger = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64(72)+libc.Uint64FromInt64(96)+libc.Uint64FromInt32(nFrom)+uint64(1))
if pTrigger != 0 {
v4 = pTrigger + 1*72
(*TTrigger)(unsafe.Pointer(pTrigger)).Fstep_list = v4
@@ -110053,7 +110053,7 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
*/
bIdListInOrder = libc.BoolUint8((*TTable)(unsafe.Pointer(pTab)).FtabFlags&libc.Uint32FromInt32(libc.Int32FromInt32(TF_OOOHidden)|libc.Int32FromInt32(TF_HasStored)) == uint32(0))
if pColumn != 0 {
aTabColMap = _sqlite3DbMallocZero(tls, db, uint64(libc.Uint64FromInt16((*TTable)(unsafe.Pointer(pTab)).FnCol)*uint64(4)))
aTabColMap = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt16((*TTable)(unsafe.Pointer(pTab)).FnCol)*uint64(4))
if aTabColMap == uintptr(0) {
goto insert_cleanup
}
@@ -110258,7 +110258,7 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
/* If this is not a view, open the table and and all indices */
if !(isView != 0) {
nIdx = _sqlite3OpenTableAndIndices(tls, pParse, pTab, int32(OP_OpenWrite), uint8(0), -int32(1), uintptr(0), bp, bp+4)
aRegIdx = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(4)*libc.Uint64FromInt32(nIdx+libc.Int32FromInt32(2))))
aRegIdx = _sqlite3DbMallocRawNN(tls, db, uint64(4)*libc.Uint64FromInt32(nIdx+libc.Int32FromInt32(2)))
if aRegIdx == uintptr(0) {
goto insert_cleanup
}
@@ -111147,7 +111147,7 @@ func _sqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt
}
(*(*TIndexIterator)(unsafe.Pointer(bp + 8))).FeType = int32(1)
*(*int32)(unsafe.Pointer(bp + 8 + 8)) = nIdx
nByte = uint64((libc.Uint64FromInt64(16)+libc.Uint64FromInt32(1))*libc.Uint64FromInt32(nIdx) + libc.Uint64FromInt32(nIdx))
nByte = (libc.Uint64FromInt64(16)+libc.Uint64FromInt32(1))*libc.Uint64FromInt32(nIdx) + libc.Uint64FromInt32(nIdx)
*(*uintptr)(unsafe.Pointer(bp + 8 + 8 + 8)) = _sqlite3DbMallocZero(tls, db, nByte)
if *(*uintptr)(unsafe.Pointer(bp + 8 + 8 + 8)) == uintptr(0) {
return
@@ -112385,7 +112385,7 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Tsqlite3_c
if xCallback != 0 && (int32(SQLITE_ROW) == rc || int32(SQLITE_DONE) == rc && !(callbackIsInit != 0) && (*Tsqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_NullCallback) != 0) {
if !(callbackIsInit != 0) {
nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 8)))
azCols = _sqlite3DbMallocRaw(tls, db, uint64(libc.Uint64FromInt32(libc.Int32FromInt32(2)*nCol+libc.Int32FromInt32(1))*uint64(8)))
azCols = _sqlite3DbMallocRaw(tls, db, libc.Uint64FromInt32(libc.Int32FromInt32(2)*nCol+libc.Int32FromInt32(1))*uint64(8))
if azCols == uintptr(0) {
goto exec_out
}
@@ -113148,7 +113148,7 @@ func _sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintp
pVfs = (*Tsqlite3)(unsafe.Pointer(db)).FpVfs
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
zAltEntry = uintptr(0)
nMsg = uint64(libc.Xstrlen(tls, zFile))
nMsg = libc.Xstrlen(tls, zFile)
if pzErrMsg != 0 {
*(*uintptr)(unsafe.Pointer(pzErrMsg)) = uintptr(0)
}
@@ -113197,7 +113197,7 @@ func _sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintp
if zAltFile == uintptr(0) {
return int32(SQLITE_NOMEM)
}
if nMsg+uint64(libc.Xstrlen(tls, _azEndings[ii]))+uint64(1) <= uint64(FILENAME_MAX) {
if nMsg+libc.Xstrlen(tls, _azEndings[ii])+uint64(1) <= uint64(FILENAME_MAX) {
handle = _sqlite3OsDlOpen(tls, pVfs, zAltFile)
}
Xsqlite3_free(tls, zAltFile)
@@ -113266,7 +113266,7 @@ func _sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintp
}
if xInit == uintptr(0) {
if pzErrMsg != 0 {
nMsg += uint64(libc.Xstrlen(tls, zEntry) + uint64(300))
nMsg += libc.Xstrlen(tls, zEntry) + uint64(300)
v7 = Xsqlite3_malloc64(tls, nMsg)
*(*uintptr)(unsafe.Pointer(bp)) = v7
*(*uintptr)(unsafe.Pointer(pzErrMsg)) = v7
@@ -113294,7 +113294,7 @@ func _sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintp
return int32(SQLITE_ERROR)
}
/* Append the new shared library handle to the db->aExtension array. */
aHandle = _sqlite3DbMallocZero(tls, db, uint64(uint64(8)*libc.Uint64FromInt32((*Tsqlite3)(unsafe.Pointer(db)).FnExtension+libc.Int32FromInt32(1))))
aHandle = _sqlite3DbMallocZero(tls, db, uint64(8)*libc.Uint64FromInt32((*Tsqlite3)(unsafe.Pointer(db)).FnExtension+libc.Int32FromInt32(1)))
if aHandle == uintptr(0) {
return int32(SQLITE_NOMEM)
}
@@ -115889,7 +115889,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
if pObjTab != 0 {
cnt++
}
aRoot = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(4)*libc.Uint64FromInt32(cnt+libc.Int32FromInt32(1))))
aRoot = _sqlite3DbMallocRawNN(tls, db, uint64(4)*libc.Uint64FromInt32(cnt+libc.Int32FromInt32(1)))
if aRoot == uintptr(0) {
break
}
@@ -120100,7 +120100,7 @@ func _sqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) (r uintpt
var p uintptr
_, _ = nExtra, p
nExtra = libc.Int32FromUint64(libc.Uint64FromInt32(N+X)*(libc.Uint64FromInt64(8)+libc.Uint64FromInt32(1)) - uint64(8))
p = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(40)+libc.Uint64FromInt32(nExtra)))
p = _sqlite3DbMallocRawNN(tls, db, uint64(40)+libc.Uint64FromInt32(nExtra))
if p != 0 {
(*TKeyInfo)(unsafe.Pointer(p)).FaSortFlags = p + 32 + uintptr(N+X)*8
(*TKeyInfo)(unsafe.Pointer(p)).FnKeyField = libc.Uint16FromInt32(N)
@@ -120721,7 +120721,7 @@ func _sqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr,
_sqlite3HashInit(tls, bp+8)
if pEList != 0 {
nCol = (*TExprList)(unsafe.Pointer(pEList)).FnExpr
aCol = _sqlite3DbMallocZero(tls, db, uint64(uint64(16)*libc.Uint64FromInt32(nCol)))
aCol = _sqlite3DbMallocZero(tls, db, uint64(16)*libc.Uint64FromInt32(nCol))
if nCol > int32(32767) {
nCol = int32(32767)
}
@@ -122093,7 +122093,7 @@ func _multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr
** to the right and the left are evaluated, they use the correct
** collation.
*/
aPermute = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(4)*libc.Uint64FromInt32(nOrderBy+libc.Int32FromInt32(1))))
aPermute = _sqlite3DbMallocRawNN(tls, db, uint64(4)*libc.Uint64FromInt32(nOrderBy+libc.Int32FromInt32(1)))
if aPermute != 0 {
*(*Tu32)(unsafe.Pointer(aPermute)) = libc.Uint32FromInt32(nOrderBy)
i = int32(1)
@@ -123464,7 +123464,7 @@ func _constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr
(*TWhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob = int32(1)
}
(*TWhereConst)(unsafe.Pointer(pConst)).FnConst++
(*TWhereConst)(unsafe.Pointer(pConst)).FapExpr = _sqlite3DbReallocOrFree(tls, (*TParse)(unsafe.Pointer((*TWhereConst)(unsafe.Pointer(pConst)).FpParse)).Fdb, (*TWhereConst)(unsafe.Pointer(pConst)).FapExpr, uint64(libc.Uint64FromInt32((*TWhereConst)(unsafe.Pointer(pConst)).FnConst*int32(2))*uint64(8)))
(*TWhereConst)(unsafe.Pointer(pConst)).FapExpr = _sqlite3DbReallocOrFree(tls, (*TParse)(unsafe.Pointer((*TWhereConst)(unsafe.Pointer(pConst)).FpParse)).Fdb, (*TWhereConst)(unsafe.Pointer(pConst)).FapExpr, libc.Uint64FromInt32((*TWhereConst)(unsafe.Pointer(pConst)).FnConst*int32(2))*uint64(8))
if (*TWhereConst)(unsafe.Pointer(pConst)).FapExpr == uintptr(0) {
(*TWhereConst)(unsafe.Pointer(pConst)).FnConst = 0
} else {
@@ -129563,7 +129563,7 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
/* Allocate space for aXRef[], aRegIdx[], and aToOpen[].
** Initialize aXRef[] and aToOpen[] to their default values.
*/
aXRef = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(4)*libc.Uint64FromInt32(int32((*TTable)(unsafe.Pointer(pTab)).FnCol)+nIdx+libc.Int32FromInt32(1))+libc.Uint64FromInt32(nIdx)+uint64(2)))
aXRef = _sqlite3DbMallocRawNN(tls, db, uint64(4)*libc.Uint64FromInt32(int32((*TTable)(unsafe.Pointer(pTab)).FnCol)+nIdx+libc.Int32FromInt32(1))+libc.Uint64FromInt32(nIdx)+uint64(2))
if aXRef == uintptr(0) {
goto update_cleanup
}
@@ -131364,7 +131364,7 @@ func _sqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule
pMod = uintptr(0)
} else {
nName = _sqlite3Strlen30(tls, zName)
pMod = _sqlite3Malloc(tls, uint64(uint64(48)+libc.Uint64FromInt32(nName)+uint64(1)))
pMod = _sqlite3Malloc(tls, uint64(48)+libc.Uint64FromInt32(nName)+uint64(1))
if pMod == uintptr(0) {
_sqlite3OomFault(tls, db)
return uintptr(0)
@@ -132700,7 +132700,7 @@ func _sqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg
}
/* Create a new ephemeral function definition for the overloaded
** function */
pNew = _sqlite3DbMallocZero(tls, db, uint64(uint64(72)+libc.Uint64FromInt32(_sqlite3Strlen30(tls, (*TFuncDef)(unsafe.Pointer(pDef)).FzName))+uint64(1)))
pNew = _sqlite3DbMallocZero(tls, db, uint64(72)+libc.Uint64FromInt32(_sqlite3Strlen30(tls, (*TFuncDef)(unsafe.Pointer(pDef)).FzName))+uint64(1))
if pNew == uintptr(0) {
return pDef
}
@@ -134401,7 +134401,7 @@ func _codeINTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, i
db = (*TParse)(unsafe.Pointer(pParse)).Fdb
pX = _removeUnindexableInClauseTerms(tls, pParse, iEq, pLoop, pX)
if !((*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) {
aiMap = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(uint64(4)*libc.Uint64FromInt32(nEq)))
aiMap = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(4)*libc.Uint64FromInt32(nEq))
eType = _sqlite3FindInIndex(tls, pParse, pX, uint32(IN_INDEX_LOOP), uintptr(0), aiMap, bp)
(*TExpr)(unsafe.Pointer(pExpr)).FiTable = *(*int32)(unsafe.Pointer(bp))
}
@@ -134413,7 +134413,7 @@ func _codeINTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, i
} else {
v3 = n
}
aiMap = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(uint64(4)*libc.Uint64FromInt32(v3)))
aiMap = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(4)*libc.Uint64FromInt32(v3))
eType = _sqlite3FindInIndex(tls, pParse, pX, uint32(IN_INDEX_LOOP), uintptr(0), aiMap, bp)
}
pX = pExpr
@@ -134451,10 +134451,10 @@ func _codeINTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, i
})(unsafe.Pointer(pLevel + 72))).FaInLoop = _sqlite3WhereRealloc(tls, (*TWhereClause)(unsafe.Pointer((*TWhereTerm)(unsafe.Pointer(pTerm)).FpWC)).FpWInfo, (*(*struct {
FnIn int32
FaInLoop uintptr
})(unsafe.Pointer(pLevel + 72))).FaInLoop, uint64(uint64(20)*libc.Uint64FromInt32((*(*struct {
})(unsafe.Pointer(pLevel + 72))).FaInLoop, uint64(20)*libc.Uint64FromInt32((*(*struct {
FnIn int32
FaInLoop uintptr
})(unsafe.Pointer(pLevel + 72))).FnIn)))
})(unsafe.Pointer(pLevel + 72))).FnIn))
pIn = (*(*struct {
FnIn int32
FaInLoop uintptr
@@ -134774,7 +134774,7 @@ func _codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32,
}
if v2 && (*TParse)(unsafe.Pointer(v1)).FwriteMask == uint32(0) {
pTab = (*TIndex)(unsafe.Pointer(pIdx)).FpTable
ai = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(uint64(4)*libc.Uint64FromInt32(int32((*TTable)(unsafe.Pointer(pTab)).FnCol)+libc.Int32FromInt32(1))))
ai = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(4)*libc.Uint64FromInt32(int32((*TTable)(unsafe.Pointer(pTab)).FnCol)+libc.Int32FromInt32(1)))
if ai != 0 {
*(*Tu32)(unsafe.Pointer(ai)) = libc.Uint32FromInt16((*TTable)(unsafe.Pointer(pTab)).FnCol)
i = 0
@@ -135800,7 +135800,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
*/
if libc.Int32FromUint8((*TWhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > int32(1) { /* Original list of tables */
nNotReady = libc.Int32FromUint8((*TWhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - int32(1)
pOrTab = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(88)+libc.Uint64FromInt32(nNotReady)*uint64(80)))
pOrTab = _sqlite3DbMallocRawNN(tls, db, uint64(88)+libc.Uint64FromInt32(nNotReady)*uint64(80))
if pOrTab == uintptr(0) {
return notReady
}
@@ -136585,7 +136585,7 @@ func _whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags Tu16) (r
if (*TWhereClause)(unsafe.Pointer(pWC)).FnTerm >= (*TWhereClause)(unsafe.Pointer(pWC)).FnSlot {
pOld = (*TWhereClause)(unsafe.Pointer(pWC)).Fa
db = (*TParse)(unsafe.Pointer((*TWhereInfo)(unsafe.Pointer((*TWhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse)).Fdb
(*TWhereClause)(unsafe.Pointer(pWC)).Fa = _sqlite3WhereMalloc(tls, (*TWhereClause)(unsafe.Pointer(pWC)).FpWInfo, uint64(uint64(56)*libc.Uint64FromInt32((*TWhereClause)(unsafe.Pointer(pWC)).FnSlot)*uint64(2)))
(*TWhereClause)(unsafe.Pointer(pWC)).Fa = _sqlite3WhereMalloc(tls, (*TWhereClause)(unsafe.Pointer(pWC)).FpWInfo, uint64(56)*libc.Uint64FromInt32((*TWhereClause)(unsafe.Pointer(pWC)).FnSlot)*uint64(2))
if (*TWhereClause)(unsafe.Pointer(pWC)).Fa == uintptr(0) {
if libc.Int32FromUint16(wtFlags)&int32(TERM_DYNAMIC) != 0 {
_sqlite3ExprDelete(tls, db, p)
@@ -140195,7 +140195,7 @@ func _allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable TB
}
/* Allocate the sqlite3_index_info structure
*/
pIdxInfo = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(uint64(96)+(libc.Uint64FromInt64(12)+libc.Uint64FromInt64(8))*libc.Uint64FromInt32(nTerm)+uint64(8)*libc.Uint64FromInt32(nOrderBy)+uint64(40)+uint64(8)*libc.Uint64FromInt32(nTerm)))
pIdxInfo = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(96)+(libc.Uint64FromInt64(12)+libc.Uint64FromInt64(8))*libc.Uint64FromInt32(nTerm)+uint64(8)*libc.Uint64FromInt32(nOrderBy)+uint64(40)+uint64(8)*libc.Uint64FromInt32(nTerm))
if pIdxInfo == uintptr(0) {
_sqlite3ErrorMsg(tls, pParse, __ccgo_ts+1637, 0)
return uintptr(0)
@@ -141195,7 +141195,7 @@ func _whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) (r int32) {
return SQLITE_OK
}
n = (n + int32(7)) & ^libc.Int32FromInt32(7)
paNew = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(8)*libc.Uint64FromInt32(n)))
paNew = _sqlite3DbMallocRawNN(tls, db, uint64(8)*libc.Uint64FromInt32(n))
if paNew == uintptr(0) {
return int32(SQLITE_NOMEM)
}
@@ -145883,7 +145883,7 @@ func _sqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere
if nTabList > int32(1) {
nByteWInfo = libc.Int32FromUint64(libc.Uint64FromInt32(nByteWInfo) + libc.Uint64FromInt32(nTabList-libc.Int32FromInt32(1))*libc.Uint64FromInt64(104))
}
pWInfo = _sqlite3DbMallocRawNN(tls, db, uint64(libc.Uint64FromInt32(nByteWInfo)+uint64(104)))
pWInfo = _sqlite3DbMallocRawNN(tls, db, libc.Uint64FromInt32(nByteWInfo)+uint64(104))
if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
_sqlite3DbFree(tls, db, pWInfo)
pWInfo = uintptr(0)
@@ -156953,13 +156953,13 @@ func _yyGrowStack(tls *libc.TLS, p uintptr) (r int32) {
newSize = oldSize*int32(2) + int32(100)
idx = int32((int64((*TyyParser)(unsafe.Pointer(p)).Fyytos) - int64((*TyyParser)(unsafe.Pointer(p)).Fyystack)) / 24)
if (*TyyParser)(unsafe.Pointer(p)).Fyystack == p+32 {
pNew = _parserStackRealloc(tls, uintptr(0), uint64(libc.Uint64FromInt32(newSize)*uint64(24)))
pNew = _parserStackRealloc(tls, uintptr(0), libc.Uint64FromInt32(newSize)*uint64(24))
if pNew == uintptr(0) {
return int32(1)
}
libc.Xmemcpy(tls, pNew, (*TyyParser)(unsafe.Pointer(p)).Fyystack, libc.Uint64FromInt32(oldSize)*uint64(24))
} else {
pNew = _parserStackRealloc(tls, (*TyyParser)(unsafe.Pointer(p)).Fyystack, uint64(libc.Uint64FromInt32(newSize)*uint64(24)))
pNew = _parserStackRealloc(tls, (*TyyParser)(unsafe.Pointer(p)).Fyystack, libc.Uint64FromInt32(newSize)*uint64(24))
if pNew == uintptr(0) {
return int32(1)
}
@@ -167673,7 +167673,7 @@ func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr
if !(i < nParam*int32(2)) {
break
}
nByte = Tsqlite3_int64(uint64(nByte) + uint64(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(azParam + uintptr(i)*8)))+libc.Uint64FromInt32(1)))
nByte = Tsqlite3_int64(uint64(nByte) + (libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(azParam + uintptr(i)*8))) + libc.Uint64FromInt32(1)))
goto _1
_1:
;
@@ -168366,7 +168366,7 @@ func _sqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) {
_sqlite3BeginBenignMalloc(tls)
if !(aDyn != 0) && nArg == libc.Int32FromUint64(libc.Uint64FromInt64(128)/libc.Uint64FromInt64(8)) || aDyn != 0 && nArg == libc.Int32FromUint64(libc.Uint64FromInt32(_sqlite3MallocSize(tls, aDyn))/libc.Uint64FromInt64(8)) {
/* The aArg[] array needs to grow. */
pNew = _sqlite3Malloc(tls, uint64(libc.Uint64FromInt32(nArg)*uint64(8)*uint64(2)))
pNew = _sqlite3Malloc(tls, libc.Uint64FromInt32(nArg)*uint64(8)*uint64(2))
if pNew != 0 {
libc.Xmemcpy(tls, pNew, aArg, libc.Uint64FromInt32(nArg)*uint64(8))
Xsqlite3_free(tls, aDyn)
@@ -176420,7 +176420,7 @@ func _writeInt64(tls *libc.TLS, p uintptr, _i Ti64) (r int32) {
bp := tls.Alloc(16)
defer tls.Free(16)
*(*Ti64)(unsafe.Pointer(bp)) = _i
*(*Ti64)(unsafe.Pointer(bp)) = libc.Int64FromUint64(libc.X__builtin_bswap64(tls, uint64(libc.Uint64FromInt64(*(*Ti64)(unsafe.Pointer(bp))))))
*(*Ti64)(unsafe.Pointer(bp)) = libc.Int64FromUint64(libc.X__builtin_bswap64(tls, libc.Uint64FromInt64(*(*Ti64)(unsafe.Pointer(bp)))))
libc.Xmemcpy(tls, p, bp, uint64(8))
return int32(8)
}
@@ -176526,7 +176526,7 @@ func _nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) {
func _nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) (r uintptr) {
var pNode uintptr
_ = pNode
pNode = Xsqlite3_malloc64(tls, uint64(uint64(40)+libc.Uint64FromInt32((*TRtree)(unsafe.Pointer(pRtree)).FiNodeSize)))
pNode = Xsqlite3_malloc64(tls, uint64(40)+libc.Uint64FromInt32((*TRtree)(unsafe.Pointer(pRtree)).FiNodeSize))
if pNode != 0 {
libc.Xmemset(tls, pNode, 0, uint64(40)+libc.Uint64FromInt32((*TRtree)(unsafe.Pointer(pRtree)).FiNodeSize))
(*TRtreeNode)(unsafe.Pointer(pNode)).FzData = pNode + 1*40
@@ -176600,7 +176600,7 @@ func _nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode Ti64, pParent uintptr, pp
}
} else {
if (*TRtree)(unsafe.Pointer(pRtree)).FiNodeSize == Xsqlite3_blob_bytes(tls, (*TRtree)(unsafe.Pointer(pRtree)).FpNodeBlob) {
pNode = Xsqlite3_malloc64(tls, uint64(uint64(40)+libc.Uint64FromInt32((*TRtree)(unsafe.Pointer(pRtree)).FiNodeSize)))
pNode = Xsqlite3_malloc64(tls, uint64(40)+libc.Uint64FromInt32((*TRtree)(unsafe.Pointer(pRtree)).FiNodeSize))
if !(pNode != 0) {
rc = int32(SQLITE_NOMEM)
} else {
@@ -177431,7 +177431,7 @@ func _rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore TRtreeDValue, iLevel Tu8)
_, _, _, _, _, _, _ = i, j, nNew, pNew, pParent, v1, v2
if (*TRtreeCursor)(unsafe.Pointer(pCur)).FnPoint >= (*TRtreeCursor)(unsafe.Pointer(pCur)).FnPointAlloc {
nNew = (*TRtreeCursor)(unsafe.Pointer(pCur)).FnPointAlloc*int32(2) + int32(8)
pNew = Xsqlite3_realloc64(tls, (*TRtreeCursor)(unsafe.Pointer(pCur)).FaPoint, uint64(libc.Uint64FromInt32(nNew)*uint64(24)))
pNew = Xsqlite3_realloc64(tls, (*TRtreeCursor)(unsafe.Pointer(pCur)).FaPoint, libc.Uint64FromInt32(nNew)*uint64(24))
if pNew == uintptr(0) {
return uintptr(0)
}
@@ -177889,7 +177889,7 @@ func _rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintp
*/
rc = _nodeAcquire(tls, pRtree, int64(1), uintptr(0), bp)
if rc == SQLITE_OK && argc > 0 {
(*TRtreeCursor)(unsafe.Pointer(pCsr)).FaConstraint = Xsqlite3_malloc64(tls, uint64(uint64(24)*libc.Uint64FromInt32(argc)))
(*TRtreeCursor)(unsafe.Pointer(pCsr)).FaConstraint = Xsqlite3_malloc64(tls, uint64(24)*libc.Uint64FromInt32(argc))
(*TRtreeCursor)(unsafe.Pointer(pCsr)).FnConstraint = argc
if !((*TRtreeCursor)(unsafe.Pointer(pCsr)).FaConstraint != 0) {
rc = int32(SQLITE_NOMEM)
@@ -178788,7 +178788,7 @@ func _SplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHe
/* Allocate an array and populate it with a copy of pCell and
** all cells from node pLeft. Then zero the original node.
*/
aCell = Xsqlite3_malloc64(tls, uint64((libc.Uint64FromInt64(48)+libc.Uint64FromInt64(4))*libc.Uint64FromInt32(nCell+libc.Int32FromInt32(1))))
aCell = Xsqlite3_malloc64(tls, (libc.Uint64FromInt64(48)+libc.Uint64FromInt64(4))*libc.Uint64FromInt32(nCell+libc.Int32FromInt32(1)))
if !(aCell != 0) {
rc = int32(SQLITE_NOMEM)
goto splitnode_out
@@ -179977,7 +179977,7 @@ func _rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintpt
/* Allocate the sqlite3_vtab structure */
nDb = libc.Int32FromUint64(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))
nName = libc.Int32FromUint64(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))))
pRtree = Xsqlite3_malloc64(tls, uint64(uint64(968)+libc.Uint64FromInt32(nDb)+libc.Uint64FromInt32(nName*int32(2))+uint64(8)))
pRtree = Xsqlite3_malloc64(tls, uint64(968)+libc.Uint64FromInt32(nDb)+libc.Uint64FromInt32(nName*int32(2))+uint64(8))
if !(pRtree != 0) {
return int32(SQLITE_NOMEM)
}
@@ -180990,7 +180990,7 @@ func _geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) (r uintptr) {
(*(*TGeoParse)(unsafe.Pointer(bp))).Fz++
if (*(*TGeoParse)(unsafe.Pointer(bp))).FnVertex >= (*(*TGeoParse)(unsafe.Pointer(bp))).FnAlloc {
(*(*TGeoParse)(unsafe.Pointer(bp))).FnAlloc = (*(*TGeoParse)(unsafe.Pointer(bp))).FnAlloc*int32(2) + int32(16)
aNew = Xsqlite3_realloc64(tls, (*(*TGeoParse)(unsafe.Pointer(bp))).Fa, uint64(libc.Uint64FromInt32((*(*TGeoParse)(unsafe.Pointer(bp))).FnAlloc)*uint64(4)*uint64(2)))
aNew = Xsqlite3_realloc64(tls, (*(*TGeoParse)(unsafe.Pointer(bp))).Fa, libc.Uint64FromInt32((*(*TGeoParse)(unsafe.Pointer(bp))).FnAlloc)*uint64(4)*uint64(2))
if aNew == uintptr(0) {
rc = int32(SQLITE_NOMEM)
(*(*TGeoParse)(unsafe.Pointer(bp))).FnErr++
@@ -181035,7 +181035,7 @@ func _geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) (r uintptr) {
if v2 && libc.Int32FromUint8(_geopolySkipSpace(tls, bp)) == libc.Int32FromInt32(0) {
*(*int32)(unsafe.Pointer(bp + 32)) = int32(1)
(*(*TGeoParse)(unsafe.Pointer(bp))).FnVertex-- /* Remove the redundant vertex at the end */
pOut = Xsqlite3_malloc64(tls, libc.Uint64FromInt64(40)+uint64(libc.Uint64FromInt64(4)*libc.Uint64FromInt32(2))*libc.Uint64FromInt64(int64((*(*TGeoParse)(unsafe.Pointer(bp))).FnVertex)-libc.Int64FromInt32(4)))
pOut = Xsqlite3_malloc64(tls, libc.Uint64FromInt64(40)+libc.Uint64FromInt64(4)*libc.Uint64FromInt32(2)*libc.Uint64FromInt64(int64((*(*TGeoParse)(unsafe.Pointer(bp))).FnVertex)-libc.Int64FromInt32(4)))
*(*int32)(unsafe.Pointer(bp + 32)) = int32(1)
if pOut == uintptr(0) {
goto parse_json_err
@@ -181097,7 +181097,7 @@ func _geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) (
}
nVertex = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 1)))<<int32(16) + libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 2)))<<int32(8) + libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(a + 3)))
if (libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(a))) == 0 || libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(a))) == int32(1)) && libc.Uint64FromInt32(nVertex*int32(2))*uint64(4)+uint64(4) == uint64(libc.Uint32FromInt32(nByte)) {
p = Xsqlite3_malloc64(tls, uint64(uint64(40)+libc.Uint64FromInt32((nVertex-int32(1))*int32(2))*uint64(4)))
p = Xsqlite3_malloc64(tls, uint64(40)+libc.Uint64FromInt32((nVertex-int32(1))*int32(2))*uint64(4))
if p == uintptr(0) {
if pRc != 0 {
*(*int32)(unsafe.Pointer(pRc)) = int32(SQLITE_NOMEM)
@@ -181465,7 +181465,7 @@ func _geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintpt
if n > int32(1000) {
n = int32(1000)
}
p = Xsqlite3_malloc64(tls, uint64(uint64(40)+libc.Uint64FromInt32((n-int32(1))*int32(2))*uint64(4)))
p = Xsqlite3_malloc64(tls, uint64(40)+libc.Uint64FromInt32((n-int32(1))*int32(2))*uint64(4))
if p == uintptr(0) {
Xsqlite3_result_error_nomem(tls, context)
return
@@ -181567,7 +181567,7 @@ func _geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr,
goto geopolyBboxFill
geopolyBboxFill:
;
pOut = Xsqlite3_realloc64(tls, p, uint64(libc.Uint64FromInt64(40)+libc.Uint64FromInt64(4)*libc.Uint64FromInt32(2)*libc.Uint64FromInt32(libc.Int32FromInt32(4)-libc.Int32FromInt32(4))))
pOut = Xsqlite3_realloc64(tls, p, libc.Uint64FromInt64(40)+libc.Uint64FromInt64(4)*libc.Uint64FromInt32(2)*libc.Uint64FromInt32(libc.Int32FromInt32(4)-libc.Int32FromInt32(4)))
if pOut == uintptr(0) {
Xsqlite3_free(tls, p)
if context != 0 {
@@ -182376,7 +182376,7 @@ func _geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uint
if !(pRtree != 0) {
return int32(SQLITE_NOMEM)
}
libc.Xmemset(tls, pRtree, 0, uint64(uint64(968)+libc.Uint64FromInt64(nDb)+libc.Uint64FromInt64(nName*int64(2))+uint64(8)))
libc.Xmemset(tls, pRtree, 0, uint64(968)+libc.Uint64FromInt64(nDb)+libc.Uint64FromInt64(nName*int64(2))+uint64(8))
(*TRtree)(unsafe.Pointer(pRtree)).FnBusy = uint32(1)
(*TRtree)(unsafe.Pointer(pRtree)).Fbase.FpModule = uintptr(unsafe.Pointer(&_rtreeModule))
(*TRtree)(unsafe.Pointer(pRtree)).FzDb = pRtree + 1*968
@@ -186944,7 +186944,7 @@ func _rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff Ti64, iAmt int32) (r i
v1 = int32(64)
}
nNew = v1 * int32(2)
aNew = Xsqlite3_realloc64(tls, (*Tsqlite3rbu)(unsafe.Pointer(pRbu)).FaFrame, uint64(libc.Uint64FromInt32(nNew)*uint64(8)))
aNew = Xsqlite3_realloc64(tls, (*Tsqlite3rbu)(unsafe.Pointer(pRbu)).FaFrame, libc.Uint64FromInt32(nNew)*uint64(8))
if aNew == uintptr(0) {
return int32(SQLITE_NOMEM)
}
@@ -189878,7 +189878,7 @@ func _statDecodePage(tls *libc.TLS, pBt uintptr, p uintptr) (r int32) {
_sqlite3BtreeEnter(tls, pBt)
nUsable = szPage - _sqlite3BtreeGetReserveNoMutex(tls, pBt)
_sqlite3BtreeLeave(tls, pBt)
(*TStatPage)(unsafe.Pointer(p)).FaCell = Xsqlite3_malloc64(tls, uint64(libc.Uint64FromInt32((*TStatPage)(unsafe.Pointer(p)).FnCell+libc.Int32FromInt32(1))*uint64(32)))
(*TStatPage)(unsafe.Pointer(p)).FaCell = Xsqlite3_malloc64(tls, libc.Uint64FromInt32((*TStatPage)(unsafe.Pointer(p)).FnCell+libc.Int32FromInt32(1))*uint64(32))
if (*TStatPage)(unsafe.Pointer(p)).FaCell == uintptr(0) {
return int32(SQLITE_NOMEM)
}
@@ -189925,7 +189925,7 @@ func _statDecodePage(tls *libc.TLS, pBt uintptr, p uintptr) (r int32) {
}
(*TStatCell)(unsafe.Pointer(pCell)).FnLastOvfl = libc.Int32FromUint32(*(*Tu32)(unsafe.Pointer(bp)) - libc.Uint32FromInt32(nLocal) - libc.Uint32FromInt32((nOvfl-int32(1))*(nUsable-int32(4))))
(*TStatCell)(unsafe.Pointer(pCell)).FnOvfl = nOvfl
(*TStatCell)(unsafe.Pointer(pCell)).FaOvfl = Xsqlite3_malloc64(tls, uint64(uint64(4)*libc.Uint64FromInt32(nOvfl)))
(*TStatCell)(unsafe.Pointer(pCell)).FaOvfl = Xsqlite3_malloc64(tls, uint64(4)*libc.Uint64FromInt32(nOvfl))
if (*TStatCell)(unsafe.Pointer(pCell)).FaOvfl == uintptr(0) {
return int32(SQLITE_NOMEM)
}
@@ -191555,7 +191555,7 @@ func _sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uin
}
return SQLITE_OK
}
libc.Xmemset(tls, apNew, 0, uint64(uint64(8)*libc.Uint64FromInt64(nNew)))
libc.Xmemset(tls, apNew, 0, uint64(8)*libc.Uint64FromInt64(nNew))
i = 0
for {
if !(i < (*TSessionTable)(unsafe.Pointer(pTab)).FnChange) {
@@ -191687,10 +191687,10 @@ func _sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr,
bRowid = 0
}
nDbCol += bRowid
nByte = Tsqlite3_int64(uint64(nByte) + uint64(libc.Xstrlen(tls, __ccgo_ts+29902)))
nByte = Tsqlite3_int64(uint64(nByte) + libc.Xstrlen(tls, __ccgo_ts+29902))
rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp)))
if rc == SQLITE_OK {
nByte = Tsqlite3_int64(uint64(nByte) + uint64(libc.Uint64FromInt32(nDbCol)*(libc.Uint64FromInt64(8)*libc.Uint64FromInt32(2)+libc.Uint64FromInt64(4)+libc.Uint64FromInt64(1)+libc.Uint64FromInt32(1)+libc.Uint64FromInt32(1))))
nByte = Tsqlite3_int64(uint64(nByte) + libc.Uint64FromInt32(nDbCol)*(libc.Uint64FromInt64(8)*libc.Uint64FromInt32(2)+libc.Uint64FromInt64(4)+libc.Uint64FromInt64(1)+libc.Uint64FromInt32(1)+libc.Uint64FromInt32(1)))
pAlloc = _sessionMalloc64(tls, pSession, nByte)
if pAlloc == uintptr(0) {
rc = int32(SQLITE_NOMEM)
@@ -191819,7 +191819,7 @@ func _sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr, db uintptr
}
if pSession != 0 && (*Tsqlite3_session)(unsafe.Pointer(pSession)).FbEnableSize != 0 {
p3 = pSession + 64
*(*Ti64)(unsafe.Pointer(p3)) = Ti64(uint64(*(*Ti64)(unsafe.Pointer(p3))) + uint64(libc.Uint64FromInt32(libc.Int32FromInt32(1)+_sessionVarintLen(tls, (*TSessionTable)(unsafe.Pointer(pTab)).FnCol)+(*TSessionTable)(unsafe.Pointer(pTab)).FnCol)+libc.Xstrlen(tls, (*TSessionTable)(unsafe.Pointer(pTab)).FzName)+libc.Uint64FromInt32(1)))
*(*Ti64)(unsafe.Pointer(p3)) = Ti64(uint64(*(*Ti64)(unsafe.Pointer(p3))) + (libc.Uint64FromInt32(libc.Int32FromInt32(1)+_sessionVarintLen(tls, (*TSessionTable)(unsafe.Pointer(pTab)).FnCol)+(*TSessionTable)(unsafe.Pointer(pTab)).FnCol) + libc.Xstrlen(tls, (*TSessionTable)(unsafe.Pointer(pTab)).FzName) + libc.Uint64FromInt32(1)))
}
}
}
@@ -193078,7 +193078,7 @@ func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession ui
/* Zero the output value in case an error occurs. */
*(*uintptr)(unsafe.Pointer(ppSession)) = uintptr(0)
/* Allocate and populate the new session object. */
pNew = Xsqlite3_malloc64(tls, uint64(uint64(136)+libc.Uint64FromInt32(nDb)+uint64(1)))
pNew = Xsqlite3_malloc64(tls, uint64(136)+libc.Uint64FromInt32(nDb)+uint64(1))
if !(pNew != 0) {
return int32(SQLITE_NOMEM)
}
@@ -195097,7 +195097,7 @@ func _sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOu
}
case int32(SQLITE_UPDATE):
if uintptr(0) == apVal {
apVal = Xsqlite3_malloc64(tls, uint64(uint64(8)*libc.Uint64FromInt32(*(*int32)(unsafe.Pointer(bp + 24)))*uint64(2)))
apVal = Xsqlite3_malloc64(tls, uint64(8)*libc.Uint64FromInt32(*(*int32)(unsafe.Pointer(bp + 24)))*uint64(2))
if uintptr(0) == apVal {
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_NOMEM)
goto finished_invert
@@ -196505,7 +196505,7 @@ func _sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset i
pNew = uintptr(0)
rc = SQLITE_OK
if !(pExist != 0) {
pNew = Xsqlite3_malloc64(tls, uint64(uint64(32)+libc.Uint64FromInt32(nRec)))
pNew = Xsqlite3_malloc64(tls, uint64(32)+libc.Uint64FromInt32(nRec))
if !(pNew != 0) {
return int32(SQLITE_NOMEM)
}
@@ -196875,7 +196875,7 @@ func _sessionChangesetFindTable(tls *libc.TLS, pGrp uintptr, zTab uintptr, pIter
}
/* If one was not found above, create a new table now */
if !(pTab != 0) {
pTab = Xsqlite3_malloc64(tls, uint64(uint64(88)+libc.Uint64FromInt32(*(*int32)(unsafe.Pointer(bp + 8)))+libc.Uint64FromInt32(nTab)+uint64(1)))
pTab = Xsqlite3_malloc64(tls, uint64(88)+libc.Uint64FromInt32(*(*int32)(unsafe.Pointer(bp + 8)))+libc.Uint64FromInt32(nTab)+uint64(1))
if !(pTab != 0) {
return int32(SQLITE_NOMEM)
}
@@ -199942,7 +199942,7 @@ func _fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) (r int32) {
v1 = int32(64)
}
nNew = v1
aNew = Xsqlite3_realloc64(tls, (*TFts5SFinder)(unsafe.Pointer(p)).FaFirst, uint64(libc.Uint64FromInt32(nNew)*uint64(4)))
aNew = Xsqlite3_realloc64(tls, (*TFts5SFinder)(unsafe.Pointer(p)).FaFirst, libc.Uint64FromInt32(nNew)*uint64(4))
if aNew == uintptr(0) {
return int32(SQLITE_NOMEM)
}
@@ -201472,7 +201472,7 @@ func _fts5ConfigParseSpecial(tls *libc.TLS, pConfig uintptr, zCmd uintptr, zArg
if Xsqlite3_strnicmp(tls, __ccgo_ts+35421, zCmd, nCmd) == 0 {
p1 = zArg
nArg = libc.Int64FromUint64(libc.Xstrlen(tls, zArg) + uint64(1))
azArg = _sqlite3Fts5MallocZero(tls, bp, libc.Int64FromUint64(uint64(libc.Uint64FromInt64(8)+libc.Uint64FromInt32(2))*libc.Uint64FromInt64(nArg)))
azArg = _sqlite3Fts5MallocZero(tls, bp, libc.Int64FromUint64((libc.Uint64FromInt64(8)+libc.Uint64FromInt32(2))*libc.Uint64FromInt64(nArg)))
if azArg != 0 {
pSpace = azArg + uintptr(nArg)*8
if (*TFts5Config)(unsafe.Pointer(pConfig)).Ft.FazArg != 0 {
@@ -204401,7 +204401,7 @@ func _fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken ui
v2 = 0
}
nNew = SZALLOC + v2
pNew = Xsqlite3_realloc64(tls, pPhrase, uint64(uint64(72)+uint64(40)*libc.Uint64FromInt32(nNew)))
pNew = Xsqlite3_realloc64(tls, pPhrase, uint64(72)+uint64(40)*libc.Uint64FromInt32(nNew))
if pNew == uintptr(0) {
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_NOMEM)
} else {
@@ -204725,7 +204725,7 @@ func _fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) (r u
v1 = 0
}
nCol = v1 /* New colset object to return */
pNew = Xsqlite3_realloc64(tls, p, uint64(uint64(8)+uint64(4)*libc.Uint64FromInt32(nCol)))
pNew = Xsqlite3_realloc64(tls, p, uint64(8)+uint64(4)*libc.Uint64FromInt32(nCol))
if pNew == uintptr(0) {
(*TFts5Parse)(unsafe.Pointer(pParse)).Frc = int32(SQLITE_NOMEM)
} else {
@@ -205309,7 +205309,7 @@ func _sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) (r
var i int32
var pBuf, pNode, pRet uintptr
_, _, _, _ = i, pBuf, pNode, pRet
pRet = Xsqlite3_malloc64(tls, uint64(uint64(16)*libc.Uint64FromInt32((*TFts5Expr)(unsafe.Pointer(pExpr)).FnPhrase)))
pRet = Xsqlite3_malloc64(tls, uint64(16)*libc.Uint64FromInt32((*TFts5Expr)(unsafe.Pointer(pExpr)).FnPhrase))
if pRet != 0 {
libc.Xmemset(tls, pRet, 0, uint64(16)*libc.Uint64FromInt32((*TFts5Expr)(unsafe.Pointer(pExpr)).FnPhrase))
i = 0
@@ -205903,7 +205903,7 @@ func _fts5HashResize(tls *libc.TLS, pHash uintptr) (r int32) {
_, _, _, _, _, _ = apNew, apOld, i, iHash, nNew, p
nNew = (*TFts5Hash)(unsafe.Pointer(pHash)).FnSlot * int32(2)
apOld = (*TFts5Hash)(unsafe.Pointer(pHash)).FaSlot
apNew = Xsqlite3_malloc64(tls, uint64(libc.Uint64FromInt32(nNew)*uint64(8)))
apNew = Xsqlite3_malloc64(tls, libc.Uint64FromInt32(nNew)*uint64(8))
if !(apNew != 0) {
return int32(SQLITE_NOMEM)
}
@@ -206215,7 +206215,7 @@ func _fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32
_, _, _, _, _, _, _ = ap, i, iSlot, nMergeSlot, pEntry, pIter, pList
nMergeSlot = int32(32)
*(*uintptr)(unsafe.Pointer(ppSorted)) = uintptr(0)
ap = Xsqlite3_malloc64(tls, uint64(uint64(8)*libc.Uint64FromInt32(nMergeSlot)))
ap = Xsqlite3_malloc64(tls, uint64(8)*libc.Uint64FromInt32(nMergeSlot))
if !(ap != 0) {
return int32(SQLITE_NOMEM)
}
@@ -208702,7 +208702,7 @@ func _fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) {
/* If necessary, grow the pIter->aRowidOffset[] array. */
if iRowidOffset >= (*TFts5SegIter)(unsafe.Pointer(pIter)).FnRowidOffset {
nNew = (*TFts5SegIter)(unsafe.Pointer(pIter)).FnRowidOffset + int32(8)
aNew = Xsqlite3_realloc64(tls, (*TFts5SegIter)(unsafe.Pointer(pIter)).FaRowidOffset, uint64(libc.Uint64FromInt32(nNew)*uint64(4)))
aNew = Xsqlite3_realloc64(tls, (*TFts5SegIter)(unsafe.Pointer(pIter)).FaRowidOffset, libc.Uint64FromInt32(nNew)*uint64(4))
if aNew == uintptr(0) {
(*TFts5Index)(unsafe.Pointer(p)).Frc = int32(SQLITE_NOMEM)
break
@@ -210954,7 +210954,7 @@ func _fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32)
var nByte Tsize_t
_, _ = aDlidx, nByte
if (*TFts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && nLvl >= (*TFts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx {
aDlidx = Xsqlite3_realloc64(tls, (*TFts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx, uint64(uint64(32)*libc.Uint64FromInt32(nLvl)))
aDlidx = Xsqlite3_realloc64(tls, (*TFts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx, uint64(32)*libc.Uint64FromInt32(nLvl))
if aDlidx == uintptr(0) {
(*TFts5Index)(unsafe.Pointer(p)).Frc = int32(SQLITE_NOMEM)
} else {
@@ -212671,7 +212671,7 @@ func _fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) (r uint
;
i++
}
nByte = Tsqlite3_int64(uint64(nByte) + uint64(libc.Uint64FromInt32((*TFts5Structure)(unsafe.Pointer(pStruct)).FnLevel+libc.Int32FromInt32(1))*libc.Uint64FromInt64(16)))
nByte = Tsqlite3_int64(uint64(nByte) + libc.Uint64FromInt32((*TFts5Structure)(unsafe.Pointer(pStruct)).FnLevel+libc.Int32FromInt32(1))*libc.Uint64FromInt64(16))
pNew = _sqlite3Fts5MallocZero(tls, p+60, nByte)
if pNew != 0 {
nByte = libc.Int64FromUint64(libc.Uint64FromInt32(nSeg) * uint64(56))
@@ -218237,7 +218237,7 @@ func _fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) (r int32) {
v3 = int32(32)
}
nNewSize = v3
aInst = Xsqlite3_realloc64(tls, (*TFts5Cursor)(unsafe.Pointer(pCsr)).FaInst, uint64(libc.Uint64FromInt32(nNewSize)*uint64(4)*uint64(3)))
aInst = Xsqlite3_realloc64(tls, (*TFts5Cursor)(unsafe.Pointer(pCsr)).FaInst, libc.Uint64FromInt32(nNewSize)*uint64(4)*uint64(3))
if aInst != 0 {
(*TFts5Cursor)(unsafe.Pointer(pCsr)).FaInst = aInst
(*TFts5Cursor)(unsafe.Pointer(pCsr)).FnInstAlloc = nNewSize
@@ -221078,7 +221078,7 @@ func _sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) (r int32
rc = SQLITE_OK
libc.Xmemset(tls, bp, 0, uint64(40))
(*(*TFts5IntegrityCtx)(unsafe.Pointer(bp))).FpConfig = (*TFts5Storage)(unsafe.Pointer(p)).FpConfig
aTotalSize = Xsqlite3_malloc64(tls, uint64(libc.Uint64FromInt32((*TFts5Config)(unsafe.Pointer(pConfig)).FnCol)*(libc.Uint64FromInt64(4)+libc.Uint64FromInt64(8))))
aTotalSize = Xsqlite3_malloc64(tls, libc.Uint64FromInt32((*TFts5Config)(unsafe.Pointer(pConfig)).FnCol)*(libc.Uint64FromInt64(4)+libc.Uint64FromInt64(8)))
if !(aTotalSize != 0) {
return int32(SQLITE_NOMEM)
}
@@ -221704,7 +221704,7 @@ func _fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars
rc = SQLITE_OK
n = libc.Int32FromUint64(libc.Xstrlen(tls, z))
if n > 0 {
aNew = Xsqlite3_realloc64(tls, (*TUnicode61Tokenizer)(unsafe.Pointer(p)).FaiException, uint64(libc.Uint64FromInt32(n+(*TUnicode61Tokenizer)(unsafe.Pointer(p)).FnException)*uint64(4)))
aNew = Xsqlite3_realloc64(tls, (*TUnicode61Tokenizer)(unsafe.Pointer(p)).FaiException, libc.Uint64FromInt32(n+(*TUnicode61Tokenizer)(unsafe.Pointer(p)).FnException)*uint64(4))
if aNew != 0 {
nNew = (*TUnicode61Tokenizer)(unsafe.Pointer(p)).FnException
zCsr = z
@@ -221843,7 +221843,7 @@ func _fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int3
libc.Xmemset(tls, p, 0, uint64(192))
(*TUnicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(FTS5_REMOVE_DIACRITICS_SIMPLE)
(*TUnicode61Tokenizer)(unsafe.Pointer(p)).FnFold = int32(64)
(*TUnicode61Tokenizer)(unsafe.Pointer(p)).FaFold = Xsqlite3_malloc64(tls, uint64(libc.Uint64FromInt32((*TUnicode61Tokenizer)(unsafe.Pointer(p)).FnFold)*uint64(1)))
(*TUnicode61Tokenizer)(unsafe.Pointer(p)).FaFold = Xsqlite3_malloc64(tls, libc.Uint64FromInt32((*TUnicode61Tokenizer)(unsafe.Pointer(p)).FnFold)*uint64(1))
if (*TUnicode61Tokenizer)(unsafe.Pointer(p)).FaFold == uintptr(0) {
rc = int32(SQLITE_NOMEM)
}

View File

@@ -113181,8 +113181,8 @@ var mu mutex
func init() { mu.recursive = true }
func Xsqlite3_initialize(tls *libc.TLS) int32 {
mu.enter(tls.ID)
defer mu.leave(tls.ID)
mutexEnter(tls, uintptr(unsafe.Pointer(&mu)))
defer mutexLeave(tls, uintptr(unsafe.Pointer(&mu)))
var pMainMtx uintptr
var rc int32

View File

@@ -113186,8 +113186,8 @@ var mu mutex
func init() { mu.recursive = true }
func Xsqlite3_initialize(tls *libc.TLS) int32 {
mu.enter(tls.ID)
defer mu.leave(tls.ID)
mutexEnter(tls, uintptr(unsafe.Pointer(&mu)))
defer mutexLeave(tls, uintptr(unsafe.Pointer(&mu)))
var pMainMtx uintptr
var rc int32

24
vendor/modules.txt vendored
View File

@@ -1065,8 +1065,8 @@ golang.org/x/crypto/scrypt
golang.org/x/crypto/sha3
golang.org/x/crypto/ssh
golang.org/x/crypto/ssh/internal/bcrypt_pbkdf
# golang.org/x/exp v0.0.0-20240222234643-814bf88cf225
## explicit; go 1.20
# golang.org/x/exp v0.0.0-20250305212735-054e65f0b394
## explicit; go 1.23.0
golang.org/x/exp/constraints
# golang.org/x/image v0.24.0
## explicit; go 1.18
@@ -1074,8 +1074,8 @@ golang.org/x/image/riff
golang.org/x/image/vp8
golang.org/x/image/vp8l
golang.org/x/image/webp
# golang.org/x/mod v0.23.0
## explicit; go 1.22.0
# golang.org/x/mod v0.24.0
## explicit; go 1.23.0
golang.org/x/mod/internal/lazyregexp
golang.org/x/mod/module
golang.org/x/mod/semver
@@ -1134,8 +1134,8 @@ golang.org/x/text/transform
golang.org/x/text/unicode/bidi
golang.org/x/text/unicode/norm
golang.org/x/text/width
# golang.org/x/tools v0.30.0
## explicit; go 1.22.0
# golang.org/x/tools v0.31.0
## explicit; go 1.23.0
golang.org/x/tools/go/ast/astutil
golang.org/x/tools/go/gcexportdata
golang.org/x/tools/go/packages
@@ -1281,8 +1281,8 @@ gopkg.in/yaml.v2
# gopkg.in/yaml.v3 v3.0.1
## explicit
gopkg.in/yaml.v3
# modernc.org/libc v1.61.13
## explicit; go 1.21
# modernc.org/libc v1.62.1
## explicit; go 1.23.0
modernc.org/libc
modernc.org/libc/errno
modernc.org/libc/fcntl
@@ -1312,10 +1312,10 @@ modernc.org/libc/wctype
# modernc.org/mathutil v1.7.1
## explicit; go 1.21
modernc.org/mathutil
# modernc.org/memory v1.8.2
## explicit; go 1.21
# modernc.org/memory v1.9.1
## explicit; go 1.23.0
modernc.org/memory
# modernc.org/sqlite v0.0.0-00010101000000-000000000000 => gitlab.com/NyaaaWhatsUpDoc/sqlite v1.36.2-concurrency-workaround
# modernc.org/sqlite v0.0.0-00010101000000-000000000000 => gitlab.com/NyaaaWhatsUpDoc/sqlite v1.37.0-concurrency-workaround
## explicit; go 1.23.0
modernc.org/sqlite
modernc.org/sqlite/lib
@@ -1323,4 +1323,4 @@ modernc.org/sqlite/lib
## explicit; go 1.22.0
mvdan.cc/xurls/v2
# github.com/go-swagger/go-swagger => codeberg.org/superseriousbusiness/go-swagger v0.31.0-gts-go1.23-fix
# modernc.org/sqlite => gitlab.com/NyaaaWhatsUpDoc/sqlite v1.36.2-concurrency-workaround
# modernc.org/sqlite => gitlab.com/NyaaaWhatsUpDoc/sqlite v1.37.0-concurrency-workaround