RESOLVED FIXED 157786
Function with default parameter values that are arrow functions that capture this isn't working
https://bugs.webkit.org/show_bug.cgi?id=157786
Summary Function with default parameter values that are arrow functions that capture ...
Saam Barati
Reported 2016-05-16 22:44:33 PDT
I.e function foo(x = ()=>this) { return x() }
Attachments
patch (21.20 KB, patch)
2016-05-18 16:49 PDT, Saam Barati
ggaren: review+
patch for landing (21.17 KB, patch)
2016-05-18 17:55 PDT, Saam Barati
no flags
patch for landing (21.12 KB, patch)
2016-05-18 17:56 PDT, Saam Barati
no flags
Saam Barati
Comment 1 2016-05-16 23:03:25 PDT
This might actually be fixed on TOT. I'll check
Saam Barati
Comment 2 2016-05-17 11:51:03 PDT
this is broken in ToT
Radar WebKit Bug Importer
Comment 3 2016-05-17 12:01:24 PDT
GSkachkov
Comment 4 2016-05-17 13:08:27 PDT
Ups. Looks like very close to already fixed issue :-( https://bugs.webkit.org/show_bug.cgi?id=157079 We did store of foo's 'this' in lexical scope after we generate default values in initializeDefaultParameterValuesAndSetupFunctionScopeStack. So we need to store 'this' earlier
Saam Barati
Comment 5 2016-05-18 16:49:35 PDT
WebKit Commit Bot
Comment 6 2016-05-18 16:50:36 PDT
Attachment 279318 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:860: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:814: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:973: Missing space before { [whitespace/braces] [5] Total errors found: 3 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Geoffrey Garen
Comment 7 2016-05-18 17:19:00 PDT
Comment on attachment 279318 [details] patch r=me
Saam Barati
Comment 8 2016-05-18 17:55:34 PDT
Created attachment 279327 [details] patch for landing
WebKit Commit Bot
Comment 9 2016-05-18 17:56:32 PDT
Attachment 279327 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:860: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:814: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:973: Missing space before { [whitespace/braces] [5] Total errors found: 3 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Saam Barati
Comment 10 2016-05-18 17:56:35 PDT
Created attachment 279328 [details] patch for landing
WebKit Commit Bot
Comment 11 2016-05-18 17:59:07 PDT
Attachment 279328 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:860: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:813: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:972: Missing space before { [whitespace/braces] [5] Total errors found: 3 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 12 2016-05-18 18:26:50 PDT
Comment on attachment 279328 [details] patch for landing Clearing flags on attachment: 279328 Committed r201122: <http://trac.webkit.org/changeset/201122>
WebKit Commit Bot
Comment 13 2016-05-18 18:26:54 PDT
All reviewed patches have been landed. Closing bug.
Benjamin Poulain
Comment 14 2016-05-18 21:34:02 PDT
There is a 7x regression in Sunspider's tofte. This patch is the only one in the range on Mozilla's bot. Our bots also show the regression.
Saam Barati
Comment 15 2016-05-19 09:58:57 PDT
(In reply to comment #14) > There is a 7x regression in Sunspider's tofte. This patch is the only one in > the range on Mozilla's bot. > > Our bots also show the regression. Ok. I'm fairly sure I know what would cause this. I'll fix when I get into the office.
Chris Dumez
Comment 16 2016-05-19 10:08:42 PDT
We see a ~5% JetStream regression on iOS in this range.
Saam Barati
Comment 17 2016-05-19 12:14:13 PDT
Note You need to log in before you can comment on or make changes to this bug.