Commit 7f6736f2 authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

[gasm] Port the Array.p.{includes,indexOf} reduction

Bug: v8:9972
Change-Id: Ieed4ba6648a20a9b372888d75e8eb7617acdf562
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1981490
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65566}
parent 06313e39
This diff is collapsed.
...@@ -62,7 +62,6 @@ class V8_EXPORT_PRIVATE JSCallReducer final : public AdvancedReducer { ...@@ -62,7 +62,6 @@ class V8_EXPORT_PRIVATE JSCallReducer final : public AdvancedReducer {
void Finalize() final; void Finalize() final;
private: private:
Reduction ReduceArrayConstructor(Node* node);
Reduction ReduceBooleanConstructor(Node* node); Reduction ReduceBooleanConstructor(Node* node);
Reduction ReduceCallApiFunction(Node* node, Reduction ReduceCallApiFunction(Node* node,
const SharedFunctionInfoRef& shared); const SharedFunctionInfoRef& shared);
...@@ -83,25 +82,27 @@ class V8_EXPORT_PRIVATE JSCallReducer final : public AdvancedReducer { ...@@ -83,25 +82,27 @@ class V8_EXPORT_PRIVATE JSCallReducer final : public AdvancedReducer {
Reduction ReduceReflectGet(Node* node); Reduction ReduceReflectGet(Node* node);
Reduction ReduceReflectGetPrototypeOf(Node* node); Reduction ReduceReflectGetPrototypeOf(Node* node);
Reduction ReduceReflectHas(Node* node); Reduction ReduceReflectHas(Node* node);
Reduction ReduceArrayForEach(Node* node, const SharedFunctionInfoRef& shared);
Reduction ReduceArrayReduce(Node* node, const SharedFunctionInfoRef& shared); Reduction ReduceArrayConstructor(Node* node);
Reduction ReduceArrayReduceRight(Node* node, Reduction ReduceArrayEvery(Node* node, const SharedFunctionInfoRef& shared);
const SharedFunctionInfoRef& shared);
Reduction ReduceArrayMap(Node* node, const SharedFunctionInfoRef& shared);
Reduction ReduceArrayFilter(Node* node, const SharedFunctionInfoRef& shared); Reduction ReduceArrayFilter(Node* node, const SharedFunctionInfoRef& shared);
Reduction ReduceArrayFind(Node* node, const SharedFunctionInfoRef& shared);
Reduction ReduceArrayFindIndex(Node* node, Reduction ReduceArrayFindIndex(Node* node,
const SharedFunctionInfoRef& shared); const SharedFunctionInfoRef& shared);
Reduction ReduceArrayEvery(Node* node, const SharedFunctionInfoRef& shared); Reduction ReduceArrayFind(Node* node, const SharedFunctionInfoRef& shared);
enum class SearchVariant { kIncludes, kIndexOf }; Reduction ReduceArrayForEach(Node* node, const SharedFunctionInfoRef& shared);
Reduction ReduceArrayIndexOfIncludes(SearchVariant search_variant, Reduction ReduceArrayIncludes(Node* node);
Node* node); Reduction ReduceArrayIndexOf(Node* node);
Reduction ReduceArraySome(Node* node, const SharedFunctionInfoRef& shared); Reduction ReduceArrayIsArray(Node* node);
Reduction ReduceArrayPrototypePush(Node* node); Reduction ReduceArrayMap(Node* node, const SharedFunctionInfoRef& shared);
Reduction ReduceArrayPrototypePop(Node* node); Reduction ReduceArrayPrototypePop(Node* node);
Reduction ReduceArrayPrototypePush(Node* node);
Reduction ReduceArrayPrototypeShift(Node* node); Reduction ReduceArrayPrototypeShift(Node* node);
Reduction ReduceArrayPrototypeSlice(Node* node); Reduction ReduceArrayPrototypeSlice(Node* node);
Reduction ReduceArrayIsArray(Node* node); Reduction ReduceArrayReduce(Node* node, const SharedFunctionInfoRef& shared);
Reduction ReduceArrayReduceRight(Node* node,
const SharedFunctionInfoRef& shared);
Reduction ReduceArraySome(Node* node, const SharedFunctionInfoRef& shared);
enum class ArrayIteratorKind { kArray, kTypedArray }; enum class ArrayIteratorKind { kArray, kTypedArray };
Reduction ReduceArrayIterator(Node* node, IterationKind kind); Reduction ReduceArrayIterator(Node* node, IterationKind kind);
Reduction ReduceArrayIteratorPrototypeNext(Node* node); Reduction ReduceArrayIteratorPrototypeNext(Node* node);
...@@ -222,21 +223,6 @@ class V8_EXPORT_PRIVATE JSCallReducer final : public AdvancedReducer { ...@@ -222,21 +223,6 @@ class V8_EXPORT_PRIVATE JSCallReducer final : public AdvancedReducer {
Node* effect, Node** check_fail, Node* effect, Node** check_fail,
Node** control); Node** control);
// Begin the central loop of a higher-order array builtin. A Loop is wired
// into {control}, an EffectPhi into {effect}, and the array index {k} is
// threaded into a Phi, which is returned. It's helpful to save the
// value of {control} as the loop node, and of {effect} as the corresponding
// EffectPhi after function return.
Node* WireInLoopStart(Node* k, Node** control, Node** effect);
void WireInLoopEnd(Node* loop, Node* eloop, Node* vloop, Node* k,
Node* control, Node* effect);
// Load receiver[k], first bounding k by receiver array length.
// k is thusly changed, and the effect is changed as well.
Node* SafeLoadElement(ElementsKind kind, Node* receiver, Node* control,
Node** effect, Node** k,
const FeedbackSource& feedback);
Node* CreateArtificialFrameState(Node* node, Node* outer_frame_state, Node* CreateArtificialFrameState(Node* node, Node* outer_frame_state,
int parameter_count, BailoutId bailout_id, int parameter_count, BailoutId bailout_id,
FrameStateType frame_state_type, FrameStateType frame_state_type,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment