Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 0fe0173428534f77253488f03cd10dea7049f436..f78495858717177896c4a84b81e4268ee65ad7d2 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -10006,10 +10006,12 @@ void HOptimizedGraphBuilder::BuildEmitDeepCopy( |
} |
// Copy in-object properties. |
- HValue* object_properties = |
- AddInstruction(new(zone) HInnerAllocatedObject(target, object_offset)); |
- BuildEmitInObjectProperties(boilerplate_object, original_boilerplate_object, |
- object_properties, target, offset, data_target, data_offset); |
+ if (boilerplate_object->map()->NumberOfFields() != 0) { |
+ HValue* object_properties = |
+ AddInstruction(new(zone) HInnerAllocatedObject(target, object_offset)); |
+ BuildEmitInObjectProperties(boilerplate_object, original_boilerplate_object, |
+ object_properties, target, offset, data_target, data_offset); |
+ } |
// Create allocation site info. |
if (mode == TRACK_ALLOCATION_SITE && |