WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
ASSIGNED
123042
Adjust JSC Call Frame layout to conform to native calling conventions
https://bugs.webkit.org/show_bug.cgi?id=123042
Summary
Adjust JSC Call Frame layout to conform to native calling conventions
Michael Saboff
Reported
2013-10-18 15:30:01 PDT
The current JavaScript call frame is made up of 64 bit slots (arg count and codeLocation together make one slot). The ordering and size of these slots doesn't map well with native calling conventions. struct oldCallFrameLayout { JSValue codeBlock; JSValue returnPC; JSValue scopeChain; JSValue callee; JSValue callerFrame; int32_t argCount; uint32_t codeLocation; JSValue arg0; // this // Args 1 ... n }; By changing the format of the call frame, JavaScript stack frames will be much more compliant with native calling conventions. struct newCallFrameLayout { void* callerFrame; void* returnPC; JSScope* scopeChain; CodeBlock* codeBlock; unsigned argCount; unsigned codeOrigin; JSValue callee; JSValue arg0; // this // Args 1 ... n }; When fully transitioned, the callFrame pointer will point to a frame of this format on the stack. Local variables will begin at the callFrame pointer - 8. For 32 bit platforms, the pointers will be 32 bits. For some platforms, callerFrame and returnPC should be reversed to conform with the order that the prior PC and frame pointer or pushed.
Attachments
Add attachment
proposed patch, testcase, etc.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug