New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String serialization of functions doesn't behaves as on Blink or Gecko #14704
Conversation
EWS run on previous version of this PR (hash 597f780) |
"valid &&= f2.toString() == 'async()=>{}'" "\n" | ||
"let f3 = async () => {}" "\n" | ||
"valid &&= f3.toString() == 'async () => {}'" "\n" | ||
"valid"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I initially wrote this way:
const auto inputScript = R"(
var valid = true;
function foo2 () {}
valid &&= foo2.toString() == "function foo2 () {}"
function foo3() {}
valid &&= foo3.toString() == "function foo3() {}"
function* fooGen (){}
valid &&= fooGen.toString() == "function* fooGen (){}"
async function fnasync() {}
valid &&= fnasync.toString() == "async function fnasync() {}"
let f1 = async function() {}
valid &&= f1.toString() == "async function() {}"
let f2 = async()=>{}
valid &&= f2.toString() == "async()=>{}"
let f3 = async () => {}
valid &&= f3.toString() == "async () => {}"
valid
)";
As it seems clearer to me, but I understand raw string aren't accepted/considered as bad practice in this project?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This API test is awesome! And at the same time, you can add tests to JSTests/stress/*.js
easily too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Raw string, it is fine :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank for your comments :-) I wasn't sure how to run those tests, looks like I definitely broke a bunch of legit test cases
(I suspect some changes aren't related to this PR, but I'll double check that later once I fixed what I broke for sure)
I'll figure out what's wrong and follow-up. (And also re-add raw string then, plus few extra tests cases and add those in JSTests/stress).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, probably you need to adjust / modify / verify the test failures in JSTests etc. (as JSC tests are failing).
You can run these tests with Tools/Scripts/run-javascriptcore-tests
command. https://ews-build.webkit.org/#/builders/12/builds/8723
Maybe, some are real issues. Some are not (need to rebase test expectations).
#include "FunctionToStringTests.h" | ||
|
||
#include "InitializeThreading.h" | ||
#include "JavaScript.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got this error locally (and visible on the pipeline check here):
ERROR: Source/JavaScriptCore/API/tests/FunctionToStringTests.cpp:27: Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4]
But I'm not sure what I get wrong here - seems that I respect what's asked here, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's ignore this. This warning is for non testapi thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just curious why this error was triggered, and found this in the style checker:
# Test .cpp, .mm, .c files do not have primary header files.
if any(target_base.endswith(suffix) for suffix in ['Test', 'Tests']):
return _OTHER_HEADER
Not sure why that'd be necessary though, since if test files didn't have headers there'd be no primary header anyway, so I can't see this would need to be a special case. Not that it matters anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tadeuzagallo -- Should I create a bug for this?
@colinvidal Can you also run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r- for now since EWS are red. But this is good work!
EWS run on previous version of this PR (hash f944af2) |
Latest updates mostly focused on getting test262 fixed - which is done now, putting aside a comment I left in the code). Note I'm not done yet: I still have to investigate/fix run-javascript-core-tests (that said from a quick glance at a local run logs I spot a bunch of those which are expected, i.e. some toString comparaison with spacing between I also need to port the test case added in apitest in JSTests/stress. Will follow-up tomorrow. |
strict mode: 'Test262Error: Expected Sun Dec 31 1899 23:59:59 GMT+0009 (Central European Standard Time) to be -2208988801000 milliseconds from the Unix epoch' | ||
test/built-ins/Date/S15.9.3.1_A5_T6.js: | ||
default: 'Test262Error: Expected Sun Dec 31 1899 23:59:59 GMT+0009 (Central European Standard Time) to be -2208988800001 milliseconds from the Unix epoch' | ||
strict mode: 'Test262Error: Expected Sun Dec 31 1899 23:59:59 GMT+0009 (Central European Standard Time) to be -2208988800001 milliseconds from the Unix epoch' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get how those changes introduce this -- Feels like it's something locally wrong on my machine but I'll follow-up on this tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think I should probably not introduce this diff here: I got those failure on my machine even from main branch (as well as a bunch of timedate related tests running form run-javascriptcore-tests). Let's remove that?
strict mode: "SyntaxError: Invalid unicode escape in identifier: '\\u{1123F}'" | ||
test/language/identifiers/start-unicode-15.0.0.js: | ||
default: "SyntaxError: Invalid character '\\ud804'" | ||
strict mode: "SyntaxError: Invalid character '\\ud804'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think those are related by those changes either. Likely something gets fixed previously in the repo but test262 haven't been run/added to the commit.
@@ -263,7 +263,7 @@ class UnlinkedFunctionExecutable final : public JSCell { | |||
unsigned m_isGeneratedFromCache : 1; | |||
unsigned m_lineCount : 31; | |||
unsigned m_hasCapturedVariables : 1; | |||
unsigned m_unlinkedFunctionNameStart : 31; | |||
unsigned m_unlinkedFunctionStart: 31; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard to find a meaningful name for this - "expressionStart" feels wrong as it's not always an expression "declarationStart" neither for the antagonist reason.
Also, looking at the parser code I'm wondering if this couldn't be "merged" with m_typeProfilingStartOffset
-- Probably not a good idea to do it there but just a though.
EWS run on previous version of this PR (hash 6440456) |
@@ -31,6 +31,6 @@ return 42 | |||
var agf = AsyncGeneratorFunction(`return 42`); | |||
shouldBe(typeof anonymous, `undefined`); | |||
shouldBe(agf.toString(), | |||
`async function* anonymous() { | |||
`async function*anonymous() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those two cases used to work before function*
, and async function*
where prefixing the rest of the function definition (from name or parameter list). So it didn't matter how the function was written (i.e. function*
or function *
, etc.).
Now we're actually starting from the actual "start" of the function definition, it matters. And function constructor are generated internally by the runtime, in FunctionConstructor.cpp::stringifyFunction. For a reason I don't know (probably arbitrary) function generators are function *
and async function generator are async function*
. That's why I had to update the spaces between the times symbol.
If preferred, I can revert this change and update FunctionConstructor instead. I don't know what can be the consequences elsewhere/on other debugging tools though.
I understand toString behavior of function constructor is not specified anyway (V8 for instance generate totally different output:
> let fga =async function*(){ console.log('foo')}
> fga.constructor.toString()
'function AsyncGeneratorFunction() { [native code] }'
function () { return _foo; } | ||
function (value) { _foo = value; } | ||
get foo() { return _foo; } | ||
set foo(value) { _foo = value; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those two things are outstanding (and it's not even the Chakra baseline) but as I understand the ECMA spec, this is what it should be. See
JSTests/test262/test/built-ins/Function/prototype/toString/getter-object.js
EWS run on previous version of this PR (hash 444959b) |
EWS run on previous version of this PR (hash 14600a2) |
@@ -18,7 +18,7 @@ PASS o.add(42, -10) is 32 | |||
PASS typeof o.add is 'function' | |||
PASS o.add.length is 2 | |||
PASS o.add.name is 'add' | |||
PASS o.add.toString() is 'function (x, y) { return x + y; }' | |||
PASS o.add.toString() is '[methodName](x, y) { return x + y; }' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As weird as those two guys looked, that's how I understand the spec.
Also tested on SpiderMonday and V8 to cross-check, and they behaves the same as this:
> o = { ['f'+'oo']() { return 10; } };
> o.foo.toString()
"['f'+'oo']() { return 10; }"
> methodName = 'add'; o = { [methodName](x, y) { return x + y; } };
> o.add.toString()
'[methodName](x, y) { return x + y; }'
Adding another bunch of fixes (layout js tests), but one test remain to fix, will do ASAP. (as well as adding the apitest in stress test as well). Sorry - size of this PR grows legs, but it's only test updates so far. |
EWS run on previous version of this PR (hash 35a4415) |
EWS run on previous version of this PR (hash 5803fed) |
EWS run on previous version of this PR (hash 618a82c)
|
EWS run on previous version of this PR (hash 64e6516)
|
EWS run on previous version of this PR (hash fe0e38f)
|
EWS run on previous version of this PR (hash 02c0141)
|
EWS run on previous version of this PR (hash 3887b4a)
|
EWS run on previous version of this PR (hash 3273151)
|
EWS run on previous version of this PR (hash 961c9f5)
|
EWS run on previous version of this PR (hash b500cda)
|
Looks like all tests are now fixed, putting aside mac-AS-debug-wk2, the two failing (hitting an assert) are
I hardly see the connection between those and the changes in the PR when looking at tests and the code from the two stack provided:
And
I run those locally few times on debug on macOS Ventura/M1 machine and those two tests passed successfully. Thanks (FYI @Constellation ) |
Source/JavaScriptCore/parser/Nodes.h
Outdated
@@ -2250,6 +2250,7 @@ namespace JSC { | |||
FunctionMode functionMode() { return m_functionMode; } | |||
|
|||
int functionNameStart() const { return m_functionNameStart; } | |||
unsigned functionStart() const { return m_functionStart.has_value() ? *m_functionStart : static_cast<unsigned>(m_functionKeywordStart); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use m_functionStart.value_or(static_cast<unsigned>(m_functionKeywordStart))
.
unsigned m_isBuiltinFunction : 1; | ||
unsigned m_unlinkedFunctionNameStart : 31; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep it here. Otherwise, it enlarges the size of this struct (31
and 1
is paired).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, I guess this change would forbid the next field (m_isBuiltinFunction
) to be packed (as the previous takes 31 bits). Thanks!
@@ -5499,7 +5518,7 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseMemberExpres | |||
} | |||
|
|||
template <typename LexerType> | |||
template <class TreeBuilder> TreeExpression Parser<LexerType>::parseArrowFunctionExpression(TreeBuilder& context, bool isAsync) | |||
template <class TreeBuilder> TreeExpression Parser<LexerType>::parseArrowFunctionExpression(TreeBuilder& context, std::optional<unsigned> functionStart) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's have isAsync
and functionStart
separately. They have different meanings, and it is confusing that making std::nullopt
functionStart as non-async.
EWS run on previous version of this PR (hash c5ee3c4)
|
} | ||
} | ||
if (isArrowFunctionParameters(context)) { | ||
if (wasOpenParen) | ||
currentScope()->revertToPreviousUsedVariables(usedVariablesSize); | ||
return parseArrowFunctionExpression(context, isAsyncArrow); | ||
return parseArrowFunctionExpression(context, isAsync, functionStart); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Constellation thanks for spotting this, it's fixed now (isAsync
is now a separate parameter). The reason is that I initially try/hacked it by looking for async keywords, and in this case the presence/absence of this keyword would (relatively) explicitly tells if it was an async function or not. Obviously it was a totally wrong assumption now as we're looking for "function start" which can be either async, get, set, whatever JS enable to start a function depending the context.
I take this opportunity to point out something a bit odd with my changes: in lot of places in the parser, there are now functionStart
(that I added) and functionKeywordStart
(already there):
- either those two values are conceptually similar (i.e.
function foo() {}
, etc.) In practice,functionStart
might benullopt
.functionKetwordStart
is used to fill the nodem_functionStart
field - either those two values are different (i.e.
let x = async function ...
, etc.), andfunctionStart
is used to fill the nodem_functionStart
field.
This is terribly confusing and the reason I didn't removed functionKeywordStart
(yet) is because this value is used in the UnlinkedFunctionExecutable m_typeProfilingStartOffset
field. I would be tempted to say "we don't need this anymore, let's just use functionStart
":
- that would make parser code simpler/less confusing (as we would remove
functionKeywordStart
andfunctionStart
wouldn't be an optional) - that would also make a small memory footprint win as it would be possible to remove
m_typeProfilingStartOffset
field
But is this correct from profiling tools perspective? One thing that would lead me to say "that's fine" is the fact there are a bunch of function that doesn't even have the function
keyword, but I really have no clues about actual use case of this profiling start offset field, so... Any insight would be much appreciated :-))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually just pushed commit 37b8276 which is an attempt of what I'm discussing just above.
All jsc tests (including stress ones) are passing locally, no new failures on test262, and no obvious jsc related breakage on layout ones, so I'll give a try here.
But my question above remain, not sure if what I'm doing in this commit is totally right (regarding some profiling flow) or not.
EWS run on previous version of this PR (hash 37b8276)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me, nice
Please squash all into one commit (with appropriate commit message format), and ping me. |
EWS run on current version of this PR (hash 2f95066)
|
Hi @Constellation - I just squashed the history/updated the commit message. (I also added your name as reviewer) Thanks! |
https://bugs.webkit.org/show_bug.cgi?id=242810 Reviewed by Yusuke Suzuki. While Blink or Gecko does a string serialization of functions by returning the strict content of the function expression/declaration from the source code, WebKit starts with `function `, `function* ` for generators, `async function ` and to on then concatenate the rest of the function declaration/expression from the source code. This can create mismatch depending, for instance, the number of spaces between the `function` keyword and the parameter list. This change makes WebKit to returns the entire function expression/declaration when serializing a function. Main code changes are: - At AST/Parser level, propagating up the start of the expression (or declaration) through the `asyncKeywordStart`. - Adding this start value in the UnlinkedFunctionExecutable class, replacing `m_unlinkedFunctionNameStart` to avoid increasing the memory footprint. - Updating the FunctionExecutable method doing the serialization. - Adding a dedicated test file for this. - Numerous unit test updates. - Bunch of test262 tests are now passing, so removing them from expectation file. * JSTests/ChakraCore/test/Array/array_literal.baseline: * JSTests/ChakraCore/test/Function/toString.baseline-jsc: * JSTests/ChakraCore/test/es5/ObjLitGetSet.baseline-jsc: * JSTests/mozilla/js1_5/Scope/regress-185485.js: (expect): * JSTests/stress/function-constructor-name.js: (async var): * JSTests/stress/function-to-string.js: (async shouldBe): * JSTests/test262/expectations.yaml: * LayoutTests/fast/canvas/2d.setTransform.matrix-expected.txt: * LayoutTests/fast/canvas/canvas-pattern-transform-expected.txt: * LayoutTests/fast/dom/TreeWalker/acceptNode-filter-expected.txt: * LayoutTests/fast/dom/Window/Location/window-override-location-using-defineGetter-expected.txt: * LayoutTests/fast/dom/Window/Location/window-override-window-using-defineGetter-expected.txt: * LayoutTests/fast/dom/getter-on-window-object2-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/IndexedDB/structured-clone.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/IndexedDB/structured-clone.any.worker_101-last-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/IndexedDB/structured-clone.any_101-last-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/clipboard-apis/async-navigator-clipboard-basics.https-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/cors/origin-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/credential-management/credentialscontainer-create-basics.https-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/MediaQueryList-addListener-handleEvent-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/idlharness-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/cssom/at-namespace-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/geometry/DOMMatrix-001-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/domparsing/innerhtml-01-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/picture-in-picture-reporting-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/screen-wake-lock-reporting.https-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general.any.serviceworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general.any.sharedworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/serviceworker-intercepted.https-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-upload.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-upload.any.serviceworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-upload.any.sharedworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-upload.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-upload.h2.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-upload.h2.any.serviceworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-upload.h2.any.sharedworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-upload.h2.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-upload.h2.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-upload.h2.any.serviceworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-upload.h2.any.sharedworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-upload.h2.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume-empty-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume.any.serviceworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume.any.sharedworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/json.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/json.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-consume-empty-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-error-from-stream-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-error-from-stream.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-error-from-stream.any.serviceworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-error-from-stream.any.sharedworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-error-from-stream.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-move.https.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-move.https.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemFileHandle-sync-access-handle-writable-lock.https.tentative.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fullscreen/api/element-request-fullscreen-namespaces-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/history_properties_only_fully_active-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-prototype-setting-cross-origin.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-cross-origin.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.window-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonexistent-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nonexistent-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.blur.exceptions-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.colorMatrix-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.colorMatrix.tentative-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-invalid-args-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.basics-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https_include=HTML._-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/imagedata-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.fillStyle.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-spec-example-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-spec-example.window-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-sourcebuffer-mode-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-events-and-exceptions-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-is-showing.https-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-hasenrolledinstrument-method.tentative.https-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/payment-request/show-consume-activation.https-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/screen-orientation/active-lock-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/screen-orientation/nested-documents-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/screen-orientation/unlock-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/cache-add.https.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/cache-add.https.any.serviceworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/cache-add.https.any.sharedworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/cache-add.https.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event.https-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/update.https-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/streams/idlharness.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/streams/idlharness.any.serviceworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/streams/idlharness.any.sharedworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/streams/idlharness.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/scripted/SVGAnimationElement-exceptions-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGLength-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/web-share/disabled-by-permissions-policy.https.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/web-share/share-sharePromise-internal-slot.https-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-answer-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-pranswer-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/websockets/Create-protocols-repeated-case-insensitive.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/websockets/Create-protocols-repeated-case-insensitive.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/websockets/Create-protocols-repeated-case-insensitive.any.worker_wss-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/websockets/Create-protocols-repeated-case-insensitive.any_wss-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/send/010-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/send/010_wss-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webstorage/missing_arguments.window-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webstorage/storage_string_conversion.window-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webxr/xrDevice_requestSession_requiredFeatures_unknown.https-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/xhr/open-url-multi-window-3-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/xhr/open-url-multi-window-6-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-sharedarraybuffer.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-sharedarraybuffer.any.worker-expected.txt: * LayoutTests/inspector/audit/non-minified-default-audits.html: * LayoutTests/inspector/console/command-line-api-copy.html: * LayoutTests/inspector/console/console-table-expected.txt: * LayoutTests/inspector/model/remote-object-get-properties-expected.txt: * LayoutTests/inspector/model/remote-object/class-expected.txt: * LayoutTests/inspector/model/remote-object/function-expected.txt: * LayoutTests/inspector/runtime/getDisplayableProperties-expected.txt: * LayoutTests/inspector/runtime/getProperties-expected.txt: * LayoutTests/js/const-expected.txt: * LayoutTests/js/destructuring-assignment-expected.txt: * LayoutTests/js/dfg-redundant-load-of-captured-variable-proven-constant-expected.txt: * LayoutTests/js/dfg-resolve-global-specific-dictionary-expected.txt: * LayoutTests/js/dom/JSON-parse-complex-expected.txt: * LayoutTests/js/dom/JSON-parse-expected.txt: * LayoutTests/js/dom/JSON-stringify-expected.txt: * LayoutTests/js/dom/dfg-strcat-over-objects-then-exit-on-it-expected.txt: * LayoutTests/js/dom/function-prototype-expected.txt: * LayoutTests/js/dom/function-prototype.html: * LayoutTests/js/dom/script-tests/dfg-strcat-over-objects-then-exit-on-it.js: * LayoutTests/js/dom/toString-and-valueOf-override-expected.txt: * LayoutTests/js/kde/lval-exceptions-expected.txt: * LayoutTests/js/object-literal-computed-methods-expected.txt: * LayoutTests/js/object-literal-methods-expected.txt: * LayoutTests/js/script-tests/dfg-redundant-load-of-captured-variable-proven-constant.js: * LayoutTests/js/script-tests/dfg-resolve-global-specific-dictionary.js: * LayoutTests/js/script-tests/function-toString-vs-name.js: (runTest): * LayoutTests/js/script-tests/object-literal-computed-methods.js: * LayoutTests/js/script-tests/object-literal-methods.js: * LayoutTests/media/modern-media-controls/button/button-icon-name-expected.txt: * LayoutTests/platform/glib/http/wpt/push-api/pushManager.any-expected.txt: * LayoutTests/platform/glib/http/wpt/push-api/pushManager.any.serviceworker-expected.txt: * LayoutTests/platform/glib/imported/w3c/web-platform-tests/cors/origin-expected.txt: * LayoutTests/platform/glib/imported/w3c/web-platform-tests/fetch/api/basic/request-upload.any-expected.txt: * LayoutTests/platform/glib/imported/w3c/web-platform-tests/fetch/api/basic/request-upload.any.serviceworker-expected.txt: * LayoutTests/platform/glib/imported/w3c/web-platform-tests/fetch/api/basic/request-upload.any.sharedworker-expected.txt: * LayoutTests/platform/glib/imported/w3c/web-platform-tests/fetch/api/basic/request-upload.any.worker-expected.txt: * LayoutTests/platform/glib/imported/w3c/web-platform-tests/fetch/content-encoding/bad-gzip-body.any.serviceworker-expected.txt: * LayoutTests/platform/glib/imported/w3c/web-platform-tests/fetch/content-encoding/bad-gzip-body.any.sharedworker-expected.txt: * LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter-expected.txt: * LayoutTests/platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-sourcebuffer-mode-expected.txt: * LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/feature-policy/reporting/picture-in-picture-reporting-expected.txt: * LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https_include=HTML._-expected.txt: * LayoutTests/platform/ios/imported/w3c/web-platform-tests/html/user-activation/idlharness.https_include=HTML._-expected.txt: * LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https_include=HTML._-expected.txt: * LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application-expected.txt: * LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application_week,month-expected.txt: * LayoutTests/storage/domstorage/localstorage/string-conversion-expected.txt: * LayoutTests/storage/domstorage/sessionstorage/string-conversion-expected.txt: * LayoutTests/streams/reference-implementation/transform-stream-expected.txt: * LayoutTests/webaudio/convolver-channels-expected.txt: * Source/JavaScriptCore/API/tests/FunctionOverridesTest.cpp: (testFunctionOverrides): * Source/JavaScriptCore/API/tests/FunctionToStringTests.cpp: Added. (testFunctionToString): * Source/JavaScriptCore/API/tests/FunctionToStringTests.h: Added. * Source/JavaScriptCore/API/tests/testapi.c: (main): * Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj: * Source/JavaScriptCore/bytecode/CodeBlock.cpp: (JSC::CodeBlock::sourceCodeForTools const): (JSC::CodeBlock::dumpSource): (JSC::CodeBlock::finishCreation): (JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler): * Source/JavaScriptCore/bytecode/CodeBlock.h: * Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp: (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): (JSC::UnlinkedFunctionExecutable::setInvalidTypeProfilingOffsets): Deleted. * Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.h: * Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::emitNewDefaultConstructor): * Source/JavaScriptCore/parser/ASTBuilder.h: (JSC::ASTBuilder::createFunctionMetadata): * Source/JavaScriptCore/parser/Nodes.cpp: (JSC::FunctionMetadataNode::FunctionMetadataNode): (JSC::FunctionMetadataNode::operator== const): (JSC::FunctionMetadataNode::dump const): * Source/JavaScriptCore/parser/Nodes.h: * Source/JavaScriptCore/parser/Parser.cpp: (JSC::Parser<LexerType>::parseGeneratorFunctionSourceElements): (JSC::Parser<LexerType>::parseAsyncFunctionSourceElements): (JSC::Parser<LexerType>::parseAsyncGeneratorFunctionSourceElements): (JSC::Parser<LexerType>::parseSingleFunction): (JSC::Parser<LexerType>::parseStatementListItem): (JSC::Parser<LexerType>::parseFunctionBody): (JSC::Parser<LexerType>::parseFunctionInfo): (JSC::Parser<LexerType>::parseFunctionDeclaration): (JSC::Parser<LexerType>::parseAsyncFunctionDeclaration): (JSC::Parser<LexerType>::parseClass): (JSC::Parser<LexerType>::parseExportDeclaration): (JSC::Parser<LexerType>::parseAssignmentExpression): (JSC::Parser<LexerType>::parseProperty): (JSC::Parser<LexerType>::parsePropertyMethod): (JSC::Parser<LexerType>::parseFunctionExpression): (JSC::Parser<LexerType>::parseAsyncFunctionExpression): (JSC::Parser<LexerType>::parsePrimaryExpression): (JSC::Parser<LexerType>::parseArrowFunctionExpression): * Source/JavaScriptCore/parser/Parser.h: * Source/JavaScriptCore/runtime/CachedTypes.cpp: (JSC::CachedFunctionExecutable::unlinkedFunctionStart const): (JSC::CachedFunctionExecutable::unlinkedFunctionEnd const): (JSC::CachedFunctionExecutable::encode): (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): (JSC::CachedFunctionExecutable::unlinkedFunctionNameStart const): Deleted. (JSC::CachedFunctionExecutable::typeProfilingStartOffset const): Deleted. (JSC::CachedFunctionExecutable::typeProfilingEndOffset const): Deleted. * Source/JavaScriptCore/runtime/FunctionExecutable.cpp: (JSC::FunctionExecutable::ensureRareDataSlow): (JSC::FunctionExecutable::toStringSlow): (JSC::FunctionExecutable::overrideInfo): * Source/JavaScriptCore/runtime/FunctionExecutable.h: * Source/JavaScriptCore/runtime/JSModuleRecord.cpp: (JSC::JSModuleRecord::instantiateDeclarations): * Source/JavaScriptCore/runtime/ModuleProgramExecutable.cpp: (JSC::ModuleProgramExecutable::ModuleProgramExecutable): * Source/JavaScriptCore/runtime/ProgramExecutable.cpp: (JSC::ProgramExecutable::ProgramExecutable): (JSC::ProgramExecutable::initializeGlobalProperties): * Source/JavaScriptCore/runtime/ScriptExecutable.cpp: (JSC::ScriptExecutable::typeProfilingStartOffset const): (JSC::ScriptExecutable::typeProfilingEndOffset const): * Source/JavaScriptCore/runtime/ScriptExecutable.h: * Source/JavaScriptCore/shell/CMakeLists.txt: * Source/JavaScriptCore/tools/FunctionOverrides.cpp: (JSC::initializeOverrideInfo): * Source/JavaScriptCore/tools/FunctionOverrides.h: * Source/JavaScriptCore/tools/JSDollarVM.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): Canonical link: https://commits.webkit.org/265284@main
2f95066
to
55ae3a1
Compare
Committed 265284@main (55ae3a1): https://commits.webkit.org/265284@main Reviewed commits have been landed. Closing PR #14704 and removing active labels. |
55ae3a1
2f95066