[runtime] Store constructor function index on primitive maps.
authorbmeurer <bmeurer@chromium.org>
Tue, 11 Aug 2015 19:36:04 +0000 (12:36 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 11 Aug 2015 19:36:14 +0000 (19:36 +0000)
commit6c743b2b39ae4333e9451f99f3edb3e17e7ad2a5
tree7e387c8486cca11d5eee53a242e496146a8520f7
parent8f733867aca704207cff11098852200a602ce364
[runtime] Store constructor function index on primitive maps.

This way we can greatly simplify the different variants of ToObject in
our codebase and make them more uniform and robust.  Adding a new
primitive doesn't require finding and changing all those places again,
but it is sufficient to setup the constructor function index when
allocating the map.

We use the inobject properties field of Map, which is invalid primitive
maps anyway.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/1276533003

Cr-Commit-Position: refs/heads/master@{#30119}
29 files changed:
src/arm/builtins-arm.cc
src/arm64/builtins-arm64.cc
src/bootstrapper.cc
src/factory.cc
src/field-index-inl.h
src/heap/heap.cc
src/heap/objects-visiting-inl.h
src/hydrogen-instructions.h
src/hydrogen.cc
src/hydrogen.h
src/ia32/builtins-ia32.cc
src/ic/handler-compiler.cc
src/ic/ic-inl.h
src/layout-descriptor-inl.h
src/layout-descriptor.cc
src/mips/builtins-mips.cc
src/mips64/builtins-mips64.cc
src/objects-debug.cc
src/objects-inl.h
src/objects-printer.cc
src/objects.cc
src/objects.h
src/ppc/builtins-ppc.cc
src/runtime/runtime-collections.cc
src/runtime/runtime-object.cc
src/x64/builtins-x64.cc
src/x87/builtins-x87.cc
test/cctest/test-heap.cc
test/cctest/test-unboxed-doubles.cc