Bug 126331 - CStack: Refactor to split the tracking of the jsStackLimit from the native stackLimit.
Summary: CStack: Refactor to split the tracking of the jsStackLimit from the native st...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks: 126320
  Show dependency treegraph
 
Reported: 2013-12-30 22:34 PST by Mark Lam
Modified: 2014-01-09 13:09 PST (History)
5 users (show)

See Also:


Attachments
the patch. (5.88 KB, patch)
2013-12-30 22:43 PST, Mark Lam
ggaren: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2013-12-30 22:34:51 PST
Previously, when using the C stack for the JS stack, VM::m_jsStackLimit is a union with VM::m_stackLimit.  With this patch, we separate them into 2 distinct fields but haven't changed the computation of the limit values to set them with yet.
Comment 1 Mark Lam 2013-12-30 22:39:34 PST
This is a step in preparation for https://bugs.webkit.org/show_bug.cgi?id=126320.
Comment 2 Mark Lam 2013-12-30 22:43:09 PST
Created attachment 220148 [details]
the patch.
Comment 3 Mark Lam 2013-12-30 22:46:41 PST
Landed in r161172 on the jsCStack branch: <http://trac.webkit.org/r161172>.
Comment 4 Geoffrey Garen 2014-01-02 13:18:46 PST
Comment on attachment 220148 [details]
the patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=220148&action=review

> Source/JavaScriptCore/runtime/VMEntryScope.cpp:78
> +#if !ENABLE(LLINT_C_LOOP)
> +    void* jsStackLimit = m_stack.recursionLimit(requiredCapacity(JSStackCapacity));
> +    m_vm.setJSStackLimit(jsStackLimit);
> +#endif

These #ifdefs look wrong. The JS stack limit is CLoop-only. Why does the #ifdef say "*not* enable CLoop?"
Comment 5 Mark Lam 2014-01-08 12:25:03 PST
Comment on attachment 220148 [details]
the patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=220148&action=review

>> Source/JavaScriptCore/runtime/VMEntryScope.cpp:78
>> +#endif
> 
> These #ifdefs look wrong. The JS stack limit is CLoop-only. Why does the #ifdef say "*not* enable CLoop?"

This is not wrong.  The jsStackLimit is the limit that all JS code checks against (i.e. the LLINT and JITted code).  In the !ENABLE(LLINT_C_LOOP) case, VM::m_jsStackLimit is in a union with VM::m_stackLimit, and the 2 are the same.  In the ENABLE(LLINT_C_LOOP) case, the 2 are different.

That said, this is moot now.  This patch will be supplanted by https://bugs.webkit.org/show_bug.cgi?id=126320 where we'll adopt the new "simpler" way of computing the stack limit.