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

Issue 1404803002: Add a lexical scope for the body of a with statement (Closed)

Created:
5 years, 2 months ago by Dan Ehrenberg
Modified:
5 years, 2 months ago
Reviewers:
adamk
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Add a lexical scope for the body of a with statement For an edge case like the following in sloppy mode with ({}) function f() {} a lexical scope needs to be created around the body in order to hold the function declaration, so it can be hoisted according to a loose interpretation of Annex B 3.3 (loose because ES2015 does not permit a function declaration as the body of a with statement). This patch adds that scope. BUG=chromium:542100 LOG=N R=adamk Committed: https://crrev.com/ab3110e87551cfd553cda87e13c6a6c008af87e7 Cr-Commit-Position: refs/heads/master@{#31269}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -3 lines) Patch
M src/parser.cc View 1 chunk +18 lines, -3 lines 0 comments Download
A test/mjsunit/regress/regress-542100.js View 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1404803002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1404803002/1
5 years, 2 months ago (2015-10-14 15:12:31 UTC) #2
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-14 15:34:02 UTC) #4
Dan Ehrenberg
5 years, 2 months ago (2015-10-14 15:36:32 UTC) #5
adamk
lgtm, sad we need all this code to support this one case
5 years, 2 months ago (2015-10-14 15:43:37 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1404803002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1404803002/1
5 years, 2 months ago (2015-10-14 15:44:39 UTC) #8
Dan Ehrenberg
Yeah, but apparently function declarations directly in with scopes is supported across browsers (at least ...
5 years, 2 months ago (2015-10-14 15:44:45 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 2 months ago (2015-10-14 17:37:21 UTC) #10
commit-bot: I haz the power
5 years, 2 months ago (2015-10-14 17:37:32 UTC) #11
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/ab3110e87551cfd553cda87e13c6a6c008af87e7
Cr-Commit-Position: refs/heads/master@{#31269}

Powered by Google App Engine
This is Rietveld 408576698