Changeset 45609 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Jul 7, 2009, 2:52:07 PM (16 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2009-07-07 Gavin Barraclough <[email protected]>

Reviewed by Sam Weinig.

Stop loading constants into the register file.

Instead, use high register values (highest bit bar the sign bit set) to indicate
constants in the instruction stream, and when we encounter such a value load it
directly from the CodeBlock.

Since constants are no longer copied into the register file, this patch renders
the 'unexpected constant' mechanism redundant, and removes it.

2% improvement, thanks to Sam Weinig.

  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::dump): (JSC::CodeBlock::CodeBlock): (JSC::CodeBlock::mark): (JSC::CodeBlock::shrinkToFit):
  • bytecode/CodeBlock.h: (JSC::CodeBlock::isTemporaryRegisterIndex): (JSC::CodeBlock::constantRegister): (JSC::CodeBlock::isConstantRegisterIndex): (JSC::CodeBlock::getConstant): (JSC::ExecState::r):
  • bytecode/Opcode.h:
  • bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::preserveLastVar): (JSC::BytecodeGenerator::BytecodeGenerator): (JSC::BytecodeGenerator::addConstantValue): (JSC::BytecodeGenerator::emitEqualityOp): (JSC::BytecodeGenerator::emitLoad): (JSC::BytecodeGenerator::emitResolveBase): (JSC::BytecodeGenerator::emitResolveWithBase): (JSC::BytecodeGenerator::emitNewError):
  • bytecompiler/BytecodeGenerator.h: (JSC::BytecodeGenerator::emitNode):
  • interpreter/CallFrame.h: (JSC::ExecState::noCaller): (JSC::ExecState::hasHostCallFrameFlag): (JSC::ExecState::addHostCallFrameFlag): (JSC::ExecState::removeHostCallFrameFlag):
  • interpreter/Interpreter.cpp: (JSC::Interpreter::resolve): (JSC::Interpreter::resolveSkip): (JSC::Interpreter::resolveGlobal): (JSC::Interpreter::resolveBase): (JSC::Interpreter::resolveBaseAndProperty): (JSC::Interpreter::resolveBaseAndFunc): (JSC::Interpreter::dumpRegisters): (JSC::Interpreter::throwException): (JSC::Interpreter::createExceptionScope): (JSC::Interpreter::privateExecute): (JSC::Interpreter::retrieveArguments):
  • jit/JIT.cpp: (JSC::JIT::privateCompileMainPass):
  • jit/JITInlineMethods.h: (JSC::JIT::emitLoadDouble): (JSC::JIT::emitLoadInt32ToDouble):
  • jit/JITOpcodes.cpp: (JSC::JIT::emit_op_new_error): (JSC::JIT::emit_op_enter): (JSC::JIT::emit_op_enter_with_activation):
  • parser/Nodes.cpp: (JSC::DeleteResolveNode::emitBytecode): (JSC::DeleteValueNode::emitBytecode): (JSC::PrefixResolveNode::emitBytecode):
  • runtime/JSActivation.cpp: (JSC::JSActivation::JSActivation):
  • wtf/Platform.h:

LayoutTests:

2009-07-07 Gavin Barraclough <[email protected]>

Reviewed by Geoff Garen.

fast/js/global-recursion-on-full-stack.html is a little finicky.

The test recurses down the JS stack to find the bottom (catching this with an exception),
then tries to call a host function (document.write), switch writes new '<script>' code,
and expects this code to be run, then expects this code to try to call 'f();' again,
which it expects to fail, and it expects to catch that exception. However it is possible
that one of the earlier stages (the call to document.write, entering the interpreter to
run the new global code) will fail, depending on exactly how much stack space was free at
the point the last call to f() failed.

Tweak the test to make it work.

  • fast/js/global-recursion-on-full-stack.html:
