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

Unified Diff: src/runtime/runtime-typedarray.cc

Issue 2814683002: [builtins] Implement %TypedArray%.prototype.map in the CSA (Closed)
Patch Set: added todo Created 3 years, 7 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
« no previous file with comments | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-typedarray.cc
diff --git a/src/runtime/runtime-typedarray.cc b/src/runtime/runtime-typedarray.cc
index ff02d84a72f5ebeff79c5f9fa8b4913ff59e87bb..a99ca7294b1012ef828c7e0d46c7bd1689b0d961 100644
--- a/src/runtime/runtime-typedarray.cc
+++ b/src/runtime/runtime-typedarray.cc
@@ -281,5 +281,21 @@ RUNTIME_FUNCTION(Runtime_IsSharedInteger32TypedArray) {
obj->type() == kExternalInt32Array);
}
+RUNTIME_FUNCTION(Runtime_TypedArraySpeciesCreateByLength) {
+ HandleScope scope(isolate);
+ DCHECK(args.length() == 2);
+ Handle<JSTypedArray> exemplar = args.at<JSTypedArray>(1);
+ Handle<Object> length = args.at(2);
+ int argc = 1;
+ ScopedVector<Handle<Object>> argv(argc);
+ argv[0] = length;
+ Handle<JSTypedArray> result_array;
+ // TODO(tebbi): Pass correct method name.
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
+ isolate, result_array,
+ JSTypedArray::SpeciesCreate(isolate, exemplar, argc, argv.start(), ""));
+ return *result_array;
+}
+
} // namespace internal
} // namespace v8
« no previous file with comments | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698