R=verwaest@chromium.org
LOG=N
BUG=417290
Review URL: https://codereview.chromium.org/
655163002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24618
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
HInstruction* boilerplate = Add<HLoadNamedField>(
allocation_site, static_cast<HValue*>(NULL), access);
- int size = JSObject::kHeaderSize + casted_stub()->length() * kPointerSize;
+ int length = casted_stub()->length();
+ if (length == 0) {
+ // Empty objects have some slack added to them.
+ length = JSObject::kInitialGlobalObjectUnusedPropertiesCount;
+ }
+ int size = JSObject::kHeaderSize + length * kPointerSize;
int object_size = size;
if (FLAG_allocation_site_pretenuring) {
size += AllocationMemento::kSize;