• svenpanne@chromium.org's avatar
    Ensure that generated code for object literals will call... · c644c4e8
    svenpanne@chromium.org authored
    Ensure that generated code for object literals will call Runtime_DefineOrRedefineAccessorProperty only once per accessor property.
    
    To do this, we collect all accessor properties in a first pass and emit code for
    defining those properties afterwards in a second pass.
    
    As a finger exercise, the table used for collecting accessors has a (subset of
    an) STL-like iterator interface, including STL-like names and operators.
    Although C++ is quite verbose here (as usual, but partly this is caused by our
    current slightly clumsy classes/templates), things work out quite nicely and it
    cleans up some confusion, e.g. a table entry is not an iterator etc.
    Everything compiles into very efficient code, e.g. the loop condition 'it !=
    accessor_table.end()' compiles into a single 'testl' instruction on ia32.
    +1 for using standard APIs!
    
    Review URL: https://chromiumcodereview.appspot.com/9691040
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    c644c4e8
Name
Last commit
Last update
..
assembler-x64-inl.h Loading commit data...
assembler-x64.cc Loading commit data...
assembler-x64.h Loading commit data...
builtins-x64.cc Loading commit data...
code-stubs-x64.cc Loading commit data...
code-stubs-x64.h Loading commit data...
codegen-x64.cc Loading commit data...
codegen-x64.h Loading commit data...
cpu-x64.cc Loading commit data...
debug-x64.cc Loading commit data...
deoptimizer-x64.cc Loading commit data...
disasm-x64.cc Loading commit data...
frames-x64.cc Loading commit data...
frames-x64.h Loading commit data...
full-codegen-x64.cc Loading commit data...
ic-x64.cc Loading commit data...
lithium-codegen-x64.cc Loading commit data...
lithium-codegen-x64.h Loading commit data...
lithium-gap-resolver-x64.cc Loading commit data...
lithium-gap-resolver-x64.h Loading commit data...
lithium-x64.cc Loading commit data...
lithium-x64.h Loading commit data...
macro-assembler-x64.cc Loading commit data...
macro-assembler-x64.h Loading commit data...
regexp-macro-assembler-x64.cc Loading commit data...
regexp-macro-assembler-x64.h Loading commit data...
simulator-x64.cc Loading commit data...
simulator-x64.h Loading commit data...
stub-cache-x64.cc Loading commit data...