Commit Graph

2592 Commits

Author SHA1 Message Date
Yusuke Suzuki 907efddb43 [JSC] Remove already-shipped wasm option flags
https://bugs.webkit.org/show_bug.cgi?id=229386

Reviewed by Ross Kirsling.

JSTests:

* wasm/references/element_active_mod.js:
* wasm/references/element_parsing.js:
* wasm/references/externref_globals.js:
* wasm/references/externref_modules.js:
* wasm/references/externref_table.js:
* wasm/references/externref_table_import.js:
* wasm/references/func_ref.js:
* wasm/references/globals.js:
* wasm/references/is_null.js:
* wasm/references/memory_copy.js:
* wasm/references/memory_copy_shared.js:
* wasm/references/memory_fill_shared.js:
* wasm/references/multitable.js:
* wasm/references/parse_unreachable.js:
* wasm/references/table_js_api.js:
* wasm/references/table_misc.js:
* wasm/references/validation.js:
* wasm/stress/immutable-globals.js:
* wasm/stress/local-ref.js:
* wasm/stress/mutable-globals.js:
* wasm/stress/table-grow-table-size.js:

Source/JavaScriptCore:

This patch removes some wasm option flags which are already shipped.

* runtime/OptionsList.h:
* wasm/WasmFormat.h:
(JSC::Wasm::isValueType):
* wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):
* wasm/WasmOperations.cpp:
(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):
* wasm/WasmParser.h:
(JSC::Wasm::Parser<SuccessType>::parseBlockSignature):
* wasm/WasmSectionParser.cpp:
(JSC::Wasm::SectionParser::parseType):
(JSC::Wasm::SectionParser::parseElement):
(JSC::Wasm::SectionParser::parseData):
(JSC::Wasm::SectionParser::parseDataCount):
* wasm/js/JSWebAssembly.cpp:
(JSC::JSWebAssembly::finishCreation):
* wasm/js/WebAssemblyGlobalConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* wasm/js/WebAssemblyTableConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* wasm/js/WebAssemblyTablePrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):

Tools:

* Scripts/run-jsc-stress-tests:

LayoutTests:

* workers/wasm-references.html:

Canonical link: https://commits.webkit.org/240821@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281438 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-23 06:28:16 +00:00
Yusuke Suzuki bb751b0464 [JSC] Remove already-shipped JS feature flags
https://bugs.webkit.org/show_bug.cgi?id=229387

Reviewed by Ross Kirsling.

JSTests:

* microbenchmarks/class-fields-private/get-private-name.js:
* microbenchmarks/class-fields-private/monomorphic-get-private-field.js:
* microbenchmarks/class-fields-private/polymorphic-get-private-field.js:
* microbenchmarks/class-fields-private/polymorphic-put-private-field.js:
* microbenchmarks/class-fields-private/put-private-field.js:
* stress/class-fields-private-as-function.js:
* stress/class-fields-private-cached-bytecode.js:
* stress/class-fields-private-freeze-out-of-line.js:
* stress/class-fields-private-freeze.js:
* stress/class-fields-private-harmony.js:
* stress/class-fields-private-on-proxy.js:
* stress/class-fields-private-out-of-line.js:
* stress/class-fields-private-prevent-extensions-out-of-line.js:
* stress/class-fields-private-prevent-extensions.js:
* stress/class-fields-private-seal-out-of-line.js:
* stress/class-fields-private-seal.js:
* stress/class-fields-private-use-eval.js:
* stress/class-fields-static-harmony.js:
* stress/class-fields-static-private-harmony.js:
* stress/class-fields-stress-instance.js:
* stress/class-private-method-access.js:
* stress/dfg-get-private-name-by-id-generic.js:
* stress/dfg-get-private-name-by-id-osr-bad-identifier.js:
* stress/dfg-get-private-name-by-id.js:
* stress/dfg-get-private-name-by-offset-osr-bad-identifier.js:
* stress/dfg-get-private-name-by-offset-osr-bad-structure.js:
* stress/dfg-get-private-name-by-offset.js:
* stress/dfg-get-private-name-by-val-generic.js:
* stress/dfg-put-private-name-check-barrier-insertion.js:
* stress/dfg-put-private-name-compiled-as-put-by-id-direct.js:
* stress/dfg-put-private-name-compiled-as-put-private-name-by-id.js:
* stress/ftl-get-private-name-by-id.js:
* stress/ftl-get-private-name-by-offset-multi.js:
* stress/get-private-name-cache-failure.js:
* stress/get-private-name-with-constant-ident.js:
* stress/get-private-name-with-constant-symbol.js:
* stress/get-private-name-with-different-symbol.js:
* stress/get-private-name-with-primitive.js:
* stress/get-private-name.js:
* stress/optional-chaining-and-private-fields.js:
* stress/private-accesor-duplicate-name-early-errors.js:
* stress/private-accessor-static-non-static.js:
* stress/private-brand-installed-after-super-call-from-arrow-function.js:
* stress/private-brand-installed-after-super-call-from-eval.js:
* stress/private-getter-brand-check.js:
* stress/private-getter-inner-class.js:
* stress/private-in-error.js:
* stress/private-in.js:
* stress/private-members-get-and-set.js:
* stress/private-method-and-field-named-constructor.js:
* stress/private-method-brand-check.js:
* stress/private-method-change-attribute-from-branded-structure.js:
* stress/private-method-change-prototype-from-branded-structure.js:
* stress/private-method-check-private-brand-ic.js:
* stress/private-method-check-structure-miss.js:
* stress/private-method-comparison.js:
* stress/private-method-delete-property-from-branded-structure.js:
* stress/private-method-extends-brand-check.js:
* stress/private-method-get-and-call.js:
* stress/private-method-invalid-multiple-brand-installation.js:
* stress/private-method-invalidate-compiled-with-constant-symbol.js:
* stress/private-method-nested-class.js:
* stress/private-method-on-sealed-objects.js:
* stress/private-method-on-uncacheable-dictionary.js:
* stress/private-method-polymorphic-with-constant-symbol.js:
* stress/private-method-set-brand-should-have-write-barrier.js:
* stress/private-method-untyped-use.js:
* stress/private-method-with-uncacheable-dictionary-transition.js:
* stress/private-methods-and-accessors-postfix-node.js:
* stress/private-methods-and-accessors-prefix-node.js:
* stress/private-methods-inline-cache.js:
* stress/private-methods-megamorphic-ic.js:
* stress/private-methods-on-proxy.js:
* stress/private-methods-poly-ic-multiple-classes.js:
* stress/private-methods-poly-ic-single-class.js:
* stress/private-name-access-in-computed-property.js:
* stress/private-names-available-on-direct-eval.js:
* stress/private-names-available-on-eval-during-field-initialization.js:
* stress/private-setter-brand-check.js:
* stress/private-setter-inner-class.js:
* stress/put-by-val-direct-addprivate.js:
* stress/put-by-val-direct-putprivate.js:
* stress/put-private-name-by-id-set-do-not-add-structure-trasition.js:
* stress/put-private-name-check-structure-miss.js:
* stress/put-private-name-constant-folding-to-mult-put-by-offset.js:
* stress/put-private-name-constant-folding-to-put-by-offset.js:
* stress/put-private-name-generic.js:
* stress/put-private-name-invalid-define.js:
* stress/put-private-name-invalid-store.js:
* stress/put-private-name-invalidate-compiled-with-constant-symbol.js:
* stress/put-private-name-polymorphic-with-constant-symbol.js:
* stress/put-private-name-untyped-use.js:
* stress/put-private-name-with-constant-symbol.js:
* stress/put-private-name-with-different-identifier.js:
* stress/put-private-name-with-primitive.js:
* stress/static-private-methods-and-accessor-inner-class.js:
* stress/static-private-methods-and-accessor-multiple-evaluation.js:
* stress/static-private-methods-and-accessors-postfix-node.js:
* stress/static-private-methods-and-accessors-prefix-node.js:
* stress/v8-cleanup-from-different-realm.js:
* stress/v8-cleanup-proxy-from-different-realm.js:
* stress/v8-finalization-registry-basics.js:
* stress/v8-finalizationregistry-and-weakref.js:
* stress/v8-finalizationregistry-keeps-holdings-alive.js:
* stress/v8-finalizationregistry-scheduled-for-cleanup-multiple-times.js:
* stress/v8-multiple-dirty-finalization-registries.js:
* stress/v8-reentrant-gc-from-cleanup.js:
* stress/v8-stress-finalizationregistry-dirty-enqueue.js:
* stress/v8-undefined-holdings.js:
* stress/v8-unregister-after-cleanup.js:
* stress/v8-unregister-before-cleanup.js:
* stress/v8-unregister-called-twice.js:
* stress/v8-unregister-inside-cleanup2.js:
* stress/v8-unregister-inside-cleanup3.js:
* stress/v8-unregister-many.js:
* stress/v8-weak-unregistertoken.js:
* test262/config.yaml:

Source/JavaScriptCore:

These features are already shipped. So removing these runtime flags to clean up source code and
remove untested path.

* API/JSObjectRef.cpp:
(JSObjectMakeError):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* bytecompiler/NodesCodegen.cpp:
(JSC::FunctionCallValueNode::emitBytecode):
* parser/Lexer.cpp:
(JSC::Lexer<T>::lexWithoutClearingLineTerminator):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::parseForStatement):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseBinaryExpression):
(JSC::Parser<LexerType>::parseGetterSetter):
(JSC::Parser<LexerType>::parsePrimaryExpression):
(JSC::Parser<LexerType>::parseUnaryExpression):
* runtime/AggregateErrorConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* runtime/ErrorConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* runtime/JSGlobalObject.h:
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor<errorType>::constructImpl):
(JSC::NativeErrorConstructor<errorType>::callImpl):
* runtime/Options.cpp:
(JSC::Options::recomputeDependentOptions):
* runtime/OptionsList.h:
* wasm/js/WebAssemblyCompileErrorConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* wasm/js/WebAssemblyLinkErrorConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):

Tools:

* Scripts/run-jsc-benchmarks:

LayoutTests:

* js/script-tests/weakref-async-is-collected.js:
* js/script-tests/weakref-eventually-collects-values.js:
* js/script-tests/weakref-finalizationregistry.js:
* js/script-tests/weakref-microtasks-dont-collect.js:
* js/script-tests/weakref-weakset-consistency.js:
* js/weakref-async-is-collected.html:
* js/weakref-eventually-collects-values.html:
* js/weakref-finalizationregistry.html:
* js/weakref-microtasks-dont-collect.html:
* js/weakref-weakset-consistency.html:
* webaudio/finished-audio-buffer-source-nodes-should-be-collectable.html:


Canonical link: https://commits.webkit.org/240816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-23 01:06:11 +00:00
Yusuke Suzuki 8f63cdde7b Unreviewed, speculative fix for old ICU
https://bugs.webkit.org/show_bug.cgi?id=229385

* stress/intl-locale-info.js:
(shouldBe):

Canonical link: https://commits.webkit.org/240811@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281421 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-22 22:09:52 +00:00
Yusuke Suzuki f38367dfe2 [JSC] Remove Intl runtime feature flags for already shipped ones
https://bugs.webkit.org/show_bug.cgi?id=229371

Reviewed by Ross Kirsling.

JSTests:

* stress/intl-datetimeformat-day-period.js:
* test262/config.yaml:

Source/JavaScriptCore:

Since they are already shipped, we should remove these runtime flags.

* builtins/DatePrototype.js:
(globalPrivate.toDateTimeOptionsAnyAll):
(globalPrivate.toDateTimeOptionsTimeTime):
* bytecode/BytecodeIntrinsicRegistry.cpp:
(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):
* bytecode/BytecodeIntrinsicRegistry.h:
* runtime/IntlDateTimeFormat.cpp:
(JSC::toDateTimeOptionsAnyDate):
(JSC::IntlDateTimeFormat::initializeDateTimeFormat):
(JSC::IntlDateTimeFormat::resolvedOptions const):
* runtime/IntlDateTimeFormatPrototype.cpp:
(JSC::IntlDateTimeFormatPrototype::finishCreation):
* runtime/OptionsList.h:


Canonical link: https://commits.webkit.org/240798@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281383 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-22 00:26:53 +00:00
Yusuke Suzuki 7ee2330a59 [JSC] Intl.DisplayNames v2
https://bugs.webkit.org/show_bug.cgi?id=227832

Reviewed by Ross Kirsling.

JSTests:

* stress/intl-displaynames-v2.js: Added.
(shouldBe):
(shouldThrow):
(vm.icuVersion):
* stress/intl-displaynames.js:
(vm.icuVersion):
* test262/config.yaml:
* test262/expectations.yaml:

Source/JavaScriptCore:

This patch implements Intl.DisplayNames v2[1].
Newly added names are calendar names and date time field names.
For the language name, language display option is added.

[1]: https://github.com/tc39/intl-displaynames-v2

* runtime/CommonIdentifiers.h:
* runtime/IntlCache.cpp:
(JSC::IntlCache::getFieldDisplayName):
* runtime/IntlCache.h:
* runtime/IntlDisplayNames.cpp:
(JSC::IntlDisplayNames::initializeDisplayNames):
(JSC::IntlDisplayNames::of const):
(JSC::IntlDisplayNames::resolvedOptions const):
(JSC::IntlDisplayNames::typeString):
(JSC::IntlDisplayNames::languageDisplayString):
* runtime/IntlDisplayNames.h:
* runtime/IntlObject.cpp:
(JSC::isUnicodeLocaleIdentifierType):
(JSC::canonicalizeUnicodeLocaleID):
(JSC::canonicalizeLocaleList):
(JSC::defaultLocale):
(JSC::mapBCP47ToICUCalendarKeyword):
(JSC::mapICUCollationKeywordToBCP47):
(JSC::canonicalizeLanguageTag): Deleted.
* runtime/IntlObject.h:


Canonical link: https://commits.webkit.org/240790@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-21 16:17:02 +00:00
Yusuke Suzuki b2eeba9a64 [JSC] Intl Locale Info
https://bugs.webkit.org/show_bug.cgi?id=227830

Reviewed by Ross Kirsling.

JSTests:

* stress/intl-locale-info.js: Added.
(shouldBe):
(throw.new.Error):
(let.enGB.new.Intl.Locale.shouldBe):
(let.l.new.Intl.Locale.shouldBe):
* test262/config.yaml:

Source/JavaScriptCore:

This patch implements Intl.Locale's extension (Intl Locale Info proposal)[1], which is already stage 3.
Intl.Locale#{calendars,collations,hourCycles,numberingSystems,timeZones} can return array of preferred
configuration for the given locale. And Intl.Locale#textInfo can return text layout direction and Intl.Locale#weekInfo
can return weekday information (e.g. when weekend starts).

[1]: https://github.com/tc39/proposal-intl-locale-info

* runtime/IntlLocale.cpp:
(JSC::createArrayFromStringVector):
(JSC::IntlLocale::calendars):
(JSC::IntlLocale::collations):
(JSC::IntlLocale::hourCycles):
(JSC::IntlLocale::numberingSystems):
(JSC::IntlLocale::timeZones):
(JSC::IntlLocale::textInfo):
(JSC::IntlLocale::weekInfo):
* runtime/IntlLocale.h:
* runtime/IntlLocalePrototype.cpp:
(JSC::JSC_DEFINE_CUSTOM_GETTER):

Canonical link: https://commits.webkit.org/240789@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-21 14:33:08 +00:00
Yusuke Suzuki 38a75391bc [JSC] Extend Intl TimeZoneName Option
https://bugs.webkit.org/show_bug.cgi?id=227831

Reviewed by Ross Kirsling.

JSTests:

* stress/intl-extended-timezone-names.js: Added.
(shouldBe):
(timeZoneTest):
* test262/config.yaml:

Source/JavaScriptCore:

https://github.com/tc39/proposal-intl-extend-timezonename

This patch implements Extend Intl TimeZoneName proposal, which adds "shortOffset", "longOffset", "shortGeneric", "longGeneric"
timeZoneName variants.

* runtime/IntlDateTimeFormat.cpp:
(JSC::IntlDateTimeFormat::setFormatsFromPattern):
(JSC::IntlDateTimeFormat::initializeDateTimeFormat):
(JSC::IntlDateTimeFormat::timeZoneNameString):
* runtime/IntlDateTimeFormat.h:

