Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bca215b

Browse files
Fixing merge conflicts
1 parent 05dd05a commit bca215b

File tree

19 files changed

+14
-549
lines changed

19 files changed

+14
-549
lines changed

compiler/linkname/linkname_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ func TestParseGoLinknames(t *testing.T) {
220220
if len(test.pkgPath) > 0 {
221221
pkgPath = test.pkgPath
222222
}
223-
directives, err := parseGoLinknames(fset, pkgPath, file)
223+
directives, err := ParseGoLinknames(fset, pkgPath, file)
224224

225225
if test.wantError != "" {
226226
if err == nil {

compiler/natives/src/crypto/ecdh/nist.go

Lines changed: 0 additions & 58 deletions
This file was deleted.

compiler/natives/src/crypto/ecdsa/ecdsa.go

Lines changed: 0 additions & 98 deletions
This file was deleted.

compiler/natives/src/crypto/ecdsa/ecdsa_test.go

Lines changed: 0 additions & 12 deletions
This file was deleted.

compiler/natives/src/crypto/internal/boring/aes.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build js
2-
// +build js
32

43
package boring
54

compiler/natives/src/crypto/subtle/xor.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build js
2-
// +build js
32

43
package subtle
54

@@ -74,5 +73,7 @@ const supportsUnaligned = false
7473
//gopherjs:purge
7574
func xorBytes(dstb, xb, yb *byte, n int)
7675

76+
// TODO(grantnelson-wf): Check if this should be removed or not with generics.
77+
//
7778
//gopherjs:purge
7879
func xorLoop[T byte | uintptr](dst, x, y []T) {}

compiler/natives/src/encoding/gob/gob.go

Lines changed: 0 additions & 39 deletions
This file was deleted.

compiler/natives/src/internal/coverage/slicereader/slicereader.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build js
2-
// +build js
32

43
package slicereader
54

Lines changed: 1 addition & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,8 @@
11
//go:build js
2-
// +build js
32

43
package godebug
54

6-
import (
7-
"sync"
8-
_ "unsafe" // go:linkname
9-
)
10-
11-
type Setting struct {
12-
name string
13-
once sync.Once
14-
15-
// temporarily replacement of atomic.Pointer[string] for go1.20 without generics.
16-
value *atomicStringPointer
17-
}
18-
19-
type atomicStringPointer struct {
20-
v *string
21-
}
22-
23-
func (x *atomicStringPointer) Load() *string { return x.v }
24-
func (x *atomicStringPointer) Store(val *string) { x.v = val }
25-
26-
func (s *Setting) Value() string {
27-
s.once.Do(func() {
28-
v, ok := cache.Load(s.name)
29-
if !ok {
30-
// temporarily replacement of atomic.Pointer[string] for go1.20 without generics.
31-
p := new(atomicStringPointer)
32-
p.Store(&empty)
33-
v, _ = cache.LoadOrStore(s.name, p)
34-
}
35-
// temporarily replacement of atomic.Pointer[string] for go1.20 without generics.
36-
s.value = v.(*atomicStringPointer)
37-
})
38-
return *s.value.Load()
39-
}
5+
import _ "unsafe" // go:linkname
406

417
//go:linkname setUpdate runtime.godebug_setUpdate
428
func setUpdate(update func(def, env string))
43-
44-
func update(def, env string) {
45-
updateMu.Lock()
46-
defer updateMu.Unlock()
47-
48-
did := make(map[string]bool)
49-
parse(did, env)
50-
parse(did, def)
51-
52-
cache.Range(func(name, v any) bool {
53-
if !did[name.(string)] {
54-
// temporarily replacement of atomic.Pointer[string] for go1.20 without generics.
55-
v.(*atomicStringPointer).Store(&empty)
56-
}
57-
return true
58-
})
59-
}
60-
61-
func parse(did map[string]bool, s string) {
62-
end := len(s)
63-
eq := -1
64-
for i := end - 1; i >= -1; i-- {
65-
if i == -1 || s[i] == ',' {
66-
if eq >= 0 {
67-
name, value := s[i+1:eq], s[eq+1:end]
68-
if !did[name] {
69-
did[name] = true
70-
v, ok := cache.Load(name)
71-
if !ok {
72-
// temporarily replacement of atomic.Pointer[string] for go1.20 without generics.
73-
p := new(atomicStringPointer)
74-
p.Store(&empty)
75-
v, _ = cache.LoadOrStore(name, p)
76-
}
77-
// temporarily replacement of atomic.Pointer[string] for go1.20 without generics.
78-
v.(*atomicStringPointer).Store(&value)
79-
}
80-
}
81-
eq = -1
82-
end = i
83-
} else if s[i] == '=' {
84-
eq = i
85-
}
86-
}
87-
}

compiler/natives/src/internal/unsafeheader/unsafeheader.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build js
2-
// +build js
32

43
package unsafeheader
54

0 commit comments

Comments
 (0)