From: Matthew Dempsky Date: Sat, 20 Feb 2016 02:36:02 +0000 (-0800) Subject: cmd/compile: switch cannedimports to use a Biobuf X-Git-Tag: go1.7beta1~1819 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=699a2ba137fec09371da431907431ec2020a58af;p=gostls13.git 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 --- diff --git a/src/cmd/compile/internal/gc/lex.go b/src/cmd/compile/internal/gc/lex.go index 0bcfb3687d..e506f7a117 100644 --- a/src/cmd/compile/internal/gc/lex.go +++ b/src/cmd/compile/internal/gc/lex.go @@ -851,7 +851,7 @@ func importfile(f *Val) { 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