[JSC] Rename item() to at() and move it behind a flag
https://bugs.webkit.org/show_bug.cgi?id=217942
Reviewed by Yusuke Suzuki.
JSTests:
* stress/at-method.js: Renamed from JSTests/stress/item-method.js.
* test262/config.yaml: Add skips until the feature is renamed.
Source/JavaScriptCore:
{Array, %TypedArray%}.prototype.item is official web-incompatible,
but it is expected to be renamed to `at` instead of being scrapped entirely:
https://github.com/tc39/proposal-item-method/issues/34
This patch performs the renaming, but does so behind a runtime flag since this has yet to achieve consensus.
* builtins/ArrayPrototype.js:
(at):
(item): Deleted.
* builtins/TypedArrayPrototype.js:
(at):
(item): Deleted.
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::finishCreation):
* runtime/JSTypedArrayViewPrototype.cpp:
(JSC::JSTypedArrayViewPrototype::finishCreation):
* runtime/OptionsList.h:
LayoutTests:
* inspector/model/remote-object-get-properties-expected.txt:
* js/array-unscopables-properties-expected.txt:
* js/Object-getOwnPropertyNames-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:
* js/script-tests/array-unscopables-properties.js:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JSTests/ChangeLog b/JSTests/ChangeLog
index f2065fa..66baf81 100644
--- a/JSTests/ChangeLog
+++ b/JSTests/ChangeLog
@@ -1,3 +1,13 @@
+2020-10-20 Ross Kirsling <ross.kirsling@sony.com>
+
+ [JSC] Rename item() to at() and move it behind a flag
+ https://bugs.webkit.org/show_bug.cgi?id=217942
+
+ Reviewed by Yusuke Suzuki.
+
+ * stress/at-method.js: Renamed from JSTests/stress/item-method.js.
+ * test262/config.yaml: Add skips until the feature is renamed.
+
2020-10-19 Alexey Shvayka <shvaikalesh@gmail.com>
[WebIDL] %Interface%.prototype.constructor should be defined on [[Set]] receiver
diff --git a/JSTests/stress/at-method.js b/JSTests/stress/at-method.js
new file mode 100644
index 0000000..91e627b
--- /dev/null
+++ b/JSTests/stress/at-method.js
@@ -0,0 +1,51 @@
+//@ requireOptions("--useAtMethod=1")
+
+function shouldBe(actual, expected) {
+ if (actual !== expected)
+ throw new Error(`expected ${expected} but got ${actual}`);
+}
+
+function shouldThrowTypeError(func) {
+ let error;
+ try {
+ func();
+ } catch (e) {
+ error = e;
+ }
+
+ if (!(error instanceof TypeError))
+ throw new Error('Expected TypeError!');
+}
+
+shouldBe(Array.prototype.at.length, 1);
+shouldThrowTypeError(() => Array.prototype.at.call(undefined));
+shouldThrowTypeError(() => Array.prototype.at.call(null));
+
+const array = [42, 'b', true];
+// intentionally go one too far to ensure that we get undefined instead of wrapping
+for (let i = 0; i <= array.length; i++) {
+ shouldBe(array.at(i), array[i]);
+ shouldBe(array.at(-i - 1), array[array.length - i - 1]);
+}
+shouldBe(array.at(), array[0]);
+shouldBe(array.at(null), array[0]);
+shouldBe(array.at({ valueOf: () => -1 }), array[array.length - 1]);
+
+const weirdArrayLike = { length: 1, get '0'() { return 3; }, get '1'() { throw 'oops'; } };
+shouldBe(Array.prototype.at.call(weirdArrayLike, 0), 3);
+shouldBe(Array.prototype.at.call(weirdArrayLike, 1), undefined);
+
+for (const TA of [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array]) {
+ shouldBe(TA.prototype.at.length, 1);
+ shouldThrowTypeError(() => TA.prototype.at.call([]));
+
+ const ta = [1, 2, 3];
+ // intentionally go one too far to ensure that we get undefined instead of wrapping
+ for (let i = 0; i <= ta.length; i++) {
+ shouldBe(ta.at(i), ta[i]);
+ shouldBe(ta.at(-i - 1), ta[ta.length - i - 1]);
+ }
+ shouldBe(ta.at(), ta[0]);
+ shouldBe(ta.at(null), ta[0]);
+ shouldBe(ta.at({ valueOf: () => -1 }), ta[ta.length - 1]);
+}
diff --git a/JSTests/stress/item-method.js b/JSTests/stress/item-method.js
deleted file mode 100644
index fa6a677..0000000
--- a/JSTests/stress/item-method.js
+++ /dev/null
@@ -1,49 +0,0 @@
-function shouldBe(actual, expected) {
- if (actual !== expected)
- throw new Error(`expected ${expected} but got ${actual}`);
-}
-
-function shouldThrowTypeError(func) {
- let error;
- try {
- func();
- } catch (e) {
- error = e;
- }
-
- if (!(error instanceof TypeError))
- throw new Error('Expected TypeError!');
-}
-
-shouldBe(Array.prototype.item.length, 1);
-shouldThrowTypeError(() => Array.prototype.item.call(undefined));
-shouldThrowTypeError(() => Array.prototype.item.call(null));
-
-const array = [42, 'b', true];
-// intentionally go one too far to ensure that we get undefined instead of wrapping
-for (let i = 0; i <= array.length; i++) {
- shouldBe(array.item(i), array[i]);
- shouldBe(array.item(-i - 1), array[array.length - i - 1]);
-}
-shouldBe(array.item(), array[0]);
-shouldBe(array.item(null), array[0]);
-shouldBe(array.item({ valueOf: () => -1 }), array[array.length - 1]);
-
-const weirdArrayLike = { length: 1, get '0'() { return 3; }, get '1'() { throw 'oops'; } };
-shouldBe(Array.prototype.item.call(weirdArrayLike, 0), 3);
-shouldBe(Array.prototype.item.call(weirdArrayLike, 1), undefined);
-
-for (const TA of [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array]) {
- shouldBe(TA.prototype.item.length, 1);
- shouldThrowTypeError(() => TA.prototype.item.call([]));
-
- const ta = [1, 2, 3];
- // intentionally go one too far to ensure that we get undefined instead of wrapping
- for (let i = 0; i <= ta.length; i++) {
- shouldBe(ta.item(i), ta[i]);
- shouldBe(ta.item(-i - 1), ta[ta.length - i - 1]);
- }
- shouldBe(ta.item(), ta[0]);
- shouldBe(ta.item(null), ta[0]);
- shouldBe(ta.item({ valueOf: () => -1 }), ta[ta.length - 1]);
-}
diff --git a/JSTests/stress/unscopables.js b/JSTests/stress/unscopables.js
index aa01cd7..26b7fef 100644
--- a/JSTests/stress/unscopables.js
+++ b/JSTests/stress/unscopables.js
@@ -1,3 +1,5 @@
+//@ requireOptions("--useAtMethod=1")
+
function test(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
@@ -9,7 +11,7 @@
test(typeof unscopables, "object");
test(unscopables.__proto__, undefined);
- test(String(Object.keys(unscopables).sort()), "copyWithin,entries,fill,find,findIndex,flat,flatMap,includes,item,keys,values");
+ test(String(Object.keys(unscopables).sort()), "at,copyWithin,entries,fill,find,findIndex,flat,flatMap,includes,keys,values");
}());
(function () {
diff --git a/JSTests/test262/config.yaml b/JSTests/test262/config.yaml
index 31d88ec..b914967 100644
--- a/JSTests/test262/config.yaml
+++ b/JSTests/test262/config.yaml
@@ -27,6 +27,10 @@
- top-level-await
- Intl.ListFormat
+ # remove once it's been renamed in test262
+ - Array.prototype.item
+ - TypedArray.prototype.item
+
# remove once it's no longer in test262
- String.prototype.item
paths:
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 532a016..acb7d1a 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2020-10-20 Ross Kirsling <ross.kirsling@sony.com>
+
+ [JSC] Rename item() to at() and move it behind a flag
+ https://bugs.webkit.org/show_bug.cgi?id=217942
+
+ Reviewed by Yusuke Suzuki.
+
+ * inspector/model/remote-object-get-properties-expected.txt:
+ * js/array-unscopables-properties-expected.txt:
+ * js/Object-getOwnPropertyNames-expected.txt:
+ * js/script-tests/Object-getOwnPropertyNames.js:
+ * js/script-tests/array-unscopables-properties.js:
+
2020-10-20 Diego Pino Garcia <dpino@igalia.com>
[GLIB][GTK] Unreviewed test gardening. Gardened several flaky crash tests.
diff --git a/LayoutTests/inspector/model/remote-object-get-properties-expected.txt b/LayoutTests/inspector/model/remote-object-get-properties-expected.txt
index de7c91a..f5ae3f6 100644
--- a/LayoutTests/inspector/model/remote-object-get-properties-expected.txt
+++ b/LayoutTests/inspector/model/remote-object-get-properties-expected.txt
@@ -85,7 +85,6 @@
findIndex
includes
copyWithin
- item
constructor
Symbol(Symbol.iterator)
Symbol(Symbol.unscopables)
@@ -139,7 +138,6 @@
findIndex
includes
copyWithin
- item
constructor
Symbol(Symbol.iterator)
Symbol(Symbol.unscopables)
@@ -178,7 +176,6 @@
findIndex
includes
copyWithin
- item
constructor
Symbol(Symbol.iterator)
Symbol(Symbol.unscopables)
@@ -217,7 +214,6 @@
findIndex
includes
copyWithin
- item
constructor
Symbol(Symbol.iterator)
Symbol(Symbol.unscopables)
diff --git a/LayoutTests/js/Object-getOwnPropertyNames-expected.txt b/LayoutTests/js/Object-getOwnPropertyNames-expected.txt
index 53bae24..221241a 100644
--- a/LayoutTests/js/Object-getOwnPropertyNames-expected.txt
+++ b/LayoutTests/js/Object-getOwnPropertyNames-expected.txt
@@ -47,7 +47,7 @@
PASS getSortedOwnPropertyNames(Function) is ['length', 'name', 'prototype']
PASS getSortedOwnPropertyNames(Function.prototype) is ['apply', 'arguments', 'bind', 'call', 'caller', 'constructor', 'length', 'name', 'toString']
PASS getSortedOwnPropertyNames(Array) is ['from', 'isArray', 'length', 'name', 'of', 'prototype']
-PASS getSortedOwnPropertyNames(Array.prototype) is ['concat', 'constructor', 'copyWithin', 'entries', 'every', 'fill', 'filter', 'find', 'findIndex', 'flat', 'flatMap', 'forEach', 'includes', 'indexOf', 'item', 'join', 'keys', 'lastIndexOf', 'length', 'map', 'pop', 'push', 'reduce', 'reduceRight', 'reverse', 'shift', 'slice', 'some', 'sort', 'splice', 'toLocaleString', 'toString', 'unshift', 'values']
+PASS getSortedOwnPropertyNames(Array.prototype) is ['concat', 'constructor', 'copyWithin', 'entries', 'every', 'fill', 'filter', 'find', 'findIndex', 'flat', 'flatMap', 'forEach', 'includes', 'indexOf', 'join', 'keys', 'lastIndexOf', 'length', 'map', 'pop', 'push', 'reduce', 'reduceRight', 'reverse', 'shift', 'slice', 'some', 'sort', 'splice', 'toLocaleString', 'toString', 'unshift', 'values']
PASS getSortedOwnPropertyNames(String) is ['fromCharCode', 'fromCodePoint', 'length', 'name', 'prototype', 'raw']
PASS getSortedOwnPropertyNames(String.prototype) is ['anchor', 'big', 'blink', 'bold', 'charAt', 'charCodeAt', 'codePointAt', 'concat', 'constructor', 'endsWith', 'fixed', 'fontcolor', 'fontsize', 'includes', 'indexOf', 'italics', 'lastIndexOf', 'length', 'link', 'localeCompare', 'match', 'matchAll', 'normalize', 'padEnd', 'padStart', 'repeat', 'replace', 'replaceAll', 'search', 'slice', 'small', 'split', 'startsWith', 'strike', 'sub', 'substr', 'substring', 'sup', 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toString', 'toUpperCase', 'trim', 'trimEnd', 'trimLeft', 'trimRight', 'trimStart', 'valueOf']
PASS getSortedOwnPropertyNames(Boolean) is ['length', 'name', 'prototype']
diff --git a/LayoutTests/js/array-unscopables-properties-expected.txt b/LayoutTests/js/array-unscopables-properties-expected.txt
index c406b86..ffa6bb1 100644
--- a/LayoutTests/js/array-unscopables-properties-expected.txt
+++ b/LayoutTests/js/array-unscopables-properties-expected.txt
@@ -42,10 +42,6 @@
PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "includes").writable is true
PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "includes").enumerable is true
PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "includes").configurable is true
-PASS Array.prototype[Symbol.unscopables]["item"] is true
-PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "item").writable is true
-PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "item").enumerable is true
-PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "item").configurable is true
PASS Array.prototype[Symbol.unscopables]["keys"] is true
PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "keys").writable is true
PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "keys").enumerable is true
diff --git a/LayoutTests/js/script-tests/Object-getOwnPropertyNames.js b/LayoutTests/js/script-tests/Object-getOwnPropertyNames.js
index ff0f9d3..cb01349 100644
--- a/LayoutTests/js/script-tests/Object-getOwnPropertyNames.js
+++ b/LayoutTests/js/script-tests/Object-getOwnPropertyNames.js
@@ -56,7 +56,7 @@
"Function": "['length', 'name', 'prototype']",
"Function.prototype": "['apply', 'arguments', 'bind', 'call', 'caller', 'constructor', 'length', 'name', 'toString']",
"Array": "['from', 'isArray', 'length', 'name', 'of', 'prototype']",
- "Array.prototype": "['concat', 'constructor', 'copyWithin', 'entries', 'every', 'fill', 'filter', 'find', 'findIndex', 'flat', 'flatMap', 'forEach', 'includes', 'indexOf', 'item', 'join', 'keys', 'lastIndexOf', 'length', 'map', 'pop', 'push', 'reduce', 'reduceRight', 'reverse', 'shift', 'slice', 'some', 'sort', 'splice', 'toLocaleString', 'toString', 'unshift', 'values']",
+ "Array.prototype": "['concat', 'constructor', 'copyWithin', 'entries', 'every', 'fill', 'filter', 'find', 'findIndex', 'flat', 'flatMap', 'forEach', 'includes', 'indexOf', 'join', 'keys', 'lastIndexOf', 'length', 'map', 'pop', 'push', 'reduce', 'reduceRight', 'reverse', 'shift', 'slice', 'some', 'sort', 'splice', 'toLocaleString', 'toString', 'unshift', 'values']",
"String": "['fromCharCode', 'fromCodePoint', 'length', 'name', 'prototype', 'raw']",
"String.prototype": "['anchor', 'big', 'blink', 'bold', 'charAt', 'charCodeAt', 'codePointAt', 'concat', 'constructor', 'endsWith', 'fixed', 'fontcolor', 'fontsize', 'includes', 'indexOf', 'italics', 'lastIndexOf', 'length', 'link', 'localeCompare', 'match', 'matchAll', 'normalize', 'padEnd', 'padStart', 'repeat', 'replace', 'replaceAll', 'search', 'slice', 'small', 'split', 'startsWith', 'strike', 'sub', 'substr', 'substring', 'sup', 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toString', 'toUpperCase', 'trim', 'trimEnd', 'trimLeft', 'trimRight', 'trimStart', 'valueOf']",
"Boolean": "['length', 'name', 'prototype']",
diff --git a/LayoutTests/js/script-tests/array-unscopables-properties.js b/LayoutTests/js/script-tests/array-unscopables-properties.js
index 224db95..ea60b38 100644
--- a/LayoutTests/js/script-tests/array-unscopables-properties.js
+++ b/LayoutTests/js/script-tests/array-unscopables-properties.js
@@ -15,7 +15,6 @@
"flat",
"flatMap",
"includes",
- "item",
"keys",
"values"
];
diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index 6e9df32..78707cd 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,28 @@
+2020-10-20 Ross Kirsling <ross.kirsling@sony.com>
+
+ [JSC] Rename item() to at() and move it behind a flag
+ https://bugs.webkit.org/show_bug.cgi?id=217942
+
+ Reviewed by Yusuke Suzuki.
+
+ {Array, %TypedArray%}.prototype.item is official web-incompatible,
+ but it is expected to be renamed to `at` instead of being scrapped entirely:
+ https://github.com/tc39/proposal-item-method/issues/34
+
+ This patch performs the renaming, but does so behind a runtime flag since this has yet to achieve consensus.
+
+ * builtins/ArrayPrototype.js:
+ (at):
+ (item): Deleted.
+ * builtins/TypedArrayPrototype.js:
+ (at):
+ (item): Deleted.
+ * runtime/ArrayPrototype.cpp:
+ (JSC::ArrayPrototype::finishCreation):
+ * runtime/JSTypedArrayViewPrototype.cpp:
+ (JSC::JSTypedArrayViewPrototype::finishCreation):
+ * runtime/OptionsList.h:
+
2020-10-20 Philippe Normand <pnormand@igalia.com> and Pavel Feldman <pavel.feldman@gmail.com>
Web Inspector: Add setScreenSizeOverride API to the Page agent
diff --git a/Source/JavaScriptCore/builtins/ArrayPrototype.js b/Source/JavaScriptCore/builtins/ArrayPrototype.js
index ec3a971..f119ebf 100644
--- a/Source/JavaScriptCore/builtins/ArrayPrototype.js
+++ b/Source/JavaScriptCore/builtins/ArrayPrototype.js
@@ -687,11 +687,11 @@
return @flatIntoArrayWithCallback(result, array, length, 0, callback, thisArg);
}
-function item(index)
+function at(index)
{
"use strict";
- var array = @toObject(this, "Array.prototype.item requires that |this| not be null or undefined");
+ var array = @toObject(this, "Array.prototype.at requires that |this| not be null or undefined");
var length = @toLength(array.length);
var k = @toInteger(index);
diff --git a/Source/JavaScriptCore/builtins/TypedArrayPrototype.js b/Source/JavaScriptCore/builtins/TypedArrayPrototype.js
index a4af760..3cfea3a 100644
--- a/Source/JavaScriptCore/builtins/TypedArrayPrototype.js
+++ b/Source/JavaScriptCore/builtins/TypedArrayPrototype.js
@@ -385,7 +385,7 @@
return string;
}
-function item(index)
+function at(index)
{
"use strict";
diff --git a/Source/JavaScriptCore/runtime/ArrayPrototype.cpp b/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
index cd102a8..b7bd11e 100644
--- a/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
+++ b/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
@@ -110,7 +110,9 @@
JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().findIndexPublicName(), arrayPrototypeFindIndexCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().includesPublicName(), arrayPrototypeIncludesCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().copyWithinPublicName(), arrayPrototypeCopyWithinCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
- JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().itemPublicName(), arrayPrototypeItemCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
+
+ if (Options::useAtMethod())
+ JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().atPublicName(), arrayPrototypeAtCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().entriesPrivateName(), getDirect(vm, vm.propertyNames->builtinNames().entriesPublicName()), static_cast<unsigned>(PropertyAttribute::ReadOnly));
putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().forEachPrivateName(), getDirect(vm, vm.propertyNames->builtinNames().forEachPublicName()), static_cast<unsigned>(PropertyAttribute::ReadOnly));
@@ -128,10 +130,11 @@
&vm.propertyNames->builtinNames().flatPublicName(),
&vm.propertyNames->builtinNames().flatMapPublicName(),
&vm.propertyNames->builtinNames().includesPublicName(),
- &vm.propertyNames->builtinNames().itemPublicName(),
&vm.propertyNames->builtinNames().keysPublicName(),
&vm.propertyNames->builtinNames().valuesPublicName()
};
+ if (Options::useAtMethod())
+ unscopables->putDirect(vm, vm.propertyNames->builtinNames().atPublicName(), jsBoolean(true));
for (const auto* unscopableName : unscopableNames)
unscopables->putDirect(vm, *unscopableName, jsBoolean(true));
putDirectWithoutTransition(vm, vm.propertyNames->unscopablesSymbol, unscopables, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
diff --git a/Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp b/Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp
index 07db2a3..8dfa45b 100644
--- a/Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp
+++ b/Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp
@@ -375,7 +375,9 @@
JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("some", typedArrayPrototypeSomeCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->subarray, typedArrayPrototypeSubarrayCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->toLocaleString, typedArrayPrototypeToLocaleStringCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
- JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().itemPublicName(), typedArrayPrototypeItemCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
+
+ if (Options::useAtMethod())
+ JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().atPublicName(), typedArrayPrototypeAtCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
JSFunction* toStringTagFunction = JSFunction::create(vm, globalObject, 0, "get [Symbol.toStringTag]"_s, typedArrayViewProtoGetterFuncToStringTag, NoIntrinsic);
GetterSetter* toStringTagAccessor = GetterSetter::create(vm, globalObject, toStringTagFunction, nullptr);
diff --git a/Source/JavaScriptCore/runtime/OptionsList.h b/Source/JavaScriptCore/runtime/OptionsList.h
index 2e19b08..82d3b19 100644
--- a/Source/JavaScriptCore/runtime/OptionsList.h
+++ b/Source/JavaScriptCore/runtime/OptionsList.h
@@ -491,6 +491,7 @@
v(Bool, useWebAssemblyMultiValues, true, Normal, "Allow types from the wasm mulit-values spec.") \
v(Bool, useWeakRefs, true, Normal, "Expose the WeakRef constructor.") \
v(Bool, useIntlDateTimeFormatDayPeriod, true, Normal, "Expose the Intl.DateTimeFormat dayPeriod feature.") \
+ v(Bool, useAtMethod, false, Normal, "Expose the at() method on Array and %TypedArray%.") \
v(Bool, useArrayAllocationProfiling, true, Normal, "If true, we will use our normal array allocation profiling. If false, the allocation profile will always claim to be undecided.") \
v(Bool, forcePolyProto, false, Normal, "If true, create_this will always create an object with a poly proto structure.") \
v(Bool, forceMiniVMMode, false, Normal, "If true, it will force mini VM mode on.") \