text
stringlengths
2
1.1M
id
stringlengths
11
117
metadata
dict
__index_level_0__
int64
0
885
// 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. //go:build linux && (mips || mipsle) package runtime func archauxv(tag, val uintptr) { } func osArchInit() {} //go:nosplit func cputicks() int64 { // nanot...
go/src/runtime/os_linux_mipsx.go/0
{ "file_path": "go/src/runtime/os_linux_mipsx.go", "repo_id": "go", "token_count": 428 }
400
// 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 runtime import ( "internal/abi" "internal/goarch" "internal/runtime/atomic" "internal/runtime/sys" "internal/stringslite" "unsafe" ) // throwTyp...
go/src/runtime/panic.go/0
{ "file_path": "go/src/runtime/panic.go", "repo_id": "go", "token_count": 15392 }
401
// Copyright 2010 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 pprof writes runtime profiling data in the format expected // by the pprof visualization tool. // // # Profiling a Go program // // The first step to...
go/src/runtime/pprof/pprof.go/0
{ "file_path": "go/src/runtime/pprof/pprof.go", "repo_id": "go", "token_count": 10897 }
402
These binaries were generated by: $ cat empty.s .global _start _start: $ as --32 -o empty.o empty.s && ld --build-id -m elf_i386 -o test32 empty.o $ as --64 -o empty.o empty.s && ld --build-id -o test64 empty.o $ powerpc-linux-gnu-as -o empty.o empty.s && powerpc-linux-gnu-ld --build-id -o test32be empty.o $ powerpc6...
go/src/runtime/pprof/testdata/README/0
{ "file_path": "go/src/runtime/pprof/testdata/README", "repo_id": "go", "token_count": 164 }
403
// 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 race_test import "unsafe" // golang.org/issue/12225 // The test is that this compiles at all. //go:noinline func convert(s string) []byte { return [...
go/src/runtime/race/testdata/issue12225_test.go/0
{ "file_path": "go/src/runtime/race/testdata/issue12225_test.go", "repo_id": "go", "token_count": 156 }
404
// 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 race package race_test import ( "sync" "testing" "time" ) func TestTimers(t *testing.T) { const goroutines = 8 var wg sync.WaitGroup wg.Add(...
go/src/runtime/race/timer_test.go/0
{ "file_path": "go/src/runtime/race/timer_test.go", "repo_id": "go", "token_count": 252 }
405
// 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. #include "textflag.h" #include "cgo/abi_arm64.h" TEXT _rt0_arm64_darwin(SB),NOSPLIT|NOFRAME,$0 MOVD $runtime·rt0_go(SB), R2 BL (R2) exit: MOVD $0, R0 MOVD ...
go/src/runtime/rt0_darwin_arm64.s/0
{ "file_path": "go/src/runtime/rt0_darwin_arm64.s", "repo_id": "go", "token_count": 808 }
406
// 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. #include "textflag.h" TEXT _rt0_riscv64_openbsd(SB),NOSPLIT|NOFRAME,$0 MOV 0(X2), A0 // argc ADD $8, X2, A1 // argv JMP main(SB) TEXT main(SB),NOSPLIT|NOFR...
go/src/runtime/rt0_openbsd_riscv64.s/0
{ "file_path": "go/src/runtime/rt0_openbsd_riscv64.s", "repo_id": "go", "token_count": 166 }
407
// 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 runtime import ( "internal/bytealg" "internal/goarch" "internal/runtime/atomic" "unsafe" ) // Keep a cached value to make gotraceback fast, // sin...
go/src/runtime/runtime1.go/0
{ "file_path": "go/src/runtime/runtime1.go", "repo_id": "go", "token_count": 7715 }
408
// 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. // Semaphore implementation exposed to Go. // Intended use is provide a sleep and wakeup // primitive that can be used in the contended case // of other synchro...
go/src/runtime/sema.go/0
{ "file_path": "go/src/runtime/sema.go", "repo_id": "go", "token_count": 7208 }
409
// 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. //go:build (linux || freebsd || openbsd) && riscv64 package runtime import ( "internal/abi" "internal/goarch" "unsafe" ) func dumpregs(c *sigctxt) { prin...
go/src/runtime/signal_riscv64.go/0
{ "file_path": "go/src/runtime/signal_riscv64.go", "repo_id": "go", "token_count": 1289 }
410
// Copyright 2010 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. // Software IEEE754 64-bit floating point. // Only referred to (and thus linked in) by softfloat targets // and by tests in this directory. package runtime co...
go/src/runtime/softfloat64.go/0
{ "file_path": "go/src/runtime/softfloat64.go", "repo_id": "go", "token_count": 5657 }
411
// 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 linux package runtime import "unsafe" func sbrk0() uintptr // Called from write_err_android.go only, but defined in sys_linux_*.s; // declared he...
go/src/runtime/stubs_linux.go/0
{ "file_path": "go/src/runtime/stubs_linux.go", "repo_id": "go", "token_count": 198 }
412
// 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 runtime import ( "internal/abi" "internal/runtime/atomic" "unsafe" ) // The X versions of syscall expect the libc call to return a 64-bit result. /...
go/src/runtime/sys_darwin.go/0
{ "file_path": "go/src/runtime/sys_darwin.go", "repo_id": "go", "token_count": 9999 }
413
// 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. //go:build linux && (mips64 || mips64le) // // System calls and other sys.stuff for mips64, Linux // #include "go_asm.h" #include "go_tls.h" #include "textfla...
go/src/runtime/sys_linux_mips64x.s/0
{ "file_path": "go/src/runtime/sys_linux_mips64x.s", "repo_id": "go", "token_count": 6715 }
414
// 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. //go:build openbsd && !mips64 package runtime import ( "internal/abi" "unsafe" ) // The X versions of syscall expect the libc call to return a 64-bit resul...
go/src/runtime/sys_openbsd3.go/0
{ "file_path": "go/src/runtime/sys_openbsd3.go", "repo_id": "go", "token_count": 1748 }
415
// 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. #include "textflag.h" TEXT runtime·wasmDiv(SB), NOSPLIT, $0-0 Get R0 I64Const $-0x8000000000000000 I64Eq If Get R1 I64Const $-1 I64Eq If I64Cons...
go/src/runtime/sys_wasm.s/0
{ "file_path": "go/src/runtime/sys_wasm.s", "repo_id": "go", "token_count": 646 }
416
// 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. // Create a large frame to force stack growth. See #62326. TEXT ·testSPWrite(SB),0,$16384-0 // Write to SP MOVQ SP, AX ANDQ $~0xf, SP MOVQ AX, SP RET
go/src/runtime/test_amd64.s/0
{ "file_path": "go/src/runtime/test_amd64.s", "repo_id": "go", "token_count": 109 }
417
// 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 main import ( "os" "runtime" "sync" "time" ) var mainTID int func init() { registerInit("LockOSThreadMain", func() { // init is guaranteed to ...
go/src/runtime/testdata/testprog/lockosthread.go/0
{ "file_path": "go/src/runtime/testdata/testprog/lockosthread.go", "repo_id": "go", "token_count": 2351 }
418
// 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 main import ( "bytes" "fmt" "internal/testenv" "io" "os" "syscall" ) func gettid() int { return syscall.Gettid() } func tidExists(tid int) (ex...
go/src/runtime/testdata/testprog/syscalls_linux.go/0
{ "file_path": "go/src/runtime/testdata/testprog/syscalls_linux.go", "repo_id": "go", "token_count": 837 }
419
// 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 !plan9 && !windows // +build !plan9,!windows package main import ( "os" "runtime" "sync/atomic" "time" "unsafe" ) /* #include <pthread.h> #in...
go/src/runtime/testdata/testprogcgo/lockosthread.go/0
{ "file_path": "go/src/runtime/testdata/testprogcgo/lockosthread.go", "repo_id": "go", "token_count": 962 }
420
// 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 "os" var cmds = map[string]func(){} func register(name string, f func()) { if cmds[name] != nil { panic("duplicate registration: " + n...
go/src/runtime/testdata/testprognet/main.go/0
{ "file_path": "go/src/runtime/testdata/testprognet/main.go", "repo_id": "go", "token_count": 255 }
421
// 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. // Time-related runtime and pieces of package time. package runtime import ( "internal/abi" "internal/runtime/atomic" "internal/runtime/sys" "unsafe" ) /...
go/src/runtime/time.go/0
{ "file_path": "go/src/runtime/time.go", "repo_id": "go", "token_count": 13406 }
422
// 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. #include "go_asm.h" #include "go_tls.h" #include "funcdata.h" #include "textflag.h" // If !iscgo, this is a no-op. // // NOTE: mcall() assumes this clobbers on...
go/src/runtime/tls_loong64.s/0
{ "file_path": "go/src/runtime/tls_loong64.s", "repo_id": "go", "token_count": 255 }
423
// 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. // Runtime -> tracer API for memory events. package runtime import ( "internal/abi" "internal/runtime/sys" ) // Batch type values for the alloc/free experi...
go/src/runtime/traceallocfree.go/0
{ "file_path": "go/src/runtime/traceallocfree.go", "repo_id": "go", "token_count": 1966 }
424
// 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. // Trace stack table and acquisition. package runtime import ( "internal/abi" "internal/goarch" "unsafe" ) // traceTypeTable maps stack traces (arrays of ...
go/src/runtime/tracetype.go/0
{ "file_path": "go/src/runtime/tracetype.go", "repo_id": "go", "token_count": 785 }
425
// 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 runtime import _ "unsafe" // for linkname const ( // vdsoArrayMax is the byte-size of a maximally sized array on this architecture. // See cmd/compi...
go/src/runtime/vdso_linux_amd64.go/0
{ "file_path": "go/src/runtime/vdso_linux_amd64.go", "repo_id": "go", "token_count": 301 }
426
// Code generated by wincallback.go using 'go generate'. DO NOT EDIT. package runtime const cb_max = 2000 // maximum number of windows callbacks allowed
go/src/runtime/zcallback_windows.go/0
{ "file_path": "go/src/runtime/zcallback_windows.go", "repo_id": "go", "token_count": 39 }
427
// 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 sort_test import ( "fmt" "sort" ) // A Change is a record of source code changes, recording user, language, and delta size. type Change struct { us...
go/src/sort/example_multi_test.go/0
{ "file_path": "go/src/sort/example_multi_test.go", "repo_id": "go", "token_count": 1487 }
428
// 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 strconv // ParseBool returns the boolean value represented by the string. // It accepts 1, t, T, TRUE, true, True, 0, f, F, FALSE, false, False. // Any...
go/src/strconv/atob.go/0
{ "file_path": "go/src/strconv/atob.go", "repo_id": "go", "token_count": 338 }
429
// 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 strconv_test import ( "fmt" "log" "strconv" ) func ExampleAppendBool() { b := []byte("bool:") b = strconv.AppendBool(b, true) fmt.Println(string...
go/src/strconv/example_test.go/0
{ "file_path": "go/src/strconv/example_test.go", "repo_id": "go", "token_count": 4155 }
430
// 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 strings import ( "internal/abi" "internal/bytealg" "unicode/utf8" "unsafe" ) // A Builder is used to efficiently build a string using [Builder.Wri...
go/src/strings/builder.go/0
{ "file_path": "go/src/strings/builder.go", "repo_id": "go", "token_count": 1089 }
431
// 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 structs defines marker types that can be used as struct fields // to modify the properties of a struct. // // By convention, a marker type should be ...
go/src/structs/doc.go/0
{ "file_path": "go/src/structs/doc.go", "repo_id": "go", "token_count": 104 }
432
// 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 sync_test import ( "fmt" "reflect" "sync" "sync/atomic" "testing" ) type bench struct { setup func(*testing.B, mapInterface) perG func(b *test...
go/src/sync/map_bench_test.go/0
{ "file_path": "go/src/sync/map_bench_test.go", "repo_id": "go", "token_count": 5569 }
433
// 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 sync import ( "internal/race" "sync/atomic" "unsafe" ) // There is a modified copy of this file in runtime/rwmutex.go. // If you make any changes h...
go/src/sync/rwmutex.go/0
{ "file_path": "go/src/sync/rwmutex.go", "repo_id": "go", "token_count": 2592 }
434
// 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. //go:build linux && (mips64 || mips64le) #include "textflag.h" // // System calls for mips64, Linux // // func rawVforkSyscall(trap, a1, a2, a3 uintptr) (r1,...
go/src/syscall/asm_linux_mips64x.s/0
{ "file_path": "go/src/syscall/asm_linux_mips64x.s", "repo_id": "go", "token_count": 543 }
435
// 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. #include "textflag.h" #include "funcdata.h" #define SYS_ERRSTR 41 /* from zsysnum_plan9.go */ #define SYS_SEEK 39 /* from zsysnum_plan9.go */ // System call s...
go/src/syscall/asm_plan9_arm.s/0
{ "file_path": "go/src/syscall/asm_plan9_arm.s", "repo_id": "go", "token_count": 1899 }
436
// 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. //go:build dragonfly || netbsd || (openbsd && mips64) package syscall import ( "runtime" "unsafe" ) type SysProcAttr struct { Chroot string // Ch...
go/src/syscall/exec_bsd.go/0
{ "file_path": "go/src/syscall/exec_bsd.go", "repo_id": "go", "token_count": 3497 }
437
// 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. // The runtime package uses //go:linkname to push the setEventHandler to this // package. To prevent the go tool from passing -complete to the compile tool, //...
go/src/syscall/js/js_js.s/0
{ "file_path": "go/src/syscall/js/js_js.s", "repo_id": "go", "token_count": 89 }
438
#!/usr/bin/env perl # 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. # # Generate system call table for DragonFly from master list # (for example, /usr/src/sys/kern/syscalls.master). use strict; my $command = "m...
go/src/syscall/mksysnum_dragonfly.pl/0
{ "file_path": "go/src/syscall/mksysnum_dragonfly.pl", "repo_id": "go", "token_count": 377 }
439
// 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 syscall import "unsafe" const ( _SYS_setgroups = SYS_SETGROUPS _SYS_clone3 = 435 _SYS_faccessat2 = 439 _SYS_fchmodat2 = 452 ) //sys Dup2(ol...
go/src/syscall/syscall_linux_s390x.go/0
{ "file_path": "go/src/syscall/syscall_linux_s390x.go", "repo_id": "go", "token_count": 3430 }
440
// 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 !faketime package syscall const faketime = false func faketimeWrite(fd int, p []byte) int { // This should never be called since faketime is fals...
go/src/syscall/time_nofake.go/0
{ "file_path": "go/src/syscall/time_nofake.go", "repo_id": "go", "token_count": 105 }
441
// 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. // Windows UTF-16 strings can contain unpaired surrogates, which can't be // decoded into a valid UTF-8 string. This file defines a set of functions // that can...
go/src/syscall/wtf8_windows.go/0
{ "file_path": "go/src/syscall/wtf8_windows.go", "repo_id": "go", "token_count": 1118 }
442
// Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_openbsd.go //go:build 386 && openbsd package syscall const ( sizeofPtr = 0x4 sizeofShort = 0x2 sizeofInt = 0x4 sizeofLong = 0x4 sizeofLongLong = 0x8 ) type ( _C_short int16 _C_int int32 _C_long int32 _C_long_long i...
go/src/syscall/ztypes_openbsd_386.go/0
{ "file_path": "go/src/syscall/ztypes_openbsd_386.go", "repo_id": "go", "token_count": 3635 }
443
// 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 testing_test import ( "flag" "internal/testenv" "os" "os/exec" "testing" ) var testFlagArg = flag.String("test_flag_arg", "", "TestFlag: passing ...
go/src/testing/flag_test.go/0
{ "file_path": "go/src/testing/flag_test.go", "repo_id": "go", "token_count": 866 }
444
// 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 testing import ( "fmt" "os" "strconv" "strings" "sync" ) // matcher sanitizes, uniques, and filters names of subtests and subbenchmarks. type mat...
go/src/testing/match.go/0
{ "file_path": "go/src/testing/match.go", "repo_id": "go", "token_count": 3018 }
445
// 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 testing_test import ( "testing" "time" ) var sink time.Time var sinkHPT testing.HighPrecisionTime func BenchmarkTimeNow(b *testing.B) { for i := 0...
go/src/testing/testing_windows_test.go/0
{ "file_path": "go/src/testing/testing_windows_test.go", "repo_id": "go", "token_count": 181 }
446
// 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 template // Tests for multiple-template parsing and execution. import ( "fmt" "os" "strings" "testing" "text/template/parse" ) const ( noError ...
go/src/text/template/multi_test.go/0
{ "file_path": "go/src/text/template/multi_test.go", "repo_id": "go", "token_count": 4952 }
447
// 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 time func ForceAusFromTZIForTesting() { ResetLocalOnceForTest() localOnce.Do(func() { initLocalFromTZI(&aus) }) } func ForceUSPacificFromTZIForTesti...
go/src/time/export_windows_test.go/0
{ "file_path": "go/src/time/export_windows_test.go", "repo_id": "go", "token_count": 166 }
448
// 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 time import "unsafe" // Note: The runtime knows the layout of struct Ticker, since newTimer allocates it. // Note also that Ticker and Timer have the ...
go/src/time/tick.go/0
{ "file_path": "go/src/time/tick.go", "repo_id": "go", "token_count": 1034 }
449
// 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 unix && !ios && !android // Parse "zoneinfo" time zone file. // This is a fairly standard file format used on OS X, Linux, BSD, Sun, and others. // ...
go/src/time/zoneinfo_unix.go/0
{ "file_path": "go/src/time/zoneinfo_unix.go", "repo_id": "go", "token_count": 705 }
450
// Copyright 2010 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 utf16 implements encoding and decoding of UTF-16 sequences. package utf16 // The conditions replacementChar==unicode.ReplacementChar and // maxRune=...
go/src/unicode/utf16/utf16.go/0
{ "file_path": "go/src/unicode/utf16/utf16.go", "repo_id": "go", "token_count": 1513 }
451
// 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 cryptobyte contains types that help with parsing and constructing // length-prefixed, binary messages, including ASN.1 DER. (The asn1 subpackage // c...
go/src/vendor/golang.org/x/crypto/cryptobyte/string.go/0
{ "file_path": "go/src/vendor/golang.org/x/crypto/cryptobyte/string.go", "repo_id": "go", "token_count": 1814 }
452
// 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. //go:build !amd64 || purego || !gc package sha3 import "math/bits" // rc stores the round constants for use in the ι step. var rc = [24]uint64{ 0x0000000000...
go/src/vendor/golang.org/x/crypto/sha3/keccakf.go/0
{ "file_path": "go/src/vendor/golang.org/x/crypto/sha3/keccakf.go", "repo_id": "go", "token_count": 6274 }
453
// 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 route import ( "syscall" "unsafe" ) func (typ RIBType) parseable() bool { return true } // RouteMetrics represents route metrics. type RouteMetrics...
go/src/vendor/golang.org/x/net/route/sys_freebsd.go/0
{ "file_path": "go/src/vendor/golang.org/x/net/route/sys_freebsd.go", "repo_id": "go", "token_count": 2025 }
454
// 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 cpu import ( "runtime" ) // byteOrder is a subset of encoding/binary.ByteOrder. type byteOrder interface { Uint32([]byte) uint32 Uint64([]byte) uin...
go/src/vendor/golang.org/x/sys/cpu/byteorder.go/0
{ "file_path": "go/src/vendor/golang.org/x/sys/cpu/byteorder.go", "repo_id": "go", "token_count": 807 }
455
// 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. // Minimal copy of x/sys/unix so the cpu package can make a // system call on AIX without depending on x/sys/unix. // (See golang.org/issue/32102) //go:build a...
go/src/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go/0
{ "file_path": "go/src/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go", "repo_id": "go", "token_count": 400 }
456
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. //go:build !go1.10 package bidi // UnicodeVersion is the Unicode version from which the tables in this package are derived. const UnicodeVersion = "9.0.0" // xorMasks contains masks to be xor-ed with brackets to get the reverse // version...
go/src/vendor/golang.org/x/text/unicode/bidi/tables9.0.0.go/0
{ "file_path": "go/src/vendor/golang.org/x/text/unicode/bidi/tables9.0.0.go", "repo_id": "go", "token_count": 71225 }
457
// run //go:build !wasm // 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 "fmt" // Test that register results are correctly returned (and passed) //go:registerparams //go:noinline func ...
go/test/abi/fibish.go/0
{ "file_path": "go/test/abi/fibish.go", "repo_id": "go", "token_count": 207 }
458
Got this far! Sink = 7
go/test/abi/more_intstar_input.out/0
{ "file_path": "go/test/abi/more_intstar_input.out", "repo_id": "go", "token_count": 10 }
459
// run // 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. // When the function Store an Arg and also use it in another place, // be sure not to generate duplicated OpArgXXXReg values, which confuses // the regi...
go/test/abi/store_reg_args.go/0
{ "file_path": "go/test/abi/store_reg_args.go", "repo_id": "go", "token_count": 219 }
460
// 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 a import "go/build" type ( Float64 = float64 Rune = rune ) type ( Int int IntAlias = Int IntAlias2 = IntAlias S struct { In...
go/test/alias3.dir/a.go/0
{ "file_path": "go/test/alias3.dir/a.go", "repo_id": "go", "token_count": 228 }
461
// run // 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. // Test the internal "algorithms" for objects larger than a word: hashing, equality etc. package main type T struct { a float64 b int64 c string d...
go/test/bigalg.go/0
{ "file_path": "go/test/bigalg.go", "repo_id": "go", "token_count": 1028 }
462
// run // Copyright 2010 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. // Test that selects do not consume undue memory. package main import "runtime" func sender(c chan int, n int) { for i := 0; i < n; i++ { c <- 1 ...
go/test/chan/select2.go/0
{ "file_path": "go/test/chan/select2.go", "repo_id": "go", "token_count": 394 }
463
// run // 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 import "math" func checkClearSlice() { s := []int{1, 2, 3} clear(s) for i := range s { if s[i] != 0 { panic("clear not zeroing sl...
go/test/clear.go/0
{ "file_path": "go/test/clear.go", "repo_id": "go", "token_count": 321 }
464
// errorcheck // Copyright 2010 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. // Verify that incorrect invocations of the complex predeclared function are detected. // Does not compile. package main type ( Float32 flo...
go/test/cmplx.go/0
{ "file_path": "go/test/cmplx.go", "repo_id": "go", "token_count": 558 }
465
// asmcheck // 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 codegen import ( "cmp" "unsafe" ) // This file contains code generation tests related to the comparison // operators. // -------------...
go/test/codegen/comparisons.go/0
{ "file_path": "go/test/codegen/comparisons.go", "repo_id": "go", "token_count": 8281 }
466
// asmcheck // 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. // Check to make sure that we recognize when the length of an append // is constant. We check this by making sure that the constant length // is fo...
go/test/codegen/issue56440.go/0
{ "file_path": "go/test/codegen/issue56440.go", "repo_id": "go", "token_count": 289 }
467
// asmcheck -race // 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 codegen // Check that we elide racefuncenter/racefuncexit for // functions with no calls (but which might panic // in various ways)....
go/test/codegen/race.go/0
{ "file_path": "go/test/codegen/race.go", "repo_id": "go", "token_count": 242 }
468
// run // 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. // Test composite literals. package main type T struct { i int f float64 s string next *T } type R struct { num int } func itor(a int)...
go/test/complit.go/0
{ "file_path": "go/test/complit.go", "repo_id": "go", "token_count": 935 }
469
// errorcheck // 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. // Verify allowed and disallowed conversions. // Does not compile. package main // everything here is legal except the ERROR line var c chan i...
go/test/convert3.go/0
{ "file_path": "go/test/convert3.go", "repo_id": "go", "token_count": 193 }
470
// errorcheck -0 -l -d=defer // 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. // check that open-coded defers are used in expected situations package main import "fmt" var glob = 3 func f1() { for i := ...
go/test/defererrcheck.go/0
{ "file_path": "go/test/defererrcheck.go", "repo_id": "go", "token_count": 604 }
471
// run // 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. //line foo/bar.y:4 package main //line foo/bar.y:60 func main() { //line foo/bar.y:297 f, l := 0, 0 //line yacctab:1 f, l = 1, 1 //line yaccpar:1 f,...
go/test/dwarf/linedirectives.go/0
{ "file_path": "go/test/dwarf/linedirectives.go", "repo_id": "go", "token_count": 709 }
472
// errorcheck -0 -m -l // 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. // Test escape analysis with respect to field assignments. package escape var sink interface{} type X struct { p1 *int p2 *int a ...
go/test/escape_field.go/0
{ "file_path": "go/test/escape_field.go", "repo_id": "go", "token_count": 1414 }
473
// errorcheck -0 -m -l // 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. // Test escape analysis for sync/atomic. package escape import ( "sync/atomic" "unsafe" ) // BAD: should be "leaking param: addr to...
go/test/escape_sync_atomic.go/0
{ "file_path": "go/test/escape_sync_atomic.go", "repo_id": "go", "token_count": 326 }
474
// run // 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 main func main() { var cu0 uint16 = '\u1234'; var cU1 uint32 = '\U00101234'; _, _ = cu0, cU1; } /* bug13.go:4: missing ' bug13.go:4: syntax ...
go/test/fixedbugs/bug013.go/0
{ "file_path": "go/test/fixedbugs/bug013.go", "repo_id": "go", "token_count": 157 }
475
// run // 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 main type Box struct {}; var m map[string] *Box; func main() { m := make(map[string] *Box); s := "foo"; var x *Box = nil; m[s] = x; } /* ...
go/test/fixedbugs/bug058.go/0
{ "file_path": "go/test/fixedbugs/bug058.go", "repo_id": "go", "token_count": 161 }
476
// 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 main import P "./bug0" func main() { a0 := P.V0(); // works a1 := P.V1(); // works a2, b2 := P.V2(); // doesn't work _, _, _, _ = a0, a1, a2, b...
go/test/fixedbugs/bug088.dir/bug1.go/0
{ "file_path": "go/test/fixedbugs/bug088.dir/bug1.go", "repo_id": "go", "token_count": 234 }
477
// run // 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 main import "os" import "strconv" type Test struct { f float64 in string out string } var tests = []Test{ Test{123.5, "123.5", "123.5"...
go/test/fixedbugs/bug120.go/0
{ "file_path": "go/test/fixedbugs/bug120.go", "repo_id": "go", "token_count": 763 }
478
// compile // 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 main type Foo interface { } type T struct {} func (t *T) foo() {} func main() { t := new(T); var i interface {}; f, ok := i.(Foo); _,...
go/test/fixedbugs/bug135.go/0
{ "file_path": "go/test/fixedbugs/bug135.go", "repo_id": "go", "token_count": 119 }
479
// run // 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 main const ( joao = "João" jose = "José" ) func main() { s1 := joao s2 := jose if (s1 < s2) != (joao < jose) { panic("unequal") } }
go/test/fixedbugs/bug1515.go/0
{ "file_path": "go/test/fixedbugs/bug1515.go", "repo_id": "go", "token_count": 125 }
480
// run // 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 main var g byte = 123 var f *byte = &g var b = make([]byte, 5) func main() { b[0:1][0] = *f if b[0] != 123 { println("want 123 got", b[0])...
go/test/fixedbugs/bug168.go/0
{ "file_path": "go/test/fixedbugs/bug168.go", "repo_id": "go", "token_count": 128 }
481
// run // 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 main import "fmt" type Buffer int func (*Buffer) Read() {} type Reader interface { Read() } func f() *Buffer { return nil } func g() Read...
go/test/fixedbugs/bug184.go/0
{ "file_path": "go/test/fixedbugs/bug184.go", "repo_id": "go", "token_count": 311 }
482
// run // 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 main var m = map[int]int{0: 0, 1: 0} var nf = 0 var i int func multi() (int, int) { return 1, 2 } func xxx() { var c chan int x, ok := <-c ...
go/test/fixedbugs/bug196.go/0
{ "file_path": "go/test/fixedbugs/bug196.go", "repo_id": "go", "token_count": 294 }
483
// errorcheck // 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 main func f(x int, y ...int) // ok func h(x, y ...int) // ERROR "[.][.][.]" func i(x int, y ...int, z float32) // ERROR "[.][.][.]"
go/test/fixedbugs/bug228a.go/0
{ "file_path": "go/test/fixedbugs/bug228a.go", "repo_id": "go", "token_count": 108 }
484
// run // Copyright 2010 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 var nf int var ng int func f() (int, int, int) { nf++ return 1, 2, 3 } func g() int { ng++ return 4 } var x, y, z = f() var m = mak...
go/test/fixedbugs/bug244.go/0
{ "file_path": "go/test/fixedbugs/bug244.go", "repo_id": "go", "token_count": 235 }
485
// errorcheck // Copyright 2010 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 type T U // bogus "invalid recursive type T" from 6g type U int const x T = 123 type V V // ERROR "invalid recursive type"
go/test/fixedbugs/bug256.go/0
{ "file_path": "go/test/fixedbugs/bug256.go", "repo_id": "go", "token_count": 93 }
486
// errorcheck // Copyright 2010 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. // 6g accepts the program below even though it is syntactically incorrect: // Each statement in the list of statements for each case clause must ...
go/test/fixedbugs/bug274.go/0
{ "file_path": "go/test/fixedbugs/bug274.go", "repo_id": "go", "token_count": 266 }
487
// compile // Copyright 2010 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. // Used to run out of registers on 8g. Issue 868. package main func main() { var r uint32 var buf [4]byte a := buf[0:4] r = (((((uint32(a[3])...
go/test/fixedbugs/bug288.go/0
{ "file_path": "go/test/fixedbugs/bug288.go", "repo_id": "go", "token_count": 155 }
488
// errorcheck // Copyright 2010 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. // Use //line to set the line number of the next line to 20. //line fixedbugs/bug305.go:20 package p // Introduce an error which should be repo...
go/test/fixedbugs/bug305.go/0
{ "file_path": "go/test/fixedbugs/bug305.go", "repo_id": "go", "token_count": 146 }
489
// run // 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 main type Value struct { X interface{} Y int } type Struct struct { X complex128 } const magic = 1 + 2i func (Value) Complex(x complex128...
go/test/fixedbugs/bug329.go/0
{ "file_path": "go/test/fixedbugs/bug329.go", "repo_id": "go", "token_count": 271 }
490
// run // 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. // issue 1900 package main func getArgs(data map[string]interface{}, keys ...string) map[string]string { ret := map[string]string{} var ...
go/test/fixedbugs/bug343.go/0
{ "file_path": "go/test/fixedbugs/bug343.go", "repo_id": "go", "token_count": 301 }
491
// errorcheck // 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. // issue 1993. // error used to have last line number in file package main func bla1() bool { return false } func bla5() bool { _ = 1 false...
go/test/fixedbugs/bug357.go/0
{ "file_path": "go/test/fixedbugs/bug357.go", "repo_id": "go", "token_count": 150 }
492
// errorcheck // 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. // Issue 2520 package main func main() { if 2e9 { } // ERROR "2e.09|expected bool|non-boolean condition in if statement" if 3.14+1i { } ...
go/test/fixedbugs/bug383.go/0
{ "file_path": "go/test/fixedbugs/bug383.go", "repo_id": "go", "token_count": 129 }
493
// 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. // Use the functions in one.go so that the inlined // forms get type-checked. package two import "./one" func use() { var r one.T r.F() }
go/test/fixedbugs/bug407.dir/two.go/0
{ "file_path": "go/test/fixedbugs/bug407.dir/two.go", "repo_id": "go", "token_count": 95 }
494
// errorcheck // 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. // Issue 3044. // Multiple valued expressions in return lists. package p func Two() (a, b int) // F used to compile. func F() (x interface{}, ...
go/test/fixedbugs/bug418.go/0
{ "file_path": "go/test/fixedbugs/bug418.go", "repo_id": "go", "token_count": 165 }
495
// run // 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. // Test that initializing struct fields out of order still runs // functions in the right order. This failed with gccgo. package main type S struct {...
go/test/fixedbugs/bug433.go/0
{ "file_path": "go/test/fixedbugs/bug433.go", "repo_id": "go", "token_count": 227 }
496
// errorcheck // 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. // Issue 3890: missing detection of init cycle involving // method calls in function bodies. package flag var commandLine = NewFlagSet() // ERR...
go/test/fixedbugs/bug459.go/0
{ "file_path": "go/test/fixedbugs/bug459.go", "repo_id": "go", "token_count": 229 }
497
package main import "./p2" func main() { _ = p2.SockUnix() }
go/test/fixedbugs/bug467.dir/p3.go/0
{ "file_path": "go/test/fixedbugs/bug467.dir/p3.go", "repo_id": "go", "token_count": 30 }
498
// run // 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. // Gccgo generated incorrect GC info when a global variable was // initialized to a slice of a value containing pointers. The initial // backing array ...
go/test/fixedbugs/bug500.go/0
{ "file_path": "go/test/fixedbugs/bug500.go", "repo_id": "go", "token_count": 231 }
499