Location:
trunk/JavaScriptCore
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r45600 r45609  
     12009-07-07  Gavin Barraclough  <[email protected]>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Stop loading constants into the register file.
     6
     7        Instead, use high register values (highest bit bar the sign bit set) to indicate
     8        constants in the instruction stream, and when we encounter such a value load it
     9        directly from the CodeBlock.
     10
     11        Since constants are no longer copied into the register file, this patch renders
     12        the 'unexpected constant' mechanism redundant, and removes it.
     13
     14        2% improvement, thanks to Sam Weinig.
     15
     16        * bytecode/CodeBlock.cpp:
     17        (JSC::CodeBlock::dump):
     18        (JSC::CodeBlock::CodeBlock):
     19        (JSC::CodeBlock::mark):
     20        (JSC::CodeBlock::shrinkToFit):
     21        * bytecode/CodeBlock.h:
     22        (JSC::CodeBlock::isTemporaryRegisterIndex):
     23        (JSC::CodeBlock::constantRegister):
     24        (JSC::CodeBlock::isConstantRegisterIndex):
     25        (JSC::CodeBlock::getConstant):
     26        (JSC::ExecState::r):
     27        * bytecode/Opcode.h:
     28        * bytecompiler/BytecodeGenerator.cpp:
     29        (JSC::BytecodeGenerator::preserveLastVar):
     30        (JSC::BytecodeGenerator::BytecodeGenerator):
     31        (JSC::BytecodeGenerator::addConstantValue):
     32        (JSC::BytecodeGenerator::emitEqualityOp):
     33        (JSC::BytecodeGenerator::emitLoad):
     34        (JSC::BytecodeGenerator::emitResolveBase):
     35        (JSC::BytecodeGenerator::emitResolveWithBase):
     36        (JSC::BytecodeGenerator::emitNewError):
     37        * bytecompiler/BytecodeGenerator.h:
     38        (JSC::BytecodeGenerator::emitNode):
     39        * interpreter/CallFrame.h:
     40        (JSC::ExecState::noCaller):
     41        (JSC::ExecState::hasHostCallFrameFlag):
     42        (JSC::ExecState::addHostCallFrameFlag):
     43        (JSC::ExecState::removeHostCallFrameFlag):
     44        * interpreter/Interpreter.cpp:
     45        (JSC::Interpreter::resolve):
     46        (JSC::Interpreter::resolveSkip):
     47        (JSC::Interpreter::resolveGlobal):
     48        (JSC::Interpreter::resolveBase):
     49        (JSC::Interpreter::resolveBaseAndProperty):
     50        (JSC::Interpreter::resolveBaseAndFunc):
     51        (JSC::Interpreter::dumpRegisters):
     52        (JSC::Interpreter::throwException):
     53        (JSC::Interpreter::createExceptionScope):
     54        (JSC::Interpreter::privateExecute):
     55        (JSC::Interpreter::retrieveArguments):
     56        * jit/JIT.cpp:
     57        (JSC::JIT::privateCompileMainPass):
     58        * jit/JITInlineMethods.h:
     59        (JSC::JIT::emitLoadDouble):
     60        (JSC::JIT::emitLoadInt32ToDouble):
     61        * jit/JITOpcodes.cpp:
     62        (JSC::JIT::emit_op_new_error):
     63        (JSC::JIT::emit_op_enter):
     64        (JSC::JIT::emit_op_enter_with_activation):
     65        * parser/Nodes.cpp:
     66        (JSC::DeleteResolveNode::emitBytecode):
     67        (JSC::DeleteValueNode::emitBytecode):
     68        (JSC::PrefixResolveNode::emitBytecode):
     69        * runtime/JSActivation.cpp:
     70        (JSC::JSActivation::JSActivation):
     71        * wtf/Platform.h:
     72
    1732009-07-07  Mark Rowe  <[email protected]>
    274
  • trunk/JavaScriptCore/bytecode/CodeBlock.cpp

    r44844 r45609  
    364364    }
    365365
    366     if (m_rareData && !m_rareData->m_unexpectedConstants.isEmpty()) {
    367         printf("\nUnexpected Constants:\n");
    368         size_t i = 0;
    369         do {
    370             printf("  k%u = %s\n", static_cast<unsigned>(i), valueToSourceString(exec, m_rareData->m_unexpectedConstants[i]).ascii());
    371             ++i;
    372         } while (i < m_rareData->m_unexpectedConstants.size());
    373     }
    374    
    375366    if (m_rareData && !m_rareData->m_regexps.isEmpty()) {
    376367        printf("\nm_regexps:\n");
     
    507498            break;
    508499        }
    509         case op_unexpected_load: {
    510             int r0 = (++it)->u.operand;
    511             int k0 = (++it)->u.operand;
    512             printf("[%4d] unexpected_load\t %s, %s\n", location, registerName(r0).c_str(), constantName(exec, k0, unexpectedConstant(k0)).c_str());
    513             break;
    514         }
    515500        case op_new_object: {
    516501            int r0 = (++it)->u.operand;
     
    10851070            int errorType = (++it)->u.operand;
    10861071            int k0 = (++it)->u.operand;
    1087             printf("[%4d] new_error\t %s, %d, %s\n", location, registerName(r0).c_str(), errorType, constantName(exec, k0, unexpectedConstant(k0)).c_str());
     1072            printf("[%4d] new_error\t %s, %d, %s\n", location, registerName(r0).c_str(), errorType, constantName(exec, k0, getConstant(k0)).c_str());
    10881073            break;
    10891074        }
     
    11431128    macro(regexps) \
    11441129    macro(functions) \
    1145     macro(unexpectedConstants) \
    11461130    macro(exceptionHandlers) \
    11471131    macro(immediateSwitchJumpTables) \
     
    12681252CodeBlock::CodeBlock(ScopeNode* ownerNode)
    12691253    : m_numCalleeRegisters(0)
    1270     , m_numConstants(0)
    12711254    , m_numVars(0)
    12721255    , m_numParameters(0)
     
    12911274CodeBlock::CodeBlock(ScopeNode* ownerNode, CodeType codeType, PassRefPtr<SourceProvider> sourceProvider, unsigned sourceOffset)
    12921275    : m_numCalleeRegisters(0)
    1293     , m_numConstants(0)
    12941276    , m_numVars(0)
    12951277    , m_numParameters(0)
     
    14561438            m_rareData->m_functions[i]->body()->mark();
    14571439
    1458         for (size_t i = 0; i < m_rareData->m_unexpectedConstants.size(); ++i) {
    1459             if (!m_rareData->m_unexpectedConstants[i].marked())
    1460                 m_rareData->m_unexpectedConstants[i].mark();
    1461         }
    14621440        m_rareData->m_evalCodeCache.mark();
    14631441    }
     
    17581736        m_rareData->m_exceptionHandlers.shrinkToFit();
    17591737        m_rareData->m_functions.shrinkToFit();
    1760         m_rareData->m_unexpectedConstants.shrinkToFit();
    17611738        m_rareData->m_regexps.shrinkToFit();
    17621739        m_rareData->m_immediateSwitchJumpTables.shrinkToFit();
  • trunk/JavaScriptCore/bytecode/CodeBlock.h

    r45128 r45609  
    4747#endif
    4848
     49// Register numbers used in bytecode operations have different meaning accoring to their ranges:
     50//      0x80000000-0xFFFFFFFF  Negative indicies from the CallFrame pointer are entries in the call frame, see RegisterFile.h.
     51//      0x00000000-0x3FFFFFFF  Forwards indices from the CallFrame pointer are local vars and temporaries with the function's callframe.
     52//      0x40000000-0x7FFFFFFF  Positive indices from 0x40000000 specify entries in the constant pool on the CodeBlock.
     53static const int FirstConstantRegisterIndex = 0x40000000;
     54
    4955namespace JSC {
    5056
     
    249255        }
    250256
    251         ALWAYS_INLINE bool isConstantRegisterIndex(int index)
    252         {
    253             return index >= m_numVars && index < m_numVars + m_numConstants;
    254         }
    255 
    256         ALWAYS_INLINE JSValue getConstant(int index)
    257         {
    258             return m_constantRegisters[index - m_numVars].jsValue();
    259         }
    260 
    261257        ALWAYS_INLINE bool isTemporaryRegisterIndex(int index)
    262258        {
    263             return index >= m_numVars + m_numConstants;
     259            return index >= m_numVars;
    264260        }
    265261
     
    401397        size_t numberOfConstantRegisters() const { return m_constantRegisters.size(); }
    402398        void addConstantRegister(const Register& r) { return m_constantRegisters.append(r); }
    403         Register& constantRegister(int index) { return m_constantRegisters[index]; }
     399        Register& constantRegister(int index) { return m_constantRegisters[index - FirstConstantRegisterIndex]; }
     400        ALWAYS_INLINE bool isConstantRegisterIndex(int index) { return index >= FirstConstantRegisterIndex; }
     401        ALWAYS_INLINE JSValue getConstant(int index) const { return m_constantRegisters[index - FirstConstantRegisterIndex].jsValue(); }
    404402
    405403        unsigned addFunctionExpression(FuncExprNode* n) { unsigned size = m_functionExpressions.size(); m_functionExpressions.append(n); return size; }
     
    410408
    411409        bool hasFunctions() const { return m_functionExpressions.size() || (m_rareData && m_rareData->m_functions.size()); }
    412 
    413         unsigned addUnexpectedConstant(JSValue v) { createRareDataIfNecessary(); unsigned size = m_rareData->m_unexpectedConstants.size(); m_rareData->m_unexpectedConstants.append(v); return size; }
    414         JSValue unexpectedConstant(int index) const { ASSERT(m_rareData); return m_rareData->m_unexpectedConstants[index]; }
    415410
    416411        unsigned addRegExp(RegExp* r) { createRareDataIfNecessary(); unsigned size = m_rareData->m_regexps.size(); m_rareData->m_regexps.append(r); return size; }
     
    442437
    443438        int m_numCalleeRegisters;
    444         // NOTE: numConstants holds the number of constant registers allocated
    445         // by the code generator, not the number of constant registers used.
    446         // (Duplicate constants are uniqued during code generation, and spare
    447         // constant registers may be allocated.)
    448         int m_numConstants;
    449439        int m_numVars;
    450440        int m_numParameters;
     
    520510            // Rare Constants
    521511            Vector<RefPtr<FuncDeclNode> > m_functions;
    522             Vector<JSValue> m_unexpectedConstants;
    523512            Vector<RefPtr<RegExp> > m_regexps;
    524513
     
    575564    };
    576565
     566    inline Register& ExecState::r(int index)
     567    {
     568        CodeBlock* codeBlock = this->codeBlock();
     569        if (codeBlock->isConstantRegisterIndex(index))
     570            return codeBlock->constantRegister(index);
     571        return this[index];
     572    }
     573
    577574} // namespace JSC
    578575
  • trunk/JavaScriptCore/bytecode/Opcode.h

    r44076 r45609  
    4545        macro(op_convert_this, 2) \
    4646        \
    47         macro(op_unexpected_load, 3) \
    4847        macro(op_new_object, 2) \
    4948        macro(op_new_array, 4) \
  • trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

    r44711 r45609  
    197197}
    198198
    199 void BytecodeGenerator::allocateConstants(size_t count)
    200 {
    201     m_codeBlock->m_numConstants = count;
    202     if (!count)
    203         return;
    204    
    205     m_nextConstantIndex = m_calleeRegisters.size();
    206 
    207     for (size_t i = 0; i < count; ++i)
    208         newRegister();
    209     m_lastConstant = &m_calleeRegisters.last();
     199void BytecodeGenerator::preserveLastVar()
     200{
     201    if ((m_firstConstantIndex = m_calleeRegisters.size()) != 0)
     202        m_lastVar = &m_calleeRegisters.last();
    210203}
    211204
     
    223216    , m_codeType(GlobalCode)
    224217    , m_nextGlobalIndex(-1)
     218    , m_nextConstantOffset(0)
    225219    , m_globalConstantIndex(0)
    226220    , m_globalData(&scopeChain.globalObject()->globalExec()->globalData())
     
    273267                newVars.append(addGlobalVar(varStack[i].first, varStack[i].second & DeclarationStacks::IsConstant));
    274268
    275         allocateConstants(programNode->neededConstants());
     269        preserveLastVar();
    276270
    277271        for (size_t i = 0; i < newVars.size(); ++i)
     
    291285        }
    292286
    293         allocateConstants(programNode->neededConstants());
     287        preserveLastVar();
    294288    }
    295289}
     
    306300    , m_baseScopeDepth(0)
    307301    , m_codeType(FunctionCode)
     302    , m_nextConstantOffset(0)
    308303    , m_globalConstantIndex(0)
    309304    , m_globalData(&scopeChain.globalObject()->globalExec()->globalData())
     
    373368        addParameter(parameters[i]);
    374369
    375     allocateConstants(functionBody->neededConstants());
     370    preserveLastVar();
    376371}
    377372
     
    388383    , m_baseScopeDepth(codeBlock->baseScopeDepth())
    389384    , m_codeType(EvalCode)
     385    , m_nextConstantOffset(0)
    390386    , m_globalConstantIndex(0)
    391387    , m_globalData(&scopeChain.globalObject()->globalExec()->globalData())
     
    402398    m_codeBlock->m_numParameters = 1; // Allocate space for "this"
    403399
    404     allocateConstants(evalNode->neededConstants());
     400    preserveLastVar();
    405401}
    406402
     
    792788}
    793789
    794 RegisterID* BytecodeGenerator::addConstant(JSValue v)
    795 {
    796     pair<JSValueMap::iterator, bool> result = m_jsValueMap.add(JSValue::encode(v), m_nextConstantIndex);
     790RegisterID* BytecodeGenerator::addConstantValue(JSValue v)
     791{
     792    int index = m_nextConstantOffset;
     793
     794    pair<JSValueMap::iterator, bool> result = m_jsValueMap.add(JSValue::encode(v), m_nextConstantOffset);
    797795    if (result.second) {
    798         RegisterID& constant = m_calleeRegisters[m_nextConstantIndex];
    799        
    800         ++m_nextConstantIndex;
    801 
     796        m_constantPoolRegisters.append(FirstConstantRegisterIndex + m_nextConstantOffset);
     797        ++m_nextConstantOffset;
    802798        m_codeBlock->addConstantRegister(JSValue(v));
    803         return &constant;
    804     }
    805 
    806     return &registerFor(result.first->second);
    807 }
    808 
    809 unsigned BytecodeGenerator::addUnexpectedConstant(JSValue v)
    810 {
    811     return m_codeBlock->addUnexpectedConstant(v);
    812 }
    813 
    814 RegisterID* BytecodeGenerator::emitLoadGlobalObject(RegisterID* dst, JSObject* globalObject)
    815 {
    816     if (!m_globalConstantIndex)
    817         m_globalConstantIndex = m_codeBlock->addUnexpectedConstant(globalObject);
    818     emitOpcode(op_unexpected_load);
    819     instructions().append(dst->index());
    820     instructions().append(m_globalConstantIndex);
    821     return dst;
     799    } else
     800        index = result.first->second;
     801
     802    return &m_constantPoolRegisters[index];
    822803}
    823804
     
    899880            && src1->isTemporary()
    900881            && m_codeBlock->isConstantRegisterIndex(src2->index())
    901             && m_codeBlock->constantRegister(src2->index() - m_codeBlock->m_numVars).jsValue().isString()) {
    902             const UString& value = asString(m_codeBlock->constantRegister(src2->index() - m_codeBlock->m_numVars).jsValue())->value();
     882            && m_codeBlock->constantRegister(src2->index()).jsValue().isString()) {
     883            const UString& value = asString(m_codeBlock->constantRegister(src2->index()).jsValue())->value();
    903884            if (value == "undefined") {
    904885                rewindUnaryOp();
     
    980961RegisterID* BytecodeGenerator::emitLoad(RegisterID* dst, JSValue v)
    981962{
    982     RegisterID* constantID = addConstant(v);
     963    RegisterID* constantID = addConstantValue(v);
    983964    if (dst)
    984965        return emitMove(dst, constantID);
    985966    return constantID;
    986 }
    987 
    988 RegisterID* BytecodeGenerator::emitUnexpectedLoad(RegisterID* dst, bool b)
    989 {
    990     emitOpcode(op_unexpected_load);
    991     instructions().append(dst->index());
    992     instructions().append(addUnexpectedConstant(jsBoolean(b)));
    993     return dst;
    994 }
    995 
    996 RegisterID* BytecodeGenerator::emitUnexpectedLoad(RegisterID* dst, double d)
    997 {
    998     emitOpcode(op_unexpected_load);
    999     instructions().append(dst->index());
    1000     instructions().append(addUnexpectedConstant(jsNumber(globalData(), d)));
    1001     return dst;
    1002967}
    1003968
     
    11701135
    11711136    // Global object is the base
    1172     return emitLoadGlobalObject(dst, globalObject);
     1137    return emitLoad(dst, JSValue(globalObject));
    11731138}
    11741139
     
    11971162
    11981163    // Global object is the base
    1199     emitLoadGlobalObject(baseDst, globalObject);
     1164    emitLoad(baseDst, JSValue(globalObject));
    12001165
    12011166    if (index != missingSymbolMarker() && !forceGlobalResolve) {
     
    18321797    instructions().append(dst->index());
    18331798    instructions().append(static_cast<int>(type));
    1834     instructions().append(addUnexpectedConstant(message));
     1799    instructions().append(addConstantValue(message)->index());
    18351800    return dst;
    18361801}
  • trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.h

    r45128 r45609  
    246246        RegisterID* emitLoad(RegisterID* dst, const Identifier&);
    247247        RegisterID* emitLoad(RegisterID* dst, JSValue);
    248         RegisterID* emitUnexpectedLoad(RegisterID* dst, bool);
    249         RegisterID* emitUnexpectedLoad(RegisterID* dst, double);
    250         RegisterID* emitLoadGlobalObject(RegisterID* dst, JSObject* globalObject);
    251248
    252249        RegisterID* emitUnaryOp(OpcodeID, RegisterID* dst, RegisterID* src);
     
    400397        RegisterID* addParameter(const Identifier&);
    401398       
    402         void allocateConstants(size_t);
     399        void preserveLastVar();
    403400
    404401        RegisterID& registerFor(int index)
     
    421418        unsigned addConstant(FuncExprNode*);
    422419        unsigned addConstant(const Identifier&);
    423         RegisterID* addConstant(JSValue);
    424         unsigned addUnexpectedConstant(JSValue);
     420        RegisterID* addConstantValue(JSValue);
    425421        unsigned addRegExp(RegExp*);
    426422
     
    451447        RegisterID m_argumentsRegister;
    452448        int m_activationRegisterIndex;
     449        WTF::SegmentedVector<RegisterID, 32> m_constantPoolRegisters;
    453450        WTF::SegmentedVector<RegisterID, 32> m_calleeRegisters;
    454451        WTF::SegmentedVector<RegisterID, 32> m_parameters;
     
    456453        WTF::SegmentedVector<Label, 32> m_labels;
    457454        WTF::SegmentedVector<LabelScope, 8> m_labelScopes;
    458         RefPtr<RegisterID> m_lastConstant;
     455        RefPtr<RegisterID> m_lastVar;
    459456        int m_finallyDepth;
    460457        int m_dynamicScopeDepth;
     
    467464        int m_nextGlobalIndex;
    468465        int m_nextParameterIndex;
    469         int m_nextConstantIndex;
     466        int m_firstConstantIndex;
     467        int m_nextConstantOffset;
    470468        unsigned m_globalConstantIndex;
    471469
  • trunk/JavaScriptCore/interpreter/CallFrame.h

    r44550 r45609  
    125125        }
    126126
    127     private:
    128         friend class Arguments;
    129         friend class JSActivation;
    130         friend class JSGlobalObject;
    131         friend class Interpreter;
    132         friend struct CallFrameClosure;
     127        // Read a register from the codeframe (or constant from the CodeBlock).
     128        inline Register& r(int);
    133129
     130        static CallFrame* noCaller() { return reinterpret_cast<CallFrame*>(HostCallFrameFlag); }
    134131        int returnValueRegister() const { return this[RegisterFile::ReturnValueRegister].i(); }
    135132
     133        bool hasHostCallFrameFlag() const { return reinterpret_cast<intptr_t>(this) & HostCallFrameFlag; }
     134        CallFrame* addHostCallFrameFlag() const { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) | HostCallFrameFlag); }
     135        CallFrame* removeHostCallFrameFlag() { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) & ~HostCallFrameFlag); }
     136
     137    private:
    136138        void setArgumentCount(int count) { this[RegisterFile::ArgumentCount] = count; }
    137139        void setCallee(JSFunction* callee) { this[RegisterFile::Callee] = callee; }
     
    139141
    140142        static const intptr_t HostCallFrameFlag = 1;
    141 
    142         static CallFrame* noCaller() { return reinterpret_cast<CallFrame*>(HostCallFrameFlag); }
    143         bool hasHostCallFrameFlag() const { return reinterpret_cast<intptr_t>(this) & HostCallFrameFlag; }
    144         CallFrame* addHostCallFrameFlag() const { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) | HostCallFrameFlag); }
    145         CallFrame* removeHostCallFrameFlag() { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) & ~HostCallFrameFlag); }
    146143
    147144        ExecState();
  • trunk/JavaScriptCore/interpreter/Interpreter.cpp

    r45370 r45609  
    109109            if (exceptionValue)
    110110                return false;
    111             callFrame[dst] = JSValue(result);
     111            callFrame->r(dst) = JSValue(result);
    112112            return true;
    113113        }
     
    142142            if (exceptionValue)
    143143                return false;
    144             callFrame[dst] = JSValue(result);
     144            callFrame->r(dst) = JSValue(result);
    145145            return true;
    146146        }
     
    160160
    161161    if (structure == globalObject->structure()) {
    162         callFrame[dst] = JSValue(globalObject->getDirectOffset(offset));
     162        callFrame->r(dst) = JSValue(globalObject->getDirectOffset(offset));
    163163        return true;
    164164    }
     
    175175            vPC[4] = globalObject->structure();
    176176            vPC[5] = slot.cachedOffset();
    177             callFrame[dst] = JSValue(result);
     177            callFrame->r(dst) = JSValue(result);
    178178            return true;
    179179        }
     
    182182        if (exceptionValue)
    183183            return false;
    184         callFrame[dst] = JSValue(result);
     184        callFrame->r(dst) = JSValue(result);
    185185        return true;
    186186    }
     
    194194    int dst = (vPC + 1)->u.operand;
    195195    int property = (vPC + 2)->u.operand;
    196     callFrame[dst] = JSValue(JSC::resolveBase(callFrame, callFrame->codeBlock()->identifier(property), callFrame->scopeChain()));
     196    callFrame->r(dst) = JSValue(JSC::resolveBase(callFrame, callFrame->codeBlock()->identifier(property), callFrame->scopeChain()));
    197197}
    198198
     
    222222            if (exceptionValue)
    223223                return false;
    224             callFrame[propDst] = JSValue(result);
    225             callFrame[baseDst] = JSValue(base);
     224            callFrame->r(propDst) = JSValue(result);
     225            callFrame->r(baseDst) = JSValue(base);
    226226            return true;
    227227        }
     
    267267                return false;
    268268
    269             callFrame[baseDst] = JSValue(thisObj);
    270             callFrame[funcDst] = JSValue(result);
     269            callFrame->r(baseDst) = JSValue(thisObj);
     270            callFrame->r(funcDst) = JSValue(result);
    271271            return true;
    272272        }
     
    433433    printf("----------------------------------------------------\n");
    434434
    435     end = it + codeBlock->m_numConstants;
    436     if (it != end) {
    437         do {
    438             printf("[r%2d]                      | %10p | %10p \n", registerCount, it, (*it).v());
    439             ++it;
    440             ++registerCount;
    441         } while (it != end);
    442     }
    443     printf("----------------------------------------------------\n");
    444 
    445     end = it + codeBlock->m_numCalleeRegisters - codeBlock->m_numConstants - codeBlock->m_numVars;
     435    end = it + codeBlock->m_numCalleeRegisters - codeBlock->m_numVars;
    446436    if (it != end) {
    447437        do {
     
    564554#if !ENABLE(JIT)
    565555        if (isCallBytecode(codeBlock->instructions()[bytecodeOffset].u.opcode))
    566             profiler->didExecute(callFrame, callFrame[codeBlock->instructions()[bytecodeOffset + 2].u.operand].jsValue());
     556            profiler->didExecute(callFrame, callFrame->r(codeBlock->instructions()[bytecodeOffset + 2].u.operand).jsValue());
    567557        else if (codeBlock->instructions()[bytecodeOffset + 8].u.opcode == getOpcode(op_construct))
    568             profiler->didExecute(callFrame, callFrame[codeBlock->instructions()[bytecodeOffset + 10].u.operand].jsValue());
     558            profiler->didExecute(callFrame, callFrame->r(codeBlock->instructions()[bytecodeOffset + 10].u.operand).jsValue());
    569559#else
    570560        int functionRegisterIndex;
    571561        if (codeBlock->functionRegisterForBytecodeOffset(bytecodeOffset, functionRegisterIndex))
    572             profiler->didExecute(callFrame, callFrame[functionRegisterIndex].jsValue());
     562            profiler->didExecute(callFrame, callFrame->r(functionRegisterIndex).jsValue());
    573563#endif
    574564    }
     
    622612
    623613    CallFrame* newCallFrame = CallFrame::create(oldEnd + codeBlock->m_numParameters + RegisterFile::CallFrameHeaderSize);
    624     newCallFrame[codeBlock->thisRegister()] = JSValue(thisObj);
     614    newCallFrame->r(codeBlock->thisRegister()) = JSValue(thisObj);
    625615    newCallFrame->init(codeBlock, 0, scopeChain, CallFrame::noCaller(), 0, 0, 0);
    626616
     
    679669    CallFrame* newCallFrame = CallFrame::create(oldEnd);
    680670    size_t dst = 0;
    681     newCallFrame[0] = JSValue(thisObj);
     671    newCallFrame->r(0) = JSValue(thisObj);
    682672    ArgList::const_iterator end = args.end();
    683673    for (ArgList::const_iterator it = args.begin(); it != end; ++it)
    684         newCallFrame[++dst] = *it;
     674        newCallFrame->r(++dst) = *it;
    685675
    686676    CodeBlock* codeBlock = &functionBodyNode->bytecode(scopeChain);
     
    740730    size_t dst = 0;
    741731    for (int i = 0; i < argc; ++i)
    742         newCallFrame[++dst] = jsUndefined();
     732        newCallFrame->r(++dst) = jsUndefined();
    743733   
    744734    CodeBlock* codeBlock = &functionBodyNode->bytecode(scopeChain);
     
    851841
    852842    // a 0 codeBlock indicates a built-in caller
    853     newCallFrame[codeBlock->thisRegister()] = JSValue(thisObj);
     843    newCallFrame->r(codeBlock->thisRegister()) = JSValue(thisObj);
    854844    newCallFrame->init(codeBlock, 0, scopeChain, callFrame->addHostCallFrameFlag(), 0, 0, 0);
    855845
     
    915905    CodeBlock* codeBlock = callFrame->codeBlock();
    916906    Identifier& property = codeBlock->identifier((++vPC)->u.operand);
    917     JSValue value = callFrame[(++vPC)->u.operand].jsValue();
     907    JSValue value = callFrame->r((++vPC)->u.operand).jsValue();
    918908    JSObject* scope = new (callFrame) JSStaticScopeObject(callFrame, property, value, DontDelete);
    919     callFrame[dst] = JSValue(scope);
     909    callFrame->r(dst) = JSValue(scope);
    920910
    921911    return callFrame->scopeChain()->push(scope);
     
    11941184        */
    11951185        int dst = (++vPC)->u.operand;
    1196         callFrame[dst] = JSValue(constructEmptyObject(callFrame));
     1186        callFrame->r(dst) = JSValue(constructEmptyObject(callFrame));
    11971187
    11981188        ++vPC;
     
    12111201        int argCount = (++vPC)->u.operand;
    12121202        ArgList args(callFrame->registers() + firstArg, argCount);
    1213         callFrame[dst] = JSValue(constructArray(callFrame, args));
     1203        callFrame->r(dst) = JSValue(constructArray(callFrame, args));
    12141204
    12151205        ++vPC;
     
    12251215        int dst = (++vPC)->u.operand;
    12261216        int regExp = (++vPC)->u.operand;
    1227         callFrame[dst] = JSValue(new (globalData) RegExpObject(callFrame->scopeChain()->globalObject()->regExpStructure(), callFrame->codeBlock()->regexp(regExp)));
     1217        callFrame->r(dst) = JSValue(new (globalData) RegExpObject(callFrame->scopeChain()->globalObject()->regExpStructure(), callFrame->codeBlock()->regexp(regExp)));
    12281218
    12291219        ++vPC;
     
    12371227        int dst = (++vPC)->u.operand;
    12381228        int src = (++vPC)->u.operand;
    1239         callFrame[dst] = callFrame[src];
     1229        callFrame->r(dst) = callFrame->r(src);
    12401230
    12411231        ++vPC;
     
    12501240        */
    12511241        int dst = (++vPC)->u.operand;
    1252         JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
    1253         JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
     1242        JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
     1243        JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
    12541244        if (JSFastMath::canDoFastBitwiseOperations(src1, src2))
    1255             callFrame[dst] = JSFastMath::equal(src1, src2);
     1245            callFrame->r(dst) = JSFastMath::equal(src1, src2);
    12561246        else {
    12571247            JSValue result = jsBoolean(JSValue::equalSlowCase(callFrame, src1, src2));
    12581248            CHECK_FOR_EXCEPTION();
    1259             callFrame[dst] = result;
     1249            callFrame->r(dst) = result;
    12601250        }
    12611251
     
    12701260        */
    12711261        int dst = (++vPC)->u.operand;
    1272         JSValue src = callFrame[(++vPC)->u.operand].jsValue();
     1262        JSValue src = callFrame->r((++vPC)->u.operand).jsValue();
    12731263
    12741264        if (src.isUndefinedOrNull()) {
    1275             callFrame[dst] = jsBoolean(true);
     1265            callFrame->r(dst) = jsBoolean(true);
    12761266            ++vPC;
    12771267            NEXT_INSTRUCTION();
    12781268        }
    12791269       
    1280         callFrame[dst] = jsBoolean(src.isCell() && src.asCell()->structure()->typeInfo().masqueradesAsUndefined());
     1270        callFrame->r(dst) = jsBoolean(src.isCell() && src.asCell()->structure()->typeInfo().masqueradesAsUndefined());
    12811271        ++vPC;
    12821272        NEXT_INSTRUCTION();
     
    12901280        */
    12911281        int dst = (++vPC)->u.operand;
    1292         JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
    1293         JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
     1282        JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
     1283        JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
    12941284        if (JSFastMath::canDoFastBitwiseOperations(src1, src2))
    1295             callFrame[dst] = JSFastMath::notEqual(src1, src2);
     1285            callFrame->r(dst) = JSFastMath::notEqual(src1, src2);
    12961286        else {
    12971287            JSValue result = jsBoolean(!JSValue::equalSlowCase(callFrame, src1, src2));
    12981288            CHECK_FOR_EXCEPTION();
    1299             callFrame[dst] = result;
     1289            callFrame->r(dst) = result;
    13001290        }
    13011291
     
    13101300        */
    13111301        int dst = (++vPC)->u.operand;
    1312         JSValue src = callFrame[(++vPC)->u.operand].jsValue();
     1302        JSValue src = callFrame->r((++vPC)->u.operand).jsValue();
    13131303
    13141304        if (src.isUndefinedOrNull()) {
    1315             callFrame[dst] = jsBoolean(false);
     1305            callFrame->r(dst) = jsBoolean(false);
    13161306            ++vPC;
    13171307            NEXT_INSTRUCTION();
    13181308        }
    13191309       
    1320         callFrame[dst] = jsBoolean(!src.isCell() || !asCell(src)->structure()->typeInfo().masqueradesAsUndefined());
     1310        callFrame->r(dst) = jsBoolean(!src.isCell() || !asCell(src)->structure()->typeInfo().masqueradesAsUndefined());
    13211311        ++vPC;
    13221312        NEXT_INSTRUCTION();
     
    13301320        */
    13311321        int dst = (++vPC)->u.operand;
    1332         JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
    1333         JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
    1334         callFrame[dst] = jsBoolean(JSValue::strictEqual(src1, src2));
     1322        JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
     1323        JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
     1324        callFrame->r(dst) = jsBoolean(JSValue::strictEqual(src1, src2));
    13351325
    13361326        ++vPC;
     
    13451335        */
    13461336        int dst = (++vPC)->u.operand;
    1347         JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
    1348         JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
    1349         callFrame[dst] = jsBoolean(!JSValue::strictEqual(src1, src2));
     1337        JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
     1338        JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
     1339        callFrame->r(dst) = jsBoolean(!JSValue::strictEqual(src1, src2));
    13501340
    13511341        ++vPC;
     
    13601350        */
    13611351        int dst = (++vPC)->u.operand;
    1362         JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
    1363         JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
     1352        JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
     1353        JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
    13641354        JSValue result = jsBoolean(jsLess(callFrame, src1, src2));
    13651355        CHECK_FOR_EXCEPTION();
    1366         callFrame[dst] = result;
     1356        callFrame->r(dst) = result;
    13671357
    13681358        ++vPC;
     
    13771367        */
    13781368        int dst = (++vPC)->u.operand;
    1379         JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
    1380         JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
     1369        JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
     1370        JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
    13811371        JSValue result = jsBoolean(jsLessEq(callFrame, src1, src2));
    13821372        CHECK_FOR_EXCEPTION();
    1383         callFrame[dst] = result;
     1373        callFrame->r(dst) = result;
    13841374
    13851375        ++vPC;
     
    13931383        */
    13941384        int srcDst = (++vPC)->u.operand;
    1395         JSValue v = callFrame[srcDst].jsValue();
     1385        JSValue v = callFrame->r(srcDst).jsValue();
    13961386        if (JSFastMath::canDoFastAdditiveOperations(v))
    1397             callFrame[srcDst] = JSValue(JSFastMath::incImmediateNumber(v));
     1387            callFrame->r(srcDst) = JSValue(JSFastMath::incImmediateNumber(v));
    13981388        else {
    13991389            JSValue result = jsNumber(callFrame, v.toNumber(callFrame) + 1);
    14001390            CHECK_FOR_EXCEPTION();
    1401             callFrame[srcDst] = result;
     1391            callFrame->r(srcDst) = result;
    14021392        }
    14031393
     
    14121402        */
    14131403        int srcDst = (++vPC)->u.operand;
    1414         JSValue v = callFrame[srcDst].jsValue();
     1404        JSValue v = callFrame->r(srcDst).jsValue();
    14151405        if (JSFastMath::canDoFastAdditiveOperations(v))
    1416             callFrame[srcDst] = JSValue(JSFastMath::decImmediateNumber(v));
     1406            callFrame->r(srcDst) = JSValue(JSFastMath::decImmediateNumber(v));
    14171407        else {
    14181408            JSValue result = jsNumber(callFrame, v.toNumber(callFrame) - 1);
    14191409            CHECK_FOR_EXCEPTION();
    1420             callFrame[srcDst] = result;
     1410            callFrame->r(srcDst) = result;
    14211411        }
    14221412
     
    14331423        int dst = (++vPC)->u.operand;
    14341424        int srcDst = (++vPC)->u.operand;
    1435         JSValue v = callFrame[srcDst].jsValue();
     1425        JSValue v = callFrame->r(srcDst).jsValue();
    14361426        if (JSFastMath::canDoFastAdditiveOperations(v)) {
    1437             callFrame[dst] = v;
    1438             callFrame[srcDst] = JSValue(JSFastMath::incImmediateNumber(v));
     1427            callFrame->r(dst) = v;
     1428            callFrame->r(srcDst) = JSValue(JSFastMath::incImmediateNumber(v));
    14391429        } else {
    1440             JSValue number = callFrame[srcDst].jsValue().toJSNumber(callFrame);
     1430            JSValue number = callFrame->r(srcDst).jsValue().toJSNumber(callFrame);
    14411431            CHECK_FOR_EXCEPTION();
    1442             callFrame[dst] = number;
    1443             callFrame[srcDst] = JSValue(jsNumber(callFrame, number.uncheckedGetNumber() + 1));
     1432            callFrame->r(dst) = number;
     1433            callFrame->r(srcDst) = JSValue(jsNumber(callFrame, number.uncheckedGetNumber() + 1));
    14441434        }
    14451435
     
    14561446        int dst = (++vPC)->u.operand;
    14571447        int srcDst = (++vPC)->u.operand;
    1458         JSValue v = callFrame[srcDst].jsValue();
     1448        JSValue v = callFrame->r(srcDst).jsValue();
    14591449        if (JSFastMath::canDoFastAdditiveOperations(v)) {
    1460             callFrame[dst] = v;
    1461             callFrame[srcDst] = JSValue(JSFastMath::decImmediateNumber(v));
     1450            callFrame->r(dst) = v;
     1451            callFrame->r(srcDst) = JSValue(JSFastMath::decImmediateNumber(v));
    14621452        } else {
    1463             JSValue number = callFrame[srcDst].jsValue().toJSNumber(callFrame);
     1453            JSValue number = callFrame->r(srcDst).jsValue().toJSNumber(callFrame);
    14641454            CHECK_FOR_EXCEPTION();
    1465             callFrame[dst] = number;
    1466             callFrame[srcDst] = JSValue(jsNumber(callFrame, number.uncheckedGetNumber() - 1));
     1455            callFrame->r(dst) = number;
     1456            callFrame->r(srcDst) = JSValue(jsNumber(callFrame, number.uncheckedGetNumber() - 1));
    14671457        }
    14681458
     
    14791469        int src = (++vPC)->u.operand;
    14801470
    1481         JSValue srcVal = callFrame[src].jsValue();
     1471        JSValue srcVal = callFrame->r(src).jsValue();
    14821472
    14831473        if (LIKELY(srcVal.isNumber()))
    1484             callFrame[dst] = callFrame[src];
     1474            callFrame->r(dst) = callFrame->r(src);
    14851475        else {
    14861476            JSValue result = srcVal.toJSNumber(callFrame);
    14871477            CHECK_FOR_EXCEPTION();
    1488             callFrame[dst] = result;
     1478            callFrame->r(dst) = result;
    14891479        }
    14901480
     
    14991489        */
    15001490        int dst = (++vPC)->u.operand;
    1501         JSValue src = callFrame[(++vPC)->u.operand].jsValue();
     1491        JSValue src = callFrame->r((++vPC)->u.operand).jsValue();
    15021492        ++vPC;
    15031493        double v;
    15041494        if (src.getNumber(v))
    1505             callFrame[dst] = JSValue(jsNumber(callFrame, -v));
     1495            callFrame->r(dst) = JSValue(jsNumber(callFrame, -v));
    15061496        else {
    15071497            JSValue result = jsNumber(callFrame, -src.toNumber(callFrame));
    15081498            CHECK_FOR_EXCEPTION();
    1509             callFrame[dst] = result;
     1499            callFrame->r(dst) = result;
    15101500        }
    15111501
     
    15201510        */
    15211511        int dst = (++vPC)->u.operand;
    1522         JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
    1523         JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
     1512        JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
     1513        JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
    15241514        if (JSFastMath::canDoFastAdditiveOperations(src1, src2))
    1525             callFrame[dst] = JSValue(JSFastMath::addImmediateNumbers(src1, src2));
     1515            callFrame->r(dst) = JSValue(JSFastMath::addImmediateNumbers(src1, src2));
    15261516        else {
    15271517            JSValue result = jsAdd(callFrame, src1, src2);
    15281518            CHECK_FOR_EXCEPTION();
    1529             callFrame[dst] = result;
     1519            callFrame->r(dst) = result;
    15301520        }
    15311521        vPC += 2;
     
    15391529        */
    15401530        int dst = (++vPC)->u.operand;
    1541         JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
    1542         JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
     1531        JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
     1532        JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
    15431533        double left;
    15441534        double right;
     
    15471537            int32_t right = src2.getInt32Fast();
    15481538            if ((left | right) >> 15 == 0)
    1549                 callFrame[dst] = JSValue(jsNumber(callFrame, left * right));
     1539                callFrame->r(dst) = JSValue(jsNumber(callFrame, left * right));
    15501540            else
    1551                 callFrame[dst] = JSValue(jsNumber(callFrame, static_cast<double>(left) * static_cast<double>(right)));
     1541                callFrame->r(dst) = JSValue(jsNumber(callFrame, static_cast<double>(left) * static_cast<double>(right)));
    15521542        } else if (src1.getNumber(left) && src2.getNumber(right))
    1553             callFrame[dst] = JSValue(jsNumber(callFrame, left * right));
     1543            callFrame->r(dst) = JSValue(jsNumber(callFrame, left * right));
    15541544        else {
    15551545            JSValue result = jsNumber(callFrame, src1.toNumber(callFrame) * src2.toNumber(callFrame));
    15561546            CHECK_FOR_EXCEPTION();
    1557             callFrame[dst] = result;
     1547            callFrame->r(dst) = result;
    15581548        }
    15591549
     
    15691559        */
    15701560        int dst = (++vPC)->u.operand;
    1571         JSValue dividend = callFrame[(++vPC)->u.operand].jsValue();
    1572         JSValue divisor = callFrame[(++vPC)->u.operand].jsValue();
     1561        JSValue dividend = callFrame->r((++vPC)->u.operand).jsValue();
     1562        JSValue divisor = callFrame->r((++vPC)->u.operand).jsValue();
    15731563        double left;
    15741564        double right;
    15751565        if (dividend.getNumber(left) && divisor.getNumber(right))
    1576             callFrame[dst] = JSValue(jsNumber(callFrame, left / right));
     1566            callFrame->r(dst) = JSValue(jsNumber(callFrame, left / right));
    15771567        else {
    15781568            JSValue result = jsNumber(callFrame, dividend.toNumber(callFrame) / divisor.toNumber(callFrame));
    15791569            CHECK_FOR_EXCEPTION();
    1580             callFrame[dst] = result;
     1570            callFrame->r(dst) = result;
    15811571        }
    15821572        ++vPC;
     
    15941584        int divisor = (++vPC)->u.operand;
    15951585
    1596         JSValue dividendValue = callFrame[dividend].jsValue();
    1597         JSValue divisorValue = callFrame[divisor].jsValue();
     1586        JSValue dividendValue = callFrame->r(dividend).jsValue();
     1587        JSValue divisorValue = callFrame->r(divisor).jsValue();
    15981588
    15991589        if (JSValue::areBothInt32Fast(dividendValue, divisorValue) && divisorValue != jsNumber(callFrame, 0)) {
     
    16021592            JSValue result = JSValue::makeInt32Fast(dividendValue.getInt32Fast() % divisorValue.getInt32Fast());
    16031593            ASSERT(result);
    1604             callFrame[dst] = result;
     1594            callFrame->r(dst) = result;
    16051595            ++vPC;
    16061596            NEXT_INSTRUCTION();
     
    16101600        JSValue result = jsNumber(callFrame, fmod(d, divisorValue.toNumber(callFrame)));
    16111601        CHECK_FOR_EXCEPTION();
    1612         callFrame[dst] = result;
     1602        callFrame->r(dst) = result;
    16131603        ++vPC;
    16141604        NEXT_INSTRUCTION();
     
    16221612        */
    16231613        int dst = (++vPC)->u.operand;
    1624         JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
    1625         JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
     1614        JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
     1615        JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
    16261616        double left;
    16271617        double right;
    16281618        if (JSFastMath::canDoFastAdditiveOperations(src1, src2))
    1629             callFrame[dst] = JSValue(JSFastMath::subImmediateNumbers(src1, src2));
     1619            callFrame->r(dst) = JSValue(JSFastMath::subImmediateNumbers(src1, src2));
    16301620        else if (src1.getNumber(left) && src2.getNumber(right))
    1631             callFrame[dst] = JSValue(jsNumber(callFrame, left - right));
     1621            callFrame->r(dst) = JSValue(jsNumber(callFrame, left - right));
    16321622        else {
    16331623            JSValue result = jsNumber(callFrame, src1.toNumber(callFrame) - src2.toNumber(callFrame));
    16341624            CHECK_FOR_EXCEPTION();
    1635             callFrame[dst] = result;
     1625            callFrame->r(dst) = result;
    16361626        }
    16371627        vPC += 2;
     
    16461636        */
    16471637        int dst = (++vPC)->u.operand;
    1648         JSValue val = callFrame[(++vPC)->u.operand].jsValue();
    1649         JSValue shift = callFrame[(++vPC)->u.operand].jsValue();
     1638        JSValue val = callFrame->r((++vPC)->u.operand).jsValue();
     1639        JSValue shift = callFrame->r((++vPC)->u.operand).jsValue();
    16501640        int32_t left;
    16511641        uint32_t right;
    16521642        if (JSValue::areBothInt32Fast(val, shift))
    1653             callFrame[dst] = JSValue(jsNumber(callFrame, val.getInt32Fast() << (shift.getInt32Fast() & 0x1f)));
     1643            callFrame->r(dst) = JSValue(jsNumber(callFrame, val.getInt32Fast() << (shift.getInt32Fast() & 0x1f)));
    16541644        else if (val.numberToInt32(left) && shift.numberToUInt32(right))
    1655             callFrame[dst] = JSValue(jsNumber(callFrame, left << (right & 0x1f)));
     1645            callFrame->r(dst) = JSValue(jsNumber(callFrame, left << (right & 0x1f)));
    16561646        else {
    16571647            JSValue result = jsNumber(callFrame, (val.toInt32(callFrame)) << (shift.toUInt32(callFrame) & 0x1f));
    16581648            CHECK_FOR_EXCEPTION();
    1659             callFrame[dst] = result;
     1649            callFrame->r(dst) = result;
    16601650        }
    16611651
     
    16711661        */
    16721662        int dst = (++vPC)->u.operand;
    1673         JSValue val = callFrame[(++vPC)->u.operand].jsValue();
    1674         JSValue shift = callFrame[(++vPC)->u.operand].jsValue();
     1663        JSValue val = callFrame->r((++vPC)->u.operand).jsValue();
     1664        JSValue shift = callFrame->r((++vPC)->u.operand).jsValue();
    16751665        int32_t left;
    16761666        uint32_t right;
    16771667        if (JSFastMath::canDoFastRshift(val, shift))
    1678             callFrame[dst] = JSValue(JSFastMath::rightShiftImmediateNumbers(val, shift));
     1668            callFrame->r(dst) = JSValue(JSFastMath::rightShiftImmediateNumbers(val, shift));
    16791669        else if (val.numberToInt32(left) && shift.numberToUInt32(right))
    1680             callFrame[dst] = JSValue(jsNumber(callFrame, left >> (right & 0x1f)));
     1670            callFrame->r(dst) = JSValue(jsNumber(callFrame, left >> (right & 0x1f)));
    16811671        else {
    16821672            JSValue result = jsNumber(callFrame, (val.toInt32(callFrame)) >> (shift.toUInt32(callFrame) & 0x1f));
    16831673            CHECK_FOR_EXCEPTION();
    1684             callFrame[dst] = result;
     1674            callFrame->r(dst) = result;
    16851675        }
    16861676
     
    16961686        */
    16971687        int dst = (++vPC)->u.operand;
    1698         JSValue val = callFrame[(++vPC)->u.operand].jsValue();
    1699         JSValue shift = callFrame[(++vPC)->u.operand].jsValue();
     1688        JSValue val = callFrame->r((++vPC)->u.operand).jsValue();
     1689        JSValue shift = callFrame->r((++vPC)->u.operand).jsValue();
    17001690        if (JSFastMath::canDoFastUrshift(val, shift))
    1701             callFrame[dst] = JSValue(JSFastMath::rightShiftImmediateNumbers(val, shift));
     1691            callFrame->r(dst) = JSValue(JSFastMath::rightShiftImmediateNumbers(val, shift));
    17021692        else {
    17031693            JSValue result = jsNumber(callFrame, (val.toUInt32(callFrame)) >> (shift.toUInt32(callFrame) & 0x1f));
    17041694            CHECK_FOR_EXCEPTION();
    1705             callFrame[dst] = result;
     1695            callFrame->r(dst) = result;
    17061696        }
    17071697
     
    17171707        */
    17181708        int dst = (++vPC)->u.operand;
    1719         JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
    1720         JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
     1709        JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
     1710        JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
    17211711        int32_t left;
    17221712        int32_t right;
    17231713        if (JSFastMath::canDoFastBitwiseOperations(src1, src2))
    1724             callFrame[dst] = JSValue(JSFastMath::andImmediateNumbers(src1, src2));
     1714            callFrame->r(dst) = JSValue(JSFastMath::andImmediateNumbers(src1, src2));
    17251715        else if (src1.numberToInt32(left) && src2.numberToInt32(right))
    1726             callFrame[dst] = JSValue(jsNumber(callFrame, left & right));
     1716            callFrame->r(dst) = JSValue(jsNumber(callFrame, left & right));
    17271717        else {
    17281718            JSValue result = jsNumber(callFrame, src1.toInt32(callFrame) & src2.toInt32(callFrame));
    17291719            CHECK_FOR_EXCEPTION();
    1730             callFrame[dst] = result;
     1720            callFrame->r(dst) = result;
    17311721        }
    17321722
     
    17421732        */
    17431733        int dst = (++vPC)->u.operand;
    1744         JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
    1745         JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
     1734        JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
     1735        JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
    17461736        int32_t left;
    17471737        int32_t right;
    17481738        if (JSFastMath::canDoFastBitwiseOperations(src1, src2))
    1749             callFrame[dst] = JSValue(JSFastMath::xorImmediateNumbers(src1, src2));
     1739            callFrame->r(dst) = JSValue(JSFastMath::xorImmediateNumbers(src1, src2));
    17501740        else if (src1.numberToInt32(left) && src2.numberToInt32(right))
    1751             callFrame[dst] = JSValue(jsNumber(callFrame, left ^ right));
     1741            callFrame->r(dst) = JSValue(jsNumber(callFrame, left ^ right));
    17521742        else {
    17531743            JSValue result = jsNumber(callFrame, src1.toInt32(callFrame) ^ src2.toInt32(callFrame));
    17541744            CHECK_FOR_EXCEPTION();
    1755             callFrame[dst] = result;
     1745            callFrame->r(dst) = result;
    17561746        }
    17571747
     
    17671757        */
    17681758        int dst = (++vPC)->u.operand;
    1769         JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
    1770         JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
     1759        JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
     1760        JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
    17711761        int32_t left;
    17721762        int32_t right;
    17731763        if (JSFastMath::canDoFastBitwiseOperations(src1, src2))
    1774             callFrame[dst] = JSValue(JSFastMath::orImmediateNumbers(src1, src2));
     1764            callFrame->r(dst) = JSValue(JSFastMath::orImmediateNumbers(src1, src2));
    17751765        else if (src1.numberToInt32(left) && src2.numberToInt32(right))
    1776             callFrame[dst] = JSValue(jsNumber(callFrame, left | right));
     1766            callFrame->r(dst) = JSValue(jsNumber(callFrame, left | right));
    17771767        else {
    17781768            JSValue result = jsNumber(callFrame, src1.toInt32(callFrame) | src2.toInt32(callFrame));
    17791769            CHECK_FOR_EXCEPTION();
    1780             callFrame[dst] = result;
     1770            callFrame->r(dst) = result;
    17811771        }
    17821772
     
    17911781        */
    17921782        int dst = (++vPC)->u.operand;
    1793         JSValue src = callFrame[(++vPC)->u.operand].jsValue();
     1783        JSValue src = callFrame->r((++vPC)->u.operand).jsValue();
    17941784        int32_t value;
    17951785        if (src.numberToInt32(value))
    1796             callFrame[dst] = JSValue(jsNumber(callFrame, ~value));
     1786            callFrame->r(dst) = JSValue(jsNumber(callFrame, ~value));
    17971787        else {
    17981788            JSValue result = jsNumber(callFrame, ~src.toInt32(callFrame));
    17991789            CHECK_FOR_EXCEPTION();
    1800             callFrame[dst] = result;
     1790            callFrame->r(dst) = result;
    18011791        }
    18021792        ++vPC;
     
    18111801        int dst = (++vPC)->u.operand;
    18121802        int src = (++vPC)->u.operand;
    1813         JSValue result = jsBoolean(!callFrame[src].jsValue().toBoolean(callFrame));
     1803        JSValue result = jsBoolean(!callFrame->r(src).jsValue().toBoolean(callFrame));
    18141804        CHECK_FOR_EXCEPTION();
    1815         callFrame[dst] = result;
     1805        callFrame->r(dst) = result;
    18161806
    18171807        ++vPC;
     
    18361826        int baseProto = vPC[4].u.operand;
    18371827
    1838         JSValue baseVal = callFrame[base].jsValue();
     1828        JSValue baseVal = callFrame->r(base).jsValue();
    18391829
    18401830        if (isInvalidParamForInstanceOf(callFrame, callFrame->codeBlock(), vPC, baseVal, exceptionValue))
    18411831            goto vm_throw;
    18421832
    1843         bool result = asObject(baseVal)->hasInstance(callFrame, callFrame[value].jsValue(), callFrame[baseProto].jsValue());
     1833        bool result = asObject(baseVal)->hasInstance(callFrame, callFrame->r(value).jsValue(), callFrame->r(baseProto).jsValue());
    18441834        CHECK_FOR_EXCEPTION();
    1845         callFrame[dst] = jsBoolean(result);
     1835        callFrame->r(dst) = jsBoolean(result);
    18461836
    18471837        vPC += 5;
     
    18561846        int dst = (++vPC)->u.operand;
    18571847        int src = (++vPC)->u.operand;
    1858         callFrame[dst] = JSValue(jsTypeStringForValue(callFrame, callFrame[src].jsValue()));
     1848        callFrame->r(dst) = JSValue(jsTypeStringForValue(callFrame, callFrame->r(src).jsValue()));
    18591849
    18601850        ++vPC;
     
    18701860        int dst = (++vPC)->u.operand;
    18711861        int src = (++vPC)->u.operand;
    1872         JSValue v = callFrame[src].jsValue();
    1873         callFrame[dst] = jsBoolean(v.isCell() ? v.asCell()->structure()->typeInfo().masqueradesAsUndefined() : v.isUndefined());
     1862        JSValue v = callFrame->r(src).jsValue();
     1863        callFrame->r(dst) = jsBoolean(v.isCell() ? v.asCell()->structure()->typeInfo().masqueradesAsUndefined() : v.isUndefined());
    18741864
    18751865        ++vPC;
     
    18851875        int dst = (++vPC)->u.operand;
    18861876        int src = (++vPC)->u.operand;
    1887         callFrame[dst] = jsBoolean(callFrame[src].jsValue().isBoolean());
     1877        callFrame->r(dst) = jsBoolean(callFrame->r(src).jsValue().isBoolean());
    18881878
    18891879        ++vPC;
     
    18991889        int dst = (++vPC)->u.operand;
    19001890        int src = (++vPC)->u.operand;
    1901         callFrame[dst] = jsBoolean(callFrame[src].jsValue().isNumber());
     1891        callFrame->r(dst) = jsBoolean(callFrame->r(src).jsValue().isNumber());
    19021892
    19031893        ++vPC;
     
    19131903        int dst = (++vPC)->u.operand;
    19141904        int src = (++vPC)->u.operand;
    1915         callFrame[dst] = jsBoolean(callFrame[src].jsValue().isString());
     1905        callFrame->r(dst) = jsBoolean(callFrame->r(src).jsValue().isString());
    19161906
    19171907        ++vPC;
     
    19271917        int dst = (++vPC)->u.operand;
    19281918        int src = (++vPC)->u.operand;
    1929         callFrame[dst] = jsBoolean(jsIsObjectType(callFrame[src].jsValue()));
     1919        callFrame->r(dst) = jsBoolean(jsIsObjectType(callFrame->r(src).jsValue()));
    19301920
    19311921        ++vPC;
     
    19411931        int dst = (++vPC)->u.operand;
    19421932        int src = (++vPC)->u.operand;
    1943         callFrame[dst] = jsBoolean(jsIsFunctionType(callFrame[src].jsValue()));
     1933        callFrame->r(dst) = jsBoolean(jsIsFunctionType(callFrame->r(src).jsValue()));
    19441934
    19451935        ++vPC;
     
    19591949        int base = (++vPC)->u.operand;
    19601950
    1961         JSValue baseVal = callFrame[base].jsValue();
     1951        JSValue baseVal = callFrame->r(base).jsValue();
    19621952        if (isInvalidParamForIn(callFrame, callFrame->codeBlock(), vPC, baseVal, exceptionValue))
    19631953            goto vm_throw;
     
    19651955        JSObject* baseObj = asObject(baseVal);
    19661956
    1967         JSValue propName = callFrame[property].jsValue();
     1957        JSValue propName = callFrame->r(property).jsValue();
    19681958
    19691959        uint32_t i;
    19701960        if (propName.getUInt32(i))
    1971             callFrame[dst] = jsBoolean(baseObj->hasProperty(callFrame, i));
     1961            callFrame->r(dst) = jsBoolean(baseObj->hasProperty(callFrame, i));
    19721962        else {
    19731963            Identifier property(callFrame, propName.toString(callFrame));
    19741964            CHECK_FOR_EXCEPTION();
    1975             callFrame[dst] = jsBoolean(baseObj->hasProperty(callFrame, property));
     1965            callFrame->r(dst) = jsBoolean(baseObj->hasProperty(callFrame, property));
    19761966        }
    19771967
     
    20312021        int index = (++vPC)->u.operand;
    20322022
    2033         callFrame[dst] = scope->registerAt(index);
     2023        callFrame->r(dst) = scope->registerAt(index);
    20342024        ++vPC;
    20352025        NEXT_INSTRUCTION();
     
    20452035        int value = (++vPC)->u.operand;
    20462036       
    2047         scope->registerAt(index) = JSValue(callFrame[value].jsValue());
     2037        scope->registerAt(index) = JSValue(callFrame->r(value).jsValue());
    20482038        ++vPC;
    20492039        NEXT_INSTRUCTION();
     
    20702060        ASSERT((*iter)->isVariableObject());
    20712061        JSVariableObject* scope = static_cast<JSVariableObject*>(*iter);
    2072         callFrame[dst] = scope->registerAt(index);
     2062        callFrame->r(dst) = scope->registerAt(index);
    20732063        ++vPC;
    20742064        NEXT_INSTRUCTION();
     
    20932083        ASSERT((*iter)->isVariableObject());
    20942084        JSVariableObject* scope = static_cast<JSVariableObject*>(*iter);
    2095         scope->registerAt(index) = JSValue(callFrame[value].jsValue());
     2085        scope->registerAt(index) = JSValue(callFrame->r(value).jsValue());
    20962086        ++vPC;
    20972087        NEXT_INSTRUCTION();
     
    21612151        CodeBlock* codeBlock = callFrame->codeBlock();
    21622152        Identifier& ident = codeBlock->identifier(property);
    2163         JSValue baseValue = callFrame[base].jsValue();
     2153        JSValue baseValue = callFrame->r(base).jsValue();
    21642154        PropertySlot slot(baseValue);
    21652155        JSValue result = baseValue.get(callFrame, ident, slot);
     
    21682158        tryCacheGetByID(callFrame, codeBlock, vPC, baseValue, ident, slot);
    21692159
    2170         callFrame[dst] = result;
     2160        callFrame->r(dst) = result;
    21712161        vPC += 8;
    21722162        NEXT_INSTRUCTION();
     
    21802170        */
    21812171        int base = vPC[2].u.operand;
    2182         JSValue baseValue = callFrame[base].jsValue();
     2172        JSValue baseValue = callFrame->r(base).jsValue();
    21832173
    21842174        if (LIKELY(baseValue.isCell())) {
     
    21932183
    21942184                ASSERT(baseObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == baseObject->getDirectOffset(offset));
    2195                 callFrame[dst] = JSValue(baseObject->getDirectOffset(offset));
     2185                callFrame->r(dst) = JSValue(baseObject->getDirectOffset(offset));
    21962186
    21972187                vPC += 8;
     
    22112201        */
    22122202        int base = vPC[2].u.operand;
    2213         JSValue baseValue = callFrame[base].jsValue();
     2203        JSValue baseValue = callFrame->r(base).jsValue();
    22142204
    22152205        if (LIKELY(baseValue.isCell())) {
     
    22272217
    22282218                    ASSERT(protoObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == protoObject->getDirectOffset(offset));
    2229                     callFrame[dst] = JSValue(protoObject->getDirectOffset(offset));
     2219                    callFrame->r(dst) = JSValue(protoObject->getDirectOffset(offset));
    22302220
    22312221                    vPC += 8;
     
    22602250        */
    22612251        int base = vPC[2].u.operand;
    2262         JSValue baseValue = callFrame[base].jsValue();
     2252        JSValue baseValue = callFrame->r(base).jsValue();
    22632253
    22642254        if (LIKELY(baseValue.isCell())) {
     
    22822272
    22832273                        ASSERT(baseObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == baseObject->getDirectOffset(offset));
    2284                         callFrame[dst] = JSValue(baseObject->getDirectOffset(offset));
     2274                        callFrame->r(dst) = JSValue(baseObject->getDirectOffset(offset));
    22852275
    22862276                        vPC += 8;
     
    23082298
    23092299        Identifier& ident = callFrame->codeBlock()->identifier(property);
    2310         JSValue baseValue = callFrame[base].jsValue();
     2300        JSValue baseValue = callFrame->r(base).jsValue();
    23112301        PropertySlot slot(baseValue);
    23122302        JSValue result = baseValue.get(callFrame, ident, slot);
    23132303        CHECK_FOR_EXCEPTION();
    23142304
    2315         callFrame[dst] = result;
     2305        callFrame->r(dst) = result;
    23162306        vPC += 8;
    23172307        NEXT_INSTRUCTION();
     
    23262316
    23272317        int base = vPC[2].u.operand;
    2328         JSValue baseValue = callFrame[base].jsValue();
     2318        JSValue baseValue = callFrame->r(base).jsValue();
    23292319        if (LIKELY(isJSArray(globalData, baseValue))) {
    23302320            int dst = vPC[1].u.operand;
    2331             callFrame[dst] = JSValue(jsNumber(callFrame, asArray(baseValue)->length()));
     2321            callFrame->r(dst) = JSValue(jsNumber(callFrame, asArray(baseValue)->length()));
    23322322            vPC += 8;
    23332323            NEXT_INSTRUCTION();
     
    23462336
    23472337        int base = vPC[2].u.operand;
    2348         JSValue baseValue = callFrame[base].jsValue();
     2338        JSValue baseValue = callFrame->r(base).jsValue();
    23492339        if (LIKELY(isJSString(globalData, baseValue))) {
    23502340            int dst = vPC[1].u.operand;
    2351             callFrame[dst] = JSValue(jsNumber(callFrame, asString(baseValue)->value().size()));
     2341            callFrame->r(dst) = JSValue(jsNumber(callFrame, asString(baseValue)->value().size()));
    23522342            vPC += 8;
    23532343            NEXT_INSTRUCTION();
     
    23722362
    23732363        CodeBlock* codeBlock = callFrame->codeBlock();
    2374         JSValue baseValue = callFrame[base].jsValue();
     2364        JSValue baseValue = callFrame->r(base).jsValue();
    23752365        Identifier& ident = codeBlock->identifier(property);
    23762366        PutPropertySlot slot;
    2377         baseValue.put(callFrame, ident, callFrame[value].jsValue(), slot);
     2367        baseValue.put(callFrame, ident, callFrame->r(value).jsValue(), slot);
    23782368        CHECK_FOR_EXCEPTION();
    23792369
     
    23952385         */
    23962386        int base = vPC[1].u.operand;
    2397         JSValue baseValue = callFrame[base].jsValue();
     2387        JSValue baseValue = callFrame->r(base).jsValue();
    23982388       
    23992389        if (LIKELY(baseValue.isCell())) {
     
    24232413                unsigned offset = vPC[7].u.operand;
    24242414                ASSERT(baseObject->offsetForLocation(baseObject->getDirectLocation(callFrame->codeBlock()->identifier(vPC[2].u.operand))) == offset);
    2425                 baseObject->putDirectOffset(offset, callFrame[value].jsValue());
     2415                baseObject->putDirectOffset(offset, callFrame->r(value).jsValue());
    24262416
    24272417                vPC += 8;
     
    24452435        */
    24462436        int base = vPC[1].u.operand;
    2447         JSValue baseValue = callFrame[base].jsValue();
     2437        JSValue baseValue = callFrame->r(base).jsValue();
    24482438
    24492439        if (LIKELY(baseValue.isCell())) {
     
    24582448               
    24592449                ASSERT(baseObject->offsetForLocation(baseObject->getDirectLocation(callFrame->codeBlock()->identifier(vPC[2].u.operand))) == offset);
    2460                 baseObject->putDirectOffset(offset, callFrame[value].jsValue());
     2450                baseObject->putDirectOffset(offset, callFrame->r(value).jsValue());
    24612451
    24622452                vPC += 8;
     
    24812471        int value = vPC[3].u.operand;
    24822472
    2483         JSValue baseValue = callFrame[base].jsValue();
     2473        JSValue baseValue = callFrame->r(base).jsValue();
    24842474        Identifier& ident = callFrame->codeBlock()->identifier(property);
    24852475        PutPropertySlot slot;
    2486         baseValue.put(callFrame, ident, callFrame[value].jsValue(), slot);
     2476        baseValue.put(callFrame, ident, callFrame->r(value).jsValue(), slot);
    24872477        CHECK_FOR_EXCEPTION();
    24882478
     
    25022492        int property = (++vPC)->u.operand;
    25032493
    2504         JSObject* baseObj = callFrame[base].jsValue().toObject(callFrame);
     2494        JSObject* baseObj = callFrame->r(base).jsValue().toObject(callFrame);
    25052495        Identifier& ident = callFrame->codeBlock()->identifier(property);
    25062496        JSValue result = jsBoolean(baseObj->deleteProperty(callFrame, ident));
    25072497        CHECK_FOR_EXCEPTION();
    2508         callFrame[dst] = result;
     2498        callFrame->r(dst) = result;
    25092499        ++vPC;
    25102500        NEXT_INSTRUCTION();
     
    25222512        int property = (++vPC)->u.operand;
    25232513       
    2524         JSValue baseValue = callFrame[base].jsValue();
    2525         JSValue subscript = callFrame[property].jsValue();
     2514        JSValue baseValue = callFrame->r(base).jsValue();
     2515        JSValue subscript = callFrame->r(property).jsValue();
    25262516
    25272517        JSValue result;
     
    25472537
    25482538        CHECK_FOR_EXCEPTION();
    2549         callFrame[dst] = result;
     2539        callFrame->r(dst) = result;
    25502540        ++vPC;
    25512541        NEXT_INSTRUCTION();
     
    25662556        int value = (++vPC)->u.operand;
    25672557
    2568         JSValue baseValue = callFrame[base].jsValue();
    2569         JSValue subscript = callFrame[property].jsValue();
     2558        JSValue baseValue = callFrame->r(base).jsValue();
     2559        JSValue subscript = callFrame->r(property).jsValue();
    25702560
    25712561        if (LIKELY(subscript.isUInt32Fast())) {
     
    25742564                JSArray* jsArray = asArray(baseValue);
    25752565                if (jsArray->canSetIndex(i))
    2576                     jsArray->setIndex(i, callFrame[value].jsValue());
     2566                    jsArray->setIndex(i, callFrame->r(value).jsValue());
    25772567                else
    2578                     jsArray->JSArray::put(callFrame, i, callFrame[value].jsValue());
     2568                    jsArray->JSArray::put(callFrame, i, callFrame->r(value).jsValue());
    25792569            } else if (isJSByteArray(globalData, baseValue) && asByteArray(baseValue)->canAccessIndex(i)) {
    25802570                JSByteArray* jsByteArray = asByteArray(baseValue);
    25812571                double dValue = 0;
    2582                 JSValue jsValue = callFrame[value].jsValue();
     2572                JSValue jsValue = callFrame->r(value).jsValue();
    25832573                if (jsValue.isInt32Fast())
    25842574                    jsByteArray->setIndex(i, jsValue.getInt32Fast());
     
    25882578                    baseValue.put(callFrame, i, jsValue);
    25892579            } else
    2590                 baseValue.put(callFrame, i, callFrame[value].jsValue());
     2580                baseValue.put(callFrame, i, callFrame->r(value).jsValue());
    25912581        } else {
    25922582            Identifier property(callFrame, subscript.toString(callFrame));
    25932583            if (!globalData->exception) { // Don't put to an object if toString threw an exception.
    25942584                PutPropertySlot slot;
    2595                 baseValue.put(callFrame, property, callFrame[value].jsValue(), slot);
     2585                baseValue.put(callFrame, property, callFrame->r(value).jsValue(), slot);
    25962586            }
    25972587        }
     
    26132603        int property = (++vPC)->u.operand;
    26142604
    2615         JSObject* baseObj = callFrame[base].jsValue().toObject(callFrame); // may throw
    2616 
    2617         JSValue subscript = callFrame[property].jsValue();
     2605        JSObject* baseObj = callFrame->r(base).jsValue().toObject(callFrame); // may throw
     2606
     2607        JSValue subscript = callFrame->r(property).jsValue();
    26182608        JSValue result;
    26192609        uint32_t i;
     
    26282618
    26292619        CHECK_FOR_EXCEPTION();
    2630         callFrame[dst] = result;
     2620        callFrame->r(dst) = result;
    26312621        ++vPC;
    26322622        NEXT_INSTRUCTION();
     
    26482638        int value = (++vPC)->u.operand;
    26492639
    2650         callFrame[base].jsValue().put(callFrame, property, callFrame[value].jsValue());
     2640        callFrame->r(base).jsValue().put(callFrame, property, callFrame->r(value).jsValue());
    26512641
    26522642        ++vPC;
     
    26952685        int cond = (++vPC)->u.operand;
    26962686        int target = (++vPC)->u.operand;
    2697         if (callFrame[cond].jsValue().toBoolean(callFrame)) {
     2687        if (callFrame->r(cond).jsValue().toBoolean(callFrame)) {
    26982688            vPC += target;
    26992689            CHECK_FOR_TIMEOUT();
     
    27122702        int cond = (++vPC)->u.operand;
    27132703        int target = (++vPC)->u.operand;
    2714         if (callFrame[cond].jsValue().toBoolean(callFrame)) {
     2704        if (callFrame->r(cond).jsValue().toBoolean(callFrame)) {
    27152705            vPC += target;
    27162706            NEXT_INSTRUCTION();
     
    27282718        int cond = (++vPC)->u.operand;
    27292719        int target = (++vPC)->u.operand;
    2730         if (!callFrame[cond].jsValue().toBoolean(callFrame)) {
     2720        if (!callFrame->r(cond).jsValue().toBoolean(callFrame)) {
    27312721            vPC += target;
    27322722            NEXT_INSTRUCTION();
     
    27442734        int src = (++vPC)->u.operand;
    27452735        int target = (++vPC)->u.operand;
    2746         JSValue srcValue = callFrame[src].jsValue();
     2736        JSValue srcValue = callFrame->r(src).jsValue();
    27472737
    27482738        if (srcValue.isUndefinedOrNull() || (srcValue.isCell() && srcValue.asCell()->structure()->typeInfo().masqueradesAsUndefined())) {
     
    27622752        int src = (++vPC)->u.operand;
    27632753        int target = (++vPC)->u.operand;
    2764         JSValue srcValue = callFrame[src].jsValue();
     2754        JSValue srcValue = callFrame->r(src).jsValue();
    27652755
    27662756        if (!srcValue.isUndefinedOrNull() || (srcValue.isCell() && !srcValue.asCell()->structure()->typeInfo().masqueradesAsUndefined())) {
     
    27812771        JSValue ptr = JSValue((++vPC)->u.jsCell);
    27822772        int target = (++vPC)->u.operand;
    2783         JSValue srcValue = callFrame[src].jsValue();
     2773        JSValue srcValue = callFrame->r(src).jsValue();
    27842774        if (srcValue != ptr) {
    27852775            vPC += target;
     
    28012791           the JS timeout is reached.
    28022792         */
    2803         JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
    2804         JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
     2793        JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
     2794        JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
    28052795        int target = (++vPC)->u.operand;
    28062796       
     
    28282818           the JS timeout is reached.
    28292819        */
    2830         JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
    2831         JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
     2820        JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
     2821        JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
    28322822        int target = (++vPC)->u.operand;
    28332823       
     
    28522842           result of the comparison is false.
    28532843        */
    2854         JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
    2855         JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
     2844        JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
     2845        JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
    28562846        int target = (++vPC)->u.operand;
    28572847
     
    28752865           if and only if theresult of the comparison is false.
    28762866        */
    2877         JSValue src1 = callFrame[(++vPC)->u.operand].jsValue();
    2878         JSValue src2 = callFrame[(++vPC)->u.operand].jsValue();
     2867        JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue();
     2868        JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue();
    28792869        int target = (++vPC)->u.operand;
    28802870
     
    29012891        int tableIndex = (++vPC)->u.operand;
    29022892        int defaultOffset = (++vPC)->u.operand;
    2903         JSValue scrutinee = callFrame[(++vPC)->u.operand].jsValue();
     2893        JSValue scrutinee = callFrame->r((++vPC)->u.operand).jsValue();
    29042894        if (scrutinee.isInt32Fast())
    29052895            vPC += callFrame->codeBlock()->immediateSwitchJumpTable(tableIndex).offsetForValue(scrutinee.getInt32Fast(), defaultOffset);
     
    29252915        int tableIndex = (++vPC)->u.operand;
    29262916        int defaultOffset = (++vPC)->u.operand;
    2927         JSValue scrutinee = callFrame[(++vPC)->u.operand].jsValue();
     2917        JSValue scrutinee = callFrame->r((++vPC)->u.operand).jsValue();
    29282918        if (!scrutinee.isString())
    29292919            vPC += defaultOffset;
     
    29482938        int tableIndex = (++vPC)->u.operand;
    29492939        int defaultOffset = (++vPC)->u.operand;
    2950         JSValue scrutinee = callFrame[(++vPC)->u.operand].jsValue();
     2940        JSValue scrutinee = callFrame->r((++vPC)->u.operand).jsValue();
    29512941        if (!scrutinee.isString())
    29522942            vPC += defaultOffset;
     
    29662956        int func = (++vPC)->u.operand;
    29672957
    2968         callFrame[dst] = callFrame->codeBlock()->function(func)->makeFunction(callFrame, callFrame->scopeChain());
     2958        callFrame->r(dst) = callFrame->codeBlock()->function(func)->makeFunction(callFrame, callFrame->scopeChain());
    29692959
    29702960        ++vPC;
     
    29822972        int func = (++vPC)->u.operand;
    29832973
    2984         callFrame[dst] = callFrame->codeBlock()->functionExpression(func)->makeFunction(callFrame, callFrame->scopeChain());
     2974        callFrame->r(dst) = callFrame->codeBlock()->functionExpression(func)->makeFunction(callFrame, callFrame->scopeChain());
    29852975
    29862976        ++vPC;
     
    30042994        int registerOffset = vPC[4].u.operand;
    30052995
    3006         JSValue funcVal = callFrame[func].jsValue();
     2996        JSValue funcVal = callFrame->r(func).jsValue();
    30072997
    30082998        Register* newCallFrame = callFrame->registers() + registerOffset;
     
    30153005            if (exceptionValue)
    30163006                goto vm_throw;
    3017             callFrame[dst] = result;
     3007            callFrame->r(dst) = result;
    30183008
    30193009            vPC += 5;
     
    30413031        int registerOffset = vPC[4].u.operand;
    30423032
    3043         JSValue v = callFrame[func].jsValue();
     3033        JSValue v = callFrame->r(func).jsValue();
    30443034
    30453035        CallData callData;
     
    30903080            CHECK_FOR_EXCEPTION();
    30913081
    3092             callFrame[dst] = JSValue(returnValue);
     3082            callFrame->r(dst) = JSValue(returnValue);
    30933083
    30943084            vPC += 5;
     
    31053095        int argsOffset = (++vPC)->u.operand;
    31063096       
    3107         JSValue arguments = callFrame[argsOffset].jsValue();
     3097        JSValue arguments = callFrame->r(argsOffset).jsValue();
    31083098        uint32_t argCount = 0;
    31093099        if (!arguments) {
    3110             argCount = (uint32_t)(callFrame[RegisterFile::ArgumentCount].u.i) - 1;
     3100            argCount = (uint32_t)(callFrame->argumentCount()) - 1;
    31113101            int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize;
    31123102            Register* newEnd = callFrame->registers() + sizeDelta;
     
    31153105                goto vm_throw;
    31163106            }
    3117             uint32_t expectedParams = asFunction(callFrame[RegisterFile::Callee].jsValue())->body()->parameterCount();
     3107            uint32_t expectedParams = callFrame->callee()->body()->parameterCount();
    31183108            uint32_t inplaceArgs = min(argCount, expectedParams);
    31193109            uint32_t i = 0;
     
    31733163        }
    31743164        CHECK_FOR_EXCEPTION();
    3175         callFrame[argCountDst] = argCount + 1;
     3165        callFrame->r(argCountDst) = argCount + 1;
    31763166        ++vPC;
    31773167        NEXT_INSTRUCTION();
     
    31943184        int registerOffset = vPC[4].u.operand;
    31953185       
    3196         JSValue v = callFrame[func].jsValue();
    3197         int argCount = callFrame[argCountReg].i();
     3186        JSValue v = callFrame->r(func).jsValue();
     3187        int argCount = callFrame->r(argCountReg).i();
    31983188        registerOffset += argCount;
    31993189        CallData callData;
     
    32443234            CHECK_FOR_EXCEPTION();
    32453235           
    3246             callFrame[dst] = JSValue(returnValue);
     3236            callFrame->r(dst) = JSValue(returnValue);
    32473237           
    32483238            vPC += 5;
     
    32713261        ASSERT(callFrame->codeBlock()->needsFullScopeChain());
    32723262
    3273         asActivation(callFrame[src].jsValue())->copyRegisters(callFrame->optionalCalleeArguments());
     3263        asActivation(callFrame->r(src).jsValue())->copyRegisters(callFrame->optionalCalleeArguments());
    32743264
    32753265        ++vPC;
     
    33113301            callFrame->scopeChain()->deref();
    33123302
    3313         JSValue returnValue = callFrame[result].jsValue();
     3303        JSValue returnValue = callFrame->r(result).jsValue();
    33143304
    33153305        vPC = callFrame->returnPC();
     
    33203310            return returnValue;
    33213311
    3322         callFrame[dst] = JSValue(returnValue);
     3312        callFrame->r(dst) = JSValue(returnValue);
    33233313
    33243314        NEXT_INSTRUCTION();
     
    33393329       
    33403330        for (size_t count = codeBlock->m_numVars; i < count; ++i)
    3341             callFrame[i] = jsUndefined();
    3342 
    3343         for (size_t count = codeBlock->numberOfConstantRegisters(), j = 0; j < count; ++i, ++j)
    3344             callFrame[i] = codeBlock->constantRegister(j);
     3331            callFrame->r(i) = jsUndefined();
    33453332
    33463333        ++vPC;
     
    33643351
    33653352        for (size_t count = codeBlock->m_numVars; i < count; ++i)
    3366             callFrame[i] = jsUndefined();
    3367 
    3368         for (size_t count = codeBlock->numberOfConstantRegisters(), j = 0; j < count; ++i, ++j)
    3369             callFrame[i] = codeBlock->constantRegister(j);
     3353            callFrame->r(i) = jsUndefined();
    33703354
    33713355        int dst = (++vPC)->u.operand;
    33723356        JSActivation* activation = new (globalData) JSActivation(callFrame, static_cast<FunctionBodyNode*>(codeBlock->ownerNode()));
    3373         callFrame[dst] = activation;
     3357        callFrame->r(dst) = activation;
    33743358        callFrame->setScopeChain(callFrame->scopeChain()->copy()->push(activation));
    33753359
     
    33903374
    33913375        int thisRegister = (++vPC)->u.operand;
    3392         JSValue thisVal = callFrame[thisRegister].jsValue();
     3376        JSValue thisVal = callFrame->r(thisRegister).jsValue();
    33933377        if (thisVal.needsThisConversion())
    3394             callFrame[thisRegister] = JSValue(thisVal.toThisObject(callFrame));
     3378            callFrame->r(thisRegister) = JSValue(thisVal.toThisObject(callFrame));
    33953379
    33963380        ++vPC;
     
    34073391           block.
    34083392         */
    3409         callFrame[RegisterFile::ArgumentsRegister] = JSValue();
     3393        callFrame->r(RegisterFile::ArgumentsRegister) = JSValue();
    34103394        ++vPC;
    34113395        NEXT_INSTRUCTION();
     
    34223406             Arguments* arguments = new (globalData) Arguments(callFrame);
    34233407             callFrame->setCalleeArguments(arguments);
    3424              callFrame[RegisterFile::ArgumentsRegister] = arguments;
     3408             callFrame->r(RegisterFile::ArgumentsRegister) = arguments;
    34253409         }
    34263410        ++vPC;
     
    34493433        int thisRegister = vPC[6].u.operand;
    34503434
    3451         JSValue v = callFrame[func].jsValue();
     3435        JSValue v = callFrame->r(func).jsValue();
    34523436
    34533437        ConstructData constructData;
     
    34603444
    34613445            Structure* structure;
    3462             JSValue prototype = callFrame[proto].jsValue();
     3446            JSValue prototype = callFrame->r(proto).jsValue();
    34633447            if (prototype.isObject())
    34643448                structure = asObject(prototype)->inheritorID();
     
    34673451            JSObject* newObject = new (globalData) JSObject(structure);
    34683452
    3469             callFrame[thisRegister] = JSValue(newObject); // "this" value
     3453            callFrame->r(thisRegister) = JSValue(newObject); // "this" value
    34703454
    34713455            CallFrame* previousCallFrame = callFrame;
     
    35013485            }
    35023486            CHECK_FOR_EXCEPTION();
    3503             callFrame[dst] = JSValue(returnValue);
     3487            callFrame->r(dst) = JSValue(returnValue);
    35043488
    35053489            vPC += 7;
     
    35203504
    35213505        int dst = vPC[1].u.operand;
    3522         if (LIKELY(callFrame[dst].jsValue().isObject())) {
     3506        if (LIKELY(callFrame->r(dst).jsValue().isObject())) {
    35233507            vPC += 3;
    35243508            NEXT_INSTRUCTION();
     
    35263510
    35273511        int override = vPC[2].u.operand;
    3528         callFrame[dst] = callFrame[override];
     3512        callFrame->r(dst) = callFrame->r(override);
    35293513
    35303514        vPC += 3;
     
    35363520        int count = (++vPC)->u.operand;
    35373521
    3538         callFrame[dst] = concatenateStrings(callFrame, &callFrame->registers()[src], count);
     3522        callFrame->r(dst) = concatenateStrings(callFrame, &callFrame->registers()[src], count);
    35393523        ++vPC;
    35403524
     
    35453529        int src = (++vPC)->u.operand;
    35463530
    3547         callFrame[dst] = callFrame[src].jsValue().toPrimitive(callFrame);
     3531        callFrame->r(dst) = callFrame->r(src).jsValue().toPrimitive(callFrame);
    35483532        ++vPC;
    35493533
     
    35583542        */
    35593543        int scope = (++vPC)->u.operand;
    3560         JSValue v = callFrame[scope].jsValue();
     3544        JSValue v = callFrame->r(scope).jsValue();
    35613545        JSObject* o = v.toObject(callFrame);
    35623546        CHECK_FOR_EXCEPTION();
    35633547
    3564         callFrame[scope] = JSValue(o);
     3548        callFrame->r(scope) = JSValue(o);
    35653549        callFrame->setScopeChain(callFrame->scopeChain()->push(o));
    35663550
     
    35893573        int base = (++vPC)->u.operand;
    35903574
    3591         callFrame[dst] = JSPropertyNameIterator::create(callFrame, callFrame[base].jsValue());
     3575        callFrame->r(dst) = JSPropertyNameIterator::create(callFrame, callFrame->r(base).jsValue());
    35923576        ++vPC;
    35933577        NEXT_INSTRUCTION();
     
    36063590        int target = (++vPC)->u.operand;
    36073591
    3608         JSPropertyNameIterator* it = callFrame[iter].propertyNameIterator();
     3592        JSPropertyNameIterator* it = callFrame->r(iter).propertyNameIterator();
    36093593        if (JSValue temp = it->next(callFrame)) {
    36103594            CHECK_FOR_TIMEOUT();
    3611             callFrame[dst] = JSValue(temp);
     3595            callFrame->r(dst) = JSValue(temp);
    36123596            vPC += target;
    36133597            NEXT_INSTRUCTION();
     
    36653649        ASSERT(!globalData->exception);
    36663650        int ex = (++vPC)->u.operand;
    3667         callFrame[ex] = exceptionValue;
     3651        callFrame->r(ex) = exceptionValue;
    36683652        exceptionValue = JSValue();
    36693653
     
    36833667
    36843668        int ex = (++vPC)->u.operand;
    3685         exceptionValue = callFrame[ex].jsValue();
     3669        exceptionValue = callFrame->r(ex).jsValue();
    36863670
    36873671        handler = throwException(callFrame, exceptionValue, vPC - callFrame->codeBlock()->instructions().begin(), true);
     
    36943678        NEXT_INSTRUCTION();
    36953679    }
    3696     DEFINE_OPCODE(op_unexpected_load) {
    3697         /* unexpected_load load dst(r) src(k)
    3698 
    3699            Copies constant src to register dst.
    3700         */
    3701         int dst = (++vPC)->u.operand;
    3702         int src = (++vPC)->u.operand;
    3703         callFrame[dst] = JSValue(callFrame->codeBlock()->unexpectedConstant(src));
    3704 
    3705         ++vPC;
    3706         NEXT_INSTRUCTION();
    3707     }
    37083680    DEFINE_OPCODE(op_new_error) {
    37093681        /* new_error dst(r) type(n) message(k)
     
    37193691
    37203692        CodeBlock* codeBlock = callFrame->codeBlock();
    3721         callFrame[dst] = JSValue(Error::create(callFrame, (ErrorType)type, codeBlock->unexpectedConstant(message).toString(callFrame), codeBlock->lineNumberForBytecodeOffset(callFrame, vPC - codeBlock->instructions().begin()), codeBlock->ownerNode()->sourceID(), codeBlock->ownerNode()->sourceURL()));
     3693        callFrame->r(dst) = JSValue(Error::create(callFrame, (ErrorType)type, callFrame->r(message).jsValue().toString(callFrame), codeBlock->lineNumberForBytecodeOffset(callFrame, vPC - codeBlock->instructions().begin()), codeBlock->ownerNode()->sourceID(), codeBlock->ownerNode()->sourceURL()));
    37223694
    37233695        ++vPC;
     
    37373709        }
    37383710        int result = (++vPC)->u.operand;
    3739         return callFrame[result].jsValue();
     3711        return callFrame->r(result).jsValue();
    37403712    }
    37413713    DEFINE_OPCODE(op_put_getter) {
     
    37543726        int function = (++vPC)->u.operand;
    37553727
    3756         ASSERT(callFrame[base].jsValue().isObject());
    3757         JSObject* baseObj = asObject(callFrame[base].jsValue());
     3728        ASSERT(callFrame->r(base).jsValue().isObject());
     3729        JSObject* baseObj = asObject(callFrame->r(base).jsValue());
    37583730        Identifier& ident = callFrame->codeBlock()->identifier(property);
    3759         ASSERT(callFrame[function].jsValue().isObject());
    3760         baseObj->defineGetter(callFrame, ident, asObject(callFrame[function].jsValue()));
     3731        ASSERT(callFrame->r(function).jsValue().isObject());
     3732        baseObj->defineGetter(callFrame, ident, asObject(callFrame->r(function).jsValue()));
    37613733
    37623734        ++vPC;
     
    37783750        int function = (++vPC)->u.operand;
    37793751
    3780         ASSERT(callFrame[base].jsValue().isObject());
    3781         JSObject* baseObj = asObject(callFrame[base].jsValue());
     3752        ASSERT(callFrame->r(base).jsValue().isObject());
     3753        JSObject* baseObj = asObject(callFrame->r(base).jsValue());
    37823754        Identifier& ident = callFrame->codeBlock()->identifier(property);
    3783         ASSERT(callFrame[function].jsValue().isObject());
    3784         baseObj->defineSetter(callFrame, ident, asObject(callFrame[function].jsValue()));
     3755        ASSERT(callFrame->r(function).jsValue().isObject());
     3756        baseObj->defineSetter(callFrame, ident, asObject(callFrame->r(function).jsValue()));
    37853757
    37863758        ++vPC;
     
    37993771        int retAddrDst = (++vPC)->u.operand;
    38003772        int target = (++vPC)->u.operand;
    3801         callFrame[retAddrDst] = vPC + 1;
     3773        callFrame->r(retAddrDst) = vPC + 1;
    38023774
    38033775        vPC += target;
     
    38123784        */
    38133785        int retAddrSrc = (++vPC)->u.operand;
    3814         vPC = callFrame[retAddrSrc].vPC();
     3786        vPC = callFrame->r(retAddrSrc).vPC();
    38153787        NEXT_INSTRUCTION();
    38163788    }
     
    38393811
    38403812        if (*enabledProfilerReference)
    3841             (*enabledProfilerReference)->willExecute(callFrame, callFrame[function].jsValue());
     3813            (*enabledProfilerReference)->willExecute(callFrame, callFrame->r(function).jsValue());
    38423814
    38433815        vPC += 2;
     
    38533825
    38543826        if (*enabledProfilerReference)
    3855             (*enabledProfilerReference)->didExecute(callFrame, callFrame[function].jsValue());
     3827            (*enabledProfilerReference)->didExecute(callFrame, callFrame->r(function).jsValue());
    38563828
    38573829        vPC += 2;
     
    38963868        SymbolTable& symbolTable = codeBlock->symbolTable();
    38973869        int argumentsIndex = symbolTable.get(functionCallFrame->propertyNames().arguments.ustring().rep()).getIndex();
    3898         if (!functionCallFrame[argumentsIndex].arguments()) {
     3870        if (!functionCallFrame->r(argumentsIndex).arguments()) {
    38993871            Arguments* arguments = new (callFrame) Arguments(functionCallFrame);
    39003872            functionCallFrame->setCalleeArguments(arguments);
    3901             functionCallFrame[RegisterFile::ArgumentsRegister] = arguments;
    3902         }
    3903         return functionCallFrame[argumentsIndex].jsValue();
     3873            functionCallFrame->r(RegisterFile::ArgumentsRegister) = arguments;
     3874        }
     3875        return functionCallFrame->r(argumentsIndex).jsValue();
    39043876    }
    39053877
  • trunk/JavaScriptCore/jit/JIT.cpp

    r44889 r45609  
    276276        DEFINE_OP(op_to_jsnumber)
    277277        DEFINE_OP(op_to_primitive)
    278         DEFINE_OP(op_unexpected_load)
    279278
    280279        case op_get_array_length:
  • trunk/JavaScriptCore/jit/JITOpcodes.cpp

    r44889 r45609  
    506506}
    507507
    508 void JIT::emit_op_unexpected_load(Instruction* currentInstruction)
    509 {
    510     JSValue v = m_codeBlock->unexpectedConstant(currentInstruction[2].u.operand);
    511     move(ImmPtr(JSValue::encode(v)), regT0);
    512     emitPutVirtualRegister(currentInstruction[1].u.operand);
    513 }
    514 
    515508void JIT::emit_op_jsr(Instruction* currentInstruction)
    516509{
     
    760753    JITStubCall stubCall(this, JITStubs::cti_op_new_error);
    761754    stubCall.addArgument(Imm32(currentInstruction[2].u.operand));
    762     stubCall.addArgument(ImmPtr(JSValue::encode(m_codeBlock->unexpectedConstant(currentInstruction[3].u.operand))));
     755    stubCall.addArgument(ImmPtr(JSValue::encode(m_codeBlock->getConstant(currentInstruction[3].u.operand))));
    763756    stubCall.addArgument(Imm32(m_bytecodeIndex));
    764757    stubCall.call(currentInstruction[1].u.operand);
     
    829822    // registers to zap stale pointers, to avoid unnecessarily prolonging
    830823    // object lifetime and increasing GC pressure.
    831     size_t count = m_codeBlock->m_numVars + m_codeBlock->numberOfConstantRegisters();
     824    size_t count = m_codeBlock->m_numVars;
    832825    for (size_t j = 0; j < count; ++j)
    833826        emitInitRegister(j);
     
    840833    // registers to zap stale pointers, to avoid unnecessarily prolonging
    841834    // object lifetime and increasing GC pressure.
    842     size_t count = m_codeBlock->m_numVars + m_codeBlock->numberOfConstantRegisters();
     835    size_t count = m_codeBlock->m_numVars;
    843836    for (size_t j = 0; j < count; ++j)
    844837        emitInitRegister(j);
  • trunk/JavaScriptCore/parser/Nodes.cpp

    r45106 r45609  
    602602{
    603603    if (generator.registerFor(m_ident))
    604         return generator.emitUnexpectedLoad(generator.finalDestination(dst), false);
     604        return generator.emitLoad(generator.finalDestination(dst), false);
    605605
    606606    generator.emitExpressionInfo(divot(), startOffset(), endOffset());
     
    637637
    638638    // delete on a non-location expression ignores the value and returns true
    639     return generator.emitUnexpectedLoad(generator.finalDestination(dst), true);
     639    return generator.emitLoad(generator.finalDestination(dst), true);
    640640}
    641641
     
    689689            if (dst == generator.ignoredResult())
    690690                return 0;
    691             RefPtr<RegisterID> r0 = generator.emitUnexpectedLoad(generator.finalDestination(dst), (m_operator == OpPlusPlus) ? 1.0 : -1.0);
     691            RefPtr<RegisterID> r0 = generator.emitLoad(generator.finalDestination(dst), (m_operator == OpPlusPlus) ? 1.0 : -1.0);
    692692            return generator.emitBinaryOp(op_add, r0.get(), local, r0.get(), OperandTypes());
    693693        }
  • trunk/JavaScriptCore/runtime/JSActivation.cpp

    r44224 r45609  
    4141
    4242JSActivation::JSActivation(CallFrame* callFrame, PassRefPtr<FunctionBodyNode> functionBody)
    43     : Base(callFrame->globalData().activationStructure, new JSActivationData(functionBody, callFrame))
     43    : Base(callFrame->globalData().activationStructure, new JSActivationData(functionBody, callFrame->registers()))
    4444{
    4545}
  • trunk/JavaScriptCore/wtf/Platform.h

    r44886 r45609  
    549549#endif
    550550
     551#if ENABLE(JIT)
    551552#ifndef ENABLE_JIT_OPTIMIZE_CALL
    552553#define ENABLE_JIT_OPTIMIZE_CALL 1
     
    563564#ifndef ENABLE_JIT_OPTIMIZE_METHOD_CALLS
    564565#define ENABLE_JIT_OPTIMIZE_METHOD_CALLS 1
     566#endif
    565567#endif
    566568
Note: See TracChangeset for help on using the changeset viewer.