Changeset 36581 in webkit for trunk/JavaScriptCore/VM/CTI.cpp


Ignore:
Timestamp:
Sep 17, 2008, 5:36:37 PM (17 years ago)
Author:
[email protected]
Message:

2008-09-17 Gavin Barraclough <[email protected]>

Reviewed by Oliver Hunt.

JIT generation cti_op_construct_verify.


Quarter to half percent progression on v8-tests.
Roughly not change on SunSpider (possible minor progression).

  • VM/CTI.cpp: (JSC::CTI::privateCompileMainPass):
  • VM/Machine.cpp:
  • VM/Machine.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/CTI.cpp

    r36566 r36581  
    899899        }
    900900        case op_construct_verify: {
    901             emitPutArgConstant(instruction[i + 1].u.operand, 0);
    902             emitPutArgConstant(instruction[i + 2].u.operand, 4);
    903             emitCall(i, Machine::cti_op_construct_verify);
     901            emitGetArg(instruction[i + 1].u.operand, X86::eax);
     902           
     903            m_jit.testl_i32r(JSImmediate::TagMask, X86::eax);
     904            X86Assembler::JmpSrc isImmediate = m_jit.emitUnlinkedJne();
     905            m_jit.movl_mr(OBJECT_OFFSET(JSCell, m_structureID), X86::eax, X86::ecx);
     906            m_jit.cmpl_i32m(ObjectType, OBJECT_OFFSET(StructureID, m_type), X86::ecx);
     907            X86Assembler::JmpSrc isObject = m_jit.emitUnlinkedJe();
     908
     909            m_jit.link(isImmediate, m_jit.label());
     910            emitGetArg(instruction[i + 2].u.operand, X86::ecx);
     911            emitPutResult(instruction[i + 1].u.operand, X86::ecx);
     912            m_jit.link(isObject, m_jit.label());
     913
    904914            i += 3;
    905915            break;
Note: See TracChangeset for help on using the changeset viewer.