Ignore:
Timestamp:
Sep 14, 2008, 7:18:13 PM (17 years ago)
Author:
[email protected]
Message:

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

Reviewed by Cameron Zwarich.


  • split the "prototype" lookup for hasInstance into opcode stream so it can be cached


~5% speedup on v8 earley-boyer test

  • API/JSCallbackObject.h: Add a parameter for the pre-looked-up prototype.
  • API/JSCallbackObjectFunctions.h: (JSC::::hasInstance): Ditto.
  • API/JSValueRef.cpp: (JSValueIsInstanceOfConstructor): Look up and pass in prototype.
  • JavaScriptCore.exp:
  • VM/CTI.cpp: (JSC::CTI::privateCompileMainPass): Pass along prototype.
  • VM/CodeBlock.cpp: (JSC::CodeBlock::dump): Print third arg.
  • VM/CodeGenerator.cpp: (JSC::CodeGenerator::emitInstanceOf): Implement this, now that there is a third argument.
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (JSC::Machine::privateExecute): Pass along the prototype. (JSC::Machine::cti_op_instanceof): ditto
  • kjs/JSObject.cpp: (JSC::JSObject::hasInstance): Expect to get a pre-looked-up prototype.
  • kjs/JSObject.h:
  • kjs/nodes.cpp: (JSC::InstanceOfNode::emitCode): Emit a get_by_id of the prototype property and pass that register to instanceof.
  • kjs/nodes.h:
File:
1 edited

Legend:

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

    r36417 r36418  
    278278        size_t i = 0;
    279279        do {
    280              printStructureIDs(&instructions[structureIDInstructions[i]]);
     280             printStructureIDs(&instructions[structureIDInstructions[i].opcodeIndex]);
    281281             ++i;
    282282        } while (i < structureIDInstructions.size());
     
    876876{
    877877    size_t size = structureIDInstructions.size();
    878     for (size_t i = 0; i < size; ++i)
    879         derefStructureIDs(&instructions[structureIDInstructions[i]]);
    880 
    881     size = structureIDAccessStubs.size();
    882     for (size_t i = 0; i < size; ++i)
    883         fastFree(structureIDAccessStubs[i]);
    884 
     878    for (size_t i = 0; i < size; ++i) {
     879        derefStructureIDs(&instructions[structureIDInstructions[i].opcodeIndex]);
     880        if (structureIDInstructions[i].stubRoutine)
     881            fastFree(structureIDInstructions[i].stubRoutine);
     882    }
    885883#if ENABLE(CTI)
    886884    if (ctiCode)
Note: See TracChangeset for help on using the changeset viewer.