Changeset 38290 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Nov 10, 2008, 9:45:14 PM (17 years ago)
Author:
[email protected]
Message:

2008-11-10 Cameron Zwarich <[email protected]>

Reviewed by Sam Weinig.

Rename CodeBlock::isConstant() to isConstantRegisterIndex().

  • VM/CTI.cpp: (JSC::CTI::emitGetArg): (JSC::CTI::emitGetPutArg): (JSC::CTI::getConstantImmediateNumericArg): (JSC::CTI::printOpcodeOperandTypes): (JSC::CTI::privateCompileMainPass):
  • VM/CodeBlock.h: (JSC::CodeBlock::isConstantRegisterIndex):
  • bytecompiler/CodeGenerator.cpp: (JSC::CodeGenerator::emitEqualityOp):
Location:
trunk/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r38289 r38290  
     12008-11-10  Cameron Zwarich  <[email protected]>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Rename CodeBlock::isConstant() to isConstantRegisterIndex().
     6
     7        * VM/CTI.cpp:
     8        (JSC::CTI::emitGetArg):
     9        (JSC::CTI::emitGetPutArg):
     10        (JSC::CTI::getConstantImmediateNumericArg):
     11        (JSC::CTI::printOpcodeOperandTypes):
     12        (JSC::CTI::privateCompileMainPass):
     13        * VM/CodeBlock.h:
     14        (JSC::CodeBlock::isConstantRegisterIndex):
     15        * bytecompiler/CodeGenerator.cpp:
     16        (JSC::CodeGenerator::emitEqualityOp):
     17
    1182008-11-10  Gavin Barraclough  <[email protected]>
    219
  • trunk/JavaScriptCore/VM/CTI.cpp

    r38286 r38290  
    183183{
    184184    // TODO: we want to reuse values that are already in registers if we can - add a register allocator!
    185     if (m_codeBlock->isConstant(src)) {
     185    if (m_codeBlock->isConstantRegisterIndex(src)) {
    186186        JSValue* js = getConstant(src);
    187187        m_jit.movl_i32r(asInteger(js), dst);
     
    193193ALWAYS_INLINE void CTI::emitGetPutArg(unsigned src, unsigned offset, X86Assembler::RegisterID scratch)
    194194{
    195     if (m_codeBlock->isConstant(src)) {
     195    if (m_codeBlock->isConstantRegisterIndex(src)) {
    196196        JSValue* js = getConstant(src);
    197197        m_jit.movl_i32m(asInteger(js), offset + sizeof(void*), X86::esp);
     
    215215ALWAYS_INLINE JSValue* CTI::getConstantImmediateNumericArg(unsigned src)
    216216{
    217     if (m_codeBlock->isConstant(src)) {
     217    if (m_codeBlock->isConstantRegisterIndex(src)) {
    218218        JSValue* js = getConstant(src);
    219219        return JSImmediate::isNumber(js) ? js : noValue();
     
    274274{
    275275    char which1 = '*';
    276     if (m_codeBlock->isConstant(src1)) {
     276    if (m_codeBlock->isConstantRegisterIndex(src1)) {
    277277        JSValue* js = getConstant(src1);
    278278        which1 =
     
    288288    }
    289289    char which2 = '*';
    290     if (m_codeBlock->isConstant(src2)) {
     290    if (m_codeBlock->isConstantRegisterIndex(src2)) {
    291291        JSValue* js = getConstant(src2);
    292292        which2 =
     
    10051005        case op_mov: {
    10061006            unsigned src = instruction[i + 2].u.operand;
    1007             if (m_codeBlock->isConstant(src))
     1007            if (m_codeBlock->isConstantRegisterIndex(src))
    10081008                m_jit.movl_i32r(asInteger(getConstant(src)), X86::eax);
    10091009            else
  • trunk/JavaScriptCore/VM/CodeBlock.h

    r38287 r38290  
    291291        }
    292292
    293         ALWAYS_INLINE bool isConstant(int index)
     293        ALWAYS_INLINE bool isConstantRegisterIndex(int index)
    294294        {
    295295            return index >= numVars && index < numVars + numConstants;
  • trunk/JavaScriptCore/bytecompiler/CodeGenerator.cpp

    r38249 r38290  
    787787        if (src1->index() == dstIndex
    788788            && src1->isTemporary()
    789             && m_codeBlock->isConstant(src2->index())
     789            && m_codeBlock->isConstantRegisterIndex(src2->index())
    790790            && m_codeBlock->constantRegisters[src2->index() - m_codeBlock->numVars].jsValue(m_scopeChain->globalObject()->globalExec())->isString()) {
    791791            const UString& value = asString(m_codeBlock->constantRegisters[src2->index() - m_codeBlock->numVars].jsValue(m_scopeChain->globalObject()->globalExec()))->value();
Note: See TracChangeset for help on using the changeset viewer.