Generate specialized constructor code for constructing simple objects.
authorsgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 26 Aug 2009 12:22:44 +0000 (12:22 +0000)
committersgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 26 Aug 2009 12:22:44 +0000 (12:22 +0000)
commit717394492d1382ef8802437cc9a30b7f0f2dead4
tree3a4773781ac68799b9f276bbd2db48ec7a6e5668
parentba9efd26b73f3e690eee6e9b5d3e750e4adb2ae1
Generate specialized constructor code for constructing simple objects.

For objects which only have simple assignments of the form this.x = ...; a
specialized constructor stub is now generated. This generated code allocates the
object and fills in the initial properties directly. If this fails for some
reason code continues in the generic constructor stub which in turn might pass
control to the runtime system.

Added counter to see how many objects are constructed using a specialized stub.

The specialized stub is only implemented for ia32 architecture in this change.
For x64 and ARM the generic construct stub is used.

This is change is identical to http://codereview.chromium.org/174392 (committed in r2753 and reverted in r2754) except that a few parts have already been committed from http://codereview.chromium.org/173469 (committed in r2762).
Review URL: http://codereview.chromium.org/173470

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
14 files changed:
src/arm/stub-cache-arm.cc
src/debug-delay.js
src/ia32/builtins-ia32.cc
src/ia32/stub-cache-ia32.cc
src/objects.cc
src/objects.h
src/runtime.cc
src/runtime.h
src/stub-cache.cc
src/stub-cache.h
src/v8-counters.h
src/x64/stub-cache-x64.cc
test/mjsunit/debug-stepin-constructor.js
test/mjsunit/simple-constructor.js