code
stringlengths
10
1.34M
language
stringclasses
1 value
// 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. // Adapted from encoding/xml/read_test.go. // Package atom defines XML data structures for an Atom feed. package atom import ( "encoding/xml" "time" ) typ...
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 blog implements a web server for articles written in present format. package blog import ( "bytes" "encoding/json" "encoding/xml" "fmt" "html/...
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 main import ( "bytes" "fmt" "io" "log" "os" "os/exec" "time" ) // run is a simple wrapper for exec.Run/Close func run(d time.Duration, envv []s...
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 main import ( "bytes" "flag" "fmt" "io" "io/ioutil" "log" "os" "path/filepath" "regexp" "runtime" "strings" "time" "code.google.com/p/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. package main import ( "bytes" "fmt" "io/ioutil" "os" "path/filepath" "runtime" "strings" "code.google.com/p/go.tools/go/vcs" ) // These variables 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 main import ( "encoding/xml" "fmt" "os" "path/filepath" "strings" "sync" "code.google.com/p/go.tools/go/vcs" ) // Repo represents a mercurial ...
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 main import ( "bytes" "encoding/json" "errors" "fmt" "io" "log" "net/http" "net/url" "time" ) type obj map[string]interface{} // dash runs t...
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 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 vcs import ( "encoding/xml" "fmt" "io" "strings" ) // charsetReader returns a reader for the given charset. Currently // it only supports UTF-8 a...
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 vcs import ( "os" "strings" ) // envForDir returns a copy of the environment // suitable for running in the given directory. // The environment is ...
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. package vcs import ( "bytes" "encoding/json" "errors" "fmt" "log" "os" "os/exec" "path/filepath" "regexp" "strconv" "strings" ) // Verbose enables...
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. package vcs import ( "fmt" "io" "io/ioutil" "log" "net/http" "net/url" ) // httpClient is the default HTTP client, but a variable so it can be // chang...
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
// 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 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 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. // +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 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 // 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 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 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 import "syscall" func ext۰syscall۰Close(fr *frame, args []value) value { panic("syscall.Close not yet implemented") } func ext۰syscall۰Fstat(...
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" "code.google.com/p/go.tools/go/exact" "code.google.com/p/go.tools/go/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 ssa // This file defines a number of miscellaneous utility functions. import ( "fmt" "go/ast" "go/token" "io" "os" "code.google.com/p/go.tools/...
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 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 String() methods for all Value and // Instruction types. // TODO(adonovan): define WriteValue(*bytes.Buffer) and avoid...
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 "code.google.com/p/go.tools/go/ssa" // This file defines utilities for visiting the SSA representation of // a Program. // // TODO(adon...
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 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 // 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 // Helpers for emitting SSA instructions. import ( "go/ast" "go/token" "code.google.com/p/go.tools/go/types" ) // emitNew emits to f a new (h...
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" "code.goog...
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 and // synthesis of wrapper methods. // // Wrappers include: // - indirection/promotio...
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" "code.google.com/p/go.tools/go/exact" "code.google.com/p/...
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 // This file implements the Function and BasicBlock types. import ( "bytes" "fmt" "go/ast" "go/token" "io" "os" "strings" "code.google.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 ssa // CreateTestMainPackage synthesizes a main package that runs all the // tests of the supplied packages. // It is closely coupled to src/cmd/go/tes...
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 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. package ssa // lvalues are the union of addressable expressions and map-index // expressions. import ( "go/ast" "go/token" "code.google.com/p/go.tools/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. 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. /* 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
// 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 "code.google.com/p/go.tools/go/ssa" // This file provides various utilities over call graphs, such as // visitation and path search. ...
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 loader import ( "go/ast" "go/build" "go/parser" "go/token" "io" "os" "path/filepath" "sync" ) // parseFiles parses the Go source files files w...
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 loader import ( "fmt" "go/ast" "code.google.com/p/go.tools/go/exact" "code.google.com/p/go.tools/go/types" ) // PackageInfo holds the ASTs and fa...
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 loader loads, parses and type-checks packages of Go code // plus their transitive closure, and retains both the ASTs and the // derived facts. // // ...
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 importer import ( "bytes" "encoding/binary" "fmt" "go/ast" "strings" "code.google.com/p/go.tools/go/exact" "code.google.com/p/go.tools/go/types...
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 importer import "code.google.com/p/go.tools/go/types" const ( magic = "\n$$ exports $$\n" version = "v0" ) // Tags. Must be < 0. const ( // Pack...
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 implementation is loosely based on the algorithm described // in: "On the linearization of graphs and writing symbol files", // by R. Griesemer, Technic...
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 pointer // This file defines the internal (context-sensitive) call graph. import ( "fmt" "go/token" "code.google.com/p/go.tools/go/ssa" ) type cg...
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 pointer import ( "bytes" "fmt" "code.google.com/p/go.tools/go/types" ) // CanPoint reports whether the type T is pointerlike, // for the purposes ...
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 pointer import "fmt" func (c *addrConstraint) String() string { return fmt.Sprintf("addr n%d <- {&n%d}", c.dst, c.src) } func (c *copyConstraint) St...
Go
package pointer // This file implements the generation and resolution rules for // constraints arising from the use of reflection in the target // program. See doc.go for explanation of the representation. // // For consistency, the names of all parameters match those of the // actual functions in the "reflect" packa...
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 pointer // This file defines the main datatypes and Analyze function of the pointer analysis. import ( "fmt" "go/token" "io" "os" "reflect" "run...
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 pointer // This package defines the treatment of intrinsics, i.e. library // functions requiring special analytical treatment. // // Most of these 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 pointer import ( "fmt" "go/token" "strings" "code.google.com/p/go.tools/go/ssa" "code.google.com/p/go.tools/go/types" ) // A Label is an entity ...
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 pointer // This file defines the constraint optimiser ("pre-solver"). import ( "fmt" ) func (a *analysis) optimize() { a.renumber() // TODO(adono...
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 pointer // This file defines the constraint generation phase. // TODO(adonovan): move the constraint definitions and the store() etc // functions whic...
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 pointer import ( "code.google.com/p/go.tools/go/types" ) type constraint interface { // For a complex constraint, returns the nodeid of the pointer ...
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 pointer // This file defines a naive Andersen-style solver for the inclusion // constraint system. import ( "fmt" "code.google.com/p/go.tools/go/ty...
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 pointer implements Andersen's analysis, an inclusion-based pointer analysis algorithm first described in (Andersen, 1994). The implementation is si...
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 pointer import ( "bytes" "fmt" "go/token" "io" "code.google.com/p/go.tools/go/callgraph" "code.google.com/p/go.tools/go/ssa" "code.google.com/p...
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 gccgoimporter import ( "bytes" "errors" "fmt" "go/token" "io" "strconv" "strings" "text/scanner" "code.google.com/p/go.tools/go/exact" "code...
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 gccgoimporter implements Import for gccgo-generated object files. package gccgoimporter import ( "debug/elf" "fmt" "io" "os" "path/filepath" "...
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 gccgoimporter import ( "bufio" "os" "os/exec" "path/filepath" "strings" "code.google.com/p/go.tools/go/types" ) // Information about a specific...
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 mathematically exact values // and operations for untyped Go constant values. // // A special Unknown value may be used when a const...
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 statements. package types import ( "fmt" "go/ast" "go/token" "code.google.com/p/go.tools/go/exact" ) func (check...
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 various error reporters. package types import ( "fmt" "go/ast" "go/token" "strings" ) func assert(p bool) { if !p { panic("ass...
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 commonly used type predicates. package types import "sort" func isNamed(typ Type) bool { if _, ok := typ.(*Basic); ok { return ok ...
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 ( "fmt" "go/ast" "go/token" "code.google.com/p/go.tools/go/e...
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 Sizes. package types // Sizes defines the sizing functions for package unsafe. type Sizes interface { // Alignof returns the alignmen...
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 "code.google.com/p/go.tools/go/exact" // Conversion type-checks the conversion T(x)...
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 defines operands and associated operations. package types import ( "bytes" "go/ast" "go/token" "code.google.com/p/go.tools/go/exact" ) // A...
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 New, Eval and EvalNode. package types import ( "fmt" "go/ast" "go/parser" "go/token" "code.google.com/p/go.tools/go/exact" ) //...
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 objsets. // // An objset is similar to a Scope but objset elements // are identified by their unique id, instead of their // object name...
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 // TODO(gri) The named type consolidation and seen maps below must be // ...
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 expressions. package types import ( "fmt" "go/ast" "go/token" "math" "code.google.com/p/go.tools/go/exact" ) /*...
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. // This file implements resolveOrder. package types import ( "go/ast" "sort" ) // resolveOrder computes the order in which package-level objects // must be...
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 !go1.2 package types import "go/ast" func slice3(x *ast.SliceExpr) bool { return false } func sliceMax(x *ast.SliceExpr) ast.Expr { return nil ...
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 method sets. package types import ( "bytes" "fmt" "sort" ) // A MethodSet is an ordered set of concrete or abstract (interface) me...
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 // This file defines utilities for user interfaces that display types. import "code.google.com/p/go.tools/go/types" // IntuitiveMethodSet re...
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
// 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 universe and unsafe package scopes. package types import ( "go/token" "strings" "code.google.com/p/go.tools/go/exact" ) var (...
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 go1.2 package types import "go/ast" func slice3(x *ast.SliceExpr) bool { return x.Slice3 } func sliceMax(x *ast.SliceExpr) ast.Expr { return x....
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 ( "errors" "fmt" "go/ast" "go/token" "sort" "strconv" "strings" "unicode" "code.google.com/p/go.tools/go/exact" ) // A declInfo...
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 type-checking of identifiers and type expressions. package types import ( "go/ast" "go/token" "sort" "strconv" "code.google.com/...
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 ( "bytes" "fmt" "go/ast" "go/token" "code.google.com/p/go.tools/go/exact" ) // TODO(gri) Document factory, accessor methods, and fi...
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. // This file implements a cache of method sets. package types import "sync" // A MethodSetCache records the method set of each type T for which // MethodSet(...
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 types import "sort" // TODO(gri) Revisit factory functions - make sure they have all relevant parameters. // A Type represents a type of Go. // All 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. // This file implements printing of expressions. package types import ( "bytes" "go/ast" ) // ExprString returns the (possibly simplified) string represent...
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 "fmt" // A Package describes a Go package. type Package struct { path string name string scope *Scope complete bool impor...
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
// 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 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. type Selection...
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 ( "go/ast" "go/token" "code.google.com/p/go.tools/go/exact" ) func (check *checker) reportAltDecl(obj Object) { if pos := obj.Pos();...
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 initialization and assignment checks. package types import ( "go/ast" "go/token" "code.google.com/p/go.tools/go/exact" ) // assig...
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 builtin function calls. package types import ( "go/ast" "go/token" "code.google.com/p/go.tools/go/exact" ) // bui...
Go