[ES2016] Implement Object.values
https://bugs.webkit.org/show_bug.cgi?id=160410
Reviewed by Saam Baraty, Yusuke Suzuki.
This patch adds values function to Object that return list of
own values of the object. Patch did according to the point of
spec http://tc39.github.io/ecma262/#sec-object.values
Also patch adds generic builtin intrinsic constants:
@IterationKindKey/@IterationKindValue/@IterationKindKeyValue
that is used in EnumerableOwnProperties to set Kind of operation
and replace own IterationKind enums in following iterators:
ArrayIterator, MapIterator, and SetIterator
Source/JavaScriptCore:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/ObjectConstructor.js:
(globalPrivate.enumerableOwnProperties):
(values):
* bytecode/BytecodeIntrinsicRegistry.cpp:
(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):
* bytecode/BytecodeIntrinsicRegistry.h:
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::getInternalProperties):
* runtime/ArrayIteratorPrototype.h:
* runtime/IterationKind.h: Copied from Source/JavaScriptCore/builtins/ObjectConstructor.js.
* runtime/JSMapIterator.h:
(JSC::JSMapIterator::create):
(JSC::JSMapIterator::next):
(JSC::JSMapIterator::kind):
(JSC::JSMapIterator::JSMapIterator):
* runtime/JSSetIterator.h:
(JSC::JSSetIterator::create):
(JSC::JSSetIterator::next):
(JSC::JSSetIterator::kind):
(JSC::JSSetIterator::JSSetIterator):
* runtime/MapPrototype.cpp:
(JSC::mapProtoFuncValues):
(JSC::mapProtoFuncEntries):
(JSC::mapProtoFuncKeys):
(JSC::privateFuncMapIterator):
* runtime/ObjectConstructor.cpp:
* runtime/SetPrototype.cpp:
(JSC::setProtoFuncValues):
(JSC::setProtoFuncEntries):
(JSC::privateFuncSetIterator):
Source/WebCore:
* ForwardingHeaders/runtime/IterationKind.h: Added.
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::serialize):
JSTests:
* stress/object-values.js: Added.
(compare):
(string_appeared_here.forEach):
(const.getInvokedFunctions.):
(const.getInvokedFunctions):
(Array.prototype.push):
LayoutTests:
* js/Object-getOwnPropertyNames-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204358
268f45cc-cd09-0410-ab3c-
d52691b4dbfc