Title: [206610] trunk
- Revision
- 206610
- Author
- joep...@webkit.org
- Date
- 2016-09-29 13:33:21 -0700 (Thu, 29 Sep 2016)
Log Message
Arrow functions do not infer name from computed property but normal functions do
https://bugs.webkit.org/show_bug.cgi?id=162720
Reviewed by Saam Barati.
JSTests:
* stress/inferred-names.js:
Source/_javascript_Core:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitSetFunctionNameIfNeeded):
Set function name on arrow functions as well.
Modified Paths
Diff
Modified: trunk/JSTests/ChangeLog (206609 => 206610)
--- trunk/JSTests/ChangeLog 2016-09-29 20:21:54 UTC (rev 206609)
+++ trunk/JSTests/ChangeLog 2016-09-29 20:33:21 UTC (rev 206610)
@@ -1,3 +1,12 @@
+2016-09-29 Joseph Pecoraro <pecor...@apple.com>
+
+ Arrow functions do not infer name from computed property but normal functions do
+ https://bugs.webkit.org/show_bug.cgi?id=162720
+
+ Reviewed by Saam Barati.
+
+ * stress/inferred-names.js:
+
2016-09-29 Mark Lam <mark....@apple.com>
Break some slow running tests into smaller bits so they don't time out.
Modified: trunk/JSTests/stress/inferred-names.js (206609 => 206610)
--- trunk/JSTests/stress/inferred-names.js 2016-09-29 20:21:54 UTC (rev 206609)
+++ trunk/JSTests/stress/inferred-names.js 2016-09-29 20:33:21 UTC (rev 206610)
@@ -70,9 +70,8 @@
assert( ({"func": ()=>{}}).func.name === "func" );
assert( ({func: ()=>{}}).func.name === "func" );
-// FIXME: <https://webkit.org/b/162720> Arrow functions do not infer name from computed property but normal functions do
-// assert( ({["func"]: ()=>{}}).func.name === "func" );
-// assert( ({[funcName()]: ()=>{}}).func.name === "func" );
+assert( ({["func"]: ()=>{}}).func.name === "func" );
+assert( ({[funcName()]: ()=>{}}).func.name === "func" );
assert( ({"klass": class{}}).klass.name === "klass" );
assert( ({klass: class{}}).klass.name === "klass" );
Modified: trunk/Source/_javascript_Core/ChangeLog (206609 => 206610)
--- trunk/Source/_javascript_Core/ChangeLog 2016-09-29 20:21:54 UTC (rev 206609)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-09-29 20:33:21 UTC (rev 206610)
@@ -1,5 +1,16 @@
2016-09-29 Joseph Pecoraro <pecor...@apple.com>
+ Arrow functions do not infer name from computed property but normal functions do
+ https://bugs.webkit.org/show_bug.cgi?id=162720
+
+ Reviewed by Saam Barati.
+
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::emitSetFunctionNameIfNeeded):
+ Set function name on arrow functions as well.
+
+2016-09-29 Joseph Pecoraro <pecor...@apple.com>
+
test262: class and function names should be inferred in assignment
https://bugs.webkit.org/show_bug.cgi?id=146262
Modified: trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp (206609 => 206610)
--- trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp 2016-09-29 20:21:54 UTC (rev 206609)
+++ trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp 2016-09-29 20:33:21 UTC (rev 206610)
@@ -3044,8 +3044,8 @@
void BytecodeGenerator::emitSetFunctionNameIfNeeded(ExpressionNode* valueNode, RegisterID* value, RegisterID* name)
{
- if (valueNode->isFuncExprNode()) {
- FunctionMetadataNode* metadata = static_cast<FuncExprNode*>(valueNode)->metadata();
+ if (valueNode->isBaseFuncExprNode()) {
+ FunctionMetadataNode* metadata = static_cast<BaseFuncExprNode*>(valueNode)->metadata();
if (!metadata->ecmaName().isNull())
return;
} else if (valueNode->isClassExprNode()) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes