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

Side by Side Diff: src/hydrogen.cc

Issue 17881004: Remove superfluous HInnerAllocatedObject in BuildEmitDeepCopy (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 10004 matching lines...) Expand 10 before | Expand all | Expand 10 after
10015 10015
10016 // Copy object elements if non-COW. 10016 // Copy object elements if non-COW.
10017 HValue* object_elements = BuildEmitObjectHeader(boilerplate_object, target, 10017 HValue* object_elements = BuildEmitObjectHeader(boilerplate_object, target,
10018 data_target, object_offset, elements_offset, elements_size); 10018 data_target, object_offset, elements_offset, elements_size);
10019 if (object_elements != NULL) { 10019 if (object_elements != NULL) {
10020 BuildEmitElements(elements, original_elements, kind, object_elements, 10020 BuildEmitElements(elements, original_elements, kind, object_elements,
10021 target, offset, data_target, data_offset); 10021 target, offset, data_target, data_offset);
10022 } 10022 }
10023 10023
10024 // Copy in-object properties. 10024 // Copy in-object properties.
10025 HValue* object_properties = 10025 Handle<DescriptorArray> descriptors(
10026 AddInstruction(new(zone) HInnerAllocatedObject(target, object_offset)); 10026 boilerplate_object->map()->instance_descriptors());
10027 BuildEmitInObjectProperties(boilerplate_object, original_boilerplate_object, 10027 int descriptor_count = boilerplate_object->map()->NumberOfOwnDescriptors();
10028 object_properties, target, offset, data_target, data_offset); 10028 bool has_field = false;
10029 for (int i = 0; i < descriptor_count; i++) {
10030 PropertyDetails details = descriptors->GetDetails(i);
10031 if (details.type() != FIELD) continue;
10032 has_field = true;
10033 }
Toon Verwaest 2013/06/27 04:32:22 Isn't there a utility function to test for this co
danno 2013/06/27 13:55:51 OK, I now use map()->NumberOfFields(). I'll leave
10034
10035 if (has_field) {
10036 HValue* object_properties =
10037 AddInstruction(new(zone) HInnerAllocatedObject(target, object_offset));
10038 BuildEmitInObjectProperties(boilerplate_object, original_boilerplate_object,
10039 object_properties, target, offset, data_target, data_offset);
10040 }
10029 10041
10030 // Create allocation site info. 10042 // Create allocation site info.
10031 if (mode == TRACK_ALLOCATION_SITE && 10043 if (mode == TRACK_ALLOCATION_SITE &&
10032 boilerplate_object->map()->CanTrackAllocationSite()) { 10044 boilerplate_object->map()->CanTrackAllocationSite()) {
10033 elements_offset += AllocationSiteInfo::kSize; 10045 elements_offset += AllocationSiteInfo::kSize;
10034 *offset += AllocationSiteInfo::kSize; 10046 *offset += AllocationSiteInfo::kSize;
10035 HInstruction* original_boilerplate = AddInstruction(new(zone) HConstant( 10047 HInstruction* original_boilerplate = AddInstruction(new(zone) HConstant(
10036 original_boilerplate_object)); 10048 original_boilerplate_object));
10037 BuildCreateAllocationSiteInfo(target, JSArray::kSize, original_boilerplate); 10049 BuildCreateAllocationSiteInfo(target, JSArray::kSize, original_boilerplate);
10038 } 10050 }
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
11554 if (ShouldProduceTraceOutput()) { 11566 if (ShouldProduceTraceOutput()) {
11555 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 11567 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
11556 } 11568 }
11557 11569
11558 #ifdef DEBUG 11570 #ifdef DEBUG
11559 graph_->Verify(false); // No full verify. 11571 graph_->Verify(false); // No full verify.
11560 #endif 11572 #endif
11561 } 11573 }
11562 11574
11563 } } // namespace v8::internal 11575 } } // namespace v8::internal
OLDNEW
« 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