Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(471)

Unified Diff: src/hydrogen.cc

Issue 17881004: Remove superfluous HInnerAllocatedObject in BuildEmitDeepCopy (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 &&
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698