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

Issue 1622723003: Sloppy mode webcompat: allow conflicting function declarations in blocks (Closed)

Created:
4 years, 11 months ago by adamk
Modified:
4 years, 11 months ago
Reviewers:
Dan Ehrenberg
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

Sloppy mode webcompat: allow conflicting function declarations in blocks The web appears to depend on being able to redeclare functions-in-blocks in sloppy mode (examples seen so far tend to redeclare identical functions, most likely accidentally). This patch opens a minimal hole: two same-named function declarations in the same scope are allowed, only in sloppy mode. BUG=v8:4693, chromium:579395 LOG=y Committed: https://crrev.com/8aeb6080e11548c018e898a078a162c23a45f7b8 Cr-Commit-Position: refs/heads/master@{#33478}

Patch Set 1 #

Patch Set 2 : Add strict mode test, add test262.status fix #

Patch Set 3 : Add Annex B checks to test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -3 lines) Patch
M src/parsing/parser.cc View 3 chunks +7 lines, -3 lines 0 comments Download
A test/mjsunit/regress/regress-4693.js View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
M test/test262/test262.status View 1 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (8 generated)
adamk
4 years, 11 months ago (2016-01-22 23:33:02 UTC) #2
Dan Ehrenberg
lgtm Lgtm but I'd prefer some more tests to nail down the semantics, namely - ...
4 years, 11 months ago (2016-01-22 23:47:06 UTC) #3
adamk
On 2016/01/22 23:47:06, Dan Ehrenberg wrote: > lgtm > > Lgtm but I'd prefer some ...
4 years, 11 months ago (2016-01-22 23:56:35 UTC) #4
adamk
Also added two Annex B-related asserts.
4 years, 11 months ago (2016-01-23 00:04:32 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1622723003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1622723003/40001
4 years, 11 months ago (2016-01-23 00:04:56 UTC) #9
Dan Ehrenberg
On 2016/01/22 at 23:56:35, adamk wrote: > On 2016/01/22 23:47:06, Dan Ehrenberg wrote: > > ...
4 years, 11 months ago (2016-01-23 00:08:13 UTC) #10
adamk
On 2016/01/23 00:08:13, Dan Ehrenberg wrote: > On 2016/01/22 at 23:56:35, adamk wrote: > > ...
4 years, 11 months ago (2016-01-23 00:12:41 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1622723003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1622723003/40001
4 years, 11 months ago (2016-01-23 00:13:00 UTC) #14
Dan Ehrenberg
On 2016/01/23 at 00:08:13, Dan Ehrenberg wrote: > On 2016/01/22 at 23:56:35, adamk wrote: > ...
4 years, 11 months ago (2016-01-23 00:15:00 UTC) #15
Dan Ehrenberg
On 2016/01/23 at 00:12:41, adamk wrote: > On 2016/01/23 00:08:13, Dan Ehrenberg wrote: > > ...
4 years, 11 months ago (2016-01-23 00:16:06 UTC) #16
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 11 months ago (2016-01-23 00:40:22 UTC) #18
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/8aeb6080e11548c018e898a078a162c23a45f7b8 Cr-Commit-Position: refs/heads/master@{#33478}
4 years, 11 months ago (2016-01-23 00:41:03 UTC) #20
Michael Achenbach
Could you have a look why the dopt fuzzer isn't happy about this change? https://build.chromium.org/p/client.v8/builders/V8%20Deopt%20Fuzzer/builds/7477 ...
4 years, 11 months ago (2016-01-25 08:09:27 UTC) #21
adamk
On 2016/01/25 08:09:27, Michael Achenbach wrote: > Could you have a look why the dopt ...
4 years, 11 months ago (2016-01-25 19:10:17 UTC) #22
Dan Ehrenberg
4 years, 11 months ago (2016-01-25 20:04:03 UTC) #23
Message was sent while issue was closed.
On 2016/01/25 at 19:10:17, adamk wrote:
> On 2016/01/25 08:09:27, Michael Achenbach wrote:
> > Could you have a look why the dopt fuzzer isn't happy about this change?
> >
https://build.chromium.org/p/client.v8/builders/V8%20Deopt%20Fuzzer/builds/7477
> > 
> > Search for "webkit/function-declarations-in-switch-statement" in the output.
> 
> Looks like littledan took care of this in
https://codereview.chromium.org/1628013003?
> 
> I'm confused as to why this started failing on the Deopt Fuzzer, though, since
the test was already failing and marked "FAIL"; it just changed the way in which
it was failing.

Turns out the deopt fuzzer doesn't interpret failing test expectations all that
well. Previously, it was a syntax error, and with your patch, it became an
expectations mismatch. Long-term, this should probably be fixed in the test
infrastructure, but that patch seems to be enough for now.

Powered by Google App Engine
This is Rietveld 408576698