code
stringlengths
10
1.34M
language
stringclasses
1 value
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 const nilchar = 0; type Atom struct { str string; integer int; next *Slist; /* in hash bucket */ }...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 "runtime" const N = 1000; // sent messages const M = 10; // receiving goroutines const W = 2; /...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 Item interface { Print(); } type ListItem struct { item Item; next *ListItem; } type List ...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 myint int; type mystring string; type I0 interface {}; func f() { var ia, ib I0; var i myint; v...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 "rand" const Count = 1e5 func i64rand() int64 { for { a := int64(rand.Uint32()); a = (a<<32)...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 setpd(a []int) { // print("setpd a=", a, " len=", len(a), " cap=", cap(a), "\n"); for i:=0; i<len(a)...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 t,i int; for i=0; i<100; i=i+1 { t = t+i; } if t != 50*99 { panic(t); } }
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 c string; a := `abc`; b := `xyz`; /* print a literal */ print(`abc`); /* print...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 b[10] float32; func main() { var a[10] float32; for i:=int16(5); i<10; i=i+1 { a[i] = float32(i)...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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() { a := 3; for i:=0; i<10; i=i+1 { switch(i) { case 5: print("five"); case a,7: p...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 assertequal(is, shouldbe int, msg string) { if is != shouldbe { print("assertion fail" + msg + "\n...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 x2 struct { a,b,c int; d int; }; var g1 x2; var g2 struct { a,b,c int; d x2; }; func main() { var ...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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() { i := 0; if false { goto gogoloop; } if false { goto gogoloop; } if false { goto...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 M map[int]int type S struct{ a,b,c int }; type SS struct{ aa,bb,cc S }; type SA struct{ a,b,c [3]int ...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 assertequal(is, shouldbe int, msg string) { if is != shouldbe { print("assertion fail" + msg + "\n...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 I interface { test1() int; test2() int; test3() int; test4() int; test5() int; test6() int; t...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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() { print("hello world\n"); }
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 const size = 16; var a [size]byte; var p []byte; var m map[int]byte; func f(k int) byte { return byte(k...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 ians [18]int; var uans [18]uint; var pass string; func testi(i int, t1,t2,t3 int) { n := ((t1*3) + t...
Go
// $G $D/$F.go && $L $F.$A && ! ./$A.out // 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 b []int; var ib interface{} = b; var m = make(map[interface{}] int); m[ib] = 1; }
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 "syscall" func main() { syscall.Syscall(syscall.SYS_KILL, uintptr(syscall.Getpid()), syscall.SIGC...
Go
// errchk $G -e $D/$F.go // 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. // check for import conflicts package main import "bufio" // GCCGO_ERROR "previous" import bufio "os" // ERROR "redeclared|redefinit...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 close(c), closed(c). // // TODO(rsc): Doesn't check behavior of close(c) when there // are blocked senders/recei...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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. // A little test program for rational arithmetics. // Computes a Hilbert matrix, its inverse, multiplies them // and ver...
Go
// $G $F.go && $L $F.$A && ./$A.out // 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 T struct { i int; f float; s string; next *T } type R struct { num int } func itor(a int) *R { r := n...
Go
// $G $D/$F.go && $L $F.$A && ! ./$A.out // 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 use(bool) { } func main() { var b []int; var ib interface{} = b; use(ib == ib); }
Go
// $G $F.go && $L $F.$A && ./$A.out // 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 nbad int func assert(cond bool, msg string) { if !cond { if nbad == 0 { print("BUG"); } nbad++...
Go
// $G $F.go && $L $F.$A && ./$A.out // 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" func main() { count := 7; if one := 1; { count = count + one } if count != 8 { print(cou...
Go
// $G $F.go && $L $F.$A && ./$A.out // 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" var result string func addInt(i int) { result += fmt.Sprint(i) } func test1helper() { for i...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG method3 // 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 that methods on slices work package main type T [] int func (t T) Len() int { return len(t...
Go
// $G $F.go && $L $F.$A && ./$A.out // 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 "os" func main() { ga, e0 := os.Getenverror("GOARCH"); if e0 != nil { print("$GOARCH: ", e0.St...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG indirect // 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 m0 map[string]int var m1 *map[string]int var m2 *map[string]int = &m0 var m3 map[...
Go
// $G $F.go && $L $F.$A && ./$A.out // 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 "malloc" func mk2() { b := new([10000]byte); _ = b; // println(b, "stored at", &b); } func mk1() {...
Go
// errchk $G -e $D/$F.go // 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 that basic operations on named types are valid // and preserve the type. package main type Bool bool type Map map[int]int ...
Go
// $G $F.go && $L $F.$A && ./$A.out // 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 assertequal(is, shouldbe int, msg string) { if is != shouldbe { print("assertion fail", msg, "\n"); ...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 "unsafe" func use(bool) { } func stringptr(s string) uintptr { return *(*uintptr)(unsafe.Pointer...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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" const ( a = iota; b; c; d; e; ) var x = []int{1,2,3} func f(x int, len *byte) { *len...
Go
// errchk $G -e $D/$F.go // 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 _ // ERROR "invalid package name _" func main() { _(); // ERROR "cannot use _ as value" x := _+1; // ERROR "cannot use _ as...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 // test range over channels func gen(c chan int, lo, hi int) { for i := lo; i <= hi; i++ { c <- i; } ...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out >tmp.go && // $G tmp.go && $L tmp.$A && ./$A.out || echo BUG: 64bit // rm -f tmp.go // 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 test of 64-bit arithmeti...
Go
// $G $F.go && $L $F.$A && ./$A.out // 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" var ecode int; func assert(a, b, c string) { if a != b { ecode = 1; print("FAIL: ", c, ": ...
Go
// errchk $G -e $D/$F.go // 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 m0 map[string]int var m1 *map[string]int var m2 *map[string]int = &m0 var m3 map[string]int = map[string]int{"a": 1}...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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 const ( ci8 = -1<<7; ci16 = -1<<15 + 100; ci32 = -1<<31 + 100000; ci64 = -1<<63 + 10000000001; cu8 ...
Go
// $G $F.go && $L $F.$A && ./$A.out // 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 assertequal(is, shouldbe int, msg string) { if is != shouldbe { print("assertion fail", msg, "\n"); ...
Go
// $G $F.go && $L $F.$A && ./$A.out // 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() { print(-(1<<63), "\n"); print((1<<63)-1, "\n") }
Go
// errchk $G $D/$F.go // 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 // everything here is legal except the ERROR line var c chan int var d1 chan<- int = c var d2 = (chan<- int)(c) var e *[4...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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. // Check that static interface conversion of // interface value nil succeeds. package main type R interface { R(); } t...
Go
// $G $D/$F.go && $L $F.$A && (! ./$A.out || echo BUG: should not succeed) // 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. // Check methods with different return types. package main type S struct { a int }...
Go
// true # used by embed1.go // 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. // Check that embedded interface types can have local methods. package p type T int func (t T) m() {} type I interface { m() } t...
Go
// $G $D/$F.go || echo BUG: should 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. // Check mutually recursive interfaces package main type I1 interface { foo() I2 } type I2 interface { bar() I1...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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. // Check that static interface conversion of // interface value nil succeeds. package main type R interface { R(); } t...
Go
// errchk $G $D/$F.go // 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. // Error messages about missing implicit methods. package main type T int func (t T) V() func (t *T) P() type V interface { V() } type...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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. // Implicit methods for embedded types. // Mixed pointer and non-pointer receivers. package main type T int var nv, np...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG interface6 // 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. // Interface values containing structures. package main import "os" var fail int func check(b...
Go
// $G $D/embed0.go && $G $D/$F.go && $L $F.$A && ./$A.out // 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. // Check that embedded interface types can have local methods. package main import "./embed0" type...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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. // Check uses of all the different interface // conversion runtime functions. package main type Stringer interface { S...
Go
// $G $D/$F.go && $L $F.$A && ! ./$A.out // 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. // Check that interface conversion fails when method is missing. package main type I interface { Foo() } func main...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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. // Interface comparisons using types hidden // inside reflected-on structs. package main import "reflect" type T stru...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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. // check that big vs small, pointer vs not // interface methods work. package main type I interface { M() int64 } typ...
Go
// errchk $G $D/$F.go // 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. // Static error messages about interface conversions. package main type T struct { a int } var t *T type I interface { M() } var i I ...
Go
// errchk $G $D/$F.go // 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. // Check that interface{M()} = *interface{M()} produces a compiler error. package main type Inst interface { Next() *Inst; } type Reg...
Go
// $G $D/$F.go && $L $F.$A && ./$A.out // 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. // Check methods derived from embedded interface and *interface values. package main import "os" const Value = 1e12 ...
Go
// $G $F.go && $L $F.$A && ./$A.out // 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() { print("hello, world\n"); }
Go
// $G $F.go && $L $F.$A && ./$A.out // 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"; "os"; "utf8"; ) func main() { s := "\000\123\x00\xca\xFE\u0123\ubabe\U0000babe\U0010FFFF...
Go
// 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 "stdio" func main() { // stdio.Stdout.WriteString("hello, world\n"); stdio.Puts("hello, world") }
Go
// 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. /* A trivial example of wrapping a C library in Go. For a more complex example and explanation, see ../gmp/gmp.go. */ package stdio // TODO(rsc): Remove fflu...
Go
// 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. // Compute Fibonacci numbers with two goroutines // that pass integers back and forth. No actual // concurrency, just threads and synchronization // and forei...
Go
// 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. // Pass numbers along a chain of threads. package main import ( "runtime"; "stdio"; "strconv"; ) const N = 10 const R = 5 func link(left chan<- int, rig...
Go
/* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form ...
Go
// 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. /* An example of wrapping a C library in Go. This is the GNU multiprecision library gmp's integer type mpz_t wrapped to look like the Go package big's integer ...
Go
// 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. // Compute Fibonacci numbers with two goroutines // that pass integers back and forth. No actual // concurrency, just threads and synchronization // and forei...
Go
// 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. /* Prof is a rudimentary real-time profiler. Given a command to run or the process id (pid) of a command already running, it samples the program's state at re...
Go
// 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. /* 8g is the version of the gc compiler for the x86. The $GOARCH for these tools is 386. It reads .go files and outputs .8 files. The flags are documented in ...
Go
// 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 ( "bytes"; "flag"; "fmt"; "go/parser"; "go/printer"; "go/scanner"; "io"; "os"; pathutil "path"; "strings"; ) var ( // main ope...
Go
// 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. Without an explicit path, it processes the standard input. Given a file, it operates on that file; given a directory, it operat...
Go
// 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. /* 6g is the version of the gc compiler for the x86-64. The $GOARCH for these tools is amd64. It reads .go files and outputs .6 files. The flags are documente...
Go
// 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 ( "bytes"; "ebnf"; "flag"; "fmt"; "go/scanner"; "io"; "os"; "path"; "strings"; ) var start = flag.String("start", "Start", "name...
Go
// 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. /* Ebnflint verifies that EBNF productions are consistent and gramatically correct. It reads them from an HTML document such as the Go specification. Grammar ...
Go
// 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. /* 6c is a version of the Plan 9 C compiler. The original is documented at http://plan9.bell-labs.com/magic/man2html/1/2c Its target architecture is the x8...
Go
// 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 directory contains the portable section of the Plan 9 C linkers. See ../6l, ../8l, and ../5l for more information. */ package documentation
Go
// 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 PACKAGE // emitted by compiler, not referred to by go programs func mal(int32) *any func throwindex() func throwreturn() func throwinit() func panicl(...
Go
// 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 PACKAGE type Pointer *any func Offsetof(any) int func Sizeof(any) int func Alignof(any) int func Typeof(i interface{}) (typ interface{}) func Reflect(...
Go
// 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. /* Gc is the generic label for the family of Go compilers that function as part of the (modified) Plan 9 tool chain. The C compiler documentation at http://...
Go
// 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 directory contains the portable section of the Plan 9 C compilers. See ../6c, ../8c, and ../5c for more information. */ package documentation
Go
/* Derived from Inferno's utils/iyacc/yacc.c http://code.google.com/p/inferno-os/source/browse/utils/iyacc/yacc.c This copyright NOTICE applies to all files in this directory and subdirectories, unless another copyright notice appears in a given file or subdirectory. If you take substantial code from this software to...
Go
// 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. /* Goyacc is a version of yacc for Go. It is written in Go and generates parsers written in Go. It is largely transliterated from the Inferno version written ...
Go
// 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. /* 5g is the version of the gc compiler for the ARM. The $GOARCH for these tools is arm. It reads .go files and outputs .5 files. The flags are documented in ...
Go
// 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. /* Godefs is a bootstrapping tool for porting the Go runtime to new systems. It translates C type declarations into C or Go type declarations with the same mem...
Go
// 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. /* Cov is a rudimentary code coverage tool. Given a command to run, it runs the command while tracking which sections of code have been executed. When the co...
Go
// 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. /* 6a is a version of the Plan 9 assembler. The original is documented at http://plan9.bell-labs.com/magic/man2html/1/2a Its target architecture is the x86...
Go
// 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. /* Gopack program is a variant of the Plan 9 ar tool. The original is documented at http://plan9.bell-labs.com/magic/man2html/1/ar It adds a special Go-spe...
Go
// 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. /* 8a is a version of the Plan 9 assembler. The original is documented at http://plan9.bell-labs.com/magic/man2html/1/2a Its target architecture is the x86...
Go
// 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. // Cgo; see gmp.go for an overview. // TODO(rsc): // Emit correct line number annotations. // Make 6g understand the annotations. package main import ( "fm...
Go
// 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. // Parse input AST and prepare Prog structure. package main import ( "fmt"; "go/ast"; "go/doc"; "go/parser"; "go/scanner"; "os"; ) // A Cref refers to...
Go
// 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 ( "bytes"; "exec"; "fmt"; "go/token"; "io"; "os"; ) // A ByteReaderAt implements io.ReadAt using a slice of bytes. type ByteReaderA...
Go
// 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. // Annotate Crefs in Prog with C types by parsing gcc debug output. // Conversion of debug output to Go types. package main import ( "bytes"; "debug/dwarf"...
Go
// 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"; "go/ast"; "go/printer"; "os"; "strings"; ) func creat(name string) *os.File { f, err := os.Open(name, os.O_WRONLY|os.O_CRE...
Go
// 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. /* Cgo enables the creation of Go packages that call C code. Usage: cgo [compiler options] file.go The compiler options are passed through uninterpreted whe...
Go
// 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 ( "bytes"; "container/vector"; "exec"; "flag"; "fmt"; "io"; "os"; "patch"; "path"; "sort"; "strings"; ) var checkSync = flag.B...
Go
// 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. /* Nm is a version of the Plan 9 nm command. The original is documented at http://plan9.bell-labs.com/magic/man2html/1/nm It prints the name list (symbol t...
Go