Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
6a08e80
net/http: skip redirecting in ServeMux when URL path for CONNECT is e…
nicholashusin Aug 29, 2025
d4b17f5
internal/runtime/atomic: reset wrong jump target in Cas{,64} on loong64
abner-chenc Aug 27, 2025
882335e
cmd/internal/obj/loong64: add LDPTR.{W/D} and STPTR.{W/D} instruction…
sophie-zhao Aug 25, 2025
7bba745
cmd/compile: use generated loops instead of DUFFZERO on loong64
limeidan Aug 28, 2025
1eec830
go/doc: linkify interface methods
neild Jul 10, 2025
355370a
runtime: add comment for concatstring2
fengyoulin Aug 30, 2025
b090680
cmd/dist: run racebench tests only in longtest mode
mknyszek Sep 2, 2025
2a7f1d4
runtime: use one more address bit for tagged pointers
randall77 Sep 2, 2025
3e596d4
math: rename Modf parameter int to integer
Aug 25, 2025
925a3cd
unicode/utf8: make DecodeRune{,InString} inlineable
jub0bs Sep 2, 2025
4c4cefc
cmd/gofmt: simplify logic to process arguments
mvdan Aug 30, 2025
731e546
cmd/compile: simplify the support for 32bit high multiply on loong64
sophie-zhao Sep 1, 2025
e8f9127
net/netip: export Prefix.Compare, fix ordering
database64128 Sep 2, 2025
c552ad9
cmd/compile: simplify memory load and store operations on loong64
sophie-zhao Sep 3, 2025
91e76a5
cmd/compile: use generated loops instead of DUFFCOPY on loong64
limeidan Aug 29, 2025
8003858
cmd/compile: export to DWARF types only referenced through interfaces
aarzilli Aug 18, 2025
4373754
cmd/compile: add store to load forwarding rules on riscv64
Aug 30, 2025
df29038
cmd/compile/internal/ssa: load constant values from abi.PtrType.Elem
fengyoulin Sep 1, 2025
b7c2041
runtime: remove obsolete osArchInit function
aimuz Sep 3, 2025
8c27a80
path{,/filepath}: speed up Match
jub0bs Aug 31, 2025
b8cc907
cmd/internal/obj/loong64: fix the usage of offset in the instructions…
sophie-zhao Aug 29, 2025
4f7bbc6
runtime, cmd/compile, cmd/internal/obj: remove duff support for loong64
limeidan Sep 1, 2025
150fae7
crypto/x509: don't force system roots load in SetFallbackRoots
mateusz834 Sep 3, 2025
e36c5ae
log/slog: add multiple handlers support for logger
callthingsoff Aug 27, 2025
00b8474
cmd/trace: don't filter events for profile by whether they have stack
mknyszek Aug 7, 2025
ddce052
cmd/internal/obj/loong64: add ADDU16I.D instruction support
sophie-zhao Aug 26, 2025
9d08299
net/http: fix cookie value of "" being interpreted as empty string.
nicholashusin Sep 3, 2025
d52a56c
cmd/link/internal/ld: unconditionally use posix_fallocate on FreeBSD
tklauser Aug 28, 2025
bb48272
cmd/compile: simplify zerorange on mips64
HeliC829 Sep 4, 2025
87e7276
runtime: simplify openbsd check in usesLibcall and mStackIsSystemAllo…
tklauser Sep 4, 2025
459b85c
cmd/fix: remove all functionality except for buildtag
qiulaidongfeng Aug 13, 2025
3492e42
cmd/compile: simplify specific addition operations using the ADDV16 i…
sophie-zhao Sep 3, 2025
f5b2068
cmd/compile: optimize loads from readonly globals into constants on l…
sophie-zhao Sep 4, 2025
0b1eed0
vendor/golang.org/x/tools: update to a09a2fb
adonovan Sep 4, 2025
d767064
cmd/compile: mark abi.PtrType.Elem sym as used
jakebailey Sep 5, 2025
e8126bc
runtime/cgo: save and restore R31 for crosscall1 on loong64
abner-chenc Sep 4, 2025
a614461
crypto/tls: use context.AfterFunc in handshakeContext
database64128 Aug 29, 2025
57769b5
os: reject OpenDir of a non-directory file in Plan 9
millerresearch Sep 4, 2025
861c90c
net/http: pool transport gzip readers
AlexanderYastrebov Sep 3, 2025
a25a189
net/http: allow reuse connection if entire unread body is in buffer
canoriz Sep 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/next/61642.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pkg net/netip, method (Prefix) Compare(Prefix) int #61642
6 changes: 6 additions & 0 deletions api/next/65954.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pkg log/slog, func NewMultiHandler(...Handler) *MultiHandler #65954
pkg log/slog, method (*MultiHandler) Enabled(context.Context, Level) bool #65954
pkg log/slog, method (*MultiHandler) Handle(context.Context, Record) error #65954
pkg log/slog, method (*MultiHandler) WithAttrs([]Attr) Handler #65954
pkg log/slog, method (*MultiHandler) WithGroup(string) Handler #65954
pkg log/slog, type MultiHandler struct #65954
6 changes: 6 additions & 0 deletions doc/next/6-stdlib/99-minor/log/slog/65954.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
The [`NewMultiHandler`](/pkg/log/slog#NewMultiHandler) function creates a
[`MultiHandler`](/pkg/log/slog#MultiHandler) that invokes all the given Handlers.
Its `Enable` method reports whether any of the handlers' `Enabled` methods
return true.
Its `Handle`, `WithAttr` and `WithGroup` methods call the corresponding method
on each of the enabled handlers.
1 change: 1 addition & 0 deletions doc/next/6-stdlib/99-minor/net/netip/61642.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The new [Prefix.Compare] method compares two prefixes.
5 changes: 1 addition & 4 deletions src/bufio/bufio.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,7 @@ func (b *Reader) ReadRune() (r rune, size int, err error) {
if b.r == b.w {
return 0, 0, b.readErr()
}
r, size = rune(b.buf[b.r]), 1
if r >= utf8.RuneSelf {
r, size = utf8.DecodeRune(b.buf[b.r:b.w])
}
r, size = utf8.DecodeRune(b.buf[b.r:b.w])
b.r += size
b.lastByte = int(b.buf[b.r-1])
b.lastRuneSize = size
Expand Down
40 changes: 8 additions & 32 deletions src/bytes/bytes.go
Original file line number Diff line number Diff line change
Expand Up @@ -528,11 +528,7 @@ func FieldsFunc(s []byte, f func(rune) bool) [][]byte {
// more efficient, possibly due to cache effects.
start := -1 // valid span start if >= 0
for i := 0; i < len(s); {
size := 1
r := rune(s[i])
if r >= utf8.RuneSelf {
r, size = utf8.DecodeRune(s[i:])
}
r, size := utf8.DecodeRune(s[i:])
if f(r) {
if start >= 0 {
spans = append(spans, span{start, i})
Expand Down Expand Up @@ -614,11 +610,7 @@ func Map(mapping func(r rune) rune, s []byte) []byte {
// fine. It could also shrink but that falls out naturally.
b := make([]byte, 0, len(s))
for i := 0; i < len(s); {
wid := 1
r := rune(s[i])
if r >= utf8.RuneSelf {
r, wid = utf8.DecodeRune(s[i:])
}
r, wid := utf8.DecodeRune(s[i:])
r = mapping(r)
if r >= 0 {
b = utf8.AppendRune(b, r)
Expand Down Expand Up @@ -917,11 +909,7 @@ func LastIndexFunc(s []byte, f func(r rune) bool) int {
func indexFunc(s []byte, f func(r rune) bool, truth bool) int {
start := 0
for start < len(s) {
wid := 1
r := rune(s[start])
if r >= utf8.RuneSelf {
r, wid = utf8.DecodeRune(s[start:])
}
r, wid := utf8.DecodeRune(s[start:])
if f(r) == truth {
return start
}
Expand Down Expand Up @@ -1052,10 +1040,7 @@ func trimLeftASCII(s []byte, as *asciiSet) []byte {

func trimLeftUnicode(s []byte, cutset string) []byte {
for len(s) > 0 {
r, n := rune(s[0]), 1
if r >= utf8.RuneSelf {
r, n = utf8.DecodeRune(s)
}
r, n := utf8.DecodeRune(s)
if !containsRune(cutset, r) {
break
}
Expand Down Expand Up @@ -1251,19 +1236,10 @@ hasUnicode:
t = t[i:]
for len(s) != 0 && len(t) != 0 {
// Extract first rune from each.
var sr, tr rune
if s[0] < utf8.RuneSelf {
sr, s = rune(s[0]), s[1:]
} else {
r, size := utf8.DecodeRune(s)
sr, s = r, s[size:]
}
if t[0] < utf8.RuneSelf {
tr, t = rune(t[0]), t[1:]
} else {
r, size := utf8.DecodeRune(t)
tr, t = r, t[size:]
}
sr, size := utf8.DecodeRune(s)
s = s[size:]
tr, size := utf8.DecodeRune(t)
t = t[size:]

// If they match, keep going; if not, return false.

Expand Down
6 changes: 1 addition & 5 deletions src/bytes/iter.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,7 @@ func FieldsFuncSeq(s []byte, f func(rune) bool) iter.Seq[[]byte] {
return func(yield func([]byte) bool) {
start := -1
for i := 0; i < len(s); {
size := 1
r := rune(s[i])
if r >= utf8.RuneSelf {
r, size = utf8.DecodeRune(s[i:])
}
r, size := utf8.DecodeRune(s[i:])
if f(r) {
if start >= 0 {
if !yield(s[start:i:i]) {
Expand Down
57 changes: 51 additions & 6 deletions src/cmd/asm/internal/asm/testdata/loong64enc1.s
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,35 @@ lable2:
MOVV FCC0, R4 // 04dc1401
MOVV R4, FCC0 // 80d81401

// LDPTR.{W/D} and STPTR.{W/D} instructions
MOVWP R5, -32768(R4) // 85008025
MOVWP R5, 32764(R4) // 85fc7f25
MOVWP R5, 32(R4) // 85200025
MOVWP R5, 4(R4) // 85040025
MOVWP R5, (R4) // 85000025
MOVVP R5, -32768(R4) // 85008027
MOVVP R5, 32764(R4) // 85fc7f27
MOVVP R5, 32(R4) // 85200027
MOVVP R5, 4(R4) // 85040027
MOVVP R5, (R4) // 85000027
MOVWP -32768(R5), R4 // a4008024
MOVWP 32764(R5), R4 // a4fc7f24
MOVWP 32(R5), R4 // a4200024
MOVWP 4(R5), R4 // a4040024
MOVWP (R5), R4 // a4000024
MOVVP -32768(R5), R4 // a4008026
MOVVP 32764(R5), R4 // a4fc7f26
MOVVP 32(R5), R4 // a4200026
MOVVP 4(R5), R4 // a4040026
MOVVP (R5), R4 // a4000026

// ADDU16I.D instruction
ADDV16 $(-32768<<16), R4, R5 // ADDV16 $-2147483648, R4, R5 // 85000012
ADDV16 $(0<<16), R4, R5 // ADDV16 $0, R4, R5 // 85000010
ADDV16 $(8<<16), R4, R5 // ADDV16 $524288, R4, R5 // 85200010
ADDV16 $(32767<<16), R4, R5 // ADDV16 $2147418112, R4, R5 // 85fcff11
ADDV16 $(16<<16), R4 // ADDV16 $1048576, R4 // 84400010

// Loong64 atomic memory access instructions
AMSWAPB R14, (R13), R12 // ac395c38
AMSWAPH R14, (R13), R12 // acb95c38
Expand Down Expand Up @@ -516,13 +545,29 @@ lable2:

// Load data from memory and broadcast to each element of a vector register: VMOVQ offset(Rj), <Vd>.<T>
VMOVQ (R4), V0.B16 // 80008030
VMOVQ 1(R4), V1.H8 // 81044030
VMOVQ 2(R4), V2.W4 // 82082030
VMOVQ 3(R4), V3.V2 // 830c1030
VMOVQ 1(R4), V0.B16 // 80048030
VMOVQ -3(R4), V0.B16 // 80f4bf30
VMOVQ (R4), V1.H8 // 81004030
VMOVQ 2(R4), V1.H8 // 81044030
VMOVQ -6(R4), V1.H8 // 81f45f30
VMOVQ (R4), V2.W4 // 82002030
VMOVQ 8(R4), V2.W4 // 82082030
VMOVQ -12(R4), V2.W4 // 82f42f30
VMOVQ (R4), V3.V2 // 83001030
VMOVQ 24(R4), V3.V2 // 830c1030
VMOVQ -16(R4), V3.V2 // 83f81730
XVMOVQ (R4), X0.B32 // 80008032
XVMOVQ 1(R4), X1.H16 // 81044032
XVMOVQ 2(R4), X2.W8 // 82082032
XVMOVQ 3(R4), X3.V4 // 830c1032
XVMOVQ 1(R4), X0.B32 // 80048032
XVMOVQ -5(R4), X0.B32 // 80ecbf32
XVMOVQ (R4), X1.H16 // 81004032
XVMOVQ 2(R4), X1.H16 // 81044032
XVMOVQ -10(R4), X1.H16 // 81ec5f32
XVMOVQ (R4), X2.W8 // 82002032
XVMOVQ 8(R4), X2.W8 // 82082032
XVMOVQ -20(R4), X2.W8 // 82ec2f32
XVMOVQ (R4), X3.V4 // 83001032
XVMOVQ 24(R4), X3.V4 // 830c1032
XVMOVQ -24(R4), X3.V4 // 83f41732

// VSEQ{B,H,W,V}, XVSEQ{B,H,W,V} instruction
VSEQB V1, V2, V3 // 43040070
Expand Down
2 changes: 2 additions & 0 deletions src/cmd/asm/internal/asm/testdata/loong64error.s
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
TEXT errors(SB),$0
VSHUF4IV $16, V1, V2 // ERROR "operand out of range 0 to 15"
XVSHUF4IV $16, X1, X2 // ERROR "operand out of range 0 to 15"
ADDV16 $1, R4, R5 // ERROR "the constant must be a multiple of 65536."
ADDV16 $65535, R4, R5 // ERROR "the constant must be a multiple of 65536."
15 changes: 15 additions & 0 deletions src/cmd/compile/internal/dwarfgen/dwarf.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,29 @@ func Info(ctxt *obj.Link, fnsym *obj.LSym, infosym *obj.LSym, curfn obj.Func) (s
// already referenced by a dwarf var, attach an R_USETYPE relocation to
// the function symbol to insure that the type included in DWARF
// processing during linking.
// Do the same with R_USEIFACE relocations from the function symbol for the
// same reason.
// All these R_USETYPE relocations are only looked at if the function
// survives deadcode elimination in the linker.
typesyms := []*obj.LSym{}
for t := range fnsym.Func().Autot {
typesyms = append(typesyms, t)
}
for i := range fnsym.R {
if fnsym.R[i].Type == objabi.R_USEIFACE && !strings.HasPrefix(fnsym.R[i].Sym.Name, "go:itab.") {
// Types referenced through itab will be referenced from somewhere else
typesyms = append(typesyms, fnsym.R[i].Sym)
}
}
slices.SortFunc(typesyms, func(a, b *obj.LSym) int {
return strings.Compare(a.Name, b.Name)
})
var lastsym *obj.LSym
for _, sym := range typesyms {
if sym == lastsym {
continue
}
lastsym = sym
infosym.AddRel(ctxt, obj.Reloc{Type: objabi.R_USETYPE, Sym: sym})
}
fnsym.Func().Autot = nil
Expand Down
Loading