Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JSC] rename Array#group/Array#groupByToMap to Object.groupBy/Map.gro…
…upBy

https://bugs.webkit.org/show_bug.cgi?id=258680

Reviewed by Yusuke Suzuki.

Match the latest changes to the "array grouping" spec[1] (proposal[2]).

1. https://tc39.es/proposal-array-grouping/
2. https://github.com/tc39/proposal-array-grouping/

* Source/JavaScriptCore/builtins/ArrayPrototype.js:
(group): Deleted.
(groupToMap): Deleted.
* Source/JavaScriptCore/builtins/MapConstructor.js: Added.
(groupBy):
* Source/JavaScriptCore/builtins/ObjectConstructor.js:
(groupBy): Added.
* Source/JavaScriptCore/runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::finishCreation):
* Source/JavaScriptCore/runtime/MapConstructor.cpp:
(JSC::MapConstructor::finishCreation):
* Source/JavaScriptCore/runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::finishCreation):
* Source/JavaScriptCore/runtime/OptionsList.h:

* JSTests/stress/array-group-by-null-or-undefined.js: Removed.
* JSTests/stress/map-groupBy.js: Renamed from array-groupBy.js.
* JSTests/stress/object-groupBy.js: Renamed from array-groupByToMap.js.

* Source/JavaScriptCore/CMakeLists.txt:
* Source/JavaScriptCore/DerivedSources.make:
* Source/JavaScriptCore/DerivedSources-input.xcfilelist:
* Source/JavaScriptCore/DerivedSources-output.xcfilelist:
* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/265632@main
  • Loading branch information
dcrousso committed Jun 29, 2023
1 parent 72ba23e commit 8f5c359
Show file tree
Hide file tree
Showing 17 changed files with 373 additions and 413 deletions.
30 changes: 0 additions & 30 deletions JSTests/stress/array-group-by-null-or-undefined.js

This file was deleted.

162 changes: 0 additions & 162 deletions JSTests/stress/array-groupBy.js

This file was deleted.

161 changes: 0 additions & 161 deletions JSTests/stress/array-groupByToMap.js

This file was deleted.

0 comments on commit 8f5c359

Please sign in to comment.