| OLD | NEW |
| 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 9988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9999 | 9999 |
| 10000 // Copy object elements if non-COW. | 10000 // Copy object elements if non-COW. |
| 10001 HValue* object_elements = BuildEmitObjectHeader(boilerplate_object, target, | 10001 HValue* object_elements = BuildEmitObjectHeader(boilerplate_object, target, |
| 10002 data_target, object_offset, elements_offset, elements_size); | 10002 data_target, object_offset, elements_offset, elements_size); |
| 10003 if (object_elements != NULL) { | 10003 if (object_elements != NULL) { |
| 10004 BuildEmitElements(elements, original_elements, kind, object_elements, | 10004 BuildEmitElements(elements, original_elements, kind, object_elements, |
| 10005 target, offset, data_target, data_offset); | 10005 target, offset, data_target, data_offset); |
| 10006 } | 10006 } |
| 10007 | 10007 |
| 10008 // Copy in-object properties. | 10008 // Copy in-object properties. |
| 10009 HValue* object_properties = | 10009 if (boilerplate_object->map()->NumberOfFields() != 0) { |
| 10010 AddInstruction(new(zone) HInnerAllocatedObject(target, object_offset)); | 10010 HValue* object_properties = |
| 10011 BuildEmitInObjectProperties(boilerplate_object, original_boilerplate_object, | 10011 AddInstruction(new(zone) HInnerAllocatedObject(target, object_offset)); |
| 10012 object_properties, target, offset, data_target, data_offset); | 10012 BuildEmitInObjectProperties(boilerplate_object, original_boilerplate_object, |
| 10013 object_properties, target, offset, data_target, data_offset); |
| 10014 } |
| 10013 | 10015 |
| 10014 // Create allocation site info. | 10016 // Create allocation site info. |
| 10015 if (mode == TRACK_ALLOCATION_SITE && | 10017 if (mode == TRACK_ALLOCATION_SITE && |
| 10016 boilerplate_object->map()->CanTrackAllocationSite()) { | 10018 boilerplate_object->map()->CanTrackAllocationSite()) { |
| 10017 elements_offset += AllocationSiteInfo::kSize; | 10019 elements_offset += AllocationSiteInfo::kSize; |
| 10018 *offset += AllocationSiteInfo::kSize; | 10020 *offset += AllocationSiteInfo::kSize; |
| 10019 HInstruction* original_boilerplate = AddInstruction(new(zone) HConstant( | 10021 HInstruction* original_boilerplate = AddInstruction(new(zone) HConstant( |
| 10020 original_boilerplate_object)); | 10022 original_boilerplate_object)); |
| 10021 BuildCreateAllocationSiteInfo(target, JSArray::kSize, original_boilerplate); | 10023 BuildCreateAllocationSiteInfo(target, JSArray::kSize, original_boilerplate); |
| 10022 } | 10024 } |
| (...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11538 if (ShouldProduceTraceOutput()) { | 11540 if (ShouldProduceTraceOutput()) { |
| 11539 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11541 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 11540 } | 11542 } |
| 11541 | 11543 |
| 11542 #ifdef DEBUG | 11544 #ifdef DEBUG |
| 11543 graph_->Verify(false); // No full verify. | 11545 graph_->Verify(false); // No full verify. |
| 11544 #endif | 11546 #endif |
| 11545 } | 11547 } |
| 11546 | 11548 |
| 11547 } } // namespace v8::internal | 11549 } } // namespace v8::internal |
| OLD | NEW |