Canonical link: https://commits.webkit.org/240786@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-21 13:02:32 +00:00
Yusuke Suzuki a83e8bf7dc [JSC] Enable Array#findLast method
https://bugs.webkit.org/show_bug.cgi?id=229355

Reviewed by Saam Barati.

JSTests:

* stress/unscopables.js:

Source/JavaScriptCore:

This patch enables Array#findLast and Array#findLastIndex methods.

* runtime/ArrayPrototype.cpp: Order of unscopables is alphabet ordering (https://tc39.es/ecma262/#sec-array.prototype-@@unscopables)
(JSC::ArrayPrototype::finishCreation):
* runtime/OptionsList.h:

LayoutTests:

* inspector/model/remote-object-get-properties-expected.txt:
* js/Object-getOwnPropertyNames-expected.txt:
* js/array-unscopables-properties-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:
* js/script-tests/array-unscopables-properties.js:

Canonical link: https://commits.webkit.org/240784@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-21 12:10:09 +00:00
Mikhail R. Gadelha 174ca9b665 Unreviewed. Skip failing MIPS tests
https://bugs.webkit.org/show_bug.cgi?id=229198

Patch by Mikhail R. Gadelha <mikhail@igalia.com> on 2021-08-17

JSTests:

* ChakraCore.yaml:

LayoutTests:

* platform/wpe/TestExpectations:

Canonical link: https://commits.webkit.org/240606@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281156 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-17 19:23:23 +00:00
Keith Miller 7d7525f03c EnumeratorNextUpdatePropertyName always needs to be able to handle IndexedMode
https://bugs.webkit.org/show_bug.cgi?id=229087

Reviewed by Filip Pizlo.

JSTests:

* stress/for-in-own-structure-and-generic-with-late-add-indexed.js: Added.
(test):
(Foo):

Source/JavaScriptCore:

Right now, this operation incorrectly assumes that EnumeratorNextUpdateIndexAndMode will guarantee
the mode matches the seen mode set. But no speculation is guaranteed and adding such a guarantee
would require adding checkpoints, which is likely not worth it. Instead, this patch just makes
sure we always handle the allocation for IndexedMode.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileEnumeratorNextUpdatePropertyName):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):


Canonical link: https://commits.webkit.org/240510@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 19:29:04 +00:00
Yusuke Suzuki b89abb4aef WTFCrash in JSC::Lexer<char16_t>::append8
https://bugs.webkit.org/show_bug.cgi?id=228982

Reviewed by Mark Lam.

JSTests:

* stress/directive-includes-non-latin1.js: Added.

Source/JavaScriptCore:

sourceURL / sourceMapURL directive should not assume Latin1 characters.

* parser/Lexer.cpp:
(JSC::Lexer<T>::parseCommentDirectiveValue):


Canonical link: https://commits.webkit.org/240423@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 07:39:26 +00:00
Yusuke Suzuki 90546e3ba4 [JSC] super-Latin1 white space and line terminator after regular expression literal misinterpreted as flags
https://bugs.webkit.org/show_bug.cgi?id=227944

Reviewed by Alexey Shvayka.

JSTests:

* test262/expectations.yaml:

Source/JavaScriptCore:

There are non-Latin1 white-spaces and line-terminators, but Lexer::scanRegExp's code did not assume that.
As a result, if there is a non-Latin1 white-spaces or line-terminators after RegExp, we raise SyntaxError
while this is valid. This patch fixes that.

* parser/Lexer.cpp:
(JSC::Lexer<T>::scanRegExp):


Canonical link: https://commits.webkit.org/240388@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-10 06:56:17 +00:00
Yusuke Suzuki 7075677763 [JSC] Clean up test262 expectations
https://bugs.webkit.org/show_bug.cgi?id=228903

Reviewed by Ross Kirsling.

* test262/config.yaml:
* test262/expectations.yaml:


Canonical link: https://commits.webkit.org/240350@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-08 20:43:12 +00:00
Keith Miller af53d48e72 for-in should only emit one loop in bytecode
https://bugs.webkit.org/show_bug.cgi?id=227989

Reviewed by Yusuke Suzuki.

JSTests:

* microbenchmarks/for-in-double-array-with-own-named.js: Added.
(test):
* microbenchmarks/for-in-double-array.js: Added.
(test):
* microbenchmarks/for-in-getters.js: Added.
(test):
* microbenchmarks/for-in-int32-array-with-own-named.js: Added.
(test):
* microbenchmarks/for-in-int32-array.js: Added.
(test):
* microbenchmarks/for-in-int32-object-with-own-named-and-getters.js: Added.
(test):
* microbenchmarks/for-in-int32-object-with-own-named.js: Added.
(test):
* microbenchmarks/for-in-object-with-own-named.js: Added.
(sum):
(opaqueSet):
* microbenchmarks/for-in-string-array.js: Added.
(test):
* microbenchmarks/for-of-iterate-array-map-set.js: Added.
(sum):
(let.generator):
* stress/for-in-array-mode.js:
(test):
* stress/for-in-base-reassigned-later.js:
* stress/for-in-delete-during-iteration.js:
* stress/for-in-primitive-index-on-prototype.js: Added.
(test):
* stress/for-in-tests.js:
* stress/has-own-property-structure-for-in-loop-correctness.js:
(test5):

Source/JavaScriptCore:

This patch redesigns how we implement for-in loops. Before this patch we would emit three copies of the for-in loop body. One for the indexed properties, one for the named-own properties, and one for generic properties (anything else). This had a couple of problems. Firstly, it meant bytecode size grew exponentially to number of nested for-in loops. This in turn meant DFG/FTL compilation took much longer.

Going off our experience with fast for-of, this patch turns for-in loops specializations into
a "fused" opcode that internally switches on the enumeration mode it currently sees. For example, if we are enumerating an own-named property, the new enumerator_get_by_val bytecode will check the enumerator cell's cached structure matches the base's then load the property offset directly.

There are four new opcodes this patch adds, which replace the various operations we had for the specialized loops previously. The new opcodes are EnumeratorGetByVal, EnumeratorInByVal, EnumeratorHasOwnProperty, and EnumeratorNext. The first three correspond to GetByVal, InByVal, and HasOwnProperty respectively. The EnumeratorNext opcode has three results in bytecode, the next enumeration value's mode, the index of the property name, and the property name string itself. When enumeration is done EnumeratorNext returns JS null as the property name string. Since the DFG doesn't support tuples yet this opcode is spilt into four new nodes. The first computes the updated index and mode for the next enumeration key, which is encoded into a single JS number. Then there are two nodes that extract the mode and index. Finally, the last new node produces the property name string or null based on the extracted mode and index.

Since, in most benchmarks, any given enumeration opcode tends to profile exactly one enumeration mode. This patch focuses primarily on reimplementing all the optimizations we have for any one specific mode. This means there are still potential optimizations for the multi-mode flavors of each new opcode.

The main optimizations implemented for each new opcode are:

EnumeratorNext:
1) IndexedMode loops are loaded and checked for presence inline (DFG/FTL).
2) NamedMode is computed inline as long as the cached structure on the enumerator cell matches the base (Baseline+). This can only differ if there's a transition.
3) property names are extracted from the cached buffer inline (Baseline+).

EnumeratorGetByVal:
EnumeratorInByVal:
EnumeratorHasOwnProperty:
1) IndexedMode has all the optimizations of a normal XByVal on indexed properties (DFG/FTL).
2) NamedMode will extract the value directly from the inline/out-of-line offset if the structure matches the enumerator's (Baseline+).

There are also a few interesting changes worth mentioning here:
1) If a for-in loop would produce an empty enumerator we now always
return the VMs empty enumerator. This has two benefits, most importantly, it distingishes between an unprofiled for-in loop and empty enumeration, which prevents OSR exit loops. Also, it means that the various Enumerator opcodes no longer need to handle undefined/null when `toObject`ing the base value.

2) The enumerator now contains a bit set of all the modes it will produce. This removes a few extra branches when speculating on the modes we will see in EnumeratorNext.

3) In the DFG, enumerator GetByVal relies on compileGetByVal to set the result it also passes a prefix callback which emits code after the various cases set up their operands but before code is emitting to help satisfy the branch over register allocation validation. Also, the array mode branch in compileGetByVal passes the data format that it would prefer, which for normal GetByVal is returned. For EnumeratorGetByVal, that preference is completely ignored and it always returns DataFormatJS.

* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::or8):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::or8):
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::rshift64):
(JSC::MacroAssemblerX86_64::or8): Deleted.
* builtins/BuiltinNames.h:
* bytecode/BytecodeList.rb:
* bytecode/BytecodeUseDef.cpp:
(JSC::computeUsesForBytecodeIndexImpl):
(JSC::computeDefsForBytecodeIndexImpl):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finishCreation):
* bytecode/LinkTimeConstant.h:
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::recordHasOwnPropertyInForInLoop):
(JSC::BytecodeGenerator::emitInByVal):
(JSC::BytecodeGenerator::emitGetByVal):
(JSC::BytecodeGenerator::emitEnumeratorNext):
(JSC::BytecodeGenerator::emitEnumeratorHasOwnProperty):
(JSC::BytecodeGenerator::pushForInScope):
(JSC::BytecodeGenerator::popForInScope):
(JSC::rewriteOp):
(JSC::ForInContext::finalize):
(JSC::BytecodeGenerator::findForInContext):
(JSC::BytecodeGenerator::recordHasOwnStructurePropertyInForInLoop): Deleted.
(JSC::BytecodeGenerator::emitGetEnumerableLength): Deleted.
(JSC::BytecodeGenerator::emitHasEnumerableIndexedProperty): Deleted.
(JSC::BytecodeGenerator::emitHasEnumerableStructureProperty): Deleted.
(JSC::BytecodeGenerator::emitHasEnumerableProperty): Deleted.
(JSC::BytecodeGenerator::emitHasOwnStructureProperty): Deleted.
(JSC::BytecodeGenerator::emitEnumeratorStructurePropertyName): Deleted.
(JSC::BytecodeGenerator::emitEnumeratorGenericPropertyName): Deleted.
(JSC::BytecodeGenerator::emitToIndexString): Deleted.
(JSC::BytecodeGenerator::pushIndexedForInScope): Deleted.
(JSC::BytecodeGenerator::popIndexedForInScope): Deleted.
(JSC::BytecodeGenerator::pushStructureForInScope): Deleted.
(JSC::BytecodeGenerator::popStructureForInScope): Deleted.
(JSC::StructureForInContext::finalize): Deleted.
(JSC::IndexedForInContext::finalize): Deleted.
(JSC::BytecodeGenerator::findStructureForInContext): Deleted.
* bytecompiler/BytecodeGenerator.h:
(JSC::ForInContext::isValid const):
(JSC::ForInContext::invalidate):
(JSC::ForInContext::local const):
(JSC::ForInContext::propertyName const):
(JSC::ForInContext::propertyOffset const):
(JSC::ForInContext::enumerator const):
(JSC::ForInContext::mode const):
(JSC::ForInContext::ForInContext):
(JSC::ForInContext::bodyBytecodeStartOffset const):
(JSC::ForInContext::type const): Deleted.
(JSC::ForInContext::isIndexedForInContext const): Deleted.
(JSC::ForInContext::isStructureForInContext const): Deleted.
(JSC::ForInContext::asIndexedForInContext): Deleted.
(JSC::ForInContext::asStructureForInContext): Deleted.
(JSC::StructureForInContext::StructureForInContext): Deleted.
(JSC::StructureForInContext::index const): Deleted.
(JSC::StructureForInContext::property const): Deleted.
(JSC::StructureForInContext::enumerator const): Deleted.
(JSC::StructureForInContext::baseVariable const): Deleted.
(JSC::StructureForInContext::addGetInst): Deleted.
(JSC::StructureForInContext::addInInst): Deleted.
(JSC::StructureForInContext::addHasOwnPropertyJump): Deleted.
(JSC::IndexedForInContext::IndexedForInContext): Deleted.
(JSC::IndexedForInContext::index const): Deleted.
(JSC::IndexedForInContext::addGetInst): Deleted.
* bytecompiler/NodesCodegen.cpp:
(JSC::HasOwnPropertyFunctionCallDotNode::emitBytecode):
(JSC::ForInNode::emitBytecode):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGArrayMode.h:
(JSC::DFG::ArrayMode::isSaneChain const):
* dfg/DFGBackwardsPropagationPhase.cpp:
(JSC::DFG::BackwardsPropagationPhase::propagate):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCFAPhase.cpp:
(JSC::DFG::CFAPhase::injectOSR):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::setJSArraySaneChainIfPossible):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGIntegerRangeOptimizationPhase.cpp:
* dfg/DFGMayExit.cpp:
* dfg/DFGNode.h:
(JSC::DFG::Node::hasHeapPrediction):
(JSC::DFG::Node::hasStorageChild const):
(JSC::DFG::Node::storageChildIndex):
(JSC::DFG::Node::hasArrayMode):
(JSC::DFG::Node::hasEnumeratorMetadata const):
(JSC::DFG::Node::enumeratorMetadata):
* dfg/DFGNodeType.h:
* dfg/DFGOpInfo.h:
(JSC::DFG::OpInfo::OpInfo):
* dfg/DFGOperations.cpp:
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSSALoweringPhase.cpp:
(JSC::DFG::SSALoweringPhase::handleNode):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::JSValueRegsTemporary::JSValueRegsTemporary):
(JSC::DFG::SpeculativeJIT::compileGetByValOnString):
(JSC::DFG::SpeculativeJIT::setIntTypedArrayLoadResult):
(JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
(JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
(JSC::DFG::SpeculativeJIT::compileGetByValForObjectWithString):
(JSC::DFG::SpeculativeJIT::compileGetByValForObjectWithSymbol):
(JSC::DFG::SpeculativeJIT::compileGetByValOnDirectArguments):
(JSC::DFG::SpeculativeJIT::compileGetByValOnScopedArguments):
(JSC::DFG::SpeculativeJIT::compileEnumeratorNextUpdateIndexAndMode):
(JSC::DFG::SpeculativeJIT::compileEnumeratorNextExtractIndex):
(JSC::DFG::SpeculativeJIT::compileEnumeratorNextExtractMode):
(JSC::DFG::SpeculativeJIT::compileEnumeratorNextUpdatePropertyName):
(JSC::DFG::SpeculativeJIT::compileEnumeratorGetByVal):
(JSC::DFG::SpeculativeJIT::compileEnumeratorHasProperty):
(JSC::DFG::SpeculativeJIT::compileEnumeratorInByVal):
(JSC::DFG::SpeculativeJIT::compileEnumeratorHasOwnProperty):
(JSC::DFG::SpeculativeJIT::compileHasIndexedProperty):
(JSC::DFG::SpeculativeJIT::compileGetEnumerableLength): Deleted.
(JSC::DFG::SpeculativeJIT::compileHasEnumerableProperty): Deleted.
(JSC::DFG::SpeculativeJIT::compileToIndexString): Deleted.
(JSC::DFG::SpeculativeJIT::compileHasEnumerableStructureProperty): Deleted.
(JSC::DFG::SpeculativeJIT::compileHasOwnStructurePropertyImpl): Deleted.
(JSC::DFG::SpeculativeJIT::compileHasOwnStructureProperty): Deleted.
(JSC::DFG::SpeculativeJIT::compileInStructureProperty): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetEnumeratorPname): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetDirectPname): Deleted.
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::allocate):
(JSC::DFG::JSValueOperand::regs):
(JSC::DFG::JSValueOperand::gpr):
(JSC::DFG::StorageOperand::StorageOperand):
(JSC::DFG::StorageOperand::~StorageOperand):
(JSC::DFG::StorageOperand::emplace):
(JSC::DFG::JSValueRegsTemporary::operator bool):
(JSC::DFG::JSValueRegsTemporary::JSValueRegsTemporary):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compileGetByVal):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compileGetByVal):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGTypeCheckHoistingPhase.cpp:
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantArrayChecks):
* ftl/FTLAbstractHeapRepository.h:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByValImpl):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileStringCharAtImpl):
(JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
* ftl/FTLOutput.h:
(JSC::FTL::Output::phi):
* generator/DSL.rb:
* interpreter/Register.h:
* interpreter/RegisterInlines.h:
(JSC::Register::operator=):
* jit/AssemblyHelpers.h:
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileHasIndexedProperty):
(JSC::JIT::emit_op_has_structure_propertyImpl): Deleted.
(JSC::JIT::emit_op_has_enumerable_structure_property): Deleted.
(JSC::JIT::emit_op_has_own_structure_property): Deleted.
(JSC::JIT::emit_op_in_structure_property): Deleted.
(JSC::JIT::emit_op_has_enumerable_indexed_property): Deleted.
(JSC::JIT::emitSlow_op_has_enumerable_indexed_property): Deleted.
(JSC::JIT::emit_op_get_direct_pname): Deleted.
(JSC::JIT::emit_op_enumerator_structure_pname): Deleted.
(JSC::JIT::emit_op_enumerator_generic_pname): Deleted.
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileHasIndexedProperty):
(JSC::JIT::emit_op_has_structure_propertyImpl): Deleted.
(JSC::JIT::emit_op_has_enumerable_structure_property): Deleted.
(JSC::JIT::emit_op_has_own_structure_property): Deleted.
(JSC::JIT::emit_op_in_structure_property): Deleted.
(JSC::JIT::emit_op_has_enumerable_indexed_property): Deleted.
(JSC::JIT::emitSlow_op_has_enumerable_indexed_property): Deleted.
(JSC::JIT::emit_op_get_direct_pname): Deleted.
(JSC::JIT::emit_op_enumerator_structure_pname): Deleted.
(JSC::JIT::emit_op_enumerator_generic_pname): Deleted.
* jit/JITPropertyAccess.cpp:
(JSC::JIT::generateGetByValSlowCase):
(JSC::JIT::emitSlow_op_get_by_val):
(JSC::JIT::emit_op_enumerator_next):
(JSC::JIT::emit_op_enumerator_get_by_val):
(JSC::JIT::emitSlow_op_enumerator_get_by_val):
(JSC::JIT::emit_enumerator_has_propertyImpl):
(JSC::JIT::emit_op_enumerator_in_by_val):
(JSC::JIT::emit_op_enumerator_has_own_property):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_enumerator_next):
(JSC::JIT::emit_op_enumerator_get_by_val):
(JSC::JIT::emitSlow_op_enumerator_get_by_val):
(JSC::JIT::emit_op_enumerator_in_by_val):
(JSC::JIT::emit_op_enumerator_has_own_property):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/CommonSlowPaths.cpp:
(JSC::JSC_DEFINE_COMMON_SLOW_PATH):
* runtime/CommonSlowPaths.h:
* runtime/FileBasedFuzzerAgent.cpp:
(JSC::FileBasedFuzzerAgent::getPredictionInternal):
* runtime/FileBasedFuzzerAgentBase.cpp:
(JSC::FileBasedFuzzerAgentBase::opcodeAliasForLookupKey):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSPropertyNameEnumerator.cpp:
(JSC::JSPropertyNameEnumerator::JSPropertyNameEnumerator):
(JSC::JSPropertyNameEnumerator::computeNext):
* runtime/JSPropertyNameEnumerator.h:
(JSC::propertyNameEnumerator):
* runtime/PredictionFileCreatingFuzzerAgent.cpp:
(JSC::PredictionFileCreatingFuzzerAgent::getPredictionInternal):


