Commit 7d60f78a authored by Franziska Hinkelmann's avatar Franziska Hinkelmann Committed by Commit Bot

[builtins] Move TypedArrayPrototypeSet to builtins

Bug: v8:6704
Change-Id: I77388b91061f934943a707a645080dfdcf481836
Reviewed-on: https://chromium-review.googlesource.com/645951Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47756}
parent d5c1730a
......@@ -2904,6 +2904,8 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
Builtins::kTypedArrayPrototypeReduce, 1, false);
SimpleInstallFunction(prototype, "reduceRight",
Builtins::kTypedArrayPrototypeReduceRight, 1, false);
SimpleInstallFunction(prototype, "set", Builtins::kTypedArrayPrototypeSet,
1, false);
SimpleInstallFunction(prototype, "slice",
Builtins::kTypedArrayPrototypeSlice, 2, false);
SimpleInstallFunction(prototype, "some", Builtins::kTypedArrayPrototypeSome,
......
......@@ -987,6 +987,8 @@ namespace internal {
CPP(TypedArrayPrototypeLastIndexOf) \
/* ES6 #sec-%typedarray%.prototype.reverse */ \
CPP(TypedArrayPrototypeReverse) \
/* ES6 %TypedArray%.prototype.set */ \
CPP(TypedArrayPrototypeSet) \
/* ES6 #sec-%typedarray%.prototype.slice */ \
CPP(TypedArrayPrototypeSlice) \
/* ES6 %TypedArray%.prototype.every */ \
......
This diff is collapsed.
......@@ -250,17 +250,6 @@ TYPED_ARRAYS(TYPED_ARRAY_SUBARRAY_CASE)
%SetForceInlineFlag(GlobalTypedArray.prototype.subarray);
// 22.2.3.23%TypedArray%.prototype.set ( overloaded [ , offset ] )
DEFINE_METHOD_LEN(
GlobalTypedArray.prototype,
set(obj, offset) {
// TODO(franzih): Migrate this to a proper builtin.
%_TypedArrayPrototypeSet(this, obj, offset);
},
1 /* Set function length. */
);
DEFINE_METHOD(
GlobalTypedArray.prototype,
get [toStringTagSymbol]() {
......
This diff is collapsed.
......@@ -623,7 +623,6 @@ namespace internal {
F(ArrayBufferViewWasNeutered, 1, 1) \
F(TypedArrayGetLength, 1, 1) \
F(TypedArrayGetBuffer, 1, 1) \
F(TypedArrayPrototypeSet, 3, 1) \
F(TypedArraySortFast, 1, 1) \
F(TypedArrayMaxSizeInHeap, 0, 1) \
F(IsTypedArray, 1, 1) \
......
......@@ -5,5 +5,5 @@
a.set([2], -1);
^
RangeError: Start offset is negative
at Uint8Array.set (native)
at Uint8Array.set (<anonymous>)
at *%(basename)s:6:3
\ No newline at end of file
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