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

Issue 7572019: 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. When recompiling code (e.g., when optimizing) we could incorrectly hoist some function expressions. This leads to incorrect results or a crash. The root cause was that functions were not correctly categorized as expression or declaration at parse time. This requires some extra hoops to prevent the print name "anonymous" for functions created by 'new Function' from establishing a binding. R=vegorov@chromium.org,kasperl@chromium.org BUG=1583 TEST=regress-1583 Committed: http://code.google.com/p/v8/source/detail?r=8838

Patch Set 1 #

Patch Set 2 : Fix a bug. #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+128 lines, -74 lines) Patch
M src/objects.h View 4 chunks +14 lines, -2 lines 1 comment Download
M src/objects-inl.h View 1 chunk +6 lines, -28 lines 0 comments Download
M src/parser.h View 1 chunk +1 line, -2 lines 1 comment Download
M src/parser.cc View 1 9 chunks +25 lines, -24 lines 2 comments Download
M src/runtime.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/runtime.cc View 8 chunks +25 lines, -15 lines 0 comments Download
M src/v8natives.js View 3 chunks +5 lines, -3 lines 1 comment Download
A test/mjsunit/regress/regress-1583.js View 1 chunk +50 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Kevin Millikin (Chromium)
http://codereview.chromium.org/7572019/diff/1001/src/objects.h File src/objects.h (left): http://codereview.chromium.org/7572019/diff/1001/src/objects.h#oldcode4920 src/objects.h:4920: static const int kBoundFunction = 9; Strange that this ...
9 years, 4 months ago (2011-08-04 16:32:09 UTC) #1
Vyacheslav Egorov (Chromium)
9 years, 4 months ago (2011-08-04 16:40:52 UTC) #2
LGTM

Powered by Google App Engine
This is Rietveld 408576698