Ignore:
Timestamp:
Jan 30, 2012, 10:28:39 AM (13 years ago)
Author:
[email protected]
Message:

Clean up putDirect
https://bugs.webkit.org/show_bug.cgi?id=76232

Reviewed by Sam Weinig.

Part 3 - merge op_put_getter & op_put_setter.

Putting these separately is inefficient (and makes future optimiation,
e.g. making GetterSetter immutable) harder. Change to emit a single
op_put_getter_setter bytecode op. Ultimately we should probably be
able to merge this with put direct, to create a common op to initialize
object literal properties.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dump):

  • bytecode/Opcode.h:

(JSC):
():

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitPutGetterSetter):

  • bytecompiler/BytecodeGenerator.h:

(BytecodeGenerator):

  • bytecompiler/NodesCodegen.cpp:

(JSC::PropertyListNode::emitBytecode):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::privateExecute):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:

(JIT):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_put_getter_setter):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_put_getter_setter):

  • jit/JITStubs.cpp:

(JSC::DEFINE_STUB_FUNCTION):

  • jit/JITStubs.h:

():

  • runtime/JSObject.cpp:

(JSC::JSObject::putDirectVirtual):
(JSC::JSObject::putDirectAccessor):
(JSC):
(JSC::putDescriptor):
(JSC::JSObject::defineOwnProperty):

  • runtime/JSObject.h:

():
(JSC::JSObject::putDirectInternal):
(JSC::JSObject::putDirect):
(JSC::JSObject::putDirectWithoutTransition):

File:
1 edited

Legend:

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

    r106197 r106255  
    903903            break;
    904904        }
    905         case op_put_getter: {
     905        case op_put_getter_setter: {
    906906            int r0 = (++it)->u.operand;
    907907            int id0 = (++it)->u.operand;
    908908            int r1 = (++it)->u.operand;
    909             printf("[%4d] put_getter\t %s, %s, %s\n", location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(exec, r1).data());
    910             break;
    911         }
    912         case op_put_setter: {
    913             int r0 = (++it)->u.operand;
    914             int id0 = (++it)->u.operand;
    915             int r1 = (++it)->u.operand;
    916             printf("[%4d] put_setter\t %s, %s, %s\n", location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(exec, r1).data());
     909            int r2 = (++it)->u.operand;
     910            printf("[%4d] put_getter_setter\t %s, %s, %s, %s\n", location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(exec, r1).data(), registerName(exec, r2).data());
    917911            break;
    918912        }
Note: See TracChangeset for help on using the changeset viewer.