text
stringlengths
2
1.1M
id
stringlengths
11
117
metadata
dict
__index_level_0__
int64
0
885
// Code generated from _gen/dec64.rules using 'go generate'; DO NOT EDIT. package ssa import "cmd/compile/internal/types" func rewriteValuedec64(v *Value) bool { switch v.Op { case OpAdd64: return rewriteValuedec64_OpAdd64(v) case OpAnd64: return rewriteValuedec64_OpAnd64(v) case OpArg: return rewriteValue...
go/src/cmd/compile/internal/ssa/rewritedec64.go/0
{ "file_path": "go/src/cmd/compile/internal/ssa/rewritedec64.go", "repo_id": "go", "token_count": 36748 }
104
// Copyright 2018 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 ssa_test import ( cmddwarf "cmd/internal/dwarf" "cmd/internal/quoted" "debug/dwarf" "debug/elf" "debug/macho" "debug/pe" "fmt" "internal/platfo...
go/src/cmd/compile/internal/ssa/stmtlines_test.go/0
{ "file_path": "go/src/cmd/compile/internal/ssa/stmtlines_test.go", "repo_id": "go", "token_count": 1592 }
105
src/cmd/compile/internal/ssa/testdata/infloop.go 6: func test() { 8: go func() {}() 10: for {
go/src/cmd/compile/internal/ssa/testdata/infloop.gdb-opt.nexts/0
{ "file_path": "go/src/cmd/compile/internal/ssa/testdata/infloop.gdb-opt.nexts", "repo_id": "go", "token_count": 47 }
106
// Copyright 2019 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 ssa import ( "cmd/internal/src" "fmt" ) type lineRange struct { first, last uint32 } // An xposmap is a map from fileindex and line of src.XPos to...
go/src/cmd/compile/internal/ssa/xposmap.go/0
{ "file_path": "go/src/cmd/compile/internal/ssa/xposmap.go", "repo_id": "go", "token_count": 1207 }
107
// Copyright 2024 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. // This file holds test cases for individual issues // for which there is (currently) no better location. package syntax import ( "strings" "testing" ) fun...
go/src/cmd/compile/internal/syntax/issues_test.go/0
{ "file_path": "go/src/cmd/compile/internal/syntax/issues_test.go", "repo_id": "go", "token_count": 506 }
108
// Copyright 2023 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 p import ( "fmt" ) func f() { int status // ERROR syntax error: unexpected name status at end of statement fmt.Println(status) }
go/src/cmd/compile/internal/syntax/testdata/issue65790.go/0
{ "file_path": "go/src/cmd/compile/internal/syntax/testdata/issue65790.go", "repo_id": "go", "token_count": 91 }
109
// Copyright 2020 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 test import ( "bufio" "cmd/compile/internal/abi" "cmd/compile/internal/base" "cmd/compile/internal/ssagen" "cmd/compile/internal/typecheck" "cmd/...
go/src/cmd/compile/internal/test/abiutils_test.go/0
{ "file_path": "go/src/cmd/compile/internal/test/abiutils_test.go", "repo_id": "go", "token_count": 6754 }
110
// Copyright 2022 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. //go:build !race package test import ( "internal/testenv" "testing" ) func TestAppendOfMake(t *testing.T) { testenv.SkipIfOptimizationOff(t) for n := 32;...
go/src/cmd/compile/internal/test/issue53888_test.go/0
{ "file_path": "go/src/cmd/compile/internal/test/issue53888_test.go", "repo_id": "go", "token_count": 471 }
111
// Copyright 2015 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 main import ( "fmt" "testing" ) var output string func mypanic(t *testing.T, s string) { t.Fatalf(s + "\n" + output) } func assertEqual(t *testi...
go/src/cmd/compile/internal/test/testdata/addressed_test.go/0
{ "file_path": "go/src/cmd/compile/internal/test/testdata/addressed_test.go", "repo_id": "go", "token_count": 2140 }
112
package main import ( "runtime" "testing" ) func checkDivByZero(f func()) (divByZero bool) { defer func() { if r := recover(); r != nil { if e, ok := r.(runtime.Error); ok && e.Error() == "runtime error: integer divide by zero" { divByZero = true } } }() f() return false } //go:noinline func div_...
go/src/cmd/compile/internal/test/testdata/divbyzero_test.go/0
{ "file_path": "go/src/cmd/compile/internal/test/testdata/divbyzero_test.go", "repo_id": "go", "token_count": 442 }
113
// Copyright 2015 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. // Tests short circuiting. package main import "testing" func and_ssa(arg1, arg2 bool) bool { return arg1 && rightCall(arg2) } func or_ssa(arg1, arg2 bool)...
go/src/cmd/compile/internal/test/testdata/short_test.go/0
{ "file_path": "go/src/cmd/compile/internal/test/testdata/short_test.go", "repo_id": "go", "token_count": 590 }
114
// 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 file. package typecheck import ( "cmd/compile/internal/base" "cmd/compile/internal/ir" "cmd/compile/internal/types" "cmd/internal/src" ) // importfunc declares ...
go/src/cmd/compile/internal/typecheck/export.go/0
{ "file_path": "go/src/cmd/compile/internal/typecheck/export.go", "repo_id": "go", "token_count": 307 }
115
// 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 file. package types import ( "fmt" "internal/goversion" "internal/lazyregexp" "log" "strconv" "cmd/compile/internal/base" ) // A lang is a language version b...
go/src/cmd/compile/internal/types/goversion.go/0
{ "file_path": "go/src/cmd/compile/internal/types/goversion.go", "repo_id": "go", "token_count": 859 }
116
// Copyright 2013 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 types2_test import ( "cmd/compile/internal/syntax" "errors" "fmt" "internal/goversion" "internal/testenv" "reflect" "regexp" "sort" "strings" ...
go/src/cmd/compile/internal/types2/api_test.go/0
{ "file_path": "go/src/cmd/compile/internal/types2/api_test.go", "repo_id": "go", "token_count": 41900 }
117
// Copyright 2014 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 types2 import ( "cmd/compile/internal/syntax" "fmt" "go/constant" "internal/buildcfg" . "internal/types/errors" ) func (check *Checker) declare(s...
go/src/cmd/compile/internal/types2/decl.go/0
{ "file_path": "go/src/cmd/compile/internal/types2/decl.go", "repo_id": "go", "token_count": 10561 }
118
// Copyright 2021 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 types2 import ( "cmd/compile/internal/syntax" . "internal/types/errors" "strconv" ) // ------------------------------------------------------------...
go/src/cmd/compile/internal/types2/struct.go/0
{ "file_path": "go/src/cmd/compile/internal/types2/struct.go", "repo_id": "go", "token_count": 2430 }
119
// Copyright 2013 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. // This file implements type-checking of identifiers and type expressions. package types2 import ( "cmd/compile/internal/syntax" "fmt" "go/constant" . "in...
go/src/cmd/compile/internal/types2/typexpr.go/0
{ "file_path": "go/src/cmd/compile/internal/types2/typexpr.go", "repo_id": "go", "token_count": 6190 }
120
// Copyright 2012 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 walk import ( "fmt" "go/constant" "cmd/compile/internal/base" "cmd/compile/internal/ir" "cmd/compile/internal/reflectdata" "cmd/compile/internal...
go/src/cmd/compile/internal/walk/order.go/0
{ "file_path": "go/src/cmd/compile/internal/walk/order.go", "repo_id": "go", "token_count": 18655 }
121
// Copyright 2022 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 main // This file contains functions and apis to support the "go tool // covdata" sub-commands that relate to dumping text format summaries // and repo...
go/src/cmd/covdata/dump.go/0
{ "file_path": "go/src/cmd/covdata/dump.go", "repo_id": "go", "token_count": 4703 }
122
// Copyright 2020 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 main import "testing" func TestPackageName(t *testing.T) { var tests = []struct { fileName, pkgName string }{ {"", ""}, {"///", ""}, {"fmt",...
go/src/cmd/cover/pkgname_test.go/0
{ "file_path": "go/src/cmd/cover/pkgname_test.go", "repo_id": "go", "token_count": 282 }
123
// Copyright 2023 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 main import ( "internal/platform" "testing" ) // TestMustLinkExternal verifies that the mustLinkExternal helper // function matches internal/platfor...
go/src/cmd/dist/build_test.go/0
{ "file_path": "go/src/cmd/dist/build_test.go", "repo_id": "go", "token_count": 271 }
124
// Copyright 2023 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 main import ( "bytes" "encoding/json" "errors" "fmt" "io" "sync" "time" ) // lockedWriter serializes Write calls to an underlying Writer. type ...
go/src/cmd/dist/testjson.go/0
{ "file_path": "go/src/cmd/dist/testjson.go", "repo_id": "go", "token_count": 1933 }
125
// Package comment B. package merge // B doc. func B() { // B comment. }
go/src/cmd/doc/testdata/merge/bb.go/0
{ "file_path": "go/src/cmd/doc/testdata/merge/bb.go", "repo_id": "go", "token_count": 28 }
126
// Copyright 2012 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 main func init() { addTestCases(gotypesTests, gotypes) } var gotypesTests = []testCase{ { Name: "gotypes.0", In: `package main import "golang.o...
go/src/cmd/fix/gotypes_test.go/0
{ "file_path": "go/src/cmd/fix/gotypes_test.go", "repo_id": "go", "token_count": 541 }
127
// Copyright 2013 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. //go:build go1.1 package main // Test that go1.1 tag above is included in builds. main.go refers to this definition. const go11tag = true
go/src/cmd/go/go11.go/0
{ "file_path": "go/src/cmd/go/go11.go", "repo_id": "go", "token_count": 85 }
128
// Copyright 2012 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 base import ( "os" "os/signal" "sync" ) // Interrupted is closed when the go command receives an interrupt signal. var Interrupted = make(chan stru...
go/src/cmd/go/internal/base/signal.go/0
{ "file_path": "go/src/cmd/go/internal/base/signal.go", "repo_id": "go", "token_count": 217 }
129
// Copyright 2015 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 doc implements the “go doc” command. package doc import ( "cmd/go/internal/base" "cmd/go/internal/cfg" "context" ) var CmdDoc = &base.Command{ ...
go/src/cmd/go/internal/doc/doc.go/0
{ "file_path": "go/src/cmd/go/internal/doc/doc.go", "repo_id": "go", "token_count": 1362 }
130
//go:build linux // +build linux package android import _ "f"
go/src/cmd/go/internal/imports/testdata/android/f.go/0
{ "file_path": "go/src/cmd/go/internal/imports/testdata/android/f.go", "repo_id": "go", "token_count": 22 }
131
package x import "import1"
go/src/cmd/go/internal/imports/testdata/star/x.go/0
{ "file_path": "go/src/cmd/go/internal/imports/testdata/star/x.go", "repo_id": "go", "token_count": 10 }
132
// Copyright 2018 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. // go mod graph package modcmd import ( "bufio" "context" "os" "cmd/go/internal/base" "cmd/go/internal/cfg" "cmd/go/internal/gover" "cmd/go/internal/m...
go/src/cmd/go/internal/modcmd/graph.go/0
{ "file_path": "go/src/cmd/go/internal/modcmd/graph.go", "repo_id": "go", "token_count": 841 }
133
// Copyright 2018 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 modfetch import ( "archive/zip" "bytes" "context" "errors" "fmt" "io" "io/fs" "os" "path" "path/filepath" "sort" "strings" "time" "cmd/g...
go/src/cmd/go/internal/modfetch/coderepo.go/0
{ "file_path": "go/src/cmd/go/internal/modfetch/coderepo.go", "repo_id": "go", "token_count": 14144 }
134
// Copyright 2022 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 modindex import ( "bytes" "encoding/binary" "errors" "fmt" "go/build" "go/build/constraint" "go/token" "internal/godebug" "internal/goroot" "...
go/src/cmd/go/internal/modindex/read.go/0
{ "file_path": "go/src/cmd/go/internal/modindex/read.go", "repo_id": "go", "token_count": 11293 }
135
// Copyright 2018 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 modload import ( "context" "internal/testenv" "regexp" "strings" "testing" "golang.org/x/mod/module" ) var importTests = []struct { path strin...
go/src/cmd/go/internal/modload/import_test.go/0
{ "file_path": "go/src/cmd/go/internal/modload/import_test.go", "repo_id": "go", "token_count": 985 }
136
// Copyright 2018 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 mvs implements Minimal Version Selection. // See https://research.swtch.com/vgo-mvs. package mvs import ( "fmt" "slices" "sort" "sync" "cmd/go...
go/src/cmd/go/internal/mvs/mvs.go/0
{ "file_path": "go/src/cmd/go/internal/mvs/mvs.go", "repo_id": "go", "token_count": 5132 }
137
// Copyright 2022 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 script implements a small, customizable, platform-agnostic scripting // language. // // Scripts are run by an [Engine] configured with a set of avail...
go/src/cmd/go/internal/script/engine.go/0
{ "file_path": "go/src/cmd/go/internal/script/engine.go", "repo_id": "go", "token_count": 8042 }
138
// Copyright 2019 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 test import ( "cmd/go/internal/cfg" "cmd/go/internal/test/internal/genflags" "internal/testenv" "maps" "os" "testing" ) func TestMain(m *testing...
go/src/cmd/go/internal/test/flagdefs_test.go/0
{ "file_path": "go/src/cmd/go/internal/test/flagdefs_test.go", "repo_id": "go", "token_count": 645 }
139
// Copyright 2023 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 toolchain import ( "context" "fmt" "os" "path/filepath" "sort" "strings" "cmd/go/internal/base" "cmd/go/internal/cfg" "cmd/go/internal/gover"...
go/src/cmd/go/internal/toolchain/switch.go/0
{ "file_path": "go/src/cmd/go/internal/toolchain/switch.go", "repo_id": "go", "token_count": 2458 }
140
// Copyright 2022 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 vcweb import ( "bufio" "bytes" "cmd/go/internal/script" "context" "errors" "fmt" "internal/txtar" "io" "log" "net/http" "os" "os/exec" "pa...
go/src/cmd/go/internal/vcweb/script.go/0
{ "file_path": "go/src/cmd/go/internal/vcweb/script.go", "repo_id": "go", "token_count": 3524 }
141
// Copyright 2019 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 web import ( "net/url" "testing" ) func TestURLToFilePath(t *testing.T) { for _, tc := range urlTests { if tc.url == "" { continue } tc :=...
go/src/cmd/go/internal/web/url_test.go/0
{ "file_path": "go/src/cmd/go/internal/web/url_test.go", "repo_id": "go", "token_count": 829 }
142
// Copyright 2023 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. //go:build unix package work import ( "bytes" "internal/testenv" "strings" "testing" "unicode" ) func FuzzSplitPkgConfigOutput(f *testing.F) { testenv....
go/src/cmd/go/internal/work/shell_test.go/0
{ "file_path": "go/src/cmd/go/internal/work/shell_test.go", "repo_id": "go", "token_count": 2110 }
143
// Copyright 2016 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 main_test import ( "errors" "internal/testenv" "internal/testpty" "io" "os" "testing" "golang.org/x/term" ) func TestTerminalPassthrough(t *te...
go/src/cmd/go/terminal_test.go/0
{ "file_path": "go/src/cmd/go/terminal_test.go", "repo_id": "go", "token_count": 1389 }
144
The scripts in this directory set up version-control repos for use in tests of cmd/go and its subpackages. They are written in a dialect of the same script language as in cmd/go/testdata/script, and the outputs are hosted by the server in cmd/go/internal/vcweb. To see the conditions and commands available for these s...
go/src/cmd/go/testdata/vcstest/README/0
{ "file_path": "go/src/cmd/go/testdata/vcstest/README", "repo_id": "go", "token_count": 140 }
145
// 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 file. /* Gofmt formats Go programs. It uses tabs for indentation and blanks for alignment. Alignment assumes that an editor is using a fixed-width font. Without an e...
go/src/cmd/gofmt/doc.go/0
{ "file_path": "go/src/cmd/gofmt/doc.go", "repo_id": "go", "token_count": 915 }
146
package p const ( // 0-octals _ = 0 _ = 0123 _ = 0123456 _ = 0_123 _ = 0123_456 // decimals _ = 1 _ = 1234 _ = 1234567 _ = 1_234 _ = 1_234_567 // hexadecimals _ = 0x0 _ = 0x1234 _ = 0xcafef00d _ = 0x0 _ = 0x1234 _ = 0xCAFEf00d _ = 0x_0 _ = 0x_1234 _ = 0x_CAFE_f00d // octals _ = 0o0 _ = ...
go/src/cmd/gofmt/testdata/go2numbers.golden/0
{ "file_path": "go/src/cmd/gofmt/testdata/go2numbers.golden", "repo_id": "go", "token_count": 1264 }
147
//gofmt -r=(x)->x // Copyright 2012 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. // Rewriting of parenthesized expressions (x) -> x // must not drop parentheses if that would lead to // wrong association of the operands. /...
go/src/cmd/gofmt/testdata/rewrite4.golden/0
{ "file_path": "go/src/cmd/gofmt/testdata/rewrite4.golden", "repo_id": "go", "token_count": 572 }
148
//gofmt -stdin var x int func f() { y := z /* this is a comment */ // this is a comment too }
go/src/cmd/gofmt/testdata/stdin2.golden/0
{ "file_path": "go/src/cmd/gofmt/testdata/stdin2.golden", "repo_id": "go", "token_count": 43 }
149
// Copyright 2020 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. //gofmt package typeparams type T[P any] struct{} type T[P1, P2, P3 any] struct{} type T[P C] struct{} type T[P1, P2, P3 C] struct{} type T[P C[P]] struct{}...
go/src/cmd/gofmt/testdata/typeparams.golden/0
{ "file_path": "go/src/cmd/gofmt/testdata/typeparams.golden", "repo_id": "go", "token_count": 339 }
150
// Copyright 2016 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 bio import ( "io" "log" ) // MustClose closes Closer c and calls log.Fatal if it returns a non-nil error. func MustClose(c io.Closer) { if err := c...
go/src/cmd/internal/bio/must.go/0
{ "file_path": "go/src/cmd/internal/bio/must.go", "repo_id": "go", "token_count": 323 }
151
// Copyright 2022 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 cov_test import ( "cmd/internal/cov" "fmt" "internal/coverage" "internal/coverage/decodecounter" "internal/coverage/decodemeta" "internal/coverag...
go/src/cmd/internal/cov/read_test.go/0
{ "file_path": "go/src/cmd/internal/cov/read_test.go", "repo_id": "go", "token_count": 1456 }
152
// Copyright 2020 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 goobj import ( "bufio" "bytes" "fmt" "internal/buildcfg" "internal/testenv" "os" "testing" "cmd/internal/bio" "cmd/internal/objabi" ) func d...
go/src/cmd/internal/goobj/objfile_test.go/0
{ "file_path": "go/src/cmd/internal/goobj/objfile_test.go", "repo_id": "go", "token_count": 1364 }
153
// Copyright 2015 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 arm var cnames5 = []string{ "NONE", "REG", "REGREG", "REGREG2", "REGLIST", "SHIFT", "SHIFTADDR", "FREG", "PSR", "FCR", "SPR", "RCON", "NCO...
go/src/cmd/internal/obj/arm/anames5.go/0
{ "file_path": "go/src/cmd/internal/obj/arm/anames5.go", "repo_id": "go", "token_count": 732 }
154
// Derived from Inferno utils/6l/obj.c and utils/6l/span.c // https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/obj.c // https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/span.c // // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. // Portions Copyright © 1995-1997 C H F...
go/src/cmd/internal/obj/data.go/0
{ "file_path": "go/src/cmd/internal/obj/data.go", "repo_id": "go", "token_count": 2718 }
155
// Code generated by stringer -i a.out.go -o anames.go -p mips; DO NOT EDIT. package mips import "cmd/internal/obj" var Anames = []string{ obj.A_ARCHSPECIFIC: "ABSD", "ABSF", "ABSW", "ADD", "ADDD", "ADDF", "ADDU", "ADDW", "AND", "BEQ", "BFPF", "BFPT", "BGEZ", "BGEZAL", "BGTZ", "BLEZ", "BLTZ", "BLTZ...
go/src/cmd/internal/obj/mips/anames.go/0
{ "file_path": "go/src/cmd/internal/obj/mips/anames.go", "repo_id": "go", "token_count": 962 }
156
// Copyright 2019 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 ppc64 implements a PPC64 assembler that assembles Go asm into the corresponding PPC64 instructions as defined by the Power ISA 3.0B. This document p...
go/src/cmd/internal/obj/ppc64/doc.go/0
{ "file_path": "go/src/cmd/internal/obj/ppc64/doc.go", "repo_id": "go", "token_count": 4043 }
157
// Inferno utils/6l/span.c // https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/span.c // // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) // Portions Copyright © 1997-1999 Vita Nuova Limited // Portions Copyright...
go/src/cmd/internal/obj/x86/asm6.go/0
{ "file_path": "go/src/cmd/internal/obj/x86/asm6.go", "repo_id": "go", "token_count": 81979 }
158
// Copyright 2019 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 objabi import ( "path/filepath" "runtime" "testing" ) // On Windows, "/foo" is reported as a relative path // (it is relative to the current drive ...
go/src/cmd/internal/objabi/line_test.go/0
{ "file_path": "go/src/cmd/internal/objabi/line_test.go", "repo_id": "go", "token_count": 572 }
159
// Copyright 2014 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. // Parsing of Plan 9 a.out executables. package objfile import ( "debug/dwarf" "debug/plan9obj" "errors" "fmt" "io" "sort" ) var validSymType = map[run...
go/src/cmd/internal/objfile/plan9obj.go/0
{ "file_path": "go/src/cmd/internal/objfile/plan9obj.go", "repo_id": "go", "token_count": 1479 }
160
go test fuzz v1 []byte("\x010\x01\r000000000")
go/src/cmd/internal/pgo/testdata/fuzz/FuzzRoundTrip/fdc60117b431bbae/0
{ "file_path": "go/src/cmd/internal/pgo/testdata/fuzz/FuzzRoundTrip/fdc60117b431bbae", "repo_id": "go", "token_count": 21 }
161
// Copyright 2024 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. //go:build cmd_go_bootstrap || compiler_bootstrap package telemetry func MaybeParent() {} func MaybeChild() {} func Mode() string ...
go/src/cmd/internal/telemetry/telemetry_bootstrap.go/0
{ "file_path": "go/src/cmd/internal/telemetry/telemetry_bootstrap.go", "repo_id": "go", "token_count": 160 }
162
=== RUN TestIndex --- PASS: TestIndex (0.00s) === PASS TestIndex === NAME === RUN TestLastIndex --- PASS: TestLastIndex (0.00s) === PASS TestLastIndex === NAME === RUN TestIndexAny --- PASS: TestIndexAny (0.00s) === PASS TestIndexAny === NAME === RUN TestLastIndexAny --- PASS: TestLastIndexAny ...
go/src/cmd/internal/test2json/testdata/framebig.test/0
{ "file_path": "go/src/cmd/internal/test2json/testdata/framebig.test", "repo_id": "go", "token_count": 1671 }
163
=== RUN TestUnicode Μπορώ να φάω σπασμένα γυαλιά χωρίς να πάθω τίποτα. Μπορώ να φάω σπασμένα γυαλιά χωρίς να πάθω τίποτα. 私はガラスを食べられます。それは私を傷つけません。私はガラスを食べられます。それは私を傷つけません。 --- PASS: TestUnicode ฉันกินกระจกได้ แต่มันไม่ทำให้ฉันเจ็บ ฉันกินกระจกได้ แต่มันไม่ทำให้ฉันเจ็บ אני יכול לאכול זכוכית וזה לא מזיק לי. אני...
go/src/cmd/internal/test2json/testdata/unicode.test/0
{ "file_path": "go/src/cmd/internal/test2json/testdata/unicode.test", "repo_id": "go", "token_count": 453 }
164
// Copyright 2020 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 ld import ( "cmd/internal/obj" "cmd/link/internal/loader" "cmd/link/internal/sym" "sync" ) type unresolvedSymKey struct { from loader.Sym // Symb...
go/src/cmd/link/internal/ld/errors.go/0
{ "file_path": "go/src/cmd/link/internal/ld/errors.go", "repo_id": "go", "token_count": 759 }
165
// Copyright 2024 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 ld // This file provides helper functions for updating/rewriting the UUID // load command within a Go go binary generated on Darwin using // external l...
go/src/cmd/link/internal/ld/macho_update_uuid.go/0
{ "file_path": "go/src/cmd/link/internal/ld/macho_update_uuid.go", "repo_id": "go", "token_count": 1198 }
166
// Copyright 2023 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 ld import ( "cmd/internal/sys" "cmd/link/internal/loader" "cmd/link/internal/sym" ) var sehp struct { pdata []sym.LoaderSym xdata []sym.LoaderSym...
go/src/cmd/link/internal/ld/seh.go/0
{ "file_path": "go/src/cmd/link/internal/ld/seh.go", "repo_id": "go", "token_count": 886 }
167
// A small test program that uses the net/http package. There is // nothing special about net/http here, this is just a convenient way // to pull in a lot of code. package main import ( "net/http" "net/http/httptest" ) type statusHandler int func (h *statusHandler) ServeHTTP(w http.ResponseWriter, r *http.Request...
go/src/cmd/link/internal/ld/testdata/httptest/main/main.go/0
{ "file_path": "go/src/cmd/link/internal/ld/testdata/httptest/main/main.go", "repo_id": "go", "token_count": 156 }
168
// Copyright 2022 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 main func main() { asmMain() } func asmMain() func startSelf() func startChain() func chain0() func chain1() func chain2() func chainEnd() func sta...
go/src/cmd/link/internal/ld/testdata/stackcheck/main.go/0
{ "file_path": "go/src/cmd/link/internal/ld/testdata/stackcheck/main.go", "repo_id": "go", "token_count": 106 }
169
// Inferno utils/5l/asm.c // https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/asm.c // // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) // Portions Copyright © 1997-1999 Vita Nuova Limited // Portions Copyright ©...
go/src/cmd/link/internal/mips/asm.go/0
{ "file_path": "go/src/cmd/link/internal/mips/asm.go", "repo_id": "go", "token_count": 2225 }
170
// Copyright 2017 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 sym import "cmd/internal/goobj" type Library struct { Objref string Srcref string File string Pkg string Shlib str...
go/src/cmd/link/internal/sym/library.go/0
{ "file_path": "go/src/cmd/link/internal/sym/library.go", "repo_id": "go", "token_count": 246 }
171
// Copyright 2014 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 main import ( "cmd/internal/notsha256" "flag" "fmt" "internal/platform" "internal/testenv" "os" "path/filepath" "runtime" "strings" "sync" "...
go/src/cmd/objdump/objdump_test.go/0
{ "file_path": "go/src/cmd/objdump/objdump_test.go", "repo_id": "go", "token_count": 3752 }
172
// Copyright 2021 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 main import ( "flag" "fmt" "os" "runtime/pprof" "time" ) var output = flag.String("output", "", "pprof profile output file") func main() { flag...
go/src/cmd/pprof/testdata/cpu.go/0
{ "file_path": "go/src/cmd/pprof/testdata/cpu.go", "repo_id": "go", "token_count": 323 }
173
// Copyright 2023 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 main import ( "fmt" "internal/trace" "internal/trace/traceviewer" "internal/trace/traceviewer/format" ) var _ generator = &procGenerator{} type p...
go/src/cmd/trace/procgen.go/0
{ "file_path": "go/src/cmd/trace/procgen.go", "repo_id": "go", "token_count": 2398 }
174
// Copyright 2014 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
go/src/cmd/vendor/github.com/google/pprof/internal/binutils/binutils.go/0
{ "file_path": "go/src/cmd/vendor/github.com/google/pprof/internal/binutils/binutils.go", "repo_id": "go", "token_count": 8296 }
175
body { overflow: hidden; /* Want scrollbar not here, but in #stack-holder */ } /* Scrollable container for flame graph */ #stack-holder { width: 100%; flex-grow: 1; overflow-y: auto; background: #eee; /* Light grey gives better contrast with boxes */ position: relative; /* Allows absolute positioning of chi...
go/src/cmd/vendor/github.com/google/pprof/internal/driver/html/stacks.css/0
{ "file_path": "go/src/cmd/vendor/github.com/google/pprof/internal/driver/html/stacks.css", "repo_id": "go", "token_count": 619 }
176
// Copyright 2014 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
go/src/cmd/vendor/github.com/google/pprof/internal/measurement/measurement.go/0
{ "file_path": "go/src/cmd/vendor/github.com/google/pprof/internal/measurement/measurement.go", "repo_id": "go", "token_count": 3268 }
177
// Copyright 2014 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
go/src/cmd/vendor/github.com/google/pprof/profile/legacy_profile.go/0
{ "file_path": "go/src/cmd/vendor/github.com/google/pprof/profile/legacy_profile.go", "repo_id": "go", "token_count": 13153 }
178
// Copyright 2014 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 ppc64asm import ( "encoding/binary" "fmt" "log" ) const debugDecode = false const prefixOpcode = 1 // instFormat is a decoding rule for one spec...
go/src/cmd/vendor/golang.org/x/arch/ppc64/ppc64asm/decode.go/0
{ "file_path": "go/src/cmd/vendor/golang.org/x/arch/ppc64/ppc64asm/decode.go", "repo_id": "go", "token_count": 2339 }
179
// Copyright 2024 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 relnote import ( "fmt" "strings" md "rsc.io/markdown" ) // DumpMarkdown writes the internal structure of a markdown // document to standard output...
go/src/cmd/vendor/golang.org/x/build/relnote/dump.go/0
{ "file_path": "go/src/cmd/vendor/golang.org/x/build/relnote/dump.go", "repo_id": "go", "token_count": 766 }
180
// Copyright 2019 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 note defines the notes signed by the Go module database server. // // A note is text signed by one or more server keys. // The text should be ignored...
go/src/cmd/vendor/golang.org/x/mod/sumdb/note/note.go/0
{ "file_path": "go/src/cmd/vendor/golang.org/x/mod/sumdb/note/note.go", "repo_id": "go", "token_count": 7249 }
181
// Copyright 2011 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. // Plan 9 system calls. // This file is compiled as ordinary Go code, // but it is also input to mksyscall, // which parses the //sys lines and generates system...
go/src/cmd/vendor/golang.org/x/sys/plan9/syscall_plan9.go/0
{ "file_path": "go/src/cmd/vendor/golang.org/x/sys/plan9/syscall_plan9.go", "repo_id": "go", "token_count": 3022 }
182
// 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 file. //go:build gc #include "textflag.h" // // System calls for 386, Linux // // See ../runtime/sys_linux_386.s for the reason why we always use int 0x80 // inste...
go/src/cmd/vendor/golang.org/x/sys/unix/asm_linux_386.s/0
{ "file_path": "go/src/cmd/vendor/golang.org/x/sys/unix/asm_linux_386.s", "repo_id": "go", "token_count": 704 }
183
// Copyright 2017 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. //go:build freebsd package unix import ( "errors" "fmt" ) // Go implementation of C mostly found in /usr/src/sys/kern/subr_capability.c const ( // This i...
go/src/cmd/vendor/golang.org/x/sys/unix/cap_freebsd.go/0
{ "file_path": "go/src/cmd/vendor/golang.org/x/sys/unix/cap_freebsd.go", "repo_id": "go", "token_count": 1961 }
184
// Copyright 2019 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 unix import "unsafe" // FcntlInt performs a fcntl syscall on fd with the provided command and argument. func FcntlInt(fd uintptr, cmd, arg int) (int, ...
go/src/cmd/vendor/golang.org/x/sys/unix/fcntl_darwin.go/0
{ "file_path": "go/src/cmd/vendor/golang.org/x/sys/unix/fcntl_darwin.go", "repo_id": "go", "token_count": 314 }
185
// Copyright 2016 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 unix import ( "errors" "fmt" "strconv" ) // Pledge implements the pledge syscall. // // This changes both the promises and execpromises; use Pledge...
go/src/cmd/vendor/golang.org/x/sys/unix/pledge_openbsd.go/0
{ "file_path": "go/src/cmd/vendor/golang.org/x/sys/unix/pledge_openbsd.go", "repo_id": "go", "token_count": 780 }
186
// Copyright 2018 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. //go:build aix && ppc64 package unix //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) //sys Seek(fd int, offset int64, whence int) (off int64, err er...
go/src/cmd/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go/0
{ "file_path": "go/src/cmd/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go", "repo_id": "go", "token_count": 754 }
187
// Copyright 2021 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. // illumos system calls not present on Solaris. //go:build amd64 && illumos package unix import ( "unsafe" ) func bytes2iovec(bs [][]byte) []Iovec { iovec...
go/src/cmd/vendor/golang.org/x/sys/unix/syscall_illumos.go/0
{ "file_path": "go/src/cmd/vendor/golang.org/x/sys/unix/syscall_illumos.go", "repo_id": "go", "token_count": 804 }
188
// Copyright 2021 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. //go:build linux && ppc package unix import ( "syscall" "unsafe" ) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys Fchown...
go/src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go/0
{ "file_path": "go/src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go", "repo_id": "go", "token_count": 2830 }
189
// go run mksyscall.go -tags darwin,amd64 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build darwin && amd64 package unix import ( "syscall" "unsafe" ) var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO ...
go/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go/0
{ "file_path": "go/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go", "repo_id": "go", "token_count": 29991 }
190
// 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 file. // Windows system calls. package windows import ( errorspkg "errors" "fmt" "runtime" "sync" "syscall" "time" "unicode/utf16" "unsafe" ) type ( Handl...
go/src/cmd/vendor/golang.org/x/sys/windows/syscall_windows.go/0
{ "file_path": "go/src/cmd/vendor/golang.org/x/sys/windows/syscall_windows.go", "repo_id": "go", "token_count": 30432 }
191
// Copyright 2019 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. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos package term import ( "golang.org/x/sys/unix" ) type state ...
go/src/cmd/vendor/golang.org/x/term/term_unix.go/0
{ "file_path": "go/src/cmd/vendor/golang.org/x/term/term_unix.go", "repo_id": "go", "token_count": 958 }
192
// Copyright 2013 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 language import ( "bytes" "fmt" "sort" "strconv" "golang.org/x/text/internal/tag" ) // findIndex tries to find the given tag in idx and returns ...
go/src/cmd/vendor/golang.org/x/text/internal/language/lookup.go/0
{ "file_path": "go/src/cmd/vendor/golang.org/x/text/internal/language/lookup.go", "repo_id": "go", "token_count": 5455 }
193
// Copyright 2011 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 norm import "encoding/binary" // This file contains Form-specific logic and wrappers for data in tables.go. // Rune info is stored in a separate trie...
go/src/cmd/vendor/golang.org/x/text/unicode/norm/forminfo.go/0
{ "file_path": "go/src/cmd/vendor/golang.org/x/text/unicode/norm/forminfo.go", "repo_id": "go", "token_count": 3113 }
194
// Copyright 2020 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 sigchanyzer defines an Analyzer that detects // misuse of unbuffered signal as argument to signal.Notify. package sigchanyzer import ( "bytes" _ "...
go/src/cmd/vendor/golang.org/x/tools/go/analysis/passes/sigchanyzer/sigchanyzer.go/0
{ "file_path": "go/src/cmd/vendor/golang.org/x/tools/go/analysis/passes/sigchanyzer/sigchanyzer.go", "repo_id": "go", "token_count": 1651 }
195
// Copyright 2023 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. // The unmarshal package defines an Analyzer that checks for passing // non-pointer or non-interface types to unmarshal and decode functions. // // # Analyzer u...
go/src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unmarshal/doc.go/0
{ "file_path": "go/src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unmarshal/doc.go", "repo_id": "go", "token_count": 148 }
196
// Copyright 2024 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 var PackageSymbols = map[string][]Symbol{ "archive/tar": { {"(*Header).FileInfo", Method, 1},...
go/src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go/0
{ "file_path": "go/src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go", "repo_id": "go", "token_count": 254358 }
197
// Copyright 2021 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 markdown import ( "bytes" "fmt" "strings" "unicode" "unicode/utf8" ) /* text node can be - other literal text - run of * or _ characters - [ ...
go/src/cmd/vendor/rsc.io/markdown/inline.go/0
{ "file_path": "go/src/cmd/vendor/rsc.io/markdown/inline.go", "repo_id": "go", "token_count": 9747 }
198
// Copyright 2013 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 nilfunc func F() {} func Comparison() { if F == nil { // ERROR "comparison of function F == nil is always false" panic("can't happen") } }
go/src/cmd/vet/testdata/nilfunc/nilfunc.go/0
{ "file_path": "go/src/cmd/vet/testdata/nilfunc/nilfunc.go", "repo_id": "go", "token_count": 93 }
199
// Copyright 2013 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 main import ( "bytes" "errors" "fmt" "internal/testenv" "log" "os" "os/exec" "path" "path/filepath" "regexp" "strconv" "strings" "sync" "...
go/src/cmd/vet/vet_test.go/0
{ "file_path": "go/src/cmd/vet/vet_test.go", "repo_id": "go", "token_count": 5212 }
200
// Copyright 2011 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 lzw import ( "bytes" "fmt" "internal/testenv" "io" "math" "os" "runtime" "testing" ) var filenames = []string{ "../testdata/gettysburg.txt", ...
go/src/compress/lzw/writer_test.go/0
{ "file_path": "go/src/compress/lzw/writer_test.go", "repo_id": "go", "token_count": 2686 }
201
// Copyright 2017 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 ring_test import ( "container/ring" "fmt" ) func ExampleRing_Len() { // Create a new ring of size 4 r := ring.New(4) // Print out its length fm...
go/src/container/ring/example_test.go/0
{ "file_path": "go/src/container/ring/example_test.go", "repo_id": "go", "token_count": 1214 }
202
// 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 file. // This Go implementation is derived in part from the reference // ANSI C implementation, which carries the following notice: // // rijndael-alg-fst.c // // @ve...
go/src/crypto/aes/block.go/0
{ "file_path": "go/src/crypto/aes/block.go", "repo_id": "go", "token_count": 3138 }
203