Changeset 36581 in webkit for trunk/JavaScriptCore


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:
Location:
trunk/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r36578 r36581  
     12008-09-17  Gavin Barraclough  <[email protected]>
     2
     3        Reviewed by Oliver Hunt.
     4
     5        JIT generation cti_op_construct_verify.
     6       
     7        Quarter to half percent progression on v8-tests.
     8        Roughly not change on SunSpider (possible minor progression).
     9
     10        * VM/CTI.cpp:
     11        (JSC::CTI::privateCompileMainPass):
     12        * VM/Machine.cpp:
     13        * VM/Machine.h:
     14
    1152008-09-15  Steve Falkenburg  <[email protected]>
    216
  • 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;
  • trunk/JavaScriptCore/VM/Machine.cpp

    r36566 r36581  
    45464546}
    45474547
    4548 void Machine::cti_op_construct_verify(CTI_ARGS)
    4549 {
    4550     ExecState* exec = ARG_exec;
    4551     Register* r = ARG_r;
    4552     int dst = ARG_int1;
    4553 
    4554     if (LIKELY(r[dst].jsValue(exec)->isObject()))
    4555         return;
    4556    
    4557     int override = ARG_int2;
    4558     r[dst] = r[override];
    4559 }
    4560 
    45614548JSValue* Machine::cti_op_construct_NotJSConstruct(CTI_ARGS)
    45624549{
  • trunk/JavaScriptCore/VM/Machine.h

    r36544 r36581  
    169169        static void* SFX_CALL cti_op_construct_JSConstruct(CTI_ARGS);
    170170        static JSValue* SFX_CALL cti_op_construct_NotJSConstruct(CTI_ARGS);
    171         static void SFX_CALL cti_op_construct_verify(CTI_ARGS);
    172171        static JSValue* SFX_CALL cti_op_get_by_val(CTI_ARGS);
    173172        static JSValue* SFX_CALL cti_op_resolve_func(CTI_ARGS);
Note: See TracChangeset for help on using the changeset viewer.