Canonical link: https://commits.webkit.org/240345@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-07 21:38:59 +00:00
Mikhail R. Gadelha 8bf27bc668 Assertion failure when checking array in DFG (32 bits)
https://bugs.webkit.org/show_bug.cgi?id=228839

Patch by Mikhail R. Gadelha <mikhail@igalia.com> on 2021-08-05
Reviewed by Yusuke Suzuki.

JSTests:

* stress/check-array-empty-32.js: Added.
(a.b.catch.print.c):
(a.b):
(a.e):
(a):

Source/JavaScriptCore:

Since empty values don't pass the cell check in 32 bits, we need to
guard the SpecEmpty check to only happen in 64 bits archs

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::checkArray):

Canonical link: https://commits.webkit.org/240307@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-06 01:59:40 +00:00
Yusuke Suzuki 9c6fee7896 [JSC] Yarr BoyerMoore search should support character-class
https://bugs.webkit.org/show_bug.cgi?id=228613

Reviewed by Saam Barati.

JSTests:

* stress/regexp-bm-search-character-non-fixed-size.js: Added.
(shouldBe):
* stress/regexp-bm-search-many-candidate-zero-length.js: Added.
(shouldBe):
(regexp.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.0.1.2.3.4.5.6.7.8.9.t.v.n.r):
* stress/regexp-bm-search-non-fixed-size.js: Added.
(shouldBe):

Source/JavaScriptCore:

This patch adds character-class support for BoyerMoore lookahead search in Yarr.
Currently, we only support fixed-sized character-class. We can extend it for repeat cases in the future.

To apply this character-class thing to jQuery's RegExp, we also allow non-fixed-sized disjunction.
For example, /aaaa.*|bbbb/'s disjunction is not fixed-sized. But still we can use (aaaa|bbbb) prefix since
this part is fixed-sized and we know minimum-size of this disjunction is 4.

Plus, instead of giving up BoyerMoore search when we found non-supported terms, we shorten BoyerMoore search
length not to include this term so that we can still have a chance to leverage BoyerMoore search. In the case
of /aaaa|bbbb|ccc(d|e|f)/, we previously gave up since it finds `(d|e|f)`. But now, instead we shorten the length
from 4 to 3, and construct search pattern with `aaa|bbb|ccc`.

This patch improves jquery-todomvc-regexp by 20%.

                                      ToT                     Patched

    jquery-todomvc-regexp      545.3561+-0.6968     ^    451.6117+-0.4613        ^ definitely 1.2076x faster

This improves Speedometer2/jQuery-TodoMVC by 2%.

    ----------------------------------------------------------------------------------------------------------------------------------
    |               subtest                |     ms      |     ms      |  b / a   | pValue (significance using False Discovery Rate) |
    ----------------------------------------------------------------------------------------------------------------------------------
    | Elm-TodoMVC                          |123.470833   |123.550000   |1.000641  | 0.841600                                         |
    | VueJS-TodoMVC                        |26.883333    |26.950000    |1.002480  | 0.846732                                         |
    | EmberJS-TodoMVC                      |127.708333   |127.754167   |1.000359  | 0.934206                                         |
    | BackboneJS-TodoMVC                   |50.545833    |50.445833    |0.998022  | 0.679610                                         |
    | Preact-TodoMVC                       |20.879167    |20.791667    |0.995809  | 0.796541                                         |
    | AngularJS-TodoMVC                    |137.479167   |137.275000   |0.998515  | 0.729817                                         |
    | Vanilla-ES2015-TodoMVC               |69.079167    |68.912500    |0.997587  | 0.524325                                         |
    | Inferno-TodoMVC                      |65.604167    |66.120833    |1.007876  | 0.145549                                         |
    | Flight-TodoMVC                       |77.029167    |76.708333    |0.995835  | 0.518562                                         |
    | Angular2-TypeScript-TodoMVC          |40.516667    |40.812500    |1.007302  | 0.513386                                         |
    | VanillaJS-TodoMVC                    |54.762500    |54.895833    |1.002435  | 0.647381                                         |
    | jQuery-TodoMVC                       |255.950000   |250.425000   |0.978414  | 0.000000 (significant)                           |
    | EmberJS-Debug-TodoMVC                |341.745833   |342.804167   |1.003097  | 0.219937                                         |
    | React-TodoMVC                        |88.854167    |88.700000    |0.998265  | 0.568405                                         |
    | React-Redux-TodoMVC                  |151.266667   |150.804167   |0.996942  | 0.256403                                         |
    | Vanilla-ES2015-Babel-Webpack-TodoMVC |65.783333    |65.645833    |0.997910  | 0.437464                                         |
    ----------------------------------------------------------------------------------------------------------------------------------
    a mean = 246.52898
    b mean = 246.85128
    pValue = 0.3927330278
    (Bigger means are better.)
    1.001 times better
    Results ARE NOT significant

* yarr/YarrJIT.cpp:
(JSC::Yarr::BoyerMooreInfo::shortenLength):
(JSC::Yarr::BoyerMooreInfo::setAll):
(JSC::Yarr::BoyerMooreInfo::addCharacters):
(JSC::Yarr::BoyerMooreInfo::addRanges):
* yarr/YarrJIT.h:
(JSC::Yarr::BoyerMooreBitmap::add):
(JSC::Yarr::BoyerMooreBitmap::addCharacters):
(JSC::Yarr::BoyerMooreBitmap::addRanges):
(JSC::Yarr::BoyerMooreBitmap::setAll):
(JSC::Yarr::BoyerMooreBitmap::isAllSet const):

Canonical link: https://commits.webkit.org/240194@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-02 23:43:16 +00:00
Alexey Proskuryakov 8be326b1fa Remove stale 'now' subdirectory in JSTests/test262/test/built-ins/Temporal, as we ended up with both 'now' and 'Now', breaking checkout on case insensitive file systems
Canonical link: https://commits.webkit.org/240181@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-02 21:20:37 +00:00
Yusuke Suzuki 0f4ae124c2 [JSC] Update test262
https://bugs.webkit.org/show_bug.cgi?id=228709

Reviewed by Mark Lam.

* test262/latest-changes-summary.txt:
* test262/test/built-ins/Error/prototype/constructor/S15.11.4.1_A1_T1.js: Removed.
* test262/test/built-ins/Error/prototype/message/15.11.4.3-1.js: Removed.
* test262/test/built-ins/Error/prototype/message/S15.11.4.3_A1.js: Removed.
* test262/test/built-ins/Error/prototype/message/S15.11.4.3_A2.js: Removed.
* test262/test/built-ins/Error/prototype/name/15.11.4.2-1.js: Removed.
* test262/test/built-ins/Error/prototype/name/S15.11.4.2_A1.js: Removed.
* test262/test/built-ins/Error/prototype/name/S15.11.4.2_A2.js: Removed.
* test262/test/built-ins/Error/prototype/toString/S15.11.4.4_A1.js: Removed.
* test262/test/built-ins/TypedArray/prototype/findLast/return-abrupt-from-this-out-of-bounds.js:
* test262/test/built-ins/TypedArray/prototype/findLastIndex/return-abrupt-from-this-out-of-bounds.js:
* test262/test/harness/sta-error.js: Removed.
* test262/test/harness/sta-override-error.js: Removed.
* test262/test262-Revision.txt:

Canonical link: https://commits.webkit.org/240173@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-02 18:41:17 +00:00
Yusuke Suzuki 638413b3df [JSC] Upgrade test262
https://bugs.webkit.org/show_bug.cgi?id=228627

Reviewed by Ross Kirsling.

* test262/config.yaml:
* test262/expectations.yaml:


Canonical link: https://commits.webkit.org/240146@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-31 09:43:51 +00:00
Robin Morisset 5f2cd74b78 Improve OSR entry into Wasm loops with arguments
https://bugs.webkit.org/show_bug.cgi?id=228595

Reviewed by Yusuke Suzuki.

JSTests:

Just a straightforward test that counts to 1M in a loop, to exercise both OSR entry and a loop with an argument at the same time.
100k iterations was not enough to reliably complete an OSR entry.

* wasm/stress/osr-entry-with-loop-arguments.js: Added.
(async test):

Source/JavaScriptCore:

This patch has two parts:
- improve the Wasm OSR code to fully support loop arguments (just some plumbing to make sure that the right values are propagated)
- improve the B3 validator to fix a hole I noticed while writing the first part: we were not detecting code that introduce Upsilons in the wrong blocks.
  Naturally, this caused hard to debug issues, as B3 has no well-defined semantics for a Phi that is reached before the corresponding Upsilon(s).

* b3/B3Validate.cpp:
* wasm/WasmAirIRGenerator.cpp:
(JSC::Wasm::AirIRGenerator::emitLoopTierUpCheck):
(JSC::Wasm::AirIRGenerator::addLoop):
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::emitLoopTierUpCheck):
(JSC::Wasm::B3IRGenerator::addLoop):
* wasm/WasmLLIntGenerator.cpp:
(JSC::Wasm::LLIntGenerator::addLoop):


Canonical link: https://commits.webkit.org/240139@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280507 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-31 01:40:05 +00:00
Tadeu Zagallo ee0e12acf0 putInlineFastReplacingStaticPropertyIfNeeded should handle custom values
https://bugs.webkit.org/show_bug.cgi?id=227963

Reviewed by Alexey Shvayka.

JSTests:

* stress/reflect-set-custom-value.js:

Source/JavaScriptCore:

Follow up after r280463: as it turns out, putInlineFastReplacingStaticPropertyIfNeeded also needs to handle
custom values, similar to how definePropertyOnReceiverSlow was updated. This function will be called when the
target property of the receiver is a custom value and isn't reified. The previous test case was expanded to
test both the reified and non-reified cases.

* runtime/JSObject.cpp:
(JSC::JSObject::putInlineFastReplacingStaticPropertyIfNeeded):
* tools/JSDollarVM.cpp:


Canonical link: https://commits.webkit.org/240137@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-31 01:33:44 +00:00
Tadeu Zagallo 4dacb5e5b4 definePropertyOnReceiver should check if receiver canPerformFastPutInline
https://bugs.webkit.org/show_bug.cgi?id=227963
<rdar://80259710>

Reviewed by Alexey Shvayka.

JSTests:

* stress/reflect-set-custom-value.js: Added.

Source/JavaScriptCore:

definePropertyOnReceiver has a fast path if the slot is not opaque and the receiver doesn't
have a custom defineOwnProperty implementation, in which case it calls putInlineFast (and
transitively putDirectInternal<PutModePut>). The issue is that putDirectInternal does not
handle customValues correctly: it just overwrites the property without changing the attributes.
To fix that, we should first check if the property might be a custom value, and if that's the case
we now call `definePropertyOnReceiverSlow`, which has been updated to handle custom values correctly.
I also added assertions to putInlineFastReplacingStaticPropertyIfNeeded and putDirectInternal
to make sure we don't accidentally overwrite custom values in the future.

* runtime/JSObject.cpp:
(JSC::definePropertyOnReceiverSlow):
(JSC::JSObject::definePropertyOnReceiver):
(JSC::JSObject::putInlineFastReplacingStaticPropertyIfNeeded):
* runtime/JSObjectInlines.h:
(JSC::JSObject::putDirectInternal):


Canonical link: https://commits.webkit.org/240098@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-30 02:00:36 +00:00
Alexey Shvayka daaceb7a93 [JSC] Legacy RegExp fields should be accessors
https://bugs.webkit.org/show_bug.cgi?id=220233

Reviewed by Tadeu Zagallo.

JSTests:

* ChakraCore/test/Lib/forin_lib_v3.baseline-jsc:
* microbenchmarks/assign-custom-setter-polymorphic.js:
* microbenchmarks/assign-custom-setter.js:
* microbenchmarks/custom-setter-getter-as-put-get-by-id.js:
* microbenchmarks/custom-value-2.js:
* microbenchmarks/custom-value.js:
* microbenchmarks/get-custom-getter.js:
* stress/custom-value-delete-property-1.js:
* stress/custom-value-delete-property-2.js:
* stress/custom-value-delete-property-3.js:
* stress/object-assign-fast-path.js:
* stress/reflect-set.js:
* stress/regexp-constructor-dollar-getters-are-unique.js: Added.
* stress/regexp-setter-realm.js: Added.
* stress/static-put-in-prototype-chain.js: Added.
* test262/config.yaml:
* test262/expectations.yaml:

Source/JavaScriptCore:

This patch implements a part of Legacy RegExp features proposal [1], replacing
custom values with custom accessors that require |this| value to be RegExp
constructor of the same realm.

