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

Issue 4960050: code review 4960050: gc: fix label recursion bugs (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 9 months ago by rsc
Modified:
13 years, 9 months ago
Reviewers:
CC:
lvd, golang-dev
Visibility:
Public.

Description

gc: fix label recursion bugs Was keeping a pointer to the labeled statement in n->right, which meant that generic traversals of the tree visited it twice. That combined with aggressive flattening of the block structure when possible during parsing meant that the kinds of label: code label: code label: code sequences generated by yacc were giving the recursion 2ⁿ paths through the program. Fixes issue 2212.

Patch Set 1 #

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

Patch Set 3 : diff -r 99bb84deb408 https://go.googlecode.com/hg #

Patch Set 4 : diff -r de1568e2e23d https://go.googlecode.com/hg #

Unified diffs Side-by-side diffs Delta from patch set Stats (+218 lines, -8 lines) Patch
M src/cmd/gc/gen.c View 1 2 chunks +4 lines, -4 lines 0 comments Download
M src/cmd/gc/go.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/gc/go.y View 1 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/gc/subr.c View 1 2 1 chunk +7 lines, -2 lines 0 comments Download
M test/escape2.go View 1 2 1 chunk +205 lines, -0 lines 0 comments Download

Messages

Total messages: 3
rsc
Hello lvd (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg
13 years, 9 months ago (2011-09-01 17:39:21 UTC) #1
lvd
LxGTM
13 years, 9 months ago (2011-09-01 17:44:00 UTC) #2
rsc
13 years, 9 months ago (2011-09-01 17:44:52 UTC) #3
*** Submitted as http://code.google.com/p/go/source/detail?r=3d378fb6c4dd ***

gc: fix label recursion bugs

Was keeping a pointer to the labeled statement in n->right,
which meant that generic traversals of the tree visited it twice.
That combined with aggressive flattening of the block
structure when possible during parsing meant that
the kinds of label: code label: code label: code sequences
generated by yacc were giving the recursion 2ⁿ paths
through the program.

Fixes issue 2212.

R=lvd
CC=golang-dev
http://codereview.appspot.com/4960050
Sign in to reply to this message.

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