Ignore:
Timestamp:
Aug 21, 2014, 10:30:02 PM (11 years ago)
Author:
[email protected]
Message:

r171362 accidentally increased the size of InlineCallFrame.
<https://webkit.org/b/136141>

Reviewed by Filip Pizlo.

r171362 increased the size of InlineCallFrame::kind to 2 bits. This increased
the size of InlineCallFrame from 72 to 80 though not intentionally. The fix
is to reduce the size of InlineCallFrame::stackOffset to 29 bits.

Also added an assert to ensure that we never set a value that exceeds the size
of InlineCallFrame::stackOffset.

  • bytecode/CodeOrigin.h:

(JSC::InlineCallFrame::setStackOffset):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/CodeOrigin.h

    r172801 r172853  
    160160    CodeOrigin caller;
    161161    BitVector capturedVars; // Indexed by the machine call frame's variable numbering.
    162     signed stackOffset : 30;
     162
     163    signed stackOffset : 29;
    163164    unsigned kind : 2; // real type is Kind
    164165    bool isClosureCall : 1; // If false then we know that callee/scope are constants and the DFG won't treat them as variables, i.e. they have to be recovered manually.
     
    198199    CodeBlock* baselineCodeBlock() const;
    199200   
     201    void setStackOffset(signed offset)
     202    {
     203        stackOffset = offset;
     204        RELEASE_ASSERT(static_cast<signed>(stackOffset) == offset);
     205    }
     206
    200207    ptrdiff_t callerFrameOffset() const { return stackOffset * sizeof(Register) + CallFrame::callerFrameOffset(); }
    201208    ptrdiff_t returnPCOffset() const { return stackOffset * sizeof(Register) + CallFrame::returnPCOffset(); }
Note: See TracChangeset for help on using the changeset viewer.