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

Issue 9703021: Fix declarations escaping global strict eval. (Closed)

Created:
8 years, 9 months ago by Michael Starzinger
Modified:
8 years, 9 months ago
Reviewers:
rossberg
CC:
v8-dev
Visibility:
Public.

Description

Fix declarations escaping global strict eval. According to ES5 10.4.2(3), eval calls of strict code always require their own lexical and variable environment. For now we just add a new scope when we parse the strict mode directive. The clean solution would be to always have this sope present (even for global eval calls) and adapt variable binding to cope with that. R=rossberg@chromium.org BUG=v8:1624 TEST=mjsunit/regress/regress-1624,test262/S10.4.2.1_A1 Committed: https://code.google.com/p/v8/source/detail?r=11057

Patch Set 1 #

Patch Set 2 : Addressed comments by Andreas Rossberg. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+303 lines, -11 lines) Patch
M src/parser.h View 1 chunk +1 line, -1 line 0 comments Download
M src/parser.cc View 1 5 chunks +23 lines, -7 lines 0 comments Download
A test/mjsunit/regress/regress-1624.js View 1 1 chunk +139 lines, -0 lines 0 comments Download
A test/mjsunit/regress/regress-1624-strict.js View 1 1 chunk +140 lines, -0 lines 0 comments Download
M test/test262/test262.status View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Michael Starzinger
8 years, 9 months ago (2012-03-14 12:34:55 UTC) #1
rossberg
Lookgs good so far, but I wonder about the cases where: - the global scope ...
8 years, 9 months ago (2012-03-14 13:40:05 UTC) #2
Michael Starzinger
Yes, I can certainly add those test cases. And here are my predictions of what ...
8 years, 9 months ago (2012-03-14 13:54:34 UTC) #3
rossberg
8 years, 9 months ago (2012-03-15 12:47:35 UTC) #4
lgtm

Powered by Google App Engine
This is Rietveld 408576698