1. 24 Feb, 2016 2 commits
    • Matthew Dempsky's avatar
      cmd/compile: remove parser lineno hack for issue #13267 · 1e4e0961
      Matthew Dempsky authored
      After golang.org/cl/19652 removed the bizarre lexlineno{++,--}
      statements for parsing canned imports, this hack for #13267 is no
      longer necessary:
      
          $ echo -n 0 > /tmp/0.go
          $ go tool compile /tmp/0.go
          /tmp/0.go:1: syntax error: package statement must be first
      
      Apparently setting lexlineno to 2 while parsing the canned imports
      caused prevlineno and lineno to also be set to 2.  After we finished
      parsing imports and restored lexlineno to 1, since "package" is the
      first token in a source file, we'll have fixed lineno = 1, but
      prevlineno was still set to 2.
      
      Change-Id: Ibcc49fe3402264819b9abb53505631f7a0ad4a36
      Reviewed-on: https://go-review.googlesource.com/19859Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      1e4e0961
    • Keith Randall's avatar
      cmd/compile: keep JMPs around with -N · e360f7c4
      Keith Randall authored
      When -N, make sure we don't drop every instruction from
      a block, even ones which would otherwise be empty.
      Helps keep line numbers around for debugging, particularly
      for break and continue statements (which often compile
      down to nothing).
      
      Fixes #14379
      
      Change-Id: I33722c4f0dcd502f146fa48af262ba3a477c959a
      Reviewed-on: https://go-review.googlesource.com/19854
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMinux Ma <minux@golang.org>
      e360f7c4
  2. 23 Feb, 2016 17 commits
  3. 22 Feb, 2016 11 commits
  4. 21 Feb, 2016 10 commits