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

Issue 8255044: code review 8255044: cmd/gc: preserve safe annotation of package def. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 1 month ago by dsymonds
Modified:
11 years, 1 month ago
Reviewers:
CC:
golang-dev, r, minux1, DMorsing, iant
Visibility:
Public.

Description

cmd/gc: preserve safe annotation of package def. A package file may begin as either "package foo" or "package foo safe". The latter is relevant when using -u. https://codereview.appspot.com/6903059 resulted in the distinction being dropped when a package was read for the second or later time. This CL records whether that "safe" tag was present, and includes it in the dummy statement generated for the lexer.

Patch Set 1 #

Patch Set 2 : diff -r fa935e01b0a7 https://code.google.com/p/go #

Patch Set 3 : diff -r fa935e01b0a7 https://code.google.com/p/go #

Total comments: 4

Patch Set 4 : diff -r 423102e03efc https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+304 lines, -299 lines) Patch
M src/cmd/gc/go.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/gc/go.y View 1 1 chunk +2 lines, -1 line 0 comments Download
M src/cmd/gc/lex.c View 1 3 chunks +6 lines, -4 lines 0 comments Download
M src/cmd/gc/y.tab.c View 1 114 chunks +295 lines, -294 lines 0 comments Download

Messages

Total messages: 6
dsymonds
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
11 years, 1 month ago (2013-04-02 13:38:02 UTC) #1
r
LGTM but get another set of eyes https://codereview.appspot.com/8255044/diff/5001/src/cmd/gc/go.h File src/cmd/gc/go.h (right): https://codereview.appspot.com/8255044/diff/5001/src/cmd/gc/go.h#newcode397 src/cmd/gc/go.h:397: int safe; ...
11 years, 1 month ago (2013-04-02 13:55:24 UTC) #2
minux1
https://codereview.appspot.com/8255044/diff/5001/src/cmd/gc/go.h File src/cmd/gc/go.h (right): https://codereview.appspot.com/8255044/diff/5001/src/cmd/gc/go.h#newcode397 src/cmd/gc/go.h:397: int safe; could we make the safe field a ...
11 years, 1 month ago (2013-04-02 14:13:47 UTC) #3
DMorsing
LGTM with minux' suggestion.
11 years, 1 month ago (2013-04-02 14:32:52 UTC) #4
iant
LGTM It would sure be nice to have a test. It ought to be possible ...
11 years, 1 month ago (2013-04-02 16:03:00 UTC) #5
dsymonds
11 years, 1 month ago (2013-04-02 21:26:16 UTC) #6
*** Submitted as https://code.google.com/p/go/source/detail?r=d7e787e80e7d ***

cmd/gc: preserve safe annotation of package def.

A package file may begin as either "package foo" or
"package foo safe". The latter is relevant when using -u.
https://codereview.appspot.com/6903059 resulted in the distinction
being dropped when a package was read for the second or later time.
This CL records whether that "safe" tag was present,
and includes it in the dummy statement generated for the lexer.

R=golang-dev, r, minux.ma, daniel.morsing, iant
CC=golang-dev
https://codereview.appspot.com/8255044

https://codereview.appspot.com/8255044/diff/5001/src/cmd/gc/go.h
File src/cmd/gc/go.h (right):

https://codereview.appspot.com/8255044/diff/5001/src/cmd/gc/go.h#newcode397
src/cmd/gc/go.h:397: int	safe;
On 2013/04/02 14:13:48, minux wrote:
> could we make the safe field a char?

Done.

https://codereview.appspot.com/8255044/diff/5001/src/cmd/gc/go.h#newcode397
src/cmd/gc/go.h:397: int	safe;
On 2013/04/02 13:55:24, r wrote:
> // what it means

Done.
Sign in to reply to this message.

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