| Summary: | r171362 accidentally increased the size of InlineCallFrame | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Mark Lam <mark.lam> | ||||||||
| Component: | JavaScriptCore | Assignee: | Mark Lam <mark.lam> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | commit-queue, fpizlo | ||||||||
| Priority: | P2 | ||||||||||
| Version: | 528+ (Nightly build) | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Mark Lam
2014-08-21 17:50:02 PDT
Created attachment 236948 [details]
The patch
Comment on attachment 236948 [details] The patch View in context: https://bugs.webkit.org/attachment.cgi?id=236948&action=review > Source/JavaScriptCore/bytecode/CodeOrigin.h:164 > + static const int maxStackOffset = (1 << 29) - 1; > + static const int minStackOffset = (~0 << 29); Wrong limits. Created attachment 236949 [details]
patch 2: with correct limits
Comment on attachment 236949 [details] patch 2: with correct limits View in context: https://bugs.webkit.org/attachment.cgi?id=236949&action=review > Source/JavaScriptCore/bytecode/CodeOrigin.h:207 > + void setStackOffset(signed offset) > + { > + RELEASE_ASSERT(minStackOffset <= offset && offset <= maxStackOffset); > + stackOffset = offset; > + } Why can't this just be: void setStackOffset(signed offset) { stackOffset = offset; RELEASE_ASSERT(static_cast<signed>(stackOffset) == offset); } Then you can get rid of the minStackOffset/maxStackOffset constants. (In reply to comment #4) > Why can't this just be: > > void setStackOffset(signed offset) > { > stackOffset = offset; > RELEASE_ASSERT(static_cast<signed>(stackOffset) == offset); > } > > Then you can get rid of the minStackOffset/maxStackOffset constants. That is an excellent and superior solution. Will fix. Created attachment 236964 [details]
patch 3: with better assertion.
Comment on attachment 236964 [details] patch 3: with better assertion. Clearing flags on attachment: 236964 Committed r172853: <http://trac.webkit.org/changeset/172853> All reviewed patches have been landed. Closing bug. |