haikuwebkit/LayoutTests/js/array-iterators.html

11 lines
253 B
HTML
Raw Permalink Normal View History

Implement Array key, value and entries iterators https://bugs.webkit.org/show_bug.cgi?id=122195 Reviewed by Filip Pizlo. Source/JavaScriptCore: Add implementation of ES6 Array iterators for keys(), values() and entries() Fairly self explanatory as we just need a simple implementation so that we can implement and test other features. * JavaScriptCore.xcodeproj/project.pbxproj: * runtime/ArrayIteratorConstructor.cpp: Added. (JSC::ArrayIteratorConstructor::finishCreation): * runtime/ArrayIteratorConstructor.h: Added. (JSC::ArrayIteratorConstructor::create): (JSC::ArrayIteratorConstructor::createStructure): (JSC::ArrayIteratorConstructor::ArrayIteratorConstructor): * runtime/ArrayIteratorPrototype.cpp: Added. (JSC::ArrayIteratorPrototype::finishCreation): (JSC::createIteratorResult): (JSC::arrayIteratorPrototypeNext): * runtime/ArrayIteratorPrototype.h: Added. (JSC::ArrayIteratorPrototype::create): (JSC::ArrayIteratorPrototype::createStructure): (JSC::ArrayIteratorPrototype::ArrayIteratorPrototype): * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncValues): (JSC::arrayProtoFuncEntries): (JSC::arrayProtoFuncKeys): * runtime/CommonIdentifiers.h: * runtime/Identifier.h: (JSC::Identifier::createEmptyUnique): * runtime/JSArrayIterator.cpp: Added. (JSC::JSArrayIterator::finishCreation): * runtime/JSArrayIterator.h: Added. (JSC::JSArrayIterator::createStructure): (JSC::JSArrayIterator::create): (JSC::JSArrayIterator::iterationKind): (JSC::JSArrayIterator::iteratedObject): (JSC::JSArrayIterator::nextIndex): (JSC::JSArrayIterator::setNextIndex): (JSC::JSArrayIterator::finish): (JSC::JSArrayIterator::JSArrayIterator): * runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::reset): * runtime/JSGlobalObject.h: (JSC::JSGlobalObject::iteratorResultStructure): LayoutTests: Add tests * js/Object-getOwnPropertyNames-expected.txt: * js/array-iterators-expected.txt: Added. * js/array-iterators.html: Added. * js/script-tests/Object-getOwnPropertyNames.js: * js/script-tests/array-iterators.js: Added. Canonical link: https://commits.webkit.org/140275@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-10-02 20:34:09 +00:00
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body>
<script src="script-tests/array-iterators.js"></script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>