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

Issue 189080: code review 189080: Steps towards tracking scopes for identifiers. (Closed)

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

Description

Steps towards tracking scopes for identifiers. - Identifiers refer now to the language entity (Object) that they denote. At the moment this is at best an approximation. - Initial data structures for language entities (Objects) and expression types (Type) independent of the actual type notations. - Initial support for declaring and looking up identifiers. - Updated various dependent files and added support functions. - Extensively tested to avoid breakage. This is an AST change.

Patch Set 1 #

Patch Set 2 : code review 189080: Steps towards tracking scopes for identifiers. #

Patch Set 3 : code review 189080: Steps towards tracking scopes for identifiers. #

Total comments: 8

Patch Set 4 : code review 189080: Steps towards tracking scopes for identifiers. #

Patch Set 5 : code review 189080: Steps towards tracking scopes for identifiers. #

Patch Set 6 : code review 189080: Steps towards tracking scopes for identifiers. #

Patch Set 7 : code review 189080: Steps towards tracking scopes for identifiers. #

Patch Set 8 : code review 189080: Steps towards tracking scopes for identifiers. #

Total comments: 6

Patch Set 9 : code review 189080: Steps towards tracking scopes for identifiers. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+247 lines, -249 lines) Patch
M src/cmd/cgo/ast.go View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -3 lines 0 comments Download
M src/cmd/cgo/gcc.go View 1 2 3 4 5 6 7 8 5 chunks +6 lines, -6 lines 0 comments Download
M src/cmd/cgo/main.go View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M src/cmd/cgo/out.go View 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/godoc/godoc.go View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -4 lines 0 comments Download
M src/cmd/godoc/index.go View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M src/cmd/godoc/snippet.go View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M src/cmd/gofmt/gofmt.go View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
M src/cmd/gofmt/rewrite.go View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/exp/eval/expr.go View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/exp/eval/stmt.go View 1 2 3 4 5 6 7 8 8 chunks +16 lines, -16 lines 0 comments Download
M src/pkg/exp/eval/type.go View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/exp/eval/typec.go View 1 2 3 4 5 6 7 8 5 chunks +8 lines, -8 lines 0 comments Download
M src/pkg/exp/parser/interface.go View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M src/pkg/exp/parser/parser.go View 11 chunks +7 lines, -56 lines 0 comments Download
M src/pkg/go/ast/ast.go View 1 2 3 4 5 6 7 8 4 chunks +25 lines, -7 lines 0 comments Download
M src/pkg/go/ast/filter.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/go/ast/scope.go View 1 2 3 4 5 6 7 8 1 chunk +55 lines, -66 lines 0 comments Download
M src/pkg/go/doc/doc.go View 1 2 3 4 5 6 7 8 8 chunks +10 lines, -10 lines 0 comments Download
M src/pkg/go/parser/interface.go View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/go/parser/parser.go View 1 2 3 4 5 6 7 8 25 chunks +86 lines, -50 lines 0 comments Download
M src/pkg/go/printer/nodes.go View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/go/printer/printer.go View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 16
gri
Hello rsc (cc: golang-dev@googlegroups.com, rog), I'd like you to review this change.
15 years, 2 months ago (2010-01-15 02:20:52 UTC) #1
rsc
I'm a little worried about doing too much in the parser. I'd like to preserve ...
15 years, 2 months ago (2010-01-15 06:19:54 UTC) #2
rog
2010/1/15 <rsc@golang.org>: > I'm a little worried about doing too much in the parser. > ...
15 years, 2 months ago (2010-01-15 15:11:29 UTC) #3
rsc
> i think there's a problem here. what happens if you have > a package ...
15 years, 2 months ago (2010-01-15 17:22:00 UTC) #4
rog
2010/1/15 Russ Cox <rsc@golang.org>: > i glossed over this. when processing the first file > ...
15 years, 2 months ago (2010-01-15 17:40:39 UTC) #5
rsc
On Fri, Jan 15, 2010 at 09:40, roger peppe <rogpeppe@gmail.com> wrote: > 2010/1/15 Russ Cox ...
15 years, 2 months ago (2010-01-15 18:03:06 UTC) #6
rog
2010/1/15 Russ Cox <rsc@golang.org>: > You could, but it would have to make a different ...
15 years, 2 months ago (2010-01-15 18:09:56 UTC) #7
rsc
> how do you merge two files, if all the global symbols in each file ...
15 years, 2 months ago (2010-01-15 18:28:37 UTC) #8
gri
On Thu, Jan 14, 2010 at 10:19 PM, <rsc@golang.org> wrote: > I'm a little worried ...
15 years, 2 months ago (2010-01-15 18:37:55 UTC) #9
gri
http://codereview.appspot.com/189080/diff/1049/67 File src/pkg/go/ast/ast.go (right): http://codereview.appspot.com/189080/diff/1049/67#newcode121 src/pkg/go/ast/ast.go:121: Obj *Object // denoted object On 2010/01/15 06:19:54, rsc ...
15 years, 2 months ago (2010-01-15 18:59:31 UTC) #10
gri
PTAL. I moved the type stuff out for now as it is not needed yet. ...
15 years, 2 months ago (2010-01-15 19:41:09 UTC) #11
rsc
http://codereview.appspot.com/189080/diff/204/207 File src/cmd/cgo/main.go (right): http://codereview.appspot.com/189080/diff/204/207#newcode103 src/cmd/cgo/main.go:103: *cref.Expr = &ast.Ident{Position: pos, Obj: ast.NewObj(ast.Err, pos, "_C_"+cref.Name)} Change ...
15 years, 2 months ago (2010-01-15 19:49:51 UTC) #12
gri
http://codereview.appspot.com/189080/diff/204/207 File src/cmd/cgo/main.go (right): http://codereview.appspot.com/189080/diff/204/207#newcode103 src/cmd/cgo/main.go:103: *cref.Expr = &ast.Ident{Position: pos, Obj: ast.NewObj(ast.Err, pos, "_C_"+cref.Name)} On ...
15 years, 2 months ago (2010-01-15 21:15:36 UTC) #13
rsc
LGTM > If NewObj changes in its interface it's easy to find all places that ...
15 years, 2 months ago (2010-01-15 21:17:22 UTC) #14
gri
On Fri, Jan 15, 2010 at 1:17 PM, Russ Cox <rsc@golang.org> wrote: > LGTM > ...
15 years, 2 months ago (2010-01-15 21:25:42 UTC) #15
gri
15 years, 2 months ago (2010-01-15 21:27:48 UTC) #16
*** Submitted as http://code.google.com/p/go/source/detail?r=1f84afedd4db ***

	Steps towards tracking scopes for identifiers.

	- Identifiers refer now to the language entity (Object)
	  that they denote. At the moment this is at best an
	  approximation.

	- Initial data structures for language entities (Objects)
          and expression types (Type) independent of the actual
	  type notations.

	- Initial support for declaring and looking up identifiers.

	- Updated various dependent files and added support functions.

	- Extensively tested to avoid breakage. This is an AST change.

R=rsc
CC=golang-dev, rog
http://codereview.appspot.com/189080
Sign in to reply to this message.

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