Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • G go
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • go
  • Repository
  • go
  • src
  • cmd
  • compile
  • internal
  • syntax
  • parser.go
Find file BlameHistoryPermalink
  • Robert Griesemer's avatar
    cmd/compile/internal/syntax: simpler position base update for line directives (cleanup) · e2a86b6b
    Robert Griesemer authored Feb 20, 2018
    The existing code was somewhat convoluted and made several assumptions
    about the encoding of position bases:
    
    1) The position's base for a file contained a position whose base
       pointed to itself (which is true but an implementation detail
       of src.Pos).
    
    2) Updating the position base for a line directive required finding
       the base of the most recent's base position.
    
    This change simply stores the file's position base and keeps using it
    directly for each line directive (instead of getting it from the most
    recently updated base).
    
    Change-Id: I4d80da513bededb636eab0ce53257fda73f0dbc0
    Reviewed-on: https://go-review.googlesource.com/95736
    
    
    Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
    e2a86b6b
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7