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/bytecompiler/BytecodeGenerator.h

    r68281 r68338  
    335335
    336336        RegisterID* emitGetById(RegisterID* dst, RegisterID* base, const Identifier& property);
     337        RegisterID* emitGetArgumentsLength(RegisterID* dst, RegisterID* base);
    337338        RegisterID* emitPutById(RegisterID* base, const Identifier& property, RegisterID* value);
    338339        RegisterID* emitDirectPutById(RegisterID* base, const Identifier& property, RegisterID* value);
    339340        RegisterID* emitDeleteById(RegisterID* dst, RegisterID* base, const Identifier&);
    340341        RegisterID* emitGetByVal(RegisterID* dst, RegisterID* base, RegisterID* property);
     342        RegisterID* emitGetArgumentByVal(RegisterID* dst, RegisterID* base, RegisterID* property);
    341343        RegisterID* emitPutByVal(RegisterID* base, RegisterID* property, RegisterID* value);
    342344        RegisterID* emitDeleteByVal(RegisterID* dst, RegisterID* base, RegisterID* property);
Note: See TracChangeset for help on using the changeset viewer.