1
0
mirror of https://github.com/golang/go synced 2024-10-01 13:28:37 -06:00
go/ssa/interp
Alan Donovan e2921e188a go.tools/importer: make loading/parsing concurrent.
1. ParseFiles (in util.go) parses each file in its own goroutine.

2. (*Importer).LoadPackage asynchronously prefetches the
   import graph by scanning the imports of each loaded package
   and calling LoadPackage on each one.

   LoadPackage is now thread-safe and idempotent: it uses a
   condition variable per package; the first goroutine to
   request a package becomes responsible for loading it and
   broadcasts to the others (waiting) when it becomes ready.

ssadump runs 34% faster when loading the oracle.

Also, refactorings:
- delete SourceLoader mechanism; just expose go/build.Context directly.
- CreateSourcePackage now also returns an error directly,
  rather than via PackageInfo.Err, since every client wants that.

R=crawshaw
CC=golang-dev
https://golang.org/cl/13509045
2013-09-04 13:15:49 -04:00
..
testdata go.tools/ssa: fix a bug building SSA code for ast.CompositeLit. 2013-08-22 10:13:51 -04:00
external_plan9.go go.tools: add go/types, ssa, and cmd/vet 2013-05-17 13:20:39 -07:00
external_unix.go go.tools: add go/types, ssa, and cmd/vet 2013-05-17 13:20:39 -07:00
external_windows.go go.tools: add go/types, ssa, and cmd/vet 2013-05-17 13:20:39 -07:00
external.go go.tools/ssa: ensure address-deriving operations panic on nil inputs. 2013-08-19 17:51:33 -04:00
interp_test.go go.tools/importer: make loading/parsing concurrent. 2013-09-04 13:15:49 -04:00
interp.go go.tools/ssa: fixes, cleanups, cosmetic tweaks. 2013-08-19 15:38:30 -04:00
map.go go.tools: add go/types, ssa, and cmd/vet 2013-05-17 13:20:39 -07:00
ops.go go.tools/go/types: Fix for broken IsAssignableTo. 2013-08-05 13:54:22 -07:00
reflect.go go.tools/go/types: support for fake imports of package "C" 2013-08-07 14:09:50 -07:00
value.go go.tools: add copyright messages to source files. 2013-08-27 18:49:13 -04:00