Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Issue 7548011: Fix a bug in scope analysis. (Closed)

Created:
9 years, 4 months ago by Kevin Millikin (Chromium)
Modified:
9 years, 4 months ago
CC:
v8-dev
Visibility:
Public.

Description

Fix a bug in scope analysis. Function declarations inside catch are hoisted to the nearest enclosing function scope, but we compiled their bodies as if occurring inside the catch scope. BUG=chrome:91120 TEST=regress/regress-91120 attached Committed: http://code.google.com/p/v8/source/detail?r=8783

Patch Set 1 #

Patch Set 2 : Correctly set inside_with on the new scope. #

Total comments: 2

Patch Set 3 : Back to the original version. #

Patch Set 4 : Fix syntax error :( #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -1 line) Patch
M src/parser.cc View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
A test/mjsunit/regress/regress-91120.js View 1 chunk +48 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Kevin Millikin (Chromium)
9 years, 4 months ago (2011-08-02 14:14:31 UTC) #1
Steven
On 2011/08/02 14:14:31, Kevin Millikin wrote: LGTM (if that counts :)
9 years, 4 months ago (2011-08-02 14:21:42 UTC) #2
rossberg
LGTM http://codereview.chromium.org/7548011/diff/4001/src/parser.cc File src/parser.cc (right): http://codereview.chromium.org/7548011/diff/4001/src/parser.cc#newcode3647 src/parser.cc:3647: outer_scope = outer_scope->DeclarationScope(); Why not write it functionally?
9 years, 4 months ago (2011-08-02 14:54:05 UTC) #3
Kevin Millikin (Chromium)
9 years, 4 months ago (2011-08-02 14:56:33 UTC) #4
http://codereview.chromium.org/7548011/diff/4001/src/parser.cc
File src/parser.cc (right):

http://codereview.chromium.org/7548011/diff/4001/src/parser.cc#newcode3647
src/parser.cc:3647: outer_scope = outer_scope->DeclarationScope();
On 2011/08/02 14:54:05, rossberg wrote:
> Why not write it functionally?

No great reason.  I wanted to write the comment exactly there.

Powered by Google App Engine
This is Rietveld 408576698