Apart from fixing property descriptors, this change brings legacy RegExpConstructor
fields in compliance with invariants of internal methods [2] (described in #151348),
aligning JSC with V8 and SpiderMonkey.

It doesn't, however, implement [[LegacyFeaturesEnabled]] and RegExp.prototype.compile
changes.

[1]: https://github.com/tc39/proposal-regexp-legacy-features
[2]: https://tc39.es/ecma262/#sec-invariants-of-the-essential-internal-methods

* bytecode/AccessCase.cpp:
(JSC::AccessCase::generateImpl):
* runtime/RegExpConstructor.cpp:
(JSC::JSC_DEFINE_CUSTOM_GETTER):
(JSC::JSC_DEFINE_CUSTOM_SETTER):
(JSC::regExpConstructorDollarImpl): Deleted.
* tools/JSDollarVM.cpp:

LayoutTests:

* js/dom/getOwnPropertyDescriptor-expected.txt:
* js/dom/regexp-caching-expected.txt:
* js/dom/regexp-caching.html:
* js/resources/getOwnPropertyDescriptor.js:
* js/script-tests/static-put-in-prototype-chain.js:
* js/static-put-in-prototype-chain-expected.txt:
* js/static-put-in-prototype-chain.html:


Canonical link: https://commits.webkit.org/240095@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-30 01:36:31 +00:00
Yusuke Suzuki 4bd770678d [JSC] Yarr should perform BoyerMoore search
https://bugs.webkit.org/show_bug.cgi?id=228301

Reviewed by Saam Barati.

JSTests:

* microbenchmarks/jquery-todomvc-regexp.js:
* stress/regexp--bm-search-long-character.js: Added.
(shouldBe):
* stress/regexp--bm-search-long-map.js: Added.
(shouldBe):
* stress/regexp-bitvector-reuse.js: Added.
(shouldBe):
* stress/regexp-non-ascii-bm-search-character.js: Added.
(shouldBe):
* stress/regexp-non-ascii-bm-search-map.js: Added.
(shouldBe):

Source/JavaScriptCore:

This patch emits skipping fast-path at the beginning of body alternatives with a large stride. So we can quickly discard unrelated characters
and attempt to find possibly related sequence in the long sequence. The method is derived from V8's implementation (with some extensions).

If we have a searching pattern /abcdef/, then we can check the 6th character against a set of {a, b, c, d, e, f}.
If it does not match, we can shift 6 characters. We use this strategy since this way can be extended easily to support
disjunction, character-class, and ignore-cases. For example, in the case of /(?:abc|def)/, we can check 3rd character
against {a, b, c, d, e, f} and shift 3 characters if it does not match.

Then, the best way to perform the above shifting is that finding the longest character sequence which does not have
many candidates. In the case of /[a-z]aaaaaaa[a-z]/, we can extract "aaaaaaa" sequence and check 8th character against {a}.
If it does not match, then we can shift 7 characters (length of "aaaaaaa"). This shifting is better than using "[a-z]aaaaaaa[a-z]"
sequence and {a-z} set since {a-z} set will almost always match.

We first collect possible characters for each character position. Then, apply heuristics to extract good character sequence from
that and construct fast searching with long stride.

Microbenchmark which performs RegExp ops in Speedometer2/jQuery-TodoMVC shows 25% improvement.

                                      ToT                     Patched

    jquery-todomvc-regexp      723.9739+-1.3997     ^    579.1698+-1.2505        ^ definitely 1.2500x faster

This improves Speedometer2/jQuery-TodoMVC by 3%.

    ----------------------------------------------------------------------------------------------------------------------------------
    |               subtest                |     ms      |     ms      |  b / a   | pValue (significance using False Discovery Rate) |
    ----------------------------------------------------------------------------------------------------------------------------------
    | Elm-TodoMVC                          |123.365625   |123.456250   |1.000735  | 0.804077                                         |
    | VueJS-TodoMVC                        |26.912500    |26.925000    |1.000464  | 0.969603                                         |
    | EmberJS-TodoMVC                      |127.540625   |127.562500   |1.000172  | 0.960474                                         |
    | BackboneJS-TodoMVC                   |50.606250    |50.518750    |0.998271  | 0.670313                                         |
    | Preact-TodoMVC                       |21.018750    |20.850000    |0.991971  | 0.563818                                         |
    | AngularJS-TodoMVC                    |136.943750   |137.271875   |1.002396  | 0.531513                                         |
    | Vanilla-ES2015-TodoMVC               |68.521875    |68.593750    |1.001049  | 0.701376                                         |
    | Inferno-TodoMVC                      |65.559375    |65.803125    |1.003718  | 0.414418                                         |
    | Flight-TodoMVC                       |77.284375    |76.715625    |0.992641  | 0.219870                                         |
    | Angular2-TypeScript-TodoMVC          |40.725000    |40.318750    |0.990025  | 0.281212                                         |
    | VanillaJS-TodoMVC                    |55.209375    |54.715625    |0.991057  | 0.056921                                         |
    | jQuery-TodoMVC                       |266.396875   |258.471875   |0.970251  | 0.000000 (significant)                           |
    | EmberJS-Debug-TodoMVC                |341.550000   |341.856250   |1.000897  | 0.618140                                         |
    | React-TodoMVC                        |88.731250    |88.871875    |1.001585  | 0.512407                                         |
    | React-Redux-TodoMVC                  |150.340625   |150.065625   |0.998171  | 0.412940                                         |
    | Vanilla-ES2015-Babel-Webpack-TodoMVC |65.390625    |65.362500    |0.999570  | 0.834760                                         |
    ----------------------------------------------------------------------------------------------------------------------------------
    a mean = 245.96997
    b mean = 246.86366
    pValue = 0.0061448402
    (Bigger means are better.)
    1.004 times better
    Results ARE significant

* runtime/OptionsList.h:
* yarr/YarrJIT.cpp:
(JSC::Yarr::BoyerMooreInfo::BoyerMooreInfo):
(JSC::Yarr::BoyerMooreInfo::length const):
(JSC::Yarr::BoyerMooreInfo::set):
(JSC::Yarr::BoyerMooreInfo::index const):
(JSC::Yarr::BoyerMooreInfo::setIndex):
(JSC::Yarr::BoyerMooreInfo::create):
(JSC::Yarr::BoyerMooreInfo::findBestCharacterSequence const):
(JSC::Yarr::BoyerMooreInfo::findWorthwhileCharacterSequenceForLookahead const):
(JSC::Yarr::BoyerMooreInfo::createCandidateBitmap const):
* yarr/YarrJIT.h:
(JSC::Yarr::BoyerMooreBitmap::count const):
(JSC::Yarr::BoyerMooreBitmap::map const):
(JSC::Yarr::BoyerMooreBitmap::isMaskEffective const):
(JSC::Yarr::BoyerMooreBitmap::add):
(JSC::Yarr::BoyerMooreByteVector::BoyerMooreByteVector):
(JSC::Yarr::YarrCodeBlock::set8BitCode):
(JSC::Yarr::YarrCodeBlock::set16BitCode):
(JSC::Yarr::YarrCodeBlock::set8BitCodeMatchOnly):
(JSC::Yarr::YarrCodeBlock::set16BitCodeMatchOnly):
(JSC::Yarr::YarrCodeBlock::clear):
(JSC::Yarr::YarrCodeBlock::findSameVector const):

Source/WTF:

* wtf/BitVector.cpp:
(WTF::BitVector::dump const):
* wtf/Bitmap.h:
(WTF::WordType>::dump const):
* wtf/UniqueRef.h:
(WTF::makeUniqueRefFromNonNullUniquePtr):
(WTF::UniqueRef::UniqueRef):

Canonical link: https://commits.webkit.org/240087@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-29 22:26:13 +00:00
Alexey Shvayka 48894e59b1 Partly implement Function.prototype.{caller,arguments} reflection proposal
https://bugs.webkit.org/show_bug.cgi?id=158116

Reviewed by Yusuke Suzuki.

JSTests:

* ChakraCore/test/strict/19.function.baseline:
* ChakraCore/test/strict/22.callerCalleeArguments.baseline-jsc:
* microbenchmarks/function-prototype-get.js: Added.
* microbenchmarks/reflect-own-keys-function.js: Added.
* stress/for-in-shadow-non-enumerable.js:
* stress/function-hidden-as-caller.js:
* stress/has-own-property-arguments.js:
* stress/object-assign-fast-path.js:
* stress/put-to-proto-chain-overrides-put.js:
* stress/reflect-set.js:
* test262/config.yaml: Skip 3 test cases that are now incorrect.
* test262/expectations.yaml: Mark 2 test cases as passing.

Source/JavaScriptCore:

To ensure web-compatibility, only the safe subset of Function.prototype.{caller,arguments}
reflection proposal [1] is implemented, which is currently shipped in SpiderMonkey.

Complete list of differences from the proposed spec:

  1. Cross-realm receiver function is allowed instead of throwing a TypeError.

     Throwing is likely safe to ship, but #225997 needs to be fixed first for
     custom properties to receive correct global object.

  2. Cross-realm caller function is returned instead of `null`.

     Hiding cross-realm caller may break things: we currently have a test for
     the opposite behavior.

  3. Defines "caller" and "arguments" setters that throw for disallowed receivers,
     instead failing silently in sloppy mode.

     This is actually more restrictive than the spec, which is preferable,
     and aligns with V8 and SM.

Most importantly, this patch removes own "caller" and "arguments" properties from
sloppy mode ES5 functions. They were non-configurable, making it harder to use
their holder as a [[ProxyTarget]]. They were also non-writable, with a constantly
changing [[Value]], which violated the invariants of internal methods [2].

As a result, JSFunction methods are greatly simplified, especially defineOwnProperty()
and getOwnSpecialPropertyNames(). The latter is now 2.1x faster according to the
provided microbenchmark. Also, removes double "prototype" lookup from [[Get]],
which is a 10% progression.

[1]: https://github.com/claudepache/es-legacy-function-reflection
[2]: https://tc39.es/ecma262/#sec-invariants-of-the-essential-internal-methods

* runtime/ClonedArguments.cpp:
(JSC::ClonedArguments::getOwnPropertySlot):
(JSC::ClonedArguments::materializeSpecials):
* runtime/FunctionExecutable.h:
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::addFunctionProperties):
(JSC::isAllowedReceiverFunctionForCallerAndArguments):
(JSC::RetrieveArgumentsFunctor::RetrieveArgumentsFunctor):
(JSC::RetrieveArgumentsFunctor::result const):
(JSC::RetrieveArgumentsFunctor::operator() const):
(JSC::retrieveArguments):
(JSC::JSC_DEFINE_CUSTOM_GETTER):
(JSC::RetrieveCallerFunctionFunctor::RetrieveCallerFunctionFunctor):
(JSC::RetrieveCallerFunctionFunctor::result const):
(JSC::RetrieveCallerFunctionFunctor::operator() const):
(JSC::retrieveCallerFunction):
(JSC::JSC_DEFINE_CUSTOM_SETTER):
(JSC::FunctionPrototype::initRestrictedProperties): Deleted.
* runtime/FunctionPrototype.h:
* runtime/JSFunction.cpp:
(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::getOwnSpecialPropertyNames):
(JSC::JSFunction::put):
(JSC::JSFunction::deleteProperty):
(JSC::JSFunction::defineOwnProperty):
(JSC::RetrieveArgumentsFunctor::RetrieveArgumentsFunctor): Deleted.
(JSC::RetrieveArgumentsFunctor::result const): Deleted.
(JSC::RetrieveArgumentsFunctor::operator() const): Deleted.
(JSC::retrieveArguments): Deleted.
(JSC::JSC_DEFINE_CUSTOM_GETTER): Deleted.
(JSC::RetrieveCallerFunctionFunctor::RetrieveCallerFunctionFunctor): Deleted.
(JSC::RetrieveCallerFunctionFunctor::result const): Deleted.
(JSC::RetrieveCallerFunctionFunctor::operator() const): Deleted.
(JSC::retrieveCallerFunction): Deleted.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildrenImpl):
* runtime/JSGlobalObject.h:
Remove unused m_throwTypeErrorGetterSetter and make [[ThrowTypeError]] lazily-created.

* runtime/JSGlobalObjectFunctions.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* runtime/JSGlobalObjectFunctions.h:
* runtime/JSObject.cpp:
(JSC::JSObject::putDirectCustomGetterSetterWithoutTransition):
* runtime/JSObject.h:

LayoutTests:

* inspector/model/remote-object-get-properties-expected.txt:
* inspector/runtime/getDisplayableProperties-expected.txt:
* inspector/runtime/getProperties-expected.txt:
* js/Object-getOwnPropertyNames-expected.txt:
* js/basic-strict-mode-expected.txt:
* js/kde/function_arguments-expected.txt:
* js/kde/script-tests/function_arguments.js:
* js/non-strict-function-properties-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:
* js/script-tests/basic-strict-mode.js:
* js/script-tests/non-strict-function-properties.js:
* js/script-tests/throw-type-error-is-unique.js:


Canonical link: https://commits.webkit.org/239947@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-25 22:32:20 +00:00
Yusuke Suzuki e0f23b402e [JSC] Add Speedometer2 jQuery-TodoMVC RegExp microbenchmark
https://bugs.webkit.org/show_bug.cgi?id=228257

Reviewed by Mark Lam.

I instrumented JSC and extracted executed RegExp evaluations from Speedometer2/jQuery-TodoMVC
to easily test RegExp performance.

* microbenchmarks/jquery-todomvc-regexp.js: Added.
(x00.test):

Canonical link: https://commits.webkit.org/239939@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280281 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-24 03:40:46 +00:00
Alexey Shvayka b2f5bae460 [JSC] Call custom accessors / values with their holder's global object
https://bugs.webkit.org/show_bug.cgi?id=225997

Reviewed by Yusuke Suzuki.

JSTests:

* stress/custom-get-set-proto-chain-put.js:
* stress/getter-setter-globalobject-in-ic-2.js: Added.

LayoutTests/imported/w3c:

* web-platform-tests/WebIDL/ecmascript-binding/global-object-implicit-this-value-cross-realm-expected.txt: Added.
* web-platform-tests/WebIDL/ecmascript-binding/global-object-implicit-this-value-cross-realm.html: Added.
* web-platform-tests/WebIDL/ecmascript-binding/invalid-this-value-cross-realm-expected.txt: Added.
* web-platform-tests/WebIDL/ecmascript-binding/invalid-this-value-cross-realm.html: Added.
* web-platform-tests/WebIDL/ecmascript-binding/support/create-realm.js: Added.
* web-platform-tests/WebIDL/ecmascript-binding/support/dummy-iframe.html: Added.
* web-platform-tests/html/browsers/origin/cross-origin-objects/window-location-and-location-href-cross-realm-set-expected.txt: Added.
* web-platform-tests/html/browsers/origin/cross-origin-objects/window-location-and-location-href-cross-realm-set.html: Added.

* web-platform-tests/html/webappapis/scripting/events/compile-event-handler-settings-objects-expected.txt:
* web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-incumbent-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-request-css-cross-origin.https-expected.txt:
* web-platform-tests/webrtc-encoded-transform/sframe-transform-readable.html:
All these are confirmed progressions.

* web-platform-tests/performance-timeline/supportedEntryTypes-cross-realm-access-expected.txt: Added.
* web-platform-tests/performance-timeline/supportedEntryTypes-cross-realm-access.html: Added.

Source/JavaScriptCore:

Just like JS built-ins, getter / setter functions of WebIDL attributes are created in realm
of their holder interface [1][2], which is their _current_ realm for throwing an error [3].

With this patch, custom properties get correct global object instead of lexical, including
when inline cached, aligning them with functions and regular accessors.

