[ES6] Add Symbol.species properties to the relevant constructors
authorkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jan 2016 18:44:46 +0000 (18:44 +0000)
committerkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jan 2016 18:44:46 +0000 (18:44 +0000)
commit6ae574124ed3974d320d24cc95778e6ea4586e46
tree997a68af094215978b72f315bf7b9bb8fa244a63
parent67331cc200f7fd42d7f7d627eed071f6413185f5
[ES6] Add Symbol.species properties to the relevant constructors
https://bugs.webkit.org/show_bug.cgi?id=153339

Reviewed by Michael Saboff.

Source/JavaScriptCore:

This patch adds Symbol.species to the RegExp, Array, TypedArray, Map, Set, ArrayBuffer, and
Promise constructors.  The functions that use these properties will be added in a later
patch.

* builtins/GlobalObject.js:
(speciesGetter):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::finishCreation):
* runtime/ArrayConstructor.h:
(JSC::ArrayConstructor::create):
* runtime/BooleanConstructor.h:
(JSC::BooleanConstructor::create):
* runtime/CommonIdentifiers.h:
* runtime/DateConstructor.h:
(JSC::DateConstructor::create):
* runtime/ErrorConstructor.h:
(JSC::ErrorConstructor::create):
* runtime/JSArrayBufferConstructor.cpp:
(JSC::JSArrayBufferConstructor::finishCreation):
(JSC::JSArrayBufferConstructor::create):
* runtime/JSArrayBufferConstructor.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSInternalPromiseConstructor.cpp:
(JSC::JSInternalPromiseConstructor::create):
* runtime/JSInternalPromiseConstructor.h:
* runtime/JSPromiseConstructor.cpp:
(JSC::JSPromiseConstructor::create):
(JSC::JSPromiseConstructor::finishCreation):
* runtime/JSPromiseConstructor.h:
* runtime/JSTypedArrayViewConstructor.cpp:
(JSC::JSTypedArrayViewConstructor::finishCreation):
(JSC::JSTypedArrayViewConstructor::create): Deleted.
* runtime/JSTypedArrayViewConstructor.h:
(JSC::JSTypedArrayViewConstructor::create):
* runtime/MapConstructor.cpp:
(JSC::MapConstructor::finishCreation):
* runtime/MapConstructor.h:
(JSC::MapConstructor::create):
* runtime/NumberConstructor.h:
(JSC::NumberConstructor::create):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::finishCreation):
* runtime/RegExpConstructor.h:
(JSC::RegExpConstructor::create):
* runtime/SetConstructor.cpp:
(JSC::SetConstructor::finishCreation):
* runtime/SetConstructor.h:
(JSC::SetConstructor::create):
* runtime/StringConstructor.h:
(JSC::StringConstructor::create):
* runtime/SymbolConstructor.h:
(JSC::SymbolConstructor::create):
* runtime/WeakMapConstructor.h:
(JSC::WeakMapConstructor::create):
* runtime/WeakSetConstructor.h:
(JSC::WeakSetConstructor::create):
* tests/stress/symbol-species.js: Added.
(testSymbolSpeciesOnConstructor):

LayoutTests:

Add species to the list of property names on the Symbol object.

* js/Object-getOwnPropertyNames-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32 files changed:
LayoutTests/ChangeLog
LayoutTests/js/Object-getOwnPropertyNames-expected.txt
LayoutTests/js/script-tests/Object-getOwnPropertyNames.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/builtins/GlobalObject.js
Source/JavaScriptCore/runtime/ArrayConstructor.cpp
Source/JavaScriptCore/runtime/ArrayConstructor.h
Source/JavaScriptCore/runtime/BooleanConstructor.h
Source/JavaScriptCore/runtime/CommonIdentifiers.h
Source/JavaScriptCore/runtime/DateConstructor.h
Source/JavaScriptCore/runtime/ErrorConstructor.h
Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp
Source/JavaScriptCore/runtime/JSArrayBufferConstructor.h
Source/JavaScriptCore/runtime/JSGlobalObject.cpp
Source/JavaScriptCore/runtime/JSInternalPromiseConstructor.cpp
Source/JavaScriptCore/runtime/JSInternalPromiseConstructor.h
Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp
Source/JavaScriptCore/runtime/JSPromiseConstructor.h
Source/JavaScriptCore/runtime/JSTypedArrayViewConstructor.cpp
Source/JavaScriptCore/runtime/JSTypedArrayViewConstructor.h
Source/JavaScriptCore/runtime/MapConstructor.cpp
Source/JavaScriptCore/runtime/MapConstructor.h
Source/JavaScriptCore/runtime/NumberConstructor.h
Source/JavaScriptCore/runtime/RegExpConstructor.cpp
Source/JavaScriptCore/runtime/RegExpConstructor.h
Source/JavaScriptCore/runtime/SetConstructor.cpp
Source/JavaScriptCore/runtime/SetConstructor.h
Source/JavaScriptCore/runtime/StringConstructor.h
Source/JavaScriptCore/runtime/SymbolConstructor.h
Source/JavaScriptCore/runtime/WeakMapConstructor.h
Source/JavaScriptCore/runtime/WeakSetConstructor.h
Source/JavaScriptCore/tests/stress/symbol-species.js [new file with mode: 0644]