Changeset 39182 in webkit for trunk/JavaScriptCore/jit/JIT.cpp


Ignore:
Timestamp:
Dec 10, 2008, 12:05:53 PM (16 years ago)
Author:
[email protected]
Message:

2008-12-10 Sam Weinig <[email protected]>

Reviewed by Geoffrey Garen.

<rdar://problem/6428332> Remove the CTI return address table from CodeBlock

Step 2:

Convert the return address table from a HashMap to a sorted Vector. This
reduces the size of the data structure by ~4.5MB on Membuster head.

SunSpider reports a 0.5% progression.

  • bytecode/CodeBlock.cpp: (JSC::sizeInBytes): Generic method to get the cost of a Vector. (JSC::CodeBlock::dumpStatistics): Add dumping of member sizes.
  • bytecode/CodeBlock.h: (JSC::PC::PC): Struct representing NativePC -> VirtualPC mappings. (JSC::getNativePC): Helper for binary chop. (JSC::CodeBlock::getBytecodeIndex): Used to get the VirtualPC from a NativePC using a binary chop of the pcVector. (JSC::CodeBlock::pcVector): Accessor.
  • interpreter/Interpreter.cpp: (JSC::vPCForPC): Use getBytecodeIndex instead of jitReturnAddressVPCMap().get(). (JSC::Interpreter::cti_op_instanceof): Ditto. (JSC::Interpreter::cti_op_resolve): Ditto. (JSC::Interpreter::cti_op_resolve_func): Ditto. (JSC::Interpreter::cti_op_resolve_skip): Ditto. (JSC::Interpreter::cti_op_resolve_with_base): Ditto. (JSC::Interpreter::cti_op_throw): Ditto. (JSC::Interpreter::cti_op_in): Ditto. (JSC::Interpreter::cti_vm_throw): Ditto.
  • jit/JIT.cpp: (JSC::JIT::privateCompile): Reserve exact capacity and fill the pcVector.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/JIT.cpp

    r39141 r39182  
    20052005    }
    20062006
     2007    m_codeBlock->pcVector().reserveCapacity(m_calls.size());
    20072008    for (Vector<CallRecord>::iterator iter = m_calls.begin(); iter != m_calls.end(); ++iter) {
    20082009        if (iter->to)
    20092010            X86Assembler::link(code, iter->from, iter->to);
    2010         m_codeBlock->jitReturnAddressVPCMap().add(__ getRelocatedAddress(code, iter->from), iter->bytecodeIndex);
     2011        m_codeBlock->pcVector().append(PC(__ getRelocatedAddress(code, iter->from), iter->bytecodeIndex));
    20112012    }
    20122013
Note: See TracChangeset for help on using the changeset viewer.