Ignore:
Timestamp:
Mar 8, 2010, 2:45:22 PM (15 years ago)
Author:
[email protected]
Message:

2010-03-07 Oliver Hunt <[email protected]>

Reviewed by Darin Adler.

TypeInfo is unnecessarily large
https://bugs.webkit.org/show_bug.cgi?id=35850

Reduce the size of the type and flags members to a single
byte each, reducing the size of Structure by 8 bytes.

  • assembler/MacroAssemblerX86Common.h: (JSC::MacroAssemblerX86Common::branch8): (JSC::MacroAssemblerX86Common::branchTest8): (JSC::MacroAssemblerX86Common::setTest8): Add single byte branches, and correct setTest8 to do a single byte read from memory, and actually store the result
  • assembler/X86Assembler.h: (JSC::X86Assembler::): (JSC::X86Assembler::cmpb_im): (JSC::X86Assembler::testb_im):
  • jit/JITCall.cpp: (JSC::JIT::emit_op_construct_verify):
  • jit/JITOpcodes.cpp: (JSC::JIT::emit_op_instanceof): (JSC::JIT::emit_op_jeq_null): (JSC::JIT::emit_op_jneq_null): (JSC::JIT::emit_op_get_pnames): (JSC::JIT::emit_op_convert_this): (JSC::JIT::emit_op_construct_verify): (JSC::JIT::emit_op_to_jsnumber): (JSC::JIT::emit_op_eq_null): (JSC::JIT::emit_op_neq_null):
  • runtime/JSTypeInfo.h: (JSC::TypeInfo::TypeInfo): (JSC::TypeInfo::type):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/assembler/MacroAssemblerX86Common.h

    r55633 r55684  
    619619
    620620public:
     621    Jump branch8(Condition cond, Address left, Imm32 right)
     622    {
     623        m_assembler.cmpb_im(right.m_value, left.offset, left.base);
     624        return Jump(m_assembler.jCC(x86Condition(cond)));
     625    }
     626
    621627    Jump branch32(Condition cond, RegisterID left, RegisterID right)
    622628    {
     
    714720        else
    715721            m_assembler.testl_i32m(mask.m_value, address.offset, address.base, address.index, address.scale);
     722        return Jump(m_assembler.jCC(x86Condition(cond)));
     723    }
     724   
     725    Jump branchTest8(Condition cond, Address address, Imm32 mask = Imm32(-1))
     726    {
     727        ASSERT((cond == Zero) || (cond == NonZero));
     728        if (mask.m_value == -1)
     729            m_assembler.cmpb_im(0, address.offset, address.base);
     730        else
     731            m_assembler.testb_im(mask.m_value, address.offset, address.base);
    716732        return Jump(m_assembler.jCC(x86Condition(cond)));
    717733    }
     
    916932    {
    917933        if (mask.m_value == -1)
    918             m_assembler.cmpl_im(0, address.offset, address.base);
     934            m_assembler.cmpb_im(0, address.offset, address.base);
    919935        else
    920             m_assembler.testl_i32m(mask.m_value, address.offset, address.base);
     936            m_assembler.testb_im(mask.m_value, address.offset, address.base);
    921937        m_assembler.setCC_r(x86Condition(cond), dest);
     938        m_assembler.movzbl_rr(dest, dest);
    922939    }
    923940
Note: See TracChangeset for help on using the changeset viewer.