Ignore:
Timestamp:
Jul 24, 2013, 9:02:03 PM (12 years ago)
Author:
[email protected]
Message:

fourthTier: Disambiguate between CallFrame bytecodeOffset and codeOriginIndex.
https://bugs.webkit.org/show_bug.cgi?id=117262.

Reviewed by Geoffrey Garen.

When writing to the ArgumentCount tag in CallFrame, we will set the high
bit if the written value is a codeOriginIndex.

(CodeOrigin):
(JSC::CodeOrigin::isHandle):
(JSC::CodeOrigin::encodeHandle):
(JSC::CodeOrigin::decodeHandle):

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::beginCall):

  • dfg/DFGRepatch.cpp:

(JSC::DFG::tryBuildGetByIDList):

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::locationAsBytecodeOffset):
(JSC::CallFrame::setLocationAsBytecodeOffset):
(JSC::CallFrame::currentVPC):
(JSC::CallFrame::setCurrentVPC):
(JSC::CallFrame::trueCallFrame):

  • interpreter/CallFrame.h:

(ExecState):
(JSC::ExecState::inlineCallFrame):

  • interpreter/CallFrameInlines.h: Added.

(JSC::CallFrame::hasLocationAsBytecodeOffset):
(JSC::CallFrame::hasLocationAsCodeOriginIndex):
(JSC::CallFrame::locationAsRawBits):
(JSC::CallFrame::setLocationAsRawBits):
(JSC::CallFrame::locationAsBytecodeOffset):
(JSC::CallFrame::setLocationAsBytecodeOffset):
(JSC::CallFrame::locationAsCodeOriginIndex):

  • interpreter/Interpreter.cpp:

(JSC::getBytecodeOffsetForCallFrame):
(JSC::getCallerInfo):

  • jit/JITStubs.cpp:

(JSC::DEFINE_STUB_FUNCTION):

File:
1 edited

Legend:

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

    r153202 r153209  
    8989   
    9090    void dump(PrintStream&) const;
     91
     92    static inline bool isHandle(uint32_t bits) { return !!(bits & handleFlag); }
     93    static inline uint32_t encodeHandle(uint32_t bits)
     94    {
     95        ASSERT(!isHandle(bits));
     96        return bits | handleFlag;
     97    }
     98    static inline uint32_t decodeHandle(uint32_t bits)
     99    {
     100        ASSERT(isHandle(bits));
     101        return bits & ~handleFlag;
     102    }
     103
     104private:
     105    static const uint32_t handleFlag = (1 << 31);
    91106};
    92107
Note: See TracChangeset for help on using the changeset viewer.