Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: src/code-stub-assembler.cc

Issue 2680153005: [builtins] Array.prototype.filter implemented as a TurboFan code stub. (Closed)
Patch Set: Code comments. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/code-stub-assembler.cc
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc
index 6c9c8de8f409a1fe39643bf671cb4045ffb1219f..183a044953131492b29a62b2b859be6c34236eca 100644
--- a/src/code-stub-assembler.cc
+++ b/src/code-stub-assembler.cc
@@ -8080,6 +8080,16 @@ Node* CodeStubAssembler::AllocateJSArrayIterator(Node* array, Node* array_map,
return iterator;
}
+Node* CodeStubAssembler::ArraySpeciesCreate(Node* context, Node* originalArray,
+ Node* len) {
+ // TODO(mvstanton): Install a fast path as well, which avoids the runtime
+ // call.
+ Node* constructor =
+ CallRuntime(Runtime::kArraySpeciesConstructor, context, originalArray);
+ return ConstructJS(CodeFactory::Construct(isolate()), context, constructor,
+ len);
+}
+
Node* CodeStubAssembler::IsDetachedBuffer(Node* buffer) {
CSA_ASSERT(this, HasInstanceType(buffer, JS_ARRAY_BUFFER_TYPE));

Powered by Google App Engine
This is Rietveld 408576698