Ignore:
Timestamp:
Nov 21, 2008, 7:34:43 PM (17 years ago)
Author:
[email protected]
Message:

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

Reviewed by Oliver Hunt.

Add (really) polymorphic caching for get by id self.
Very similar to caching of prototype accesses, described below.

Oh, also, probably shouldn't have been leaking those structure list objects.


4% preogression on deltablue.

  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::dump): (JSC::CodeBlock::derefStructures): (JSC::PrototypeStructureList::derefStructures):
  • bytecode/Instruction.h:
  • bytecode/Opcode.h:
  • interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute): (JSC::Interpreter::cti_op_get_by_id_self_fail):
  • jit/JIT.cpp: (JSC::JIT::privateCompileMainPass): (JSC::JIT::privateCompileGetByIdSelfList): (JSC::JIT::patchGetByIdSelf):
  • jit/JIT.h: (JSC::JIT::compileGetByIdSelfList):
File:
1 edited

Legend:

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

    r38652 r38688  
    643643            break;
    644644        }
     645        case op_get_by_id_self_list: {
     646            printGetByIdOp(location, it, identifiers, "get_by_id_self_list");
     647            break;
     648        }
    645649        case op_get_by_id_proto: {
    646650            printGetByIdOp(location, it, identifiers, "get_by_id_proto");
     
    10241028        return;
    10251029    }
    1026     if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto_list)) {
    1027         PrototypeStructureList* prototypeStructures = vPC[4].u.prototypeStructure;
    1028         int count = vPC[5].u.operand;
    1029         for (int i = 0; i < count; ++i) {
    1030             PrototypeStructureList::ProtoStubInfo& info = prototypeStructures->list[i];
    1031             ASSERT(info.base);
    1032             ASSERT(info.proto);
    1033             ASSERT(info.stubRoutine);
    1034             info.base->deref();
    1035             info.proto->deref();
    1036             WTF::fastFreeExecutable(info.stubRoutine);
    1037         }
     1030    if ((vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto_list))
     1031        || (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self_list))) {
     1032        PolymorphicAccessStructureList* polymorphicStructures = vPC[4].u.polymorphicStructures;
     1033        polymorphicStructures->derefStructures(vPC[5].u.operand);
     1034        delete polymorphicStructures;
    10381035        return;
    10391036    }
Note: See TracChangeset for help on using the changeset viewer.