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/interpreter/CallFrame.h

    r150160 r153209  
    22 *  Copyright (C) 1999-2001 Harri Porten ([email protected])
    33 *  Copyright (C) 2001 Peter Kelly ([email protected])
    4  *  Copyright (C) 2003, 2007, 2008, 2011 Apple Inc. All rights reserved.
     4 *  Copyright (C) 2003, 2007, 2008, 2011, 2013 Apple Inc. All rights reserved.
    55 *
    66 *  This library is free software; you can redistribute it and/or
     
    114114#endif
    115115        AbstractPC abstractReturnPC(VM& vm) { return AbstractPC(vm, this); }
    116 #if USE(JSVALUE32_64)
    117         unsigned bytecodeOffsetForNonDFGCode() const;
    118         void setBytecodeOffsetForNonDFGCode(unsigned offset);
    119 #else
    120         unsigned bytecodeOffsetForNonDFGCode() const
    121         {
    122             ASSERT(codeBlock());
    123             return this[JSStack::ArgumentCount].tag();
    124         }
    125        
    126         void setBytecodeOffsetForNonDFGCode(unsigned offset)
    127         {
    128             ASSERT(codeBlock());
    129             this[JSStack::ArgumentCount].tag() = static_cast<int32_t>(offset);
    130         }
    131 #endif
     116
     117        bool hasLocationAsBytecodeOffset() const;
     118        bool hasLocationAsCodeOriginIndex() const;
     119
     120        unsigned locationAsRawBits() const;
     121        unsigned locationAsBytecodeOffset() const;
     122        unsigned locationAsCodeOriginIndex() const;
     123
     124        void setLocationAsRawBits(unsigned);
     125        void setLocationAsBytecodeOffset(unsigned);
    132126
    133127        Register* frameExtent()
     
    142136#if ENABLE(DFG_JIT)
    143137        InlineCallFrame* inlineCallFrame() const { return this[JSStack::ReturnPC].asInlineCallFrame(); }
    144         unsigned codeOriginIndexForDFG() const { return this[JSStack::ArgumentCount].tag(); }
    145138#else
    146139        // This will never be called if !ENABLE(DFG_JIT) since all calls should be guarded by
Note: See TracChangeset for help on using the changeset viewer.