code
stringlengths
10
1.34M
language
stringclasses
1 value
// 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 ( "sync" "syscall" "unsafe" ) var ( modkernel32 = syscall.NewLazyDLL("kernel32.dll") procLockFileEx = modkernel32.NewProc("Loc...
Go
// 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. // +build nacl plan9 solaris package main import ( "log" "sync" ) // FileMutex is similar to sync.RWMutex, but also synchronizes across processes. // This ...
Go
// 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" "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "regexp" "runtime" "strings" "golang.org/x/tools/go/vcs" ) // builde...
Go
// 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. /* Go Builder is a continuous build client for the Go project. It integrates with the Go Dashboard AppEngine application. Go Builder is intended to run contin...
Go
// 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. // +build appengine package key import ( "sync" "appengine" "appengine/datastore" ) var theKey struct { sync.RWMutex builderKey } type builderKey stru...
Go
// 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 playground registers HTTP handlers at "/compile" and "/share" that // proxy requests to the golang.org playground service. // This package may be us...
Go
// 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. // +build !appengine // Package socket implements an WebSocket-based playground backend. // Clients connect to a websocket handler and send run/kill commands,...
Go
// 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. // +build !appengine package playground import ( "log" "net/http" ) func client(r *http.Request) *http.Client { return http.DefaultClient } func report(...
Go
// 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. // +build appengine package playground import ( "net/http" "appengine" "appengine/urlfetch" ) func client(r *http.Request) *http.Client { return urlfet...
Go
// 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 astutil contains common utilities for working with the Go AST. package astutil import ( "bufio" "bytes" "fmt" "go/ast" "go/format" "go/parser"...
Go
// 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 astutil // This file defines utilities for working with source positions. import ( "fmt" "go/ast" "go/token" "sort" ) // PathEnclosingInterval re...
Go
// 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 httpfs implements http.FileSystem using a godoc vfs.FileSystem. package httpfs import ( "fmt" "io" "net/http" "os" "golang.org/x/tools/godoc/v...
Go
// 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 vfs import ( "fmt" "io/ioutil" "os" pathpkg "path" "path/filepath" ) // OS returns an implementation of FileSystem reading from the // tree roote...
Go
// 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 vfs import ( "fmt" "io" "os" pathpkg "path" "sort" "strings" "time" ) // Setting debugNS = true will enable debugging prints about // name spac...
Go
// 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 zipfs file provides an implementation of the FileSystem // interface based on the contents of a .zip file. // // Assumptions: // // - The file paths ...
Go
// 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 mapfs file provides an implementation of the FileSystem // interface based on the contents of a map[string]string. package mapfs import ( "io" "os...
Go
// 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 gatefs provides an implementation of the FileSystem // interface that wraps another FileSystem and limits its concurrency. package gatefs import ( ...
Go
// 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 vfs defines types for abstract file system access and provides an // implementation accessing the file system of the underlying OS. package vfs impo...
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 file contains the infrastructure to create a code // snippet for search results. // // Note: At the moment, this only creates HTML snippets. package go...
Go
// 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 static //go:generate go run makestatic.go
Go
// 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. // +build ignore // Command bake reads a set of files and writes a Go source file to "static.go" // that declares a map of string constants containing contents...
Go
// 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 static exports a map of static file content that supports the godoc // user interface. The map should be used with the mapfs package, see // golang.o...
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 godoc import ( "bytes" "fmt" "net/http" "regexp" "strings" ) type SearchResult struct { Query string Alert string // error or warning message ...
Go
// 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 godoc import ( "fmt" "go/ast" "go/build" "io" "log" "os" pathpkg "path" "path/filepath" "regexp" "strings" "golang.org/x/tools/godoc/vfs" ) ...
Go
// 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 godoc is a work-in-progress (2013-07-17) package to // begin splitting up the godoc binary into multiple pieces. // // This package comment will evol...
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 godoc import ( "net/http" "runtime" ) // Page describes the contents of the top-level godoc webpage. type Page struct { Title string Tabtitle s...
Go
// 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 util contains utility types and functions for godoc. package util import ( pathpkg "path" "sync" "time" "unicode/utf8" "golang.org/x/tools/god...
Go
// 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 util import "time" // A Throttle permits throttling of a goroutine by // calling the Throttle method repeatedly. // type Throttle struct { f float64...
Go
// 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. // This file implements FormatSelections and FormatText. // FormatText is used to HTML-format Go and non-Go source // text with line numbers and highlighted sec...
Go
// 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 LinkifyText which introduces // links for identifiers pointing to their declarations. // The approach does not cover all cases because g...
Go
// 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 godoc import ( "errors" pathpkg "path" "time" "golang.org/x/tools/godoc/analysis" "golang.org/x/tools/godoc/util" "golang.org/x/tools/godoc/vfs"...
Go
// 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 godoc import ( "net/http" "regexp" "sync" "text/template" "golang.org/x/tools/godoc/vfs/httpfs" ) // SearchResultFunc functions return an HTML 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. package godoc // This file contains the mechanism to "linkify" html source // text containing EBNF sections (as found in go_spec.html). // The result is the 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. // This file contains the infrastructure to create an // identifier and full-text index for a set of Go files. // // Algorithm for identifier index: // - traver...
Go
// 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 analysis // This file computes the "implements" relation over all pairs of // named types in the program. (The mark-up is done by typeinfo.go.) // TO...
Go
// 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 analysis // This file computes the channel "peers" relation over all pairs of // channel operations in the program. The peers are displayed in the // ...
Go
// 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 analysis // This file computes the markup for information from go/types: // IMPORTS, identifier RESOLUTION, METHOD SETS, size/alignment, and // the IMP...
Go
// 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 analysis performs type and pointer analysis // and generates mark-up for the Go source view. // // The Run method populates a Result object by runnin...
Go
// 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 analysis // This file computes the CALLERS and CALLEES relations from the call // graph. CALLERS/CALLEES information is displayed in the lower pane //...
Go
// 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 analysis // This file defines types used by client-side JavaScript. type anchorJSON struct { Text string // HTML Href string // URL } type commOpJS...
Go
// 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 godoc // ---------------------------------------------------------------------------- // SpotInfo // A SpotInfo value describes a particular identifie...
Go
// 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. // Template support for writing HTML documents. // Documents that include Template: true in their // metadata are executed as input to text/template. // // This...
Go
// 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. // This file contains support functions for parsing .go files // accessed via godoc's file system fs. package godoc import ( "bytes" "go/ast" "go/parser" ...
Go
// 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 godoc import ( "bytes" "encoding/json" "expvar" "fmt" "go/ast" "go/build" "go/doc" "go/token" htmlpkg "html" htmltemplate "html/template" "i...
Go
// 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. // This file contains the code dealing with package directory trees. package godoc import ( "bytes" "go/doc" "go/parser" "go/token" "log" "os" pathpkg ...
Go
// 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 redirect provides hooks to register HTTP handlers that redirect old // godoc paths to their new equivalents and assist in accessing the issue // trac...
Go
// TODO(bradfitz,adg): move to util package godoc import "io" var spaces = []byte(" ") // 32 spaces seems like a good number const ( indenting = iota collecting ) // A tconv is an io.Writer filter for converting leading tabs into spaces. type tconv struct { output io.Writer state...
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 godoc import ( "bytes" "encoding/json" "log" pathpkg "path" "strings" "time" "golang.org/x/tools/godoc/vfs" ) var ( doctype = []byte("<!DOC...
Go
// 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 exact implements Values representing untyped // Go constants and the corresponding operations. Values // and operations have unlimited precision. // ...
Go
// 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. // +build !go1.4 package exact import ( "math" "math/big" ) func ratToFloat32(x *big.Rat) (float32, bool) { // Before 1.4, there's no Rat.Float32. // Em...
Go
// 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. // +build go1.4 package exact import "math/big" func ratToFloat32(x *big.Rat) (float32, bool) { return x.Float32() }
Go
// 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 gcimporter implements Import for gc-generated object files. // Importing this package installs Import as go/types.DefaultImport. package gcimporter ...
Go
// 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. // This file implements FindExportData. package gcimporter import ( "bufio" "errors" "fmt" "io" "strconv" "strings" ) func readGopackHeader(r *bufio.Re...
Go
// Package static computes the call graph of a Go program containing // only static call edges. package static import ( "golang.org/x/tools/go/callgraph" "golang.org/x/tools/go/ssa" "golang.org/x/tools/go/ssa/ssautil" ) // CallGraph computes the call graph of the specified program // considering only static calls....
Go
// 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 package provides Rapid Type Analysis (RTA) for Go, a fast // algorithm for call graph construction and discovery of reachable code // (and hence dead co...
Go
// 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 callgraph import "golang.org/x/tools/go/ssa" // This file provides various utilities over call graphs, such as // visitation and path search. // Call...
Go
// 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 callgraph defines the call graph and various algorithms and utilities to operate on it. A call graph is a labelled directed graph whose nodes repre...
Go
// Package cha computes the call graph of a Go program using the Class // Hierarchy Analysis (CHA) algorithm. // // CHA was first described in "Optimization of Object-Oriented Programs // Using Static Class Hierarchy Analysis", Jeffrey Dean, David Grove, // and Craig Chambers, ECOOP'95. // // CHA is related to RTA (see...
Go
// 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 ssa // This package defines a high-level intermediate representation for // Go programs using static single-assignment (SSA) form. import ( "fmt" "g...
Go
// 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 ssa // This file implements the CREATE phase of SSA construction. // See builder.go for explanation. import ( "go/ast" "go/token" "os" "sync" "g...
Go
// 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 ssa // Simple block optimizations to simplify the control flow graph. // TODO(adonovan): opt: instead of creating several "unreachable" blocks // per ...
Go
// 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 ssa // Helpers for emitting SSA instructions. import ( "fmt" "go/ast" "go/token" "golang.org/x/tools/go/types" ) // emitNew emits to f a new (he...
Go
// 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 ssa // This file defines the Const SSA value type. import ( "fmt" "go/token" "strconv" "golang.org/x/tools/go/exact" "golang.org/x/tools/go/type...
Go
// 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 ssa // This file implements the String() methods for all Value and // Instruction types. import ( "bytes" "fmt" "io" "reflect" "sort" "golang.o...
Go
// 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 ssa // This file defines algorithms related to dominance. // Dominator tree construction ---------------------------------------- // // We use the alg...
Go
// 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 ssa // This file defines a number of miscellaneous utility functions. import ( "fmt" "go/ast" "go/token" "io" "os" "golang.org/x/tools/go/types...
Go
// 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 ssa // This file defines the lifting pass which tries to "lift" Alloc // cells (new/local variables) into SSA registers, replacing loads // with the do...
Go
// 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 ssa // This file implements the BUILD phase of SSA construction. // // SSA construction has two phases, CREATE and BUILD. In the CREATE phase // (crea...
Go
// 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 ssautil import "golang.org/x/tools/go/ssa" // This file defines utilities for visiting the SSA representation of // a Program. // // TODO(adonovan): t...
Go
// 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 ssautil // This file implements discovery of switch and type-switch constructs // from low-level control flow. // // Many techniques exist for compilin...
Go
// 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 ssa // This file defines synthesis of Functions that delegate to declared // methods, which come in three kinds: // // (1) wrappers: methods that wrap ...
Go
// 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 ssa // This file defines utilities for working with source positions // or source-level named entities ("objects"). // TODO(adonovan): test that {Valu...
Go
// 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 ssa // CreateTestMainPackage synthesizes a main package that runs all the // tests of the supplied packages. // It is closely coupled to $GOROOT/src/cm...
Go
// 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 ssa // This file defines utilities for population of method sets. import ( "fmt" "golang.org/x/tools/go/types" ) // Method returns the Function im...
Go
// 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 ssa // This file implements the Function and BasicBlock types. import ( "bytes" "fmt" "go/ast" "go/token" "io" "os" "strings" "golang.org/x/t...
Go
// 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 ssa // lvalues are the union of addressable expressions and map-index // expressions. import ( "go/ast" "go/token" "golang.org/x/tools/go/types" )...
Go
// 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 ssa // An optional pass for sanity-checking invariants of the SSA representation. // Currently it checks CFG invariants but little at the instruction l...
Go
// 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. // +build !windows,!plan9 package interp import "syscall" func fillStat(st *syscall.Stat_t, stat structure) { stat[0] = st.Dev stat[1] = st.Ino stat[2] =...
Go
// 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 interp // Emulated functions that we cannot interpret because they are // external or because they use "unsafe" or "reflect" operations. import ( "m...
Go
// 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 interp import "syscall" func ext۰syscall۰Close(fr *frame, args []value) value { panic("syscall.Close not yet implemented") } func ext۰syscall۰Fstat(...
Go
// 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. // +build freebsd package interp import "syscall" func init() { externals["syscall.Sysctl"] = ext۰syscall۰Sysctl externals["syscall.SysctlUint32"] = ext۰s...
Go
// 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 interp import "syscall" func ext۰syscall۰Close(fr *frame, args []value) value { panic("syscall.Close not yet implemented") } func ext۰syscall۰Fstat(...
Go
// 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. // +build darwin package interp import "syscall" func init() { externals["syscall.Sysctl"] = ext۰syscall۰Sysctl } func ext۰syscall۰Sysctl(fr *frame, args ...
Go
// 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 interp // Custom hashtable atop map. // For use when the key's equivalence relation is not consistent with ==. // The Go specification doesn't address...
Go
// 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 interp // Emulated "reflect" package. // // We completely replace the built-in "reflect" package. // The only thing clients can depend upon are that re...
Go
// 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 interp // Values // // All interpreter values are "boxed" in the empty interface, value. // The range of possible dynamic types within value are: // //...
Go
// 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 ssa/interp defines an interpreter for the SSA // representation of Go programs. // // This interpreter is provided as an adjunct for testing the SSA ...
Go
// 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 interp import ( "bytes" "fmt" "go/token" "strings" "sync" "unsafe" "golang.org/x/tools/go/exact" "golang.org/x/tools/go/ssa" "golang.org/x/to...
Go
// 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 ssa defines a representation of the elements of Go programs // (packages, types, functions, variables and constants) using a // static single-assignm...
Go
// 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 typechecking of call and selector expressions. package types import ( "go/ast" "go/token" ) func (check *Checker) call(x *operand, ...
Go
// 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. // This file implements the Check function, which drives type-checking. package types import ( "go/ast" "go/token" "golang.org/x/tools/go/exact" ) // deb...
Go
// 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 Selections. package types import ( "bytes" "fmt" ) // SelectionKind describes the kind of a selector expression x.f // (excluding q...
Go
// 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 types import ( "go/ast" "go/token" ) // labels checks correct label use in body. func (check *Checker) labels(body *ast.BlockStmt) { // set of all...
Go
// 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 typeutil defines various utilities for types, such as Map, // a mapping from types.Type to interface{} values. package typeutil import ( "bytes" "...
Go
package typeutil import "golang.org/x/tools/go/types" // Dependencies returns all dependencies of the specified packages. // // Dependent packages appear in topological order: if package P imports // package Q, Q appears earlier than P in the result. // The algorithm follows import statements in the order they // app...
Go
// 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 typeutil // This file defines utilities for user interfaces that display types. import "golang.org/x/tools/go/types" // IntuitiveMethodSet returns th...
Go
// 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 types import ( "container/heap" "fmt" ) // initOrder computes the Info.InitOrder for package variables. func (check *Checker) initOrder() { // An I...
Go
// 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 various field and method lookup functions. package types // LookupFieldOrMethod looks up a field or method with given package and name...
Go
// 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. // This file implements typechecking of conversions. package types import "golang.org/x/tools/go/exact" // Conversion type-checks the conversion T(x). // The...
Go
// 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 printing of types. package types import ( "bytes" "fmt" ) // If GcCompatibilityMode is set, printing of types is modified // to mat...
Go