Skip to content

net: update document on limitation of iprawsock on Windows #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 80 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
12cd4c2
net: update document on limitation of iprawsock on Windows
aisk Aug 3, 2025
d6beda8
runtime: add reference to debugPinnerV1
limeidan Jun 19, 2025
d44749b
cmd/internal/obj/loong64: add [X]VLDREPL.{B/H/W/D} instructions support
sophie-zhao Jun 19, 2025
abeeef1
cmd/compile/internal/test: fix typo in comments
sophie-zhao Jun 7, 2025
b2960e3
cmd/internal/obj/loong64: add {V,XV}{BITCLR/BITSET/BITREV}[I].{B/H/W/…
sophie-zhao May 30, 2025
4b6cbc3
cmd/cgo/internal/test: use (syntactic) constant for C array bound
cherrymui Aug 2, 2025
d7bd777
go/parser: remove safePos
mateusz834 Aug 4, 2025
9569381
cmd/compile: move riscv64 over to new bounds check strategy
randall77 Jun 18, 2025
7a1679d
cmd/compile: move s390x over to new bounds check strategy
randall77 Jun 18, 2025
fcc036f
cmd/compile: optimise float <-> int register moves on riscv64
mundaym Jul 17, 2024
5ab9f23
cmd/compile, runtime: add checkptr instrumentation for unsafe.Add
cuonglm Jul 29, 2025
26da119
cmd/compile: make isUint{32,64}PowerOfTwo implementations clearer
cuonglm Aug 4, 2025
72147ff
cmd/compile: simplify isUintXPowerOfTwo implementation
cuonglm Aug 4, 2025
2b622b0
cmd/compile: remove isUintXPowerOfTwo functions
cuonglm Aug 4, 2025
bd08285
doc: fix typo in go memory model doc
derekparker Aug 4, 2025
a3295df
cmd/compile/internal/ssa: Use transitive properties for len/cap
DanielMorsing Jun 4, 2025
802d056
cmd/compile: move ppc64 over to new bounds check strategy
randall77 Jun 18, 2025
21ab012
cmd/compile: remove support for old-style bounds check calls
randall77 Jun 19, 2025
cd55f86
cmd/compile: allow multi-field structs to be stored directly in inter…
randall77 Jun 15, 2025
a2c45f0
runtime: test VDSO symbol hash values
prattmic Jul 23, 2025
4ee0df8
cmd: remove dead code
qiulaidongfeng Jul 26, 2025
c0025d5
go/parser: correct comment in expectedErrors
mateusz834 Aug 5, 2025
cef381b
runtime: eliminate global state in mkpreempt.go
aclements Jun 12, 2025
e73afaa
internal/cpu: add AVX-512-CD and DQ, and derived "basic AVX-512"
aclements Jun 12, 2025
af0c4fe
runtime: save scalar registers off stack in amd64 async preemption
aclements Apr 30, 2025
55d961b
runtime: save AVX2 and AVX-512 state on asynchronous preemption
aclements Jun 12, 2025
b0945a5
cmd/dist, internal/platform: mark freebsd/riscv64 broken
Jul 30, 2025
bcd25c7
cmd/compile: allow StructSelect [x] of interface data fields for x>0
randall77 Aug 5, 2025
e1fd4fa
runtime: fix godoc comment for inVDSOPage
tklauser Aug 5, 2025
a552737
cmd/compile: fold negation into multiplication on loong64
sophie-zhao Jun 17, 2025
4c7362e
cmd/internal/obj/loong64: add new instructions ALSL{W/WU/V} for loong64
limeidan Jul 10, 2025
5defe8e
internal/chacha8rand: replace WORD with instruction VMOVQ
sophie-zhao Jun 19, 2025
dda9d78
crypto/sha256: use const table for key loading on loong64
HeliC829 Jun 3, 2025
17a8be7
crypto/sha512: use const table for key loading on loong64
HeliC829 Jun 3, 2025
75ea2d0
internal/bytealg: vector implementation of equal for riscv64
4a6f656c Feb 12, 2025
3406a61
internal/bytealg: vector implementation of indexbyte for riscv64
4a6f656c Feb 7, 2025
72e8237
cmd/compile: allow more args in StructMake folding rule
randall77 Aug 6, 2025
608e9fa
go/types, types2: flip on position tracing
May 28, 2025
a3895fe
database/sql: avoid closing Rows while scan is in progress
neild Jul 23, 2025
f53dcb6
cmd/internal/testdir: unify link command
cherrymui Aug 2, 2025
025d369
cmd/internal/testdir: pass -buildid to link command
cherrymui Aug 2, 2025
2747f92
debug/macho: support reading imported symbols without LC_DYSYMTAB
cherrymui Aug 4, 2025
e0a1ea4
cmd/compile: make panicBounds stack frame smaller on ppc64
randall77 Aug 6, 2025
dc54d7b
all: remove support for windows/arm
qiulaidongfeng Feb 12, 2025
8282b72
runtime/race: update darwin race syso
cherrymui Mar 25, 2025
1f7ffca
time: skip TestLongAdjustTimers on plan9 (too slow)
millerresearch Aug 7, 2025
ee7bb89
cmd/internal/obj/loong64: add support for FSEL instruction
sophie-zhao Aug 6, 2025
f3606b0
cmd/compile/internal/ssa: fix typo in LOONG64Ops.go comment
sophie-zhao Aug 6, 2025
73ff6d1
cmd/internal/obj/loong64: change the immediate range of ALSL{W/WU/V}
limeidan Aug 6, 2025
dd3abf6
internal/bytealg: optimize Index/IndexString on loong64
limeidan Aug 7, 2025
d83b16f
internal/bytealg: vector implementation of compare for riscv64
4a6f656c Feb 12, 2025
b338856
reflect: handle zero-sized fields of directly-stored structures corre…
randall77 Aug 7, 2025
768c51e
internal/runtime/maps: remove unused var bitsetDeleted
cuiweixie Aug 8, 2025
bdb2d50
net: fix WriteMsgUDPAddrPort addr handling on IPv4 sockets
database64128 Jul 25, 2025
a8dd771
crypto/tls: check if quic conn can send session ticket
ronaudinho Sep 15, 2023
c7b85e9
all: update blog link
180909 Jul 24, 2025
dcc77f9
cmd/go: fix get -tool when multiple packages are provided
wgrr Jun 7, 2025
0201524
math: remove redundant infinity tests
Aug 1, 2025
777d76c
text/template: use sync.OnceValue for builtinFuncs
May 14, 2025
bce5601
cmd/go: fix fips doc link
rolandshoemaker Jul 29, 2025
317be4c
cmd/compile/internal/staticinit: remove deadcode
cuonglm Aug 7, 2025
fbac94a
internal/sync: rename Store parameter from old to new
ianlancetaylor Aug 8, 2025
a62f72f
cmd/compile/internal/ssa: optimise more branches with SGTconst/SGTUco…
sophie-zhao Aug 5, 2025
084c0f8
cmd/compile: allow InlMark operations to be speculatively executed
Aug 6, 2025
1718828
internal/sync: warn about incorrect unsafe usage in HashTrieMap
thepudds Aug 9, 2025
a7f05b3
cmd/compile: convert branch with zero to more optimal branch zero on …
sophie-zhao Aug 6, 2025
a243177
net, os, file/filepath, syscall: use slices.Equal in tests
tklauser Jul 25, 2025
b096ddb
internal/runtime/maps: loop invariant code motion with h2(hash) by hand
cuiweixie Aug 9, 2025
cf4af0b
encoding/json/v2: fix UnmarshalDecode regression with EOF
dsnet Jul 31, 2025
925149d
net/http: add example for CrossOriginProtection
brackendawson Jun 12, 2025
691af6c
encoding/json: fix Indent trailing whitespace regression in goexperim…
dsnet Jul 31, 2025
6abfe7b
cmd/dist: require Go 1.24.6 as minimum bootstrap toolchain
dmitshur Aug 9, 2025
2b804ab
net: context aware Dialer.Dial functions
fraenkel Apr 30, 2023
3dbef65
database/sql: allow drivers to override Scan behavior
jackc May 31, 2025
ce3f3e2
cmd/link/internal/ld, internal/syscall/unix: use posix_fallocate on n…
tklauser Aug 6, 2025
caf9fc3
Revert "reflect: handle zero-sized fields of directly-stored structur…
randall77 Aug 12, 2025
7248995
Revert "cmd/compile: allow more args in StructMake folding rule"
randall77 Aug 12, 2025
c313591
Revert "cmd/compile: allow StructSelect [x] of interface data fields …
randall77 Aug 12, 2025
74421a3
Revert "cmd/compile: allow multi-field structs to be stored directly …
randall77 Aug 12, 2025
660a62d
Merge remote-tracking branch 'upstream/master' into rawsock-windows
aisk Aug 12, 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
4 changes: 4 additions & 0 deletions api/next/49097.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pkg net, method (*Dialer) DialIP(context.Context, string, netip.Addr, netip.Addr) (*IPConn, error) #49097
pkg net, method (*Dialer) DialTCP(context.Context, string, netip.AddrPort, netip.AddrPort) (*TCPConn, error) #49097
pkg net, method (*Dialer) DialUDP(context.Context, string, netip.AddrPort, netip.AddrPort) (*UDPConn, error) #49097
pkg net, method (*Dialer) DialUnix(context.Context, string, *UnixAddr, *UnixAddr) (*UnixConn, error) #49097
5 changes: 5 additions & 0 deletions api/next/67546.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pkg database/sql/driver, type RowsColumnScanner interface { Close, Columns, Next, ScanColumn } #67546
pkg database/sql/driver, type RowsColumnScanner interface, Close() error #67546
pkg database/sql/driver, type RowsColumnScanner interface, Columns() []string #67546
pkg database/sql/driver, type RowsColumnScanner interface, Next([]Value) error #67546
pkg database/sql/driver, type RowsColumnScanner interface, ScanColumn(interface{}, int) error #67546
2 changes: 1 addition & 1 deletion doc/go_mem.html
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ <h2 id="restrictions">Implementation Restrictions for Programs Containing Data R

<p>
A read of an array, struct, or complex number
may by implemented as a read of each individual sub-value
may be implemented as a read of each individual sub-value
(array element, struct field, or real/imaginary component),
in any order.
Similarly, a write of an array, struct, or complex number
Expand Down
5 changes: 5 additions & 0 deletions doc/next/5-toolchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@

## Linker {#linker}

## Bootstrap {#bootstrap}

<!-- go.dev/issue/69315 -->
As mentioned in the [Go 1.24 release notes](/doc/go1.24#bootstrap), Go 1.26 now requires
Go 1.24.6 or later for bootstrap.
We expect that Go 1.28 will require a minor release of Go 1.26 or later for bootstrap.
1 change: 1 addition & 0 deletions doc/next/6-stdlib/99-minor/database/sql/driver/67546.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A database driver may implement [RowsColumnScanner] to entirely override `Scan` behavior.
1 change: 1 addition & 0 deletions doc/next/6-stdlib/99-minor/net/49097.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added context aware dial functions for TCP, UDP, IP and Unix networks.
4 changes: 4 additions & 0 deletions doc/next/7-ports.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
## Ports {#ports}

### Windows

<!-- go.dev/issue/71671 -->
As [announced](/doc/go1.25#windows) in the Go 1.25 release notes, the [broken](/doc/go1.24#windows) 32-bit windows/arm port (`GOOS=windows` `GOARCH=arm`) is removed.
12 changes: 0 additions & 12 deletions src/cmd/asm/internal/arch/loong64.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,6 @@ func jumpLoong64(word string) bool {
return false
}

// IsLoong64MUL reports whether the op (as defined by an loong64.A* constant) is
// one of the MUL/DIV/REM instructions that require special handling.
func IsLoong64MUL(op obj.As) bool {
switch op {
case loong64.AMUL, loong64.AMULU, loong64.AMULV, loong64.AMULVU,
loong64.ADIV, loong64.ADIVU, loong64.ADIVV, loong64.ADIVVU,
loong64.AREM, loong64.AREMU, loong64.AREMV, loong64.AREMVU:
return true
}
return false
}

// IsLoong64RDTIME reports whether the op (as defined by an loong64.A*
// constant) is one of the RDTIMELW/RDTIMEHW/RDTIMED instructions that
// require special handling.
Expand Down
8 changes: 0 additions & 8 deletions src/cmd/asm/internal/asm/asm.go
Original file line number Diff line number Diff line change
Expand Up @@ -974,14 +974,6 @@ func (p *Parser) getConstant(prog *obj.Prog, op obj.As, addr *obj.Addr) int64 {
return addr.Offset
}

// getImmediate checks that addr represents an immediate constant and returns its value.
func (p *Parser) getImmediate(prog *obj.Prog, op obj.As, addr *obj.Addr) int64 {
if addr.Type != obj.TYPE_CONST || addr.Name != 0 || addr.Reg != 0 || addr.Index != 0 {
p.errorf("%s: expected immediate constant; found %s", op, obj.Dconv(prog, addr))
}
return addr.Offset
}

// getRegister checks that addr represents a register and returns its value.
func (p *Parser) getRegister(prog *obj.Prog, op obj.As, addr *obj.Addr) int16 {
if addr.Type != obj.TYPE_REG || addr.Offset != 0 || addr.Name != 0 || addr.Index != 0 {
Expand Down
69 changes: 69 additions & 0 deletions src/cmd/asm/internal/asm/testdata/loong64enc1.s
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,10 @@ lable2:
FTINTRNEVF F0, F2 // 02e41a01
FTINTRNEVD F0, F2 // 02e81a01

// FSEL instruction
FSEL FCC0, F1, F2, F3 // 4304000d
FSEL FCC1, F1, F2 // 4284000d

// LDX.{B,BU,H,HU,W,WU,D} instructions
MOVB (R14)(R13), R12 // cc350038
MOVBU (R14)(R13), R12 // cc352038
Expand Down Expand Up @@ -510,6 +514,16 @@ lable2:
VMOVQ V3.W[1], V7.W4 // 67e4f772
VMOVQ V4.V[0], V6.V2 // 86f0f772

// 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
XVMOVQ (R4), X0.B32 // 80008032
XVMOVQ 1(R4), X1.H16 // 81044032
XVMOVQ 2(R4), X2.W8 // 82082032
XVMOVQ 3(R4), X3.V4 // 830c1032

// VSEQ{B,H,W,V}, XVSEQ{B,H,W,V} instruction
VSEQB V1, V2, V3 // 43040070
VSEQH V1, V2, V3 // 43840070
Expand Down Expand Up @@ -1035,3 +1049,58 @@ lable2:
PRELD (R4), $0 // 8000c02a
PRELD -1(R4), $8 // 88fcff2a
PRELD 8(R4), $31 // 9f20c02a

// [X]{VBITCLR/VBITSET/VBITREV}{B,H,W,V} instructions
VBITCLRB V1, V2, V3 // 43040c71
VBITCLRH V1, V2, V3 // 43840c71
VBITCLRW V1, V2, V3 // 43040d71
VBITCLRV V1, V2, V3 // 43840d71
VBITSETB V1, V2, V3 // 43040e71
VBITSETH V1, V2, V3 // 43840e71
VBITSETW V1, V2, V3 // 43040f71
VBITSETV V1, V2, V3 // 43840f71
VBITREVB V1, V2, V3 // 43041071
VBITREVH V1, V2, V3 // 43841071
VBITREVW V1, V2, V3 // 43041171
VBITREVV V1, V2, V3 // 43841171
XVBITCLRB X3, X2, X1 // 410c0c75
XVBITCLRH X3, X2, X1 // 418c0c75
XVBITCLRW X3, X2, X1 // 410c0d75
XVBITCLRV X3, X2, X1 // 418c0d75
XVBITSETB X3, X2, X1 // 410c0e75
XVBITSETH X3, X2, X1 // 418c0e75
XVBITSETW X3, X2, X1 // 410c0f75
XVBITSETV X3, X2, X1 // 418c0f75
XVBITREVB X3, X2, X1 // 410c1075
XVBITREVH X3, X2, X1 // 418c1075
XVBITREVW X3, X2, X1 // 410c1175
XVBITREVV X3, X2, X1 // 418c1175
VBITCLRB $7, V2, V3 // 433c1073
VBITCLRH $15, V2, V3 // 437c1073
VBITCLRW $31, V2, V3 // 43fc1073
VBITCLRV $63, V2, V3 // 43fc1173
VBITSETB $7, V2, V3 // 433c1473
VBITSETH $15, V2, V3 // 437c1473
VBITSETW $31, V2, V3 // 43fc1473
VBITSETV $63, V2, V3 // 43fc1573
VBITREVB $7, V2, V3 // 433c1873
VBITREVH $15, V2, V3 // 437c1873
VBITREVW $31, V2, V3 // 43fc1873
VBITREVV $63, V2, V3 // 43fc1973
XVBITCLRB $7, X2, X1 // 413c1077
XVBITCLRH $15, X2, X1 // 417c1077
XVBITCLRW $31, X2, X1 // 41fc1077
XVBITCLRV $63, X2, X1 // 41fc1177
XVBITSETB $7, X2, X1 // 413c1477
XVBITSETH $15, X2, X1 // 417c1477
XVBITSETW $31, X2, X1 // 41fc1477
XVBITSETV $63, X2, X1 // 41fc1577
XVBITREVB $7, X2, X1 // 413c1877
XVBITREVH $15, X2, X1 // 417c1877
XVBITREVW $31, X2, X1 // 41fc1877
XVBITREVV $63, X2, X1 // 41fc1977

// ALSL{W/WU/D}
ALSLW $4, R4, R5, R6 // 86940500
ALSLWU $4, R4, R5, R6 // 86940700
ALSLV $4, R4, R5, R6 // 86942d00
2 changes: 1 addition & 1 deletion src/cmd/cgo/internal/test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ static void *thread(void *p) {
return NULL;
}
void testSendSIG() {
const int N = 20;
enum { N = 20 };
int i;
pthread_t tid[N];
for (i = 0; i < N; i++) {
Expand Down
108 changes: 0 additions & 108 deletions src/cmd/compile/internal/importer/support.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,14 @@ package importer
import (
"cmd/compile/internal/base"
"cmd/compile/internal/types2"
"fmt"
"go/token"
"internal/pkgbits"
"sync"
)

func assert(p bool) {
base.Assert(p)
}

func errorf(format string, args ...interface{}) {
panic(fmt.Sprintf(format, args...))
}

const deltaNewFile = -64 // see cmd/compile/internal/gc/bexport.go

// Synthesize a token.Pos
Expand All @@ -31,108 +25,6 @@ type fakeFileSet struct {
files map[string]*token.File
}

func (s *fakeFileSet) pos(file string, line, column int) token.Pos {
// TODO(mdempsky): Make use of column.

// Since we don't know the set of needed file positions, we
// reserve maxlines positions per file.
const maxlines = 64 * 1024
f := s.files[file]
if f == nil {
f = s.fset.AddFile(file, -1, maxlines)
s.files[file] = f
// Allocate the fake linebreak indices on first use.
// TODO(adonovan): opt: save ~512KB using a more complex scheme?
fakeLinesOnce.Do(func() {
fakeLines = make([]int, maxlines)
for i := range fakeLines {
fakeLines[i] = i
}
})
f.SetLines(fakeLines)
}

if line > maxlines {
line = 1
}

// Treat the file as if it contained only newlines
// and column=1: use the line number as the offset.
return f.Pos(line - 1)
}

var (
fakeLines []int
fakeLinesOnce sync.Once
)

func chanDir(d int) types2.ChanDir {
// tag values must match the constants in cmd/compile/internal/gc/go.go
switch d {
case 1 /* Crecv */ :
return types2.RecvOnly
case 2 /* Csend */ :
return types2.SendOnly
case 3 /* Cboth */ :
return types2.SendRecv
default:
errorf("unexpected channel dir %d", d)
return 0
}
}

var predeclared = []types2.Type{
// basic types
types2.Typ[types2.Bool],
types2.Typ[types2.Int],
types2.Typ[types2.Int8],
types2.Typ[types2.Int16],
types2.Typ[types2.Int32],
types2.Typ[types2.Int64],
types2.Typ[types2.Uint],
types2.Typ[types2.Uint8],
types2.Typ[types2.Uint16],
types2.Typ[types2.Uint32],
types2.Typ[types2.Uint64],
types2.Typ[types2.Uintptr],
types2.Typ[types2.Float32],
types2.Typ[types2.Float64],
types2.Typ[types2.Complex64],
types2.Typ[types2.Complex128],
types2.Typ[types2.String],

// basic type aliases
types2.Universe.Lookup("byte").Type(),
types2.Universe.Lookup("rune").Type(),

// error
types2.Universe.Lookup("error").Type(),

// untyped types
types2.Typ[types2.UntypedBool],
types2.Typ[types2.UntypedInt],
types2.Typ[types2.UntypedRune],
types2.Typ[types2.UntypedFloat],
types2.Typ[types2.UntypedComplex],
types2.Typ[types2.UntypedString],
types2.Typ[types2.UntypedNil],

// package unsafe
types2.Typ[types2.UnsafePointer],

// invalid type
types2.Typ[types2.Invalid], // only appears in packages with errors

// used internally by gc; never used by this package or in .a files
// not to be confused with the universe any
anyType{},

// comparable
types2.Universe.Lookup("comparable").Type(),

// "any" has special handling: see usage of predeclared.
}

type anyType struct{}

func (t anyType) Underlying() types2.Type { return t }
Expand Down
11 changes: 0 additions & 11 deletions src/cmd/compile/internal/inline/inl.go
Original file line number Diff line number Diff line change
Expand Up @@ -1211,17 +1211,6 @@ func pruneUnusedAutos(ll []*ir.Name, vis *hairyVisitor) []*ir.Name {
return s
}

// numNonClosures returns the number of functions in list which are not closures.
func numNonClosures(list []*ir.Func) int {
count := 0
for _, fn := range list {
if fn.OClosure == nil {
count++
}
}
return count
}

func doList(list []ir.Node, do func(ir.Node) bool) bool {
for _, x := range list {
if x != nil {
Expand Down
8 changes: 0 additions & 8 deletions src/cmd/compile/internal/inline/inlheur/scoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,14 +399,6 @@ func LargestNegativeScoreAdjustment(fn *ir.Func, props *FuncProps) int {
return score
}

// LargestPositiveScoreAdjustment tries to estimate the largest possible
// positive score adjustment that could be applied to a given callsite.
// At the moment we don't have very many positive score adjustments, so
// this is just hard-coded, not table-driven.
func LargestPositiveScoreAdjustment(fn *ir.Func) int {
return adjValues[panicPathAdj] + adjValues[initFuncAdj]
}

// callSiteTab contains entries for each call in the function
// currently being processed by InlineCalls; this variable will either
// be set to 'cstabCache' below (for non-inlinable routines) or to the
Expand Down
9 changes: 0 additions & 9 deletions src/cmd/compile/internal/ir/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,3 @@ func DeepCopy(pos src.XPos, n Node) Node {
}
return edit(n)
}

// DeepCopyList returns a list of deep copies (using DeepCopy) of the nodes in list.
func DeepCopyList(pos src.XPos, list []Node) []Node {
var out []Node
for _, n := range list {
out = append(out, DeepCopy(pos, n))
}
return out
}
9 changes: 0 additions & 9 deletions src/cmd/compile/internal/ir/mini.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ type miniNode struct {
esc uint16
}

// posOr returns pos if known, or else n.pos.
// For use in DeepCopy.
func (n *miniNode) posOr(pos src.XPos) src.XPos {
if pos.IsKnown() {
return pos
}
return n.pos
}

// op can be read, but not written.
// An embedding implementation can provide a SetOp if desired.
// (The panicking SetOp is with the other panics below.)
Expand Down
13 changes: 0 additions & 13 deletions src/cmd/compile/internal/ir/visit.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,6 @@ func Any(n Node, cond func(Node) bool) bool {
return do(n)
}

// AnyList calls Any(x, cond) for each node x in the list, in order.
// If any call returns true, AnyList stops and returns true.
// Otherwise, AnyList returns false after calling Any(x, cond)
// for every x in the list.
func AnyList(list Nodes, cond func(Node) bool) bool {
for _, x := range list {
if Any(x, cond) {
return true
}
}
return false
}

// EditChildren edits the child nodes of n, replacing each child x with edit(x).
//
// Note that EditChildren(n, edit) only calls edit(x) for n's immediate children.
Expand Down
Loading