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


Ignore:
Timestamp:
Sep 22, 2008, 6:59:06 AM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-09-22 Maciej Stachowiak <[email protected]>

Reviewed by Dave Hyatt.


Based on initial work by Darin Adler.


0.5% speedup on SunSpider
~4% speedup on Richards benchmark


  • VM/CTI.cpp: (JSC::CTI::privateCompileMainPass):
  • VM/Machine.cpp: (JSC::jsTypeStringForValue): (JSC::jsIsObjectType): (JSC::Machine::privateExecute): (JSC::Machine::cti_op_is_undefined):
  • VM/Machine.h:
  • kjs/JSCell.h:
  • kjs/JSValue.h:
  • kjs/StringObjectThatMasqueradesAsUndefined.h: (JSC::StringObjectThatMasqueradesAsUndefined::create): (JSC::StringObjectThatMasqueradesAsUndefined::createStructureID):
  • kjs/StructureID.h: (JSC::StructureID::mutableTypeInfo):
  • kjs/TypeInfo.h: (JSC::TypeInfo::TypeInfo): (JSC::TypeInfo::masqueradesAsUndefined):
  • kjs/operations.cpp: (JSC::equal):
  • masm/X86Assembler.h: (JSC::X86Assembler::): (JSC::X86Assembler::setne_r): (JSC::X86Assembler::setnz_r): (JSC::X86Assembler::testl_i32m):

WebCore:

2008-09-22 Maciej Stachowiak <[email protected]>

Reviewed by Dave Hyatt.

Based on initial work by Darin Adler.



  • WebCore.xcodeproj/project.pbxproj:
  • WebCore.vcproj/WebCore.vcproj:
  • bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::nameGetter):
  • bindings/js/JSHTMLAllCollection.cpp: Added. (WebCore::):
  • bindings/js/JSHTMLAllCollection.h: (WebCore::JSHTMLAllCollection::createStructureID): (WebCore::JSHTMLAllCollection::toBoolean):
File:
1 edited

Legend:

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

    r36755 r36764  
    15911591        }
    15921592        case op_eq_null: {
    1593             emitGetPutArg(instruction[i + 2].u.operand, 0, X86::ecx);
    1594             emitCall(i, Machine::cti_op_eq_null);
    1595             emitPutResult(instruction[i + 1].u.operand);
     1593            unsigned dst = instruction[i + 1].u.operand;
     1594            unsigned src1 = instruction[i + 2].u.operand;
     1595
     1596            emitGetArg(src1, X86::eax);
     1597            m_jit.testl_i32r(JSImmediate::TagMask, X86::eax);
     1598            X86Assembler::JmpSrc isImmediate = m_jit.emitUnlinkedJnz();
     1599
     1600            m_jit.movl_mr(OBJECT_OFFSET(JSCell, m_structureID), X86::eax, X86::ecx);
     1601            m_jit.testl_i32m(MasqueradesAsUndefined, OBJECT_OFFSET(StructureID, m_typeInfo.m_flags), X86::ecx);
     1602            m_jit.setnz_r(X86::eax);
     1603
     1604            X86Assembler::JmpSrc wasNotImmediate = m_jit.emitUnlinkedJmp();
     1605
     1606            m_jit.link(isImmediate, m_jit.label());
     1607
     1608            m_jit.movl_i32r(~JSImmediate::ExtendedTagBitUndefined, X86::ecx);
     1609            m_jit.andl_rr(X86::eax, X86::ecx);
     1610            m_jit.cmpl_i32r(JSImmediate::FullTagTypeNull, X86::ecx);
     1611            m_jit.sete_r(X86::eax);
     1612
     1613            m_jit.link(wasNotImmediate, m_jit.label());
     1614
     1615            m_jit.movzbl_rr(X86::eax, X86::eax);
     1616            emitTagAsBoolImmediate(X86::eax);
     1617            emitPutResult(dst);
     1618
    15961619            i += 3;
    15971620            break;
    15981621        }
    15991622        case op_neq_null: {
    1600             emitGetPutArg(instruction[i + 2].u.operand, 0, X86::ecx);
    1601             emitCall(i, Machine::cti_op_neq_null);
    1602             emitPutResult(instruction[i + 1].u.operand);
     1623            unsigned dst = instruction[i + 1].u.operand;
     1624            unsigned src1 = instruction[i + 2].u.operand;
     1625
     1626            emitGetArg(src1, X86::eax);
     1627            m_jit.testl_i32r(JSImmediate::TagMask, X86::eax);
     1628            X86Assembler::JmpSrc isImmediate = m_jit.emitUnlinkedJnz();
     1629
     1630            m_jit.movl_mr(OBJECT_OFFSET(JSCell, m_structureID), X86::eax, X86::ecx);
     1631            m_jit.testl_i32m(MasqueradesAsUndefined, OBJECT_OFFSET(StructureID, m_typeInfo.m_flags), X86::ecx);
     1632            m_jit.setz_r(X86::eax);
     1633
     1634            X86Assembler::JmpSrc wasNotImmediate = m_jit.emitUnlinkedJmp();
     1635
     1636            m_jit.link(isImmediate, m_jit.label());
     1637
     1638            m_jit.movl_i32r(~JSImmediate::ExtendedTagBitUndefined, X86::ecx);
     1639            m_jit.andl_rr(X86::eax, X86::ecx);
     1640            m_jit.cmpl_i32r(JSImmediate::FullTagTypeNull, X86::ecx);
     1641            m_jit.setne_r(X86::eax);
     1642
     1643            m_jit.link(wasNotImmediate, m_jit.label());
     1644
     1645            m_jit.movzbl_rr(X86::eax, X86::eax);
     1646            emitTagAsBoolImmediate(X86::eax);
     1647            emitPutResult(dst);
     1648
    16031649            i += 3;
    16041650            break;
Note: See TracChangeset for help on using the changeset viewer.