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

Issue 6816100: code review 6816100: cmd/gc: annotate local variables with unique ids for in... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by rsc
Modified:
11 years, 4 months ago
Reviewers:
ken3
CC:
ken2, golang-dev
Visibility:
Public.

Description

cmd/gc: annotate local variables with unique ids for inlining Avoids problems with local declarations shadowing other names. We write a more explicit form than the incoming program, so there may be additional type annotations. For example: int := "hello" j := 2 would normally turn into var int string = "hello" var j int = 2 but the int variable shadows the int type in the second line. This CL marks all local variables with a per-function sequence number, so that this would instead be: var int·1 string = "hello" var j·2 int = 2 Fixes issue 4326.

Patch Set 1 #

Patch Set 2 : diff -r e1d0c77a3cd5 https://go.googlecode.com/hg/ #

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -8 lines) Patch
M src/cmd/gc/dcl.c View 1 2 9 chunks +17 lines, -4 lines 0 comments Download
M src/cmd/gc/esc.c View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/cmd/gc/fmt.c View 1 4 chunks +22 lines, -1 line 0 comments Download
M src/pkg/exp/types/gcimporter_test.go View 1 1 chunk +1 line, -1 line 0 comments Download
A test/fixedbugs/issue4326.go View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
A test/fixedbugs/issue4326.dir/p1.go View 1 2 1 chunk +12 lines, -0 lines 0 comments Download
A test/fixedbugs/issue4326.dir/p2.go View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
A test/fixedbugs/issue4326.dir/q1.go View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
A test/fixedbugs/issue4326.dir/q2.go View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
A test/fixedbugs/issue4326.dir/z.go View 1 2 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 3
rsc
Hello ken2 (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
11 years, 4 months ago (2012-11-07 14:59:17 UTC) #1
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=25dcee3d220c *** cmd/gc: annotate local variables with unique ids for inlining Avoids ...
11 years, 4 months ago (2012-11-07 14:59:26 UTC) #2
ken3
11 years, 4 months ago (2012-11-07 20:41:43 UTC) #3
lgtm
Sign in to reply to this message.

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