| commit | 699a2ba137fec09371da431907431ec2020a58af | [log] [tgz] |
|---|---|---|
| author | Matthew Dempsky <mdempsky@google.com> | Fri Feb 19 18:36:02 2016 -0800 |
| committer | Matthew Dempsky <mdempsky@google.com> | Sat Feb 20 04:37:50 2016 +0000 |
| tree | d561e22b79c848fbea0a6180c269eba6112d48e7 | |
| parent | 7d3a40978aaa69c3cf08068a83252927b4514e9d [diff] |
cmd/compile: switch cannedimports to use a Biobuf Allows eliminating the separate lexer code paths for reading from cp in the next CL. Change-Id: I49098ecef32b735c4a01374443c2f847235ff964 Reviewed-on: https://go-review.googlesource.com/19750 Reviewed-by: Robert Griesemer <gri@golang.org>
diff --git a/src/cmd/compile/internal/gc/lex.go b/src/cmd/compile/internal/gc/lex.go index 0bcfb36..e506f7a 100644 --- a/src/cmd/compile/internal/gc/lex.go +++ b/src/cmd/compile/internal/gc/lex.go
@@ -851,7 +851,7 @@ func cannedimports(file string, cp string) { lexlineno++ // if sys.6 is included on line 1, pushedio = curio - curio = Io{infile: file, cp: cp} + curio = Io{infile: file, bin: obj.Binitr(strings.NewReader(cp))} typecheckok = true incannedimport = 1