Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2581d153d8bee7078509ef4b5a27ad2a7090bb72
https://github.com/WebKit/WebKit/commit/2581d153d8bee7078509ef4b5a27ad2a7090bb72
Author: Yusuke Suzuki <[email protected]>
Date: 2025-02-01 (Sat, 01 Feb 2025)
Changed paths:
M
LayoutTests/inspector/debugger/sourceURL-repeated-identical-executions-expected.txt
M
LayoutTests/inspector/debugger/sourceURL-repeated-identical-executions.html
M LayoutTests/js/script-tests/regress-150513.js
M Source/JavaScriptCore/parser/ParserModes.h
M Source/JavaScriptCore/parser/SourceCodeKey.h
M Source/JavaScriptCore/runtime/CodeCache.cpp
M Source/JavaScriptCore/runtime/FunctionConstructor.cpp
M Source/JavaScriptCore/runtime/FunctionConstructor.h
M Source/JavaScriptCore/runtime/FunctionExecutable.cpp
M Source/JavaScriptCore/runtime/FunctionExecutable.h
M Source/JavaScriptCore/runtime/JSGlobalObject.cpp
M Source/JavaScriptCore/runtime/JSGlobalObject.h
M Source/JavaScriptCore/runtime/SourceOrigin.h
Log Message:
-----------
[JSC] Cache FunctionExecutable from `new Function` constructor call with
one-entry cache
https://bugs.webkit.org/show_bug.cgi?id=286233
rdar://143208554
Reviewed by Yijia Huang.
This patch introduces a simple one-entry cache for `new Function`
constructor's FunctionExecutable. We also handle two-arguments `new
Function` calls efficiently.
*
LayoutTests/inspector/debugger/sourceURL-repeated-identical-executions-expected.txt:
* LayoutTests/inspector/debugger/sourceURL-repeated-identical-executions.html:
* LayoutTests/js/script-tests/regress-150513.js:
(test):
* Source/JavaScriptCore/parser/ParserModes.h:
* Source/JavaScriptCore/parser/SourceCodeKey.h:
(JSC::SourceCodeKey::functionConstructorParametersEndPosition const):
* Source/JavaScriptCore/runtime/CodeCache.cpp:
(JSC::CodeCache::getUnlinkedGlobalFunctionExecutable):
* Source/JavaScriptCore/runtime/FunctionConstructor.cpp:
(JSC::functionConstructorPrefix):
(JSC::stringifyFunction):
(JSC::constructFunction):
(JSC::constructFunctionSkippingEvalEnabledCheck):
* Source/JavaScriptCore/runtime/FunctionConstructor.h:
* Source/JavaScriptCore/runtime/FunctionExecutable.cpp:
(JSC::FunctionExecutable::fromGlobalCode):
* Source/JavaScriptCore/runtime/FunctionExecutable.h:
* Source/JavaScriptCore/runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::tryGetCachedFunctionExecutableForFunctionConstructor):
(JSC::JSGlobalObject::cachedFunctionExecutableForFunctionConstructor):
* Source/JavaScriptCore/runtime/JSGlobalObject.h:
* Source/JavaScriptCore/runtime/SourceOrigin.h:
Canonical link: https://commits.webkit.org/289677@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes