Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(59)

Issue 2936041: code review 2936041: token/position: implemented Pos (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 1 month ago by gri
Modified:
14 years, 5 months ago
Reviewers:
CC:
r, golang-dev, rsc
Visibility:
Public.

Description

token/position: implemented Pos A pos value represents a file-set specific, accurate source position value. It is 8x smaller in size than the corresponding Position value (4 bytes vs 32 bytes). Using Pos values instead of Position values in AST saves approx. 25MBytes of memory when running godoc on the current repository. This CL introduces the Pos, File, and FileSet data types; it does not affect existing code. Another (pending CL) will make the change to all dependent source files. Missing: tests

Patch Set 1 #

Patch Set 2 : code review 2936041: position.go - preliminary version #

Patch Set 3 : code review 2936041: position.go - preliminary version #

Total comments: 2

Patch Set 4 : code review 2936041: position.go - preliminary version #

Patch Set 5 : code review 2936041: token/position: implemented Pos #

Patch Set 6 : code review 2936041: token/position: implemented Pos #

Total comments: 19

Patch Set 7 : code review 2936041: token/position: implemented Pos #

Patch Set 8 : code review 2936041: token/position: implemented Pos #

Unified diffs Side-by-side diffs Delta from patch set Stats (+317 lines, -40 lines) Patch
M src/pkg/go/token/Makefile View 1 chunk +1 line, -0 lines 0 comments Download
A src/pkg/go/token/position.go View 1 2 3 4 5 6 7 1 chunk +315 lines, -0 lines 0 comments Download
M src/pkg/go/token/token.go View 2 chunks +1 line, -40 lines 0 comments Download

Messages

Total messages: 6
rsc1
http://codereview.appspot.com/2936041/diff/5001/src/pkg/go/token/position.go File src/pkg/go/token/position.go (right): http://codereview.appspot.com/2936041/diff/5001/src/pkg/go/token/position.go#newcode61 src/pkg/go/token/position.go:61: // NoPos may be used when no offset information ...
15 years, 1 month ago (2010-11-05 18:55:37 UTC) #1
gri
Hello r (cc: golang-dev@googlegroups.com, rsc), I'd like you to review this change.
15 years, 1 month ago (2010-11-12 22:55:44 UTC) #2
r
http://codereview.appspot.com/2936041/diff/15002/src/pkg/go/token/position.go File src/pkg/go/token/position.go (right): http://codereview.appspot.com/2936041/diff/15002/src/pkg/go/token/position.go#newcode16 src/pkg/go/token/position.go:16: // Position describes an arbitrary source position. including the ...
15 years, 1 month ago (2010-11-12 23:22:06 UTC) #3
gri
PTAL http://codereview.appspot.com/2936041/diff/15002/src/pkg/go/token/position.go File src/pkg/go/token/position.go (right): http://codereview.appspot.com/2936041/diff/15002/src/pkg/go/token/position.go#newcode16 src/pkg/go/token/position.go:16: // Position describes an arbitrary source position. On ...
15 years, 1 month ago (2010-11-12 23:45:15 UTC) #4
r
LGTM
15 years, 1 month ago (2010-11-12 23:48:24 UTC) #5
gri
15 years, 1 month ago (2010-11-13 00:39:36 UTC) #6
*** Submitted as http://code.google.com/p/go/source/detail?r=03404c0155f6 ***

token/position: implemented Pos

A pos value represents a file-set specific, accurate
source position value. It is 8x smaller in size than
the corresponding Position value (4 bytes vs 32 bytes).

Using Pos values instead of Position values in AST
saves approx. 25MBytes of memory when running godoc
on the current repository.

This CL introduces the Pos, File, and FileSet data
types; it does not affect existing code. Another
(pending CL) will make the change to all dependent
source files.

Missing: tests

R=r
CC=golang-dev, rsc
http://codereview.appspot.com/2936041

Committer: Robert Griesemer <gri@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b