haikuwebkit/LayoutTests/js/resources
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
..
JSON-parse.js
JSON-stringify-string-object-with-tojson.js
JSON-stringify.js
Promise-catch-in-workers.js
Promise-init-in-workers.js
Promise-reject-in-workers.js
Promise-resolve-in-workers.js
Promise-resolve-state-in-workers.js
Promise-simple-in-workers.js
Promise-then-in-workers.js
Promise-then-without-callbacks-in-workers.js
array-sort-harness.js
bom-in-file-retains-correct-offset.js
codegen-temporaries-multiple-global-blocks-1.js
codegen-temporaries-multiple-global-blocks-2.js
document-all-between-frames-subframe.html
empty-worker.js
garbage-collect-after-string-appends.js
getOwnPropertyDescriptor.js
instanceof-operator-dummy-worker.js
js-constructors-use-correct-global.js
json2-es5-compat.js
lexical-lookup-in-function-constructor-child.html
math-random-initial-values-iframe.html REGRESSION(r192855): Math.random() always produces the same first 7 decimal points the first two invocations 2016-05-17 22:52:47 +00:00
parse-error-external-script-in-eval.js
parse-error-external-script-in-new-Function.js
parse-syntax-error-in-initializer.js
pass-and-finish.html Instance property getters / setters cannot be called on another instance of the same type 2016-02-06 00:18:41 +00:00
script-line-number.js
select-options-remove.js
string-concatenate-outofmemory.js
unhandled-promise-rejection-basic-in-workers.js
unhandled-promise-rejection-bindings-type-error-in-workers.js
unhandled-promise-rejection-handle-during-event-in-workers.js
unhandled-promise-rejection-handle-in-handler-in-workers.js
unhandled-promise-rejection-handle-in-workers.js
unhandled-promise-rejection-order-in-workers.js