The latter allowed switching JS built-ins to CustomAccessor (e.g. Symbol#description),
which is slightly more efficient to call from C++, doesn't need reification on first access,
and has nicer signature.

Also, renames WASM accessors to drop "func" and removes unused function length parameter.

[1]: https://heycam.github.io/webidl/#dfn-attribute-getter (step 2)
[2]: https://heycam.github.io/webidl/#dfn-attribute-setter (step 5)
[3]: https://heycam.github.io/webidl/#ecmascript-throw

* bytecode/AccessCase.cpp:
(JSC::AccessCase::generateImpl):
* create_hash_table:
* interpreter/CallFrame.cpp:
(JSC::CallFrame::globalObjectOfClosestCodeBlock):
* interpreter/CallFrame.h:
* runtime/IntlCollatorPrototype.cpp:
(JSC::JSC_DEFINE_CUSTOM_GETTER):
* runtime/IntlDateTimeFormatPrototype.cpp:
(JSC::JSC_DEFINE_CUSTOM_GETTER):
* runtime/IntlLocalePrototype.cpp:
(JSC::JSC_DEFINE_CUSTOM_GETTER):
* runtime/IntlNumberFormatPrototype.cpp:
(JSC::JSC_DEFINE_CUSTOM_GETTER):
* runtime/JSDataViewPrototype.cpp:
(JSC::JSC_DEFINE_CUSTOM_GETTER):
* runtime/JSObject.cpp:
(JSC::JSObject::putInlineSlow):
* runtime/PropertySlot.cpp:
(JSC::PropertySlot::customGetter const):
* runtime/PropertySlot.h:
(JSC::PropertySlot::getValue const):
* runtime/SymbolPrototype.cpp:
(JSC::JSC_DEFINE_CUSTOM_GETTER):
* tools/JSDollarVM.cpp:
* wasm/js/WebAssemblyInstancePrototype.cpp:
(JSC::JSC_DEFINE_CUSTOM_GETTER):
(JSC::JSC_DEFINE_HOST_FUNCTION): Deleted.
* wasm/js/WebAssemblyMemoryPrototype.cpp:
(JSC::JSC_DEFINE_CUSTOM_GETTER):
* wasm/js/WebAssemblyTablePrototype.cpp:
(JSC::JSC_DEFINE_CUSTOM_GETTER):

Source/WebCore:

This patch fixes cross-realm yet same-origin WebIDL attributes to throw errors in realm of
their accessor, while ensuring that `window.location` and `location.href` setters don't leak
cross-origin Object.prototype via thrown error.

Since Location setters relied on lexical global object to pass outgoing `document.referrer`,
they were updated to use IncumbentWindow as per spec [1]. callerGlobalObject() was reworked
to skip native / built-in callers and rely on VMEntryScope to accomodate top-level <script>
code navigating via Location setter, making the helper more versatile.

globalObjectOfClosestCodeBlock() fixed JSCustomSetterFunction instances and Location's
assign() / replace() methods to pass correct referrer.

Also, this change fixes static attributes like `PerformanceObserver.supportedEntryTypes`
to return wrappers of their realm instead of lexical.

[1] https://html.spec.whatwg.org/multipage/history.html#location-object-navigate (step 2)

Tests: imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/global-object-implicit-this-value-cross-realm.html
       imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/invalid-this-value-cross-realm.html
       imported/w3c/web-platform-tests/html/browsers/origin/cross-origin-objects/window-location-and-location-href-cross-realm-set.html
       imported/w3c/web-platform-tests/performance-timeline/supportedEntryTypes-cross-realm-access.html

* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::callerGlobalObject): Deleted.
* bindings/js/JSDOMGlobalObject.h:
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::incumbentDOMWindow):
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::put):
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::put):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateNamedGetterLambda):
(GenerateCallWithUsingReferences):
(GenerateCallWith):
Ensure IncumbentWindow comes before FirstWindow.

* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/TestObj.idl:
Remove attributes that relied on CallFrame since custom getters don't have it.

* page/Location.idl:
Remove [LegacyUnforgeable] from ancestorOrigins because it's set on the interface.

LayoutTests:

* fast/dom/HTMLObjectElement/object-as-frame-expected.txt:
* fast/dom/HTMLObjectElement/object-as-frame.html:
* fast/dom/HTMLObjectElement/resources: Added.
* fast/dom/HTMLObjectElement/resources/dummy-frame-1.html: Added.
* fast/dom/HTMLObjectElement/resources/dummy-frame-2.html: Added.
* fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html:
* fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html:
These tests used to pass as is, probably, due to combination of old (incorrect) behavior and
some implementation details of run-webkit-tests. They fail on MiniBrowser / Chrome / Firefox
unless modified not to use data:// protocol, which is not system under test.

* fast/frames/sandboxed-iframe-navigation-parent-expected.txt:
* fast/frames/sandboxed-iframe-navigation-parent.html:
* http/tests/security/frameNavigation/context-for-location-assign-expected.txt:
Revert the changes made in r174996. Location::assign() now uses correct (incumbent) Window
to set outgoing referrer and perform security checks, aligning WebKit with Chrome / Firefox.

* http/tests/security/frameNavigation/context-for-location-href-gopd-expected.txt: Added.
* http/tests/security/frameNavigation/context-for-location-href-gopd.html: Added.


Canonical link: https://commits.webkit.org/239923@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280256 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-23 20:13:31 +00:00
Saam Barati 42de282191 JSTests/stress/test-out-of-memory shouldn't assume that we always OOM
https://bugs.webkit.org/show_bug.cgi?id=228213

Reviewed by Mark Lam.

* stress/test-out-of-memory.js:


Canonical link: https://commits.webkit.org/239903@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-23 03:17:51 +00:00
Yusuke Suzuki 8ccf1667d8 Reduce iteration of microbenchmarks/memcpy-typed-loop.js
https://bugs.webkit.org/show_bug.cgi?id=228214

Reviewed by Saam Barati.

Observing frequent timeout (e.g. https://ews-build.webkit.org/#/builders/1/builds/44698).
We do not need to have such a large # of iterations.

* microbenchmarks/memcpy-typed-loop.js:


Canonical link: https://commits.webkit.org/239902@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-23 03:17:00 +00:00
Saam Barati d9a9aa8006 AirStackSlot's uint16_t byte size is too small
https://bugs.webkit.org/show_bug.cgi?id=228193
<rdar://80888059>

Reviewed by Mark Lam.

JSTests:

* stress/stack-slot-needs-to-use-more-than-uint16.js: Added.

Source/JavaScriptCore:

* b3/B3Procedure.cpp:
(JSC::B3::Procedure::addStackSlot):
* b3/B3Procedure.h:
* b3/air/AirCode.cpp:
(JSC::B3::Air::Code::addStackSlot):
* b3/air/AirCode.h:
* b3/air/AirStackSlot.cpp:
(JSC::B3::Air::StackSlot::StackSlot):
* b3/air/AirStackSlot.h:
(JSC::B3::Air::StackSlot::ensureSize):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::lower):
* ftl/FTLOutput.cpp:
(JSC::FTL::Output::lockedStackSlot):
* ftl/FTLOutput.h:


Canonical link: https://commits.webkit.org/239886@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-22 21:37:02 +00:00
Yusuke Suzuki 53cbdb4393 [JSC] invalidParameterInstanceofSourceAppender should care direct call of Symbol.hasInstance
https://bugs.webkit.org/show_bug.cgi?id=228075
rdar://80762879

Reviewed by Frédéric Wang.

JSTests:

* stress/symbol-hasinstance-error.js: Added.
(shouldThrow):
(let.a):

Source/JavaScriptCore:

invalidParameterInstanceofSourceAppender can be invoked without `instanceof` expression since we can call
`[Symbol.hasInstance]` function directly, but the implementation did not assume that. This patch fixes
it to handle this direct call.

* runtime/ExceptionHelpers.cpp:
(JSC::invalidParameterInstanceofSourceAppender):


Canonical link: https://commits.webkit.org/239814@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-20 19:35:56 +00:00
Mark Lam d2a5d42c1a DFG's parseIntResult() should check for negative zero.
https://bugs.webkit.org/show_bug.cgi?id=228068
rdar://80788603

Reviewed by Yusuke Suzuki.

JSTests:

* stress/dfg-parseIntResult-should-check-for-negative-zero.js: Added.

Source/JavaScriptCore:

We have to check for negative zero explicitly because C++ evaluates 0.0 == -0.0
as true.

* dfg/DFGOperations.cpp:
(JSC::DFG::parseIntResult):



Canonical link: https://commits.webkit.org/239795@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-20 00:48:54 +00:00
Yusuke Suzuki 2a845f864a [JSC] InByStatus / InByVariant should visit CacheableIdentifier
https://bugs.webkit.org/show_bug.cgi?id=228088
rdar://80794604

Reviewed by Mark Lam.

JSTests:

* stress/in-by-variant-should-mark-cacheable-identifier.js: Added.
(foo):
(let.handler.has):

Source/JavaScriptCore:

After r278445, InByVariant holds CacheableIdentifier. And this can have
String/Symbol cells if this variant is generated by in_by_val. In that
case, we must visit this cell as GetByStatus / GetByVariant are doing.

* bytecode/InByStatus.cpp:
(JSC::InByStatus::visitAggregateImpl):
* bytecode/InByStatus.h:
* bytecode/InByVariant.cpp:
(JSC::InByVariant::visitAggregateImpl):
* bytecode/InByVariant.h:
* bytecode/RecordedStatuses.cpp:
(JSC::RecordedStatuses::visitAggregateImpl):

Canonical link: https://commits.webkit.org/239785@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-19 22:17:56 +00:00
Yusuke Suzuki 41bf556263 [JSC] Simplify sampling-profiler-regexp.js test
https://bugs.webkit.org/show_bug.cgi?id=228040

Reviewed by Saam Barati.

In this new test case, only thing we care is regexp appears on sampling-profiler regardless of whether the other functions are inlined / tail-called or not.
We change the sampling-profiler/samplingProfiler.js runTest to add a mode which searches specific signature in the call tree.

* stress/sampling-profiler-regexp.js:
(platformSupportsSamplingProfiler):
* stress/sampling-profiler/samplingProfiler.js:
(doesTreeHaveStackTrace):
(runTest):


Canonical link: https://commits.webkit.org/239753@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280011 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-17 00:15:32 +00:00
Saam Barati 04841c1b83 Grab the lock in FTL::Thunks::keyForSlowPathCallThunk
https://bugs.webkit.org/show_bug.cgi?id=227988
<rdar://problem/80627901>

Reviewed by Mark Lam.

JSTests:

* stress/thunks-hash-map-should-grab-lock.js: Added.

Source/JavaScriptCore:

Both FTL::Thunks::keyForSlowPathCallThunk and FTL::Thunks::getSlowPathCallThunk
both touch the thunks hash map. In r278030, when I added the lock, I grabbed it
in getSlowPathCallThunk, but forgot to also grab it in keyForSlowPathCallThunk.

* ftl/FTLThunks.h:
(JSC::FTL::Thunks::keyForSlowPathCallThunk):


Canonical link: https://commits.webkit.org/239750@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280008 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-16 23:40:00 +00:00
Yusuke Suzuki 13848dc50c [JSC] RegExp::dumpToStream must not ref Strings since it is called concurrently
https://bugs.webkit.org/show_bug.cgi?id=228031
rdar://80686425

Reviewed by Mark Lam.

JSTests:

* stress/regexp-dump-concurrently.js: Added.
(let.code):

Source/JavaScriptCore:

RegExp::dumpToStream's escapedPattern can return m_pattern. In that case, it is refed in the concurrent thread.
This is wrong since StringImpl must not be ref-ed concurrently. This patch just revert this function to the old behavior.

* runtime/RegExp.cpp:
(JSC::RegExp::dumpToStream):

Canonical link: https://commits.webkit.org/239740@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279997 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-16 21:01:16 +00:00
Yusuke Suzuki ba81330178 [JSC] SamplingProfiler should recognize RegExp execution
https://bugs.webkit.org/show_bug.cgi?id=201702

Reviewed by Saam Barati.

JSTests:

* stress/sampling-profiler-regexp.js: Added.
(platformSupportsSamplingProfiler.getText):
(platformSupportsSamplingProfiler.test):
(platformSupportsSamplingProfiler.baz):
(platformSupportsSamplingProfiler):
* stress/sampling-profiler/samplingProfiler.js: Extend samplingProfiler to show better error information when VERBOSE = true.
(doesTreeHaveStackTrace):

Source/JavaScriptCore:

This patch extends SamplingProfiler to recognize RegExp execution. We record
executing RegExp in VM via MatchingContextHolder so that SamplingProfiler can detect it.
We use MatchingContextHolder even if the RegExp is interpreter mode so that we can still
catch non-JIT RegExp in SamplingProfiler.

The example output is the following.

    Sampling rate: 1000.000000 microseconds. Total samples: 1830
    Top functions as <numSamples  'functionName#hash:sourceID'>
       466    'Exec#<nil>:4'
       225    '/(^|[^\\])\"\\\/Qngr\((-?[0-9]+)\)\\\/\"/g#<nil>:-1'
       173    'runBlock1#<nil>:4'
        88    '/NQ_VQ/g#<nil>:-1'
        83    '/d2/g#<nil>:-1'
        78    '/d1/g#<nil>:-1'
        70    '/\s?;\s?/#<nil>:-1'
        68    'replace#<nil>:3'
        50    '/(((\w+):\/\/)([^\/:]*)(:(\d+))?)?([^#?]*)(\?([^#]*))?(#(.*))?/#<nil>:-1'
        49    'runBlock0#<nil>:4'
        46    '#<nil>:-1'
        24    '/^\s*|\s*$/g#<nil>:-1'

    Sampling rate: 1000.000000 microseconds. Total samples: 1830

    Tier breakdown:
    -----------------------------------
    LLInt:                    13  (0.710383%)
    Baseline:                 54  (2.950820%)
    DFG:                     187  (10.218579%)
    FTL:                     612  (33.442623%)
    js builtin:               73  (3.989071%)
    Wasm:                      0  (0.000000%)
    Host:                      0  (0.000000%)
    RegExp:                  907  (49.562842%)
    C/C++:                     0  (0.000000%)
    Unknown Executable:       57  (3.114754%)

    Hottest bytecodes as <numSamples   'functionName#hash:JITType:bytecodeIndex'>
       378    'Exec#<nil>:FTL:bc#27'
       225    '/(^|[^\\])\"\\\/Qngr\((-?[0-9]+)\)\\\/\"/g#<nil>:RegExp:<nil>'
        88    '/NQ_VQ/g#<nil>:RegExp:<nil>'
        83    '/d2/g#<nil>:RegExp:<nil>'
        78    '/d1/g#<nil>:RegExp:<nil>'
        70    '/\s?;\s?/#<nil>:RegExp:<nil>'
        62    'replace#<nil>:FTL:bc#63'
        53    'Exec#<nil>:DFG:bc#27'
        50    '/(((\w+):\/\/)([^\/:]*)(:(\d+))?)?([^#?]*)(\?([^#]*))?(#(.*))?/#<nil>:RegExp:<nil>'
        46    '#<nil>:None:<nil>'
        42    'runBlock1#<nil>:FTL:bc#1795'
        29    'runBlock1#<nil>:FTL:bc#1849'
        29    'runBlock1#<nil>:FTL:bc#1741'
        24    '/^\s*|\s*$/g#<nil>:RegExp:<nil>'
        17    'runBlock1#<nil>:DFG:bc#1741'
        17    'runBlock1#<nil>:DFG:bc#1795'
        16    '/\b\w+\b/g#<nil>:RegExp:<nil>'
        14    '/TNQP=([^;]*)/i#<nil>:RegExp:<nil>'
        13    '/%\w?$/#<nil>:RegExp:<nil>'
        12    '/^ba/#<nil>:RegExp:<nil>'
        11    '/^\s*(\S*(\s+\S+)*)\s*$/#<nil>:RegExp:<nil>'
        10    'runBlock0#<nil>:FTL:bc#400'
        10    'runBlock1#<nil>:DFG:bc#1849'
        10    'Exec#<nil>:DFG:bc#16'
         9    '/(?:ZFVR.(\d+\.\d+))|(?:(?:Sversbk|TenaCnenqvfb|Vprjrnfry).(\d+\.\d+))|(?:Bcren.(\d+\.\d+))|(?:NccyrJroXvg.(\d+(?:\.\d+)?))/#<nil>:RegExp:<nil>'
         8    '/##yv18##/gi#<nil>:RegExp:<nil>'
         8    '/([a-zA-Z]|\s)+/#<nil>:RegExp:<nil>'
         7    '/JroXvg\/(\S+)/#<nil>:RegExp:<nil>'
         7    'runBlock0#<nil>:FTL:bc#2671'
         7    '/^([#.]?)((?:[\w\u0128-\uffff*_-]|\\.)*)/#<nil>:RegExp:<nil>'
         6    '/##oe##/gi#<nil>:RegExp:<nil>'
         6    'runBlock1#<nil>:FTL:bc#124'
         6    '/[+, ]/#<nil>:RegExp:<nil>'
         6    'runBlock1#<nil>:FTL:bc#1903'
         6    'replace#<nil>:DFG:bc#63'
         5    'runBlock0#<nil>:FTL:bc#3378'
         5    '/'/g#<nil>:RegExp:<nil>'
         5    '/##yv20##/gi#<nil>:RegExp:<nil>'
         4    '/\?[\w\W]*(sevraqvq|punaaryvq|tebhcvq)=([^\&\?#]*)/i#<nil>:RegExp:<nil>'
         4    'load#<nil>:None:<nil>'

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/RegExp.cpp:
(JSC::RegExp::matchCompareWithInterpreter):
(JSC::RegExp::dumpToStream):
(JSC::appendLineTerminatorEscape<LChar>):
(JSC::appendLineTerminatorEscape<UChar>):
(JSC::escapePattern):
(JSC::RegExp::escapedPattern const): Moved from RegExpPrototype.cpp to implement RegExp::toSourceString and RegExp::escapedPattern.
(JSC::RegExp::toSourceString const):
(JSC::regexpToSourceString): Deleted.
* runtime/RegExp.h:
* runtime/RegExpInlines.h:
(JSC::RegExp::matchInline):
* runtime/RegExpPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::appendLineTerminatorEscape<LChar>): Deleted.
(JSC::appendLineTerminatorEscape<UChar>): Deleted.
(JSC::regExpProtoGetterSourceInternal): Deleted.
* runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::takeSample):
(JSC::SamplingProfiler::processUnverifiedStackTraces):
(JSC::SamplingProfiler::StackFrame::nameFromCallee):
(JSC::SamplingProfiler::StackFrame::displayName):
(JSC::SamplingProfiler::StackFrame::displayNameForJSONTests):
(JSC::SamplingProfiler::StackFrame::functionStartLine):
(JSC::SamplingProfiler::StackFrame::functionStartColumn):
(JSC::SamplingProfiler::StackFrame::sourceID):
(JSC::SamplingProfiler::StackFrame::url):
(JSC::SamplingProfiler::reportTopBytecodes):
(WTF::printInternal):
* runtime/SamplingProfiler.h:
* runtime/VM.h:
* yarr/YarrJIT.cpp:
(JSC::Yarr::MatchingContextHolder::MatchingContextHolder): Deleted.
(JSC::Yarr::MatchingContextHolder::~MatchingContextHolder): Deleted.
* yarr/YarrJIT.h:
(JSC::Yarr::MatchingContextHolder::offsetOfStackLimit): Deleted.
(JSC::Yarr::MatchingContextHolder::offsetOfPatternContextBuffer): Deleted.
(JSC::Yarr::MatchingContextHolder::offsetOfPatternContextBufferSize): Deleted.
* yarr/YarrMatchingContextHolder.h: Added.
(JSC::Yarr::MatchingContextHolder::offsetOfStackLimit):
(JSC::Yarr::MatchingContextHolder::offsetOfPatternContextBuffer):
(JSC::Yarr::MatchingContextHolder::offsetOfPatternContextBufferSize):
(JSC::Yarr::MatchingContextHolder::MatchingContextHolder):
(JSC::Yarr::MatchingContextHolder::~MatchingContextHolder):

Canonical link: https://commits.webkit.org/239719@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-16 04:10:49 +00:00
Yusuke Suzuki 63eaf3f49f [JSC] Harden defaultTimeZone retrieval
https://bugs.webkit.org/show_bug.cgi?id=227996
JSTests:

Reviewed by Mark Lam.

* complex.yaml:
* complex/intl-timezone-check.js: Added.
(shouldBe):

Source/JavaScriptCore:

rdar://80540300

Reviewed by Mark Lam.

We received the report that "UTC" can appear in Intl.DateTimeFormat's default timezone.
While we cannot reproduce it, this patch attempts to avoid using TimeZone from UCalendar
so that the code gets the same to the old defaultTimeZone implementation.

* runtime/JSDateMath.cpp:
(JSC::DateCache::defaultTimeZone):
(JSC::DateCache::timeZoneCacheSlow):

Canonical link: https://commits.webkit.org/239705@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-15 20:44:57 +00:00
Mark Lam d20124cec3 JITWorklist::waitUntilAllPlansForVMAreReady() should also be notified when plans are cancelled.
https://bugs.webkit.org/show_bug.cgi?id=228003
rdar://78314543

Reviewed by Yusuke Suzuki.

JSTests:

* stress/waitUntilAllPlansForVMAreReady-should-be-notified-of-cancelled-plans-too.js: Added.

Source/JavaScriptCore:

Previously, it only gets notified when plans are done compiling.  As a result, if
JITWorklist::waitUntilAllPlansForVMAreReady() found non-ready plans and started
waiting, and those plans were canceled, then JITWorklist::waitUntilAllPlansForVMAreReady()
can hang indefinitely.

This patch renames JITWorklist::::m_planCompiled to m_planCompiledOrCancelled,
and notifies it also when plans are cancelled.

* jit/JITWorklist.cpp:
(JSC::JITWorklist::waitUntilAllPlansForVMAreReady):
(JSC::JITWorklist::removeMatchingPlansForVM):
* jit/JITWorklist.h:
* jit/JITWorklistThread.cpp:
(JSC::JITWorklistThread::work):



Canonical link: https://commits.webkit.org/239704@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-15 20:42:53 +00:00
Devin Rousso dea74fd373 Implement Array.prototype.findLast and Array.prototype.findLastIndex
https://bugs.webkit.org/show_bug.cgi?id=227939

Reviewed by Yusuke Suzuki.

JSTests:

* stress/typedarray-findLast.js: Added.
(keepEven):
(keepEvenAndChange):
(isBigEnoughAndException):

* stress/typedarray-findLastIndex.js: Added.
(keepEven):
(keepEvenAndChange):
(isBigEnoughAndException):

Source/JavaScriptCore:

* builtins/ArrayPrototype.js:
(findLast): Added.
(findLastIndex): Added.
(JSC::ArrayPrototype::finishCreation):
* runtime/JSTypedArrayViewPrototype.cpp:

* builtins/TypedArrayPrototype.js:
(findLast): Added.
(findLastIndex): Added.
* runtime/ArrayPrototype.cpp:
(JSC::JSTypedArrayViewPrototype::finishCreation):

* runtime/OptionsList.h:

Source/WebInspectorUI:

* UserInterface/Models/NativeFunctionParameters.js:

LayoutTests:

* js/array-findLast.html: Added.
* js/array-findLast-expected.txt: Added.
* js/script-tests/array-findLast.js: Added.
(passUndefined):
(passZero):
(passNull):
(passFalse):
(passEmptyString):
(passEven):
(passAfter5):
(toObject):
(findItemAddedDuringSearch):
(numberOfCallbacksInFindInArrayWithHoles):
(throwError):

* js/array-findLastIndex.html: Added.
* js/array-findLastIndex-expected.txt: Added.
* js/script-tests/array-findLastIndex.js: Added.
(passUndefined):
(passZero):
(passNull):
(passFalse):
(passEmptyString):
(passEven):
(passAfter5):
(toObject):
(findItemAddedDuringSearch):
(numberOfCallbacksInFindIndexInArrayWithHoles):
(throwError):


Canonical link: https://commits.webkit.org/239681@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279937 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-15 03:11:53 +00:00
Keith Miller 0eab9414b9 Unreviewed, test gardening.
* stress/bit-op-with-object-returning-int32.js:
* stress/bitwise-not-fixup-rules.js:
(jscOptions):

Canonical link: https://commits.webkit.org/239670@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-14 22:04:39 +00:00
Mark Lam 8dbae6ab3f Check for out of memory in JSC::globalFuncEscape() and JSC::globalFuncUnescape().
https://bugs.webkit.org/show_bug.cgi?id=227962
rdar://78392251

Reviewed by Yusuke Suzuki.

JSTests:

* stress/out-of-memory-in-globalFuncUnescape.js: Added.

Source/JavaScriptCore:

* runtime/JSGlobalObjectFunctions.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):



Canonical link: https://commits.webkit.org/239664@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279915 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-14 19:15:56 +00:00
Mark Lam bd84039135 Placate exception checker validation in operationObjectAssignUntyped.
https://bugs.webkit.org/show_bug.cgi?id=227955
rdar://80503746

Reviewed by Michael Saboff.

JSTests:

* stress/exception-check-in-operationObjectAssignUntyped.js: Added.

Source/JavaScriptCore:

* dfg/DFGOperations.cpp:
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):


Canonical link: https://commits.webkit.org/239659@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-14 17:25:44 +00:00
Keith Miller d8208fa648 Fix more tests around fuzzing executable allocations
https://bugs.webkit.org/show_bug.cgi?id=226663

Reviewed by Mark Lam.

* stress/bit-op-with-object-returning-int32.js:
(numberOfDFGCompiles): Deleted.
* stress/bitwise-not-fixup-rules.js:
(jscOptions):
(numberOfDFGCompiles): Deleted.


Canonical link: https://commits.webkit.org/239658@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-14 15:00:39 +00:00
Saam Barati f117ca8025 Run some tests for fewer iterations to prevent test timeouts
https://bugs.webkit.org/show_bug.cgi?id=227879

Reviewed by Mark Lam.

* microbenchmarks/get-by-val-negative-array-index.js:
* microbenchmarks/memcpy-typed-loop-small.js:
* microbenchmarks/put-by-val-negative-array-index.js:


Canonical link: https://commits.webkit.org/239601@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-12 19:05:55 +00:00
Saam Barati 7184aa1a2b stress/wasm-loop-consistency.js should require the --useExecutableAllocationFuzz=false JSC option
https://bugs.webkit.org/show_bug.cgi?id=227876

Reviewed by Mark Lam.

* stress/wasm-loop-consistency.js:


Canonical link: https://commits.webkit.org/239598@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-12 18:02:45 +00:00
Yusuke Suzuki 2a7fcaf68b [JSC] Update test262
https://bugs.webkit.org/show_bug.cgi?id=227851

Reviewed by Mark Lam.

* test262/config.yaml:
* test262/expectations.yaml:
* test262/harness/compareArray.js:
(assert.compareArray):
* test262/harness/regExpUtils.js:
(buildString):
(): Deleted.
* test262/harness/sta.js:
(Test262Error.thrower):
* test262/harness/testIntl.js:
(getLocaleSupportInfo):
* test262/latest-changes-summary.txt:
* test262/test/annexB/language/literals/regexp/legacy-octal-escape.js:
* test262/test/built-ins/ArrayBuffer/options-maxbytelength-diminuitive.js: Added.
* test262/test/built-ins/ArrayBuffer/options-maxbytelength-excessive.js: Added.
* test262/test/built-ins/ArrayBuffer/options-maxbytelength-negative.js: Added.
* test262/test/built-ins/ArrayBuffer/options-maxbytelength-object.js: Added.
(options.maxByteLength.toString):
(options.maxByteLength.valueOf):
* test262/test/built-ins/ArrayBuffer/options-maxbytelength-poisoned.js: Added.
(options.get maxByteLength):
* test262/test/built-ins/ArrayBuffer/options-maxbytelength-undefined.js: Added.
* test262/test/built-ins/ArrayBuffer/options-non-object.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/maxByteLength/detached-buffer.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/maxByteLength/invoked-as-accessor.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/maxByteLength/invoked-as-func.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/maxByteLength/length.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/maxByteLength/name.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/maxByteLength/prop-desc.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/maxByteLength/return-maxbytelength-non-resizable.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/maxByteLength/return-maxbytelength-resizable.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/maxByteLength/this-has-no-arraybufferdata-internal.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/maxByteLength/this-is-not-object.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/maxByteLength/this-is-sharedarraybuffer.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resizable/detached-buffer.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resizable/invoked-as-accessor.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resizable/invoked-as-func.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resizable/length.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resizable/name.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resizable/prop-desc.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resizable/return-resizable.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resizable/this-has-no-arraybufferdata-internal.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resizable/this-is-not-object.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resizable/this-is-sharedarraybuffer.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resize/descriptor.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resize/extensible.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resize/length.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resize/name.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resize/new-length-excessive.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resize/new-length-negative.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resize/new-length-non-number.js: Added.
(newLength.toString):
(newLength.valueOf):
* test262/test/built-ins/ArrayBuffer/prototype/resize/nonconstructor.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resize/resize-grow.js: Added.
(catch):
* test262/test/built-ins/ArrayBuffer/prototype/resize/resize-same-size-zero-explicit.js: Added.
(catch):
* test262/test/built-ins/ArrayBuffer/prototype/resize/resize-same-size-zero-implicit.js: Added.
(catch):
* test262/test/built-ins/ArrayBuffer/prototype/resize/resize-same-size.js: Added.
(catch):
* test262/test/built-ins/ArrayBuffer/prototype/resize/resize-shrink-zero-explicit.js: Added.
(catch):
* test262/test/built-ins/ArrayBuffer/prototype/resize/resize-shrink-zero-implicit.js: Added.
(catch):
* test262/test/built-ins/ArrayBuffer/prototype/resize/resize-shrink.js: Added.
(catch):
* test262/test/built-ins/ArrayBuffer/prototype/resize/this-is-detached.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resize/this-is-not-arraybuffer-object.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resize/this-is-not-object.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resize/this-is-not-resizable-arraybuffer-object.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/resize/this-is-sharedarraybuffer.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/transfer/descriptor.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/transfer/extensible.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/transfer/from-fixed-to-larger.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/transfer/from-fixed-to-same.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/transfer/from-fixed-to-smaller.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/transfer/from-fixed-to-zero.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/transfer/from-resizable-to-larger.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/transfer/from-resizable-to-same.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/transfer/from-resizable-to-smaller.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/transfer/from-resizable-to-zero.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/transfer/length.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/transfer/name.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/transfer/new-length-excessive.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/transfer/new-length-non-number.js: Added.
(newLength.toString):
(newLength.valueOf):
* test262/test/built-ins/ArrayBuffer/prototype/transfer/nonconstructor.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/transfer/this-is-detached.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/transfer/this-is-not-arraybuffer-object.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/transfer/this-is-not-object.js: Added.
* test262/test/built-ins/ArrayBuffer/prototype/transfer/this-is-sharedarraybuffer.js: Added.
* test262/test/built-ins/DataView/prototype/byteLength/resizable-array-buffer-auto.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/byteLength/resizable-array-buffer-fixed.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/byteOffset/resizable-array-buffer-auto.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/byteOffset/resizable-array-buffer-fixed.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/getBigInt64/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/getBigUint64/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/getFloat32/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/getFloat64/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/getInt16/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/getInt32/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/getInt8/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/getUint16/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/getUint32/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/getUint8/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/setBigInt64/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/setBigUint64/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/setFloat32/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/setFloat64/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/setInt16/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/setInt32/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/setInt8/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/setUint16/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/setUint32/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/DataView/prototype/setUint8/resizable-buffer.js: Added.
(catch):
* test262/test/built-ins/Error/cause_abrupt.js:
(has):
(options.get cause):
* test262/test/built-ins/Object/hasOwn/descriptor.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_exists.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_getter.js: Added.
(base.get foo):
* test262/test/built-ins/Object/hasOwn/hasown_inherited_getter_and_setter.js: Added.
(base.get foo):
(base.set foo):
* test262/test/built-ins/Object/hasOwn/hasown_inherited_getter_and_setter_configurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_getter_and_setter_configurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_getter_and_setter_nonconfigurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_getter_and_setter_nonconfigurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_getter_configurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_getter_configurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_getter_nonconfigurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_getter_nonconfigurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_nonwritable_configurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_nonwritable_configurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_nonwritable_nonconfigurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_nonwritable_nonconfigurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_setter.js: Added.
(base.set foo):
* test262/test/built-ins/Object/hasOwn/hasown_inherited_setter_configurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_setter_configurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_setter_nonconfigurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_setter_nonconfigurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_writable_configurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_writable_configurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_writable_nonconfigurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_inherited_writable_nonconfigurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_nonexistent.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_getter.js: Added.
(o.get foo):
* test262/test/built-ins/Object/hasOwn/hasown_own_getter_and_setter.js: Added.
(o.get foo):
(o.set foo):
* test262/test/built-ins/Object/hasOwn/hasown_own_getter_and_setter_configurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_getter_and_setter_configurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_getter_and_setter_nonconfigurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_getter_and_setter_nonconfigurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_getter_configurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_getter_configurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_getter_nonconfigurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_getter_nonconfigurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_nonwritable_configurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_nonwritable_nonconfigurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_nonwriteable_configurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_nonwriteable_nonconfigurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_property_exists.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_setter.js: Added.
(o.set foo):
* test262/test/built-ins/Object/hasOwn/hasown_own_setter_configurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_setter_configurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_setter_nonconfigurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_setter_nonconfigurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_writable_configurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_writable_configurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_writable_nonconfigurable_enumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/hasown_own_writable_nonconfigurable_nonenumerable.js: Added.
* test262/test/built-ins/Object/hasOwn/length.js: Added.
* test262/test/built-ins/Object/hasOwn/name.js: Added.
* test262/test/built-ins/Object/hasOwn/not-a-constructor.js: Added.
* test262/test/built-ins/Object/hasOwn/prototype.js: Added.
* test262/test/built-ins/Object/hasOwn/symbol_own_property.js: Added.
* test262/test/built-ins/Object/hasOwn/symbol_property_toPrimitive.js: Added.
(wrapper.Symbol.toPrimitive):
* test262/test/built-ins/Object/hasOwn/symbol_property_toString.js: Added.
(wrapper.toString):
(wrapper.valueOf):
* test262/test/built-ins/Object/hasOwn/symbol_property_valueOf.js: Added.
(wrapper.valueOf):
* test262/test/built-ins/Object/hasOwn/toobject_before_topropertykey.js: Added.
(coercibleKey1.get toString):
(coercibleKey1.get valueOf):
(coercibleKey2.Symbol.toPrimitive):
* test262/test/built-ins/Object/hasOwn/toobject_null.js: Added.
* test262/test/built-ins/Object/hasOwn/toobject_undefined.js: Added.
* test262/test/built-ins/Promise/race/resolve-element-function-extensible.js: Removed.
* test262/test/built-ins/Promise/race/resolve-element-function-name.js: Removed.
* test262/test/built-ins/Promise/race/resolve-element-function-nonconstructor.js: Removed.
* test262/test/built-ins/Promise/race/resolve-element-function-prototype.js: Removed.
* test262/test/built-ins/SharedArrayBuffer/options-maxbytelength-diminuitive.js: Added.
* test262/test/built-ins/SharedArrayBuffer/options-maxbytelength-excessive.js: Added.
* test262/test/built-ins/SharedArrayBuffer/options-maxbytelength-negative.js: Added.
* test262/test/built-ins/SharedArrayBuffer/options-maxbytelength-object.js: Added.
(options.maxByteLength.toString):
(options.maxByteLength.valueOf):
* test262/test/built-ins/SharedArrayBuffer/options-maxbytelength-poisoned.js: Added.
(options.get maxByteLength):
* test262/test/built-ins/SharedArrayBuffer/options-maxbytelength-undefined.js: Added.
* test262/test/built-ins/SharedArrayBuffer/options-non-object.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/grow/descriptor.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/grow/extensible.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/grow/grow-larger-size.js: Added.
(catch):
* test262/test/built-ins/SharedArrayBuffer/prototype/grow/grow-same-size.js: Added.
(catch):
* test262/test/built-ins/SharedArrayBuffer/prototype/grow/grow-smaller-size.js: Added.
(catch):
* test262/test/built-ins/SharedArrayBuffer/prototype/grow/length.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/grow/name.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/grow/new-length-excessive.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/grow/new-length-negative.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/grow/new-length-non-number.js: Added.
(newLength.toString):
(newLength.valueOf):
* test262/test/built-ins/SharedArrayBuffer/prototype/grow/nonconstructor.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/grow/this-is-not-arraybuffer-object.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/grow/this-is-not-object.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/grow/this-is-not-resizable-arraybuffer-object.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/grow/this-is-sharedarraybuffer.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/growable/invoked-as-accessor.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/growable/invoked-as-func.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/growable/length.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/growable/name.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/growable/prop-desc.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/growable/return-growable.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/growable/this-has-no-arraybufferdata-internal.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/growable/this-is-arraybuffer.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/growable/this-is-not-object.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/maxByteLength/invoked-as-accessor.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/maxByteLength/invoked-as-func.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/maxByteLength/length.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/maxByteLength/name.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/maxByteLength/prop-desc.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/maxByteLength/return-maxbytelength-growable.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/maxByteLength/return-maxbytelength-non-growable.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/maxByteLength/this-has-no-arraybufferdata-internal.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/maxByteLength/this-is-arraybuffer.js: Added.
* test262/test/built-ins/SharedArrayBuffer/prototype/maxByteLength/this-is-not-object.js: Added.
* test262/test/built-ins/Symbol/for/description.js: Added.
(symbol.Symbol.toString):
* test262/test/built-ins/Temporal/now/instant/extensible.js: Added.
* test262/test/built-ins/Temporal/now/instant/length.js: Added.
* test262/test/built-ins/Temporal/now/instant/name.js: Added.
* test262/test/built-ins/Temporal/now/instant/not-a-constructor.js: Added.
* test262/test/built-ins/Temporal/now/instant/prop-desc.js: Added.
* test262/test/built-ins/Temporal/now/instant/return-value-distinct.js: Added.
* test262/test/built-ins/Temporal/now/instant/return-value-prototype.js: Added.
* test262/test/built-ins/Temporal/now/instant/return-value-value.js: Added.
* test262/test/built-ins/Temporal/now/timeZone/extensible.js: Added.
* test262/test/built-ins/Temporal/now/timeZone/length.js: Added.
* test262/test/built-ins/Temporal/now/timeZone/name.js: Added.
* test262/test/built-ins/Temporal/now/timeZone/new-object.js: Added.
* test262/test/built-ins/Temporal/now/timeZone/not-a-constructor.js: Added.
* test262/test/built-ins/Temporal/now/timeZone/prop-desc.js: Added.
* test262/test/built-ins/Temporal/now/timeZone/return-value.js: Added.
* test262/test/built-ins/TypedArray/prototype/at/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
* test262/test/built-ins/TypedArray/prototype/byteLength/resizable-array-buffer-auto.js: Added.
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArray/prototype/byteLength/resizable-array-buffer-fixed.js: Added.
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArray/prototype/byteOffset/resizable-array-buffer-auto.js: Added.
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArray/prototype/byteOffset/resizable-array-buffer-fixed.js: Added.
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
* test262/test/built-ins/TypedArray/prototype/entries/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
* test262/test/built-ins/TypedArray/prototype/every/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
(testWithTypedArrayConstructors.TA.array.every):
* test262/test/built-ins/TypedArray/prototype/fill/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
* test262/test/built-ins/TypedArray/prototype/filter/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
(testWithTypedArrayConstructors.TA.array.filter):
* test262/test/built-ins/TypedArray/prototype/find/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
(testWithTypedArrayConstructors.TA.array.find):
* test262/test/built-ins/TypedArray/prototype/findIndex/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
(testWithTypedArrayConstructors.TA.array.findIndex):
* test262/test/built-ins/TypedArray/prototype/forEach/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
(testWithTypedArrayConstructors.TA.array.forEach):
* test262/test/built-ins/TypedArray/prototype/includes/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
* test262/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
* test262/test/built-ins/TypedArray/prototype/join/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
* test262/test/built-ins/TypedArray/prototype/keys/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
* test262/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
* test262/test/built-ins/TypedArray/prototype/length/resizable-array-buffer-auto.js: Added.
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArray/prototype/length/resizable-array-buffer-fixed.js: Added.
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArray/prototype/map/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
(testWithTypedArrayConstructors.TA.array.map):
* test262/test/built-ins/TypedArray/prototype/reduce/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
(testWithTypedArrayConstructors.TA.array.reduce):
* test262/test/built-ins/TypedArray/prototype/reduceRight/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
(testWithTypedArrayConstructors.TA.array.reduceRight):
* test262/test/built-ins/TypedArray/prototype/reverse/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
* test262/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-same-type-resized.js: Added.
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
* test262/test/built-ins/TypedArray/prototype/slice/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
* test262/test/built-ins/TypedArray/prototype/some/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
(testWithTypedArrayConstructors.TA.array.some):
* test262/test/built-ins/TypedArray/prototype/sort/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
* test262/test/built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
* test262/test/built-ins/TypedArray/prototype/values/return-abrupt-from-this-out-of-bounds.js: Added.
(testWithTypedArrayConstructors.TA.catch):
* test262/test/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-offset-throws-resizable-ab.js: Added.
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/out-of-bounds-when-species-retrieved-different-type.js: Added.
(testWithTypedArrayConstructors.):
(testWithTypedArrayConstructors.get var):
(testWithTypedArrayConstructors.onGetSpecies):
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/ctors/typedarray-arg/out-of-bounds-when-species-retrieved-same-type.js: Added.
(testWithTypedArrayConstructors.):
(testWithTypedArrayConstructors.get var):
(testWithTypedArrayConstructors.onGetSpecies):
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/detached-buffer-realm.js: Removed.
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/detached-buffer-throws-realm.js: Added.
(testWithBigIntTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/detached-buffer-throws.js: Added.
(testWithBigIntTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-not-numeric-index-throws.js: Added.
(testWithBigIntTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-accessor-desc-throws.js: Added.
(testWithBigIntTypedArrayConstructors.):
(testWithBigIntTypedArrayConstructors.get assert):
(testWithBigIntTypedArrayConstructors.set assert):
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-configurable.js:
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-configurable-throws.js: Added.
(testWithBigIntTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-enumerable-throws.js: Added.
(testWithBigIntTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-writable-throws.js: Added.
(testWithBigIntTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/BigInt/tonumber-value-detached-buffer.js:
(testWithBigIntTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/detached-buffer-realm.js: Removed.
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/detached-buffer-throws-realm.js: Added.
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/detached-buffer-throws.js: Added.
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-not-numeric-index-throws.js: Added.
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-accessor-desc-throws.js: Added.
(testWithTypedArrayConstructors.):
(testWithTypedArrayConstructors.get assert):
(testWithTypedArrayConstructors.set assert):
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-configurable.js:
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-configurable-throws.js: Added.
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-enumerable-throws.js: Added.
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-numericindex-desc-not-writable-throws.js: Added.
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/tonumber-value-detached-buffer.js:
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/internals/Delete/key-is-symbol.js:
* test262/test/built-ins/TypedArrayConstructors/internals/HasProperty/resizable-array-buffer-auto.js: Added.
(inspect):
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/internals/HasProperty/resizable-array-buffer-fixed.js: Added.
(inspect):
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-resizable-array-buffer-auto.js: Added.
(testWithTypedArrayConstructors):
* test262/test/built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-resizable-array-buffer-fixed.js: Added.
(testWithTypedArrayConstructors):
* test262/test/intl402/DateTimeFormat/constructor-options-style-conflict.js: Added.
* test262/test/intl402/Locale/prototype/calendars/branding.js: Added.
* test262/test/intl402/Locale/prototype/calendars/name.js: Added.
* test262/test/intl402/Locale/prototype/calendars/output-array.js: Added.
* test262/test/intl402/Locale/prototype/calendars/prop-desc.js: Added.
* test262/test/intl402/Locale/prototype/collations/branding.js: Added.
* test262/test/intl402/Locale/prototype/collations/name.js: Added.
* test262/test/intl402/Locale/prototype/collations/output-array-values.js: Added.
* test262/test/intl402/Locale/prototype/collations/output-array.js: Added.
* test262/test/intl402/Locale/prototype/collations/prop-desc.js: Added.
* test262/test/intl402/Locale/prototype/hourCycles/branding.js: Added.
* test262/test/intl402/Locale/prototype/hourCycles/name.js: Added.
* test262/test/intl402/Locale/prototype/hourCycles/output-array-values.js: Added.
* test262/test/intl402/Locale/prototype/hourCycles/output-array.js: Added.
* test262/test/intl402/Locale/prototype/hourCycles/prop-desc.js: Added.
* test262/test/intl402/Locale/prototype/numberingSystems/branding.js: Added.
* test262/test/intl402/Locale/prototype/numberingSystems/name.js: Added.
* test262/test/intl402/Locale/prototype/numberingSystems/output-array.js: Added.
* test262/test/intl402/Locale/prototype/numberingSystems/prop-desc.js: Added.
* test262/test/intl402/Locale/prototype/textInfo/branding.js: Added.
* test262/test/intl402/Locale/prototype/textInfo/name.js: Added.
* test262/test/intl402/Locale/prototype/textInfo/output-object-keys.js: Added.
* test262/test/intl402/Locale/prototype/textInfo/output-object.js: Added.
* test262/test/intl402/Locale/prototype/textInfo/prop-desc.js: Added.
* test262/test/intl402/Locale/prototype/timeZones/branding.js: Added.
* test262/test/intl402/Locale/prototype/timeZones/name.js: Added.
* test262/test/intl402/Locale/prototype/timeZones/output-array-sorted.js: Added.
* test262/test/intl402/Locale/prototype/timeZones/output-array.js: Added.
* test262/test/intl402/Locale/prototype/timeZones/output-undefined.js: Added.
* test262/test/intl402/Locale/prototype/timeZones/prop-desc.js: Added.
* test262/test/intl402/Locale/prototype/weekInfo/branding.js: Added.
* test262/test/intl402/Locale/prototype/weekInfo/name.js: Added.
* test262/test/intl402/Locale/prototype/weekInfo/output-object-keys.js: Added.
* test262/test/intl402/Locale/prototype/weekInfo/output-object.js: Added.
* test262/test/intl402/Locale/prototype/weekInfo/prop-desc.js: Added.
* test262/test/intl402/Segmenter/constructor/supportedLocalesOf/locales-specific.js:
* test262/test/intl402/Segmenter/prototype/segment/containing/iswordlike.js:
(other_granularities.forEach):
* test262/test/intl402/Segmenter/prototype/segment/containing/one-index.js:
(toString):
(valueOf):
(Symbol.toPrimitive):
* test262/test/intl402/Segmenter/prototype/segment/containing/out-of-bound-index.js:
(toString):
(valueOf):
(Symbol.toPrimitive):
* test262/test/intl402/Segmenter/prototype/segment/containing/word-iswordlike.js:
(inputs.forEach):
* test262/test/intl402/Segmenter/prototype/segment/containing/zero-index.js:
(toString):
(valueOf):
(Symbol.toPrimitive):
* test262/test/intl402/Segmenter/prototype/segment/segment-grapheme-iterable.js:
(const.v.of.seg.segment):
* test262/test/intl402/Segmenter/prototype/segment/segment-sentence-iterable.js:
(const.v.of.seg.segment):
* test262/test/intl402/Segmenter/prototype/segment/segment-word-iterable.js:
(const.v.of.seg.segment):
* test262/test/intl402/fallback-locales-are-supported.js:
(testWithIntlConstructors):
* test262/test/intl402/supportedLocalesOf-consistent-with-resolvedOptions.js:
(testWithIntlConstructors):
* test262/test/intl402/supportedLocalesOf-unicode-extensions-ignored.js:
(testWithIntlConstructors.):
(testWithIntlConstructors):
* test262/test/language/expressions/arrow-function/extensibility.js: Added.
(assert.Object.isExtensible):
* test262/test/language/expressions/arrow-function/syntax/arrowparameters-cover-initialize-2.js:
* test262/test/language/expressions/assignment/S11.13.1_A7_T1.js: Removed.
* test262/test/language/expressions/assignment/S11.13.1_A7_T2.js: Removed.
* test262/test/language/expressions/assignment/target-member-computed-reference-null.js: Added.
(DummyError):
(prop):
(expr):
(prop.toString):
* test262/test/language/expressions/assignment/target-member-computed-reference-undefined.js: Added.
(DummyError):
(prop):
(expr):
(prop.toString):
* test262/test/language/expressions/assignment/target-member-identifier-reference-null.js: Added.
* test262/test/language/expressions/assignment/target-member-identifier-reference-undefined.js: Added.
* test262/test/language/expressions/assignment/target-super-computed-reference-null.js: Added.
(C.m):
(C):
* test262/test/language/expressions/assignment/target-super-identifier-reference-null.js: Added.
(C.m):
(C):
* test262/test/language/expressions/delete/member-computed-reference-null.js: Added.
* test262/test/language/expressions/delete/member-computed-reference-undefined.js: Added.
* test262/test/language/expressions/delete/member-identifier-reference-null.js: Added.
* test262/test/language/expressions/delete/member-identifier-reference-undefined.js: Added.
* test262/test/language/expressions/delete/super-property-null-base.js: Added.
(C.m):
(C):
* test262/test/language/expressions/dynamic-import/2nd-param-assert-enumeration-abrupt.js: Added.
(options.ownKeys):
(options.then):
* test262/test/language/expressions/dynamic-import/2nd-param-assert-enumeration.js: Added.
(options.ownKeys):
(options.get _):
(options.getOwnPropertyDescriptor):
(options.then):
* test262/test/language/expressions/dynamic-import/2nd-param-assert-non-object.js: Added.
(test):
(string_appeared_here.then):
* test262/test/language/expressions/dynamic-import/2nd-param-assert-undefined.js: Added.
(then):
* test262/test/language/expressions/dynamic-import/2nd-param-assert-value-abrupt.js: Added.
(assert.get string_appeared_here):
(then):
* test262/test/language/expressions/dynamic-import/2nd-param-assert-value-non-string.js: Added.
(test):
(string_appeared_here.then):
* test262/test/language/expressions/dynamic-import/2nd-param-await-expr.js: Added.
* test262/test/language/expressions/dynamic-import/2nd-param-await-ident.js: Added.
(await):
(await.undefined.then):
* test262/test/language/expressions/dynamic-import/2nd-param-evaluation-abrupt-return.js: Added.
(iter):
* test262/test/language/expressions/dynamic-import/2nd-param-evaluation-abrupt-throw.js: Added.
(throwError):
* test262/test/language/expressions/dynamic-import/2nd-param-evaluation-sequence.js: Added.
* test262/test/language/expressions/dynamic-import/2nd-param-get-assert-error.js: Added.
(options.get assert):
(options.then):
* test262/test/language/expressions/dynamic-import/2nd-param-in.js: Added.
(promise.then):
* test262/test/language/expressions/dynamic-import/2nd-param-non-object.js: Added.
(test):
(string_appeared_here.then):
* test262/test/language/expressions/dynamic-import/2nd-param-trailing-comma-fulfill.js: Added.
(then):
* test262/test/language/expressions/dynamic-import/2nd-param-trailing-comma-reject.js: Added.
(import.toString):
(then):
* test262/test/language/expressions/dynamic-import/2nd-param-yield-expr.js: Added.
(iter):
(promise.then):
* test262/test/language/expressions/dynamic-import/2nd-param-yield-ident-invalid.js: Added.
* test262/test/language/expressions/dynamic-import/2nd-param-yield-ident-valid.js: Added.
(yield.then):
* test262/test/language/expressions/dynamic-import/2nd-param_FIXTURE.js: Added.
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-not-extensible-args.js:
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-arrow-not-extensible-args.js:
(let.f):
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-await-not-extensible-args.js:
(async await):
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-return-await-not-extensible-args.js:
(async await):
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-return-await-not-extensible-no-trailing-comma.js: Removed.
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-async-function-await-not-extensible-args.js:
(async f):
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-async-function-not-extensible-args.js:
(async f):
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-async-function-return-await-not-extensible-args.js:
(async f):
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-async-function-return-await-not-extensible-no-trailing-comma.js: Removed.
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-not-extensible-args.js:
(async f):
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-block-labeled-not-extensible-args.js:
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-block-not-extensible-args.js:
(DONOTEVALUATE):
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-do-while-not-extensible-args.js:
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-else-braceless-not-extensible-args.js:
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-else-not-extensible-args.js:
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-function-not-extensible-args.js:
(fn):
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-function-return-not-extensible-args.js:
(fn):
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-if-braceless-not-extensible-args.js:
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-if-braceless-not-extensible-no-trailing-comma.js: Removed.
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-if-not-extensible-args.js:
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-while-not-extensible-args.js:
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-with-expression-not-extensible-args.js:
(with.import):
* test262/test/language/expressions/dynamic-import/syntax/invalid/nested-with-not-extensible-args.js:
(with):
* test262/test/language/expressions/dynamic-import/syntax/invalid/top-level-not-extensible-args.js:
* test262/test/language/expressions/dynamic-import/syntax/invalid/top-level-not-extensible-no-trailing-comma.js: Removed.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-arrow-assignment-expression-trailing-comma-first.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-not-extensible-args.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-arrow-assignment-expression-trailing-comma-second.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-not-extensible-args.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-arrow-trailing-comma-first.js: Renamed from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-arrow-not-extensible-no-trailing-comma.js.
(let.f):
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-arrow-trailing-comma-second.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-arrow-not-extensible-args.js.
(let.f):
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-async-arrow-function-await-trailing-comma-first.js: Renamed from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-await-not-extensible-no-trailing-comma.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-async-arrow-function-await-trailing-comma-second.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-await-not-extensible-args.js.
(async await):
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-async-arrow-function-return-await-trailing-comma-first.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-not-extensible-args.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-async-arrow-function-return-await-trailing-comma-second.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-not-extensible-args.js.
(async await):
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-async-function-await-trailing-comma-first.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-async-function-await-not-extensible-args.js.
(async f):
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-async-function-await-trailing-comma-second.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-async-function-await-not-extensible-args.js.
(async f):
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-async-function-return-await-trailing-comma-first.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-async-function-await-not-extensible-args.js.
(async f):
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-async-function-return-await-trailing-comma-second.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-async-function-await-not-extensible-args.js.
(async f):
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-async-function-trailing-comma-first.js: Renamed from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-async-function-await-not-extensible-no-trailing-comma.js.
(async f):
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-async-function-trailing-comma-second.js: Renamed from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-async-function-not-extensible-no-trailing-comma.js.
(async f):
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-async-gen-await-trailing-comma-first.js: Renamed from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-not-extensible-no-trailing-comma.js.
(async f):
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-async-gen-await-trailing-comma-second.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-not-extensible-args.js.
(async f):
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-block-labeled-trailing-comma-first.js: Renamed from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-block-labeled-not-extensible-no-trailing-comma.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-block-labeled-trailing-comma-second.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-block-labeled-not-extensible-args.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-block-trailing-comma-first.js: Renamed from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-block-not-extensible-no-trailing-comma.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-block-trailing-comma-second.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-block-not-extensible-args.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-do-while-trailing-comma-first.js: Renamed from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-do-while-not-extensible-no-trailing-comma.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-do-while-trailing-comma-second.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-do-while-not-extensible-args.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-else-braceless-trailing-comma-first.js: Renamed from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-else-braceless-not-extensible-no-trailing-comma.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-else-braceless-trailing-comma-second.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-else-braceless-not-extensible-args.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-else-trailing-comma-first.js: Renamed from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-else-not-extensible-no-trailing-comma.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-else-trailing-comma-second.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-else-not-extensible-args.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-function-return-trailing-comma-first.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-function-return-not-extensible-args.js.
(fn):
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-function-return-trailing-comma-second.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-function-return-not-extensible-args.js.
(fn):
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-function-trailing-comma-first.js: Renamed from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-function-not-extensible-no-trailing-comma.js.
(fn):
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-function-trailing-comma-second.js: Renamed from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-function-return-not-extensible-no-trailing-comma.js.
(fn):
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-if-braceless-trailing-comma-first.js: Renamed from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-not-extensible-no-trailing-comma.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-if-braceless-trailing-comma-second.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-not-extensible-args.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-if-trailing-comma-first.js: Renamed from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-if-not-extensible-no-trailing-comma.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-if-trailing-comma-second.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-if-not-extensible-args.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-while-trailing-comma-first.js: Renamed from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-while-not-extensible-no-trailing-comma.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-while-trailing-comma-second.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-while-not-extensible-args.js.
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-with-expression-trailing-comma-first.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-with-not-extensible-args.js.
(with.import):
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-with-expression-trailing-comma-second.js: Copied from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-with-not-extensible-args.js.
(with.import):
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-with-trailing-comma-first.js: Renamed from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-with-not-extensible-no-trailing-comma.js.
(with):
* test262/test/language/expressions/dynamic-import/syntax/valid/nested-with-trailing-comma-second.js: Renamed from JSTests/test262/test/language/expressions/dynamic-import/syntax/invalid/nested-with-expression-not-extensible-no-trailing-comma.js.
(with):
* test262/test/language/expressions/dynamic-import/syntax/valid/top-level-trailing-comma-first.js: Added.
* test262/test/language/expressions/dynamic-import/syntax/valid/top-level-trailing-comma-second.js: Added.
* test262/test/language/expressions/dynamic-import/trailing-comma-fulfill.js: Added.
(then):
* test262/test/language/expressions/dynamic-import/trailing-comma-reject.js: Added.
(import.toString):
(then):
* test262/test/language/expressions/template-literal/invalid-legacy-octal-escape-sequence-8.js:
* test262/test/language/expressions/template-literal/invalid-legacy-octal-escape-sequence-9.js:
* test262/test/language/expressions/template-literal/invalid-legacy-octal-escape-sequence.js:
* test262/test/language/import/json-extensibility-array.js: Added.
* test262/test/language/import/json-extensibility-object.js: Added.
* test262/test/language/import/json-idempotency-indirect_FIXTURE.js: Added.
* test262/test/language/import/json-idempotency.js: Added.
(then):
* test262/test/language/import/json-invalid.js: Added.
* test262/test/language/import/json-named-bindings.js: Added.
* test262/test/language/import/json-value-array.js: Added.
* test262/test/language/import/json-value-boolean.js: Added.
* test262/test/language/import/json-value-null.js: Added.
* test262/test/language/import/json-value-number.js: Added.
* test262/test/language/import/json-value-object.js: Added.
* test262/test/language/import/json-value-string.js: Added.
* test262/test/language/import/json-via-namespace.js: Added.
* test262/test/language/literals/numeric/legacy-octal-integer-strict.js:
* test262/test/language/literals/numeric/legacy-octal-integer.js: Renamed from JSTests/test262/test/annexB/language/literals/numeric/legacy-octal-integer.js.
* test262/test/language/literals/numeric/non-octal-decimal-integer-strict.js:
* test262/test/language/literals/numeric/non-octal-decimal-integer.js: Renamed from JSTests/test262/test/annexB/language/literals/numeric/non-octal-decimal-integer.js.
* test262/test/language/literals/string/legacy-non-octal-escape-sequence-1-strict-explicit-pragma.js:
* test262/test/language/literals/string/legacy-non-octal-escape-sequence-2-strict-explicit-pragma.js:
* test262/test/language/literals/string/legacy-non-octal-escape-sequence-3-strict-explicit-pragma.js:
* test262/test/language/literals/string/legacy-non-octal-escape-sequence-4-strict-explicit-pragma.js:
* test262/test/language/literals/string/legacy-non-octal-escape-sequence-5-strict-explicit-pragma.js:
* test262/test/language/literals/string/legacy-non-octal-escape-sequence-6-strict-explicit-pragma.js:
* test262/test/language/literals/string/legacy-non-octal-escape-sequence-7-strict-explicit-pragma.js:
* test262/test/language/literals/string/legacy-non-octal-escape-sequence-8-non-strict.js: Added.
* test262/test/language/literals/string/legacy-non-octal-escape-sequence-8-strict-explicit-pragma.js:
* test262/test/language/literals/string/legacy-non-octal-escape-sequence-8-strict.js:
* test262/test/language/literals/string/legacy-non-octal-escape-sequence-9-non-strict.js: Added.
* test262/test/language/literals/string/legacy-non-octal-escape-sequence-9-strict-explicit-pragma.js:
* test262/test/language/literals/string/legacy-non-octal-escape-sequence-9-strict.js:
* test262/test/language/literals/string/legacy-non-octal-escape-sequence-strict.js:
* test262/test/language/literals/string/legacy-octal-escape-sequence-strict.js:
* test262/test/language/literals/string/legacy-octal-escape-sequence.js: Renamed from JSTests/test262/test/annexB/language/literals/string/legacy-octal-escape-sequence.js.
* test262/test/language/module-code/early-dup-assert-key-export.js: Added.
* test262/test/language/module-code/early-dup-assert-key-import-nobinding.js: Added.
* test262/test/language/module-code/early-dup-assert-key-import-withbinding.js: Added.
* test262/test/language/module-code/early-export-ill-formed-string.js:
* test262/test/language/module-code/eval-gtbndng-indirect-faux-assertion.js: Added.
* test262/test/language/module-code/import-assertion-1_FIXTURE.js: Added.
* test262/test/language/module-code/import-assertion-2_FIXTURE.js: Added.
* test262/test/language/module-code/import-assertion-3_FIXTURE.js: Added.
* test262/test/language/module-code/import-assertion-empty.js: Added.
* test262/test/language/module-code/import-assertion-key-identifiername.js: Added.
* test262/test/language/module-code/import-assertion-key-string-double.js: Added.
* test262/test/language/module-code/import-assertion-key-string-single.js: Added.
* test262/test/language/module-code/import-assertion-many.js: Added.
* test262/test/language/module-code/import-assertion-newlines.js: Added.
* test262/test/language/module-code/import-assertion-trlng-comma.js: Added.
* test262/test/language/module-code/import-assertion-value-string-double.js: Added.
* test262/test/language/module-code/import-assertion-value-string-single.js: Added.
* test262/test/language/module-code/instn-star-as-props-dflt-skip.js:
* test262/test/language/module-code/top-level-await/dfs-invariant-async_FIXTURE.js: Added.
* test262/test/language/module-code/top-level-await/dfs-invariant-direct-1_FIXTURE.js: Added.
* test262/test/language/module-code/top-level-await/dfs-invariant-direct-2_FIXTURE.js: Added.
* test262/test/language/module-code/top-level-await/dfs-invariant-indirect_FIXTURE.js: Added.
* test262/test/language/module-code/top-level-await/dfs-invariant.js: Added.
* test262/test/language/statements/for-of/head-lhs-async-escaped.js: Added.
* test262/test/language/statements/for-of/head-lhs-async-parens.js: Added.
* test262/test262-Revision.txt:

Canonical link: https://commits.webkit.org/239572@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279809 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-10 21:00:38 +00:00
Yusuke Suzuki b64358f455 [JSC] Update Intl.Locale test after AppleICU update
https://bugs.webkit.org/show_bug.cgi?id=227788

Reviewed by Keith Miller.

This patch fixes Intl.Locale test since AppleICU fixes the ICU bug and starts producing the right results.

* stress/intl-long-locale-id-maximize-minimize.js:
(shouldBe):


Canonical link: https://commits.webkit.org/239513@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-08 17:05:54 +00:00
Yusuke Suzuki ec50d93e3f [JSC] Fix Object.assign fast path to accept undefined/null
https://bugs.webkit.org/show_bug.cgi?id=227769
rdar://80264271

Reviewed by Saam Barati.

JSTests:

* stress/object-assign-undefined.js: Added.
(test):

Source/JavaScriptCore:

Object.assign can accept undefined or null as a second (or latter) parameters.
If it is passed, the parameter is just ignored. Previous DFG / FTL optimization patch
does not handle this case.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGOperations.cpp:
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):
* dfg/DFGOperations.h:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileObjectAssign):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileObjectAssign):
* runtime/ObjectConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* runtime/ObjectConstructorInlines.h:
(JSC::objectAssignFast):


Canonical link: https://commits.webkit.org/239495@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279690 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-08 00:55:24 +00:00
Commit Queue d0333311de Unreviewed, reverting r279546, r279554, r279558 and r279567.
https://bugs.webkit.org/show_bug.cgi?id=227732

Speedometer/jQuery-TodoMVC 2-3% regression

Reverted changesets:

"[WebIDL] Rework runtime enabled properties leveraging
PropertyCallback"
https://bugs.webkit.org/show_bug.cgi?id=227275
https://commits.webkit.org/r279546

"[WebIDL] Generate constructor's hash table in
GenerateConstructorHelperMethods"
https://bugs.webkit.org/show_bug.cgi?id=227668
https://commits.webkit.org/r279554

"[WebIDL] Simplify generation of runtime conditionally read-
write attributes"
https://bugs.webkit.org/show_bug.cgi?id=227672
https://commits.webkit.org/r279558

"Use AbortSignal's [PrivateIdentifier] whenSignalAborted()
static method"
https://bugs.webkit.org/show_bug.cgi?id=227673
https://commits.webkit.org/r279567

Canonical link: https://commits.webkit.org/239449@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-07 03:12:05 +00:00