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


Ignore:
Timestamp:
Sep 15, 2008, 8:46:58 PM (17 years ago)
Author:
[email protected]
Message:

2008-09-15 Sam Weinig <[email protected]>

Roll out r36462. It broke document.all.

  • VM/CTI.cpp: (JSC::CTI::privateCompileMainPass): (JSC::CTI::privateCompileSlowCases):
  • VM/CTI.h:
  • VM/Machine.cpp: (JSC::Machine::Machine): (JSC::Machine::cti_op_eq_null): (JSC::Machine::cti_op_neq_null):
  • VM/Machine.h: (JSC::Machine::isJSString):
  • kjs/JSCell.h:
  • kjs/JSWrapperObject.h:
  • kjs/StringObject.h:
  • kjs/StringObjectThatMasqueradesAsUndefined.h:
File:
1 edited

Legend:

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

    r36463 r36475  
    318318}
    319319
    320 ALWAYS_INLINE void CTI::emitJumpSlowCaseIfIsJSCell(X86Assembler::RegisterID reg, unsigned opcodeIndex)
    321 {
    322     m_jit.testl_i32r(JSImmediate::TagMask, reg);
    323     m_slowCases.append(SlowCaseEntry(m_jit.emitUnlinkedJe(), opcodeIndex));
    324 }
    325 
    326320ALWAYS_INLINE void CTI::emitJumpSlowCaseIfNotJSCell(X86Assembler::RegisterID reg, unsigned opcodeIndex)
    327321{
     
    14031397        }
    14041398        case op_eq_null: {
    1405             emitGetArg(instruction[i + 2].u.operand, X86::edx);
    1406 
    1407             // go to a slow case either if this is not an immediate, or if the immediate is not undefined/null.
    1408             emitJumpSlowCaseIfIsJSCell(X86::edx, i);
    1409             m_jit.andl_i32r(~JSImmediate::ExtendedTagBitUndefined, X86::edx);
    1410             m_jit.cmpl_i32r(JSImmediate::FullTagTypeNull, X86::edx);
    1411             m_slowCases.append(SlowCaseEntry(m_jit.emitUnlinkedJne(), i));
    1412 
    1413             m_jit.movl_i32r(reinterpret_cast<uint32_t>(JSImmediate::trueImmediate()), X86::eax);
    1414             emitPutResult(instruction[i + 1].u.operand);
    1415 
     1399            emitGetPutArg(instruction[i + 2].u.operand, 0, X86::ecx);
     1400            emitCall(i, Machine::cti_op_eq_null);
     1401            emitPutResult(instruction[i + 1].u.operand);
    14161402            i += 3;
    14171403            break;
    14181404        }
    14191405        case op_neq_null: {
    1420             emitGetArg(instruction[i + 2].u.operand, X86::edx);
    1421 
    1422             // go to a slow case either if this is not an immediate, or if the immediate is not undefined/null.
    1423             emitJumpSlowCaseIfIsJSCell(X86::edx, i);
    1424             m_jit.andl_i32r(~JSImmediate::ExtendedTagBitUndefined, X86::edx);
    1425             m_jit.cmpl_i32r(JSImmediate::FullTagTypeNull, X86::edx);
    1426             m_slowCases.append(SlowCaseEntry(m_jit.emitUnlinkedJne(), i));
    1427 
    1428             m_jit.movl_i32r(reinterpret_cast<uint32_t>(JSImmediate::falseImmediate()), X86::eax);
    1429             emitPutResult(instruction[i + 1].u.operand);
    1430 
     1406            emitGetPutArg(instruction[i + 2].u.operand, 0, X86::ecx);
     1407            emitCall(i, Machine::cti_op_neq_null);
     1408            emitPutResult(instruction[i + 1].u.operand);
    14311409            i += 3;
    14321410            break;
     
    18771855        }
    18781856        CTI_COMPILE_BINARY_OP_SLOW_CASE(op_mul);
    1879         case op_eq_null: {
    1880             m_jit.link(iter->from, m_jit.label());
    1881 
    1882             // Value is a JSCell - speculate false, check for StringObjectThatMasqueradesAsUndefined.
    1883             m_jit.movl_i32r(reinterpret_cast<uint32_t>(JSImmediate::falseImmediate()), X86::eax);
    1884             emitPutResult(instruction[i + 1].u.operand);
    1885             m_jit.cmpl_i32m(reinterpret_cast<unsigned>(m_machine->m_jsStringObjectThatMasqueradesAsUndefinedVptr), X86::edx);
    1886             m_jit.link(m_jit.emitUnlinkedJne(), m_labels[i + 3]);
    1887            
    1888             // Value is a StringObjectThatMasqueradesAsUndefined
    1889             m_jit.movl_i32r(reinterpret_cast<uint32_t>(JSImmediate::trueImmediate()), X86::eax);
    1890             emitPutResult(instruction[i + 1].u.operand);
    1891             m_jit.link(m_jit.emitUnlinkedJmp(), m_labels[i + 3]);
    1892 
    1893             // Value is an immediate other than undefined/null
    1894             m_jit.link((++iter)->from, m_jit.label());
    1895             m_jit.movl_i32r(reinterpret_cast<uint32_t>(JSImmediate::falseImmediate()), X86::eax);
    1896             emitPutResult(instruction[i + 1].u.operand);
    1897            
    1898             i += 3;
    1899             break;
    1900         }
    1901         case op_neq_null: {
    1902             m_jit.link(iter->from, m_jit.label());
    1903 
    1904             // Value is a JSCell - speculate false, check for StringObjectThatMasqueradesAsUndefined.
    1905             m_jit.movl_i32r(reinterpret_cast<uint32_t>(JSImmediate::trueImmediate()), X86::eax);
    1906             emitPutResult(instruction[i + 1].u.operand);
    1907             m_jit.cmpl_i32m(reinterpret_cast<unsigned>(m_machine->m_jsStringObjectThatMasqueradesAsUndefinedVptr), X86::edx);
    1908             m_jit.link(m_jit.emitUnlinkedJne(), m_labels[i + 3]);
    1909            
    1910             // Value is a StringObjectThatMasqueradesAsUndefined
    1911             m_jit.movl_i32r(reinterpret_cast<uint32_t>(JSImmediate::falseImmediate()), X86::eax);
    1912             emitPutResult(instruction[i + 1].u.operand);
    1913             m_jit.link(m_jit.emitUnlinkedJmp(), m_labels[i + 3]);
    1914 
    1915             // Value is an immediate other than undefined/null
    1916             m_jit.link((++iter)->from, m_jit.label());
    1917             m_jit.movl_i32r(reinterpret_cast<uint32_t>(JSImmediate::trueImmediate()), X86::eax);
    1918             emitPutResult(instruction[i + 1].u.operand);
    1919            
    1920             i += 3;
    1921             break;
    1922         }
    19231857        default:
    19241858            ASSERT_NOT_REACHED();
Note: See TracChangeset for help on using the changeset viewer.