Commit Graph

3 Commits

Author SHA1 Message Date
Peter Collingbourne 38a7dde1c5 llgoi: Fix type identity for imported binary packages.
go/loader creates a fresh package map for each source package it imports. In
llgoi this caused binary imported packages to be imported anew for every input
line, resulting in spurious type errors and panics in go/ssa when encountering
previously imported types. Fix this by setting types.Config.Packages to our
internal package map.

Differential Revision: http://reviews.llvm.org/D8409

llvm-svn: 232617
2015-03-18 08:34:40 +00:00
Peter Collingbourne 6092d2c065 llgoi: Fix importing source packages together with dependent binary packages.
Note that this means that llgoi does not support the case
where a package's pkgpath is different from its import path,
but I don't think this should actually happen with llgoi.

Differential Revision: http://reviews.llvm.org/D8403

llvm-svn: 232612
2015-03-18 06:04:22 +00:00
Peter Collingbourne 6725a83e84 Introduce llgoi, a REPL for Go
llgoi is a Go REPL based on llgo irgen and the LLVM JIT. It supports
expressions, statements, most declarations and imports, including binary
imports from the standard library and source imports from $GOPATH.

Differential Revision: http://reviews.llvm.org/D6957

llvm-svn: 226097
2015-01-15 04:13:29 +00:00