Changeset 38286 in webkit for trunk/JavaScriptCore/masm


Ignore:
Timestamp:
Nov 10, 2008, 9:09:46 PM (17 years ago)
Author:
[email protected]
Message:

2008-11-10 Gavin Barraclough <[email protected]>

Reviewed by Camron Zwarich.

Batch compile the set of static trampolines at the point Machine is constructed, using a single allocation.
Refactor out m_callFrame from CTI, since this is only needed to access the global data (instead store a
pointer to the global data directly, since this is available at the point the Machine is constructed).
Add a method to align the code buffer, to allow JIT generation for multiple trampolines in one block.

  • VM/CTI.cpp: (JSC::CTI::getConstant): (JSC::CTI::emitGetArg): (JSC::CTI::emitGetPutArg): (JSC::CTI::getConstantImmediateNumericArg): (JSC::CTI::printOpcodeOperandTypes): (JSC::CTI::CTI): (JSC::CTI::compileBinaryArithOp): (JSC::CTI::privateCompileMainPass): (JSC::CTI::privateCompileGetByIdProto): (JSC::CTI::privateCompileGetByIdChain): (JSC::CTI::privateCompileCTIMachineTrampolines): (JSC::CTI::freeCTIMachineTrampolines):
  • VM/CTI.h: (JSC::CTI::compile): (JSC::CTI::compileGetByIdSelf): (JSC::CTI::compileGetByIdProto): (JSC::CTI::compileGetByIdChain): (JSC::CTI::compilePutByIdReplace): (JSC::CTI::compilePutByIdTransition): (JSC::CTI::compileCTIMachineTrampolines): (JSC::CTI::compilePatchGetArrayLength):
  • VM/Machine.cpp: (JSC::Machine::initialize): (JSC::Machine::~Machine): (JSC::Machine::execute): (JSC::Machine::tryCTICachePutByID): (JSC::Machine::tryCTICacheGetByID): (JSC::Machine::cti_op_call_JSFunction): (JSC::Machine::cti_vm_lazyLinkCall):
  • VM/Machine.h:
  • masm/X86Assembler.h: (JSC::JITCodeBuffer::isAligned): (JSC::X86Assembler::): (JSC::X86Assembler::align):
  • runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/masm/X86Assembler.h

    r37991 r38286  
    6161    }
    6262
     63    bool isAligned(int alignment)
     64    {
     65        return !(m_index & (alignment - 1));
     66    }
     67   
    6368    void putByteUnchecked(int value)
    6469    {
     
    220225        OP_JMP_rel32                    = 0xE9,
    221226        PRE_SSE_F2                      = 0xF2,
     227        OP_HLT                          = 0xF4,
    222228        OP_GROUP3_Ev                    = 0xF7,
    223229        OP_GROUP3_EvIz                  = 0xF7, // OP_GROUP3_Ev has an immediate, when instruction is a test.
     
    911917    }
    912918   
     919    JmpDst align(int alignment)
     920    {
     921        while (!m_buffer->isAligned(alignment))
     922            m_buffer->putByte(OP_HLT);
     923
     924        return label();
     925    }
     926
    913927    JmpSrc emitUnlinkedJmp()
    914928    {
Note: See TracChangeset for help on using the changeset viewer.