Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[JSC] Clean up ArraySpeciesCreate
https://bugs.webkit.org/show_bug.cgi?id=182434 Patch by Alexey Shvayka <shvaikalesh@gmail.com> on 2019-07-05 Reviewed by Yusuke Suzuki. JSTests: Adjusts error message expectations in stress tests. * stress/array-flatmap.js: * stress/array-flatten.js: * stress/array-species-create-should-handle-masquerader.js: * test262/expectations.yaml: Mark 4 test cases as passing. Source/JavaScriptCore: We have duplicate code in arraySpeciesCreate, filter, map, concatSlowPath of ArrayPrototype.js and speciesConstructArray of ArrayPrototype.cpp. This patch fixes cross-realm Array constructor detection in native speciesConstructArray, upgrades `length` type to correctly handle large integers, and exposes it as @arraySpeciesCreate. Also removes now unused @isArrayConstructor private function. Native speciesConstructArray is preferred because it has fast path via speciesWatchpointIsValid. Thoroughly benchmarked: this change progresses ARES-6 by 0-1%. * builtins/ArrayPrototype.js: (filter): (map): (globalPrivate.concatSlowPath): (globalPrivate.arraySpeciesCreate): Deleted. * builtins/BuiltinNames.h: * runtime/ArrayConstructor.cpp: (JSC::arrayConstructorPrivateFuncIsArrayConstructor): Deleted. * runtime/ArrayConstructor.h: * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncSpeciesCreate): * runtime/ArrayPrototype.h: * runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::init): Canonical link: https://commits.webkit.org/213436@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
995ee39
commit 323c73b380b78f0e7b7a5b07a5f008988b6c6199
Showing
13 changed files
with
82 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters