Bug 253481 - Fold CallFrameClosure into CachedCall.
Summary: Fold CallFrameClosure into CachedCall.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-03-06 19:00 PST by Mark Lam
Modified: 2023-03-06 23:29 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2023-03-06 19:00:12 PST
CallFrameClosure is always embedded into and used with a CachedCall.  This patch makes the following changes:
1. By folding it into CachedCall, we can remove many redundancies e.g. a protoCallFrame pointer, a JSFunction pointer, a VM pointer, and argumentCountIncludingThis.
2. CallFrameClosure::parameterCountIncludingThis was also never used.  So, remove it.
3. Remove CachedCall::m_interpreter because it is always as an offset from CachedCall::m_vm.
4. Added an optimization to compute VM& from Interpreter*.  This eliminates the need to pass globalObject to a few Interpreter::executeXXX functions where the sole purpose of the globalObject is for computing VM&.
5. Add an optimization in Interpreter::executeCachedCall where we can skip the call to ScriptExecutable::prepareForExecution if the addressForCall is unchanged.
6. Remove the now unneeded CallFrameClosure.
7. Rename Interpreter::prepareForRepeatCall to prepareForCachedCall to match what it's actually preparing for.
Comment 1 Radar WebKit Bug Importer 2023-03-06 19:00:56 PST
<rdar://problem/106341933>
Comment 2 Mark Lam 2023-03-06 19:08:00 PST
Pull request: https://github.com/WebKit/WebKit/pull/11147
Comment 3 EWS 2023-03-06 23:29:40 PST
Committed 261311@main (dd4b91af70c5): <https://commits.webkit.org/261311@main>

Reviewed commits have been landed. Closing PR #11147 and removing active labels.