Ignore:
Timestamp:
Sep 25, 2010, 2:42:00 PM (15 years ago)
Author:
[email protected]
Message:

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

Reviewed by Cameron Zwarich.

Avoid constructing arguments object when accessing length and index properties
https://bugs.webkit.org/show_bug.cgi?id=46572

Add opcodes to read argument length and properties, and then implement them.
Much like other lazy opcodes these opcodes take a fast path when the arguments
object has not been instantiated, and fall back on generic access mechanisms
if they are acting on an instantiated object.

3% win on v8-earleyboyer, no change elsewhere.

  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::dump):
  • bytecode/Opcode.h:
  • bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::emitGetArgumentsLength): (JSC::BytecodeGenerator::emitGetArgumentByVal):
  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp: (JSC::BracketAccessorNode::emitBytecode): (JSC::DotAccessorNode::emitBytecode):
  • interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute):
  • jit/JIT.cpp: (JSC::JIT::privateCompileMainPass): (JSC::JIT::privateCompileSlowCases):
  • jit/JIT.h:
  • jit/JITOpcodes.cpp: (JSC::JIT::emit_op_get_arguments_length): (JSC::JIT::emitSlow_op_get_arguments_length): (JSC::JIT::emit_op_get_argument_by_val): (JSC::JIT::emitSlow_op_get_argument_by_val):
  • jit/JITOpcodes32_64.cpp: (JSC::JIT::emit_op_get_arguments_length): (JSC::JIT::emitSlow_op_get_arguments_length): (JSC::JIT::emit_op_get_argument_by_val): (JSC::JIT::emitSlow_op_get_argument_by_val):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/bytecode/Opcode.h

    r68281 r68338  
    121121        macro(op_get_array_length, 8) \
    122122        macro(op_get_string_length, 8) \
     123        macro(op_get_arguments_length, 4) \
    123124        macro(op_put_by_id, 9) \
    124125        macro(op_put_by_id_transition, 9) \
     
    127128        macro(op_del_by_id, 4) \
    128129        macro(op_get_by_val, 4) \
     130        macro(op_get_argument_by_val, 4) \
    129131        macro(op_get_by_pname, 7) \
    130132        macro(op_put_by_val, 4) \
Note: See TracChangeset for help on using the changeset viewer.