Ignore:
Timestamp:
May 9, 2010, 4:42:22 AM (15 years ago)
Author:
[email protected]
Message:

2010-05-09 Oliver Hunt <[email protected]>

Reviewed by Maciej Stachowiak.

Improve string indexing performance
https://bugs.webkit.org/show_bug.cgi?id=38814

Add an assembly stub to do indexed loads from strings much
more cheaply than the current stub dispatch logic. We can
do this because we are able to make guarantees about the
register contents when entering the stub so the call overhead
is negligible.

  • jit/JIT.h:
  • jit/JITInlineMethods.h:
  • jit/JITOpcodes.cpp:
  • jit/JITPropertyAccess.cpp: (JSC::JIT::stringGetByValStubGenerator): (JSC::JIT::emitSlow_op_get_by_val):

Moved from JITOpcodes.cpp to keep the slowcase next to
the normal case codegen as we do for everything else.

  • jit/JITPropertyAccess32_64.cpp: (JSC::JIT::stringGetByValStubGenerator): (JSC::JIT::emitSlow_op_get_by_val):
  • jit/JSInterfaceJIT.h: (JSC::JSInterfaceJIT::emitFastArithImmToInt):
File:
1 edited

Legend:

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

    r59040 r59056  
    14081408}
    14091409
    1410 void JIT::emitSlow_op_get_by_val(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    1411 {
    1412     unsigned dst = currentInstruction[1].u.operand;
    1413     unsigned base = currentInstruction[2].u.operand;
    1414     unsigned property = currentInstruction[3].u.operand;
    1415 
    1416     linkSlowCase(iter); // property int32 check
    1417     linkSlowCaseIfNotJSCell(iter, base); // base cell check
    1418     linkSlowCase(iter); // base array check
    1419     linkSlowCase(iter); // vector length check
    1420     linkSlowCase(iter); // empty value
    1421 
    1422     JITStubCall stubCall(this, cti_op_get_by_val);
    1423     stubCall.addArgument(base, regT2);
    1424     stubCall.addArgument(property, regT2);
    1425     stubCall.call(dst);
    1426 }
    1427 
    14281410void JIT::emitSlow_op_loop_if_lesseq(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    14291411{
Note: See TracChangeset for help on using the changeset viewer.