Generate specialized constructor code for constructing simple objects.
authorsgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 25 Aug 2009 12:23:58 +0000 (12:23 +0000)
committersgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 25 Aug 2009 12:23:58 +0000 (12:23 +0000)
commit53531ed48a39a14b0e23b44b479036b77433dfa5
tree61f44fe27839ab0ac8899d5880b84b2135a6ca93
parentc9827717f19144c323e488105298791d6393d091
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.
Review URL: http://codereview.chromium.org/174392

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
15 files changed:
src/arm/stub-cache-arm.cc
src/compiler.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