OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 8311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8322 void HOptimizedGraphBuilder::BuildEmitDeepCopy( | 8322 void HOptimizedGraphBuilder::BuildEmitDeepCopy( |
8323 Handle<JSObject> boilerplate_object, | 8323 Handle<JSObject> boilerplate_object, |
8324 Handle<JSObject> original_boilerplate_object, | 8324 Handle<JSObject> original_boilerplate_object, |
8325 Handle<Object> allocation_site_object, | 8325 Handle<Object> allocation_site_object, |
8326 HInstruction* target, | 8326 HInstruction* target, |
8327 int* offset, | 8327 int* offset, |
8328 HInstruction* data_target, | 8328 HInstruction* data_target, |
8329 int* data_offset, | 8329 int* data_offset, |
8330 AllocationSiteMode mode) { | 8330 AllocationSiteMode mode) { |
8331 bool create_allocation_site_info = mode == TRACK_ALLOCATION_SITE && | 8331 bool create_allocation_site_info = mode == TRACK_ALLOCATION_SITE && |
8332 boilerplate_object->map()->CanTrackAllocationSite(); | 8332 AllocationSite::CanTrack(boilerplate_object->map()->instance_type()); |
8333 | 8333 |
8334 // If using allocation sites, then the payload on the site should already | 8334 // If using allocation sites, then the payload on the site should already |
8335 // be filled in as a valid (boilerplate) array. | 8335 // be filled in as a valid (boilerplate) array. |
8336 ASSERT(!create_allocation_site_info || | 8336 ASSERT(!create_allocation_site_info || |
8337 AllocationSite::cast(*allocation_site_object)->IsLiteralSite()); | 8337 AllocationSite::cast(*allocation_site_object)->IsLiteralSite()); |
8338 | 8338 |
8339 HInstruction* allocation_site = NULL; | 8339 HInstruction* allocation_site = NULL; |
8340 | 8340 |
8341 if (create_allocation_site_info) { | 8341 if (create_allocation_site_info) { |
8342 allocation_site = Add<HConstant>(allocation_site_object); | 8342 allocation_site = Add<HConstant>(allocation_site_object); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8378 // Copy in-object properties. | 8378 // Copy in-object properties. |
8379 if (boilerplate_object->map()->NumberOfFields() != 0) { | 8379 if (boilerplate_object->map()->NumberOfFields() != 0) { |
8380 HValue* object_properties = | 8380 HValue* object_properties = |
8381 Add<HInnerAllocatedObject>(target, object_offset); | 8381 Add<HInnerAllocatedObject>(target, object_offset); |
8382 BuildEmitInObjectProperties(boilerplate_object, original_boilerplate_object, | 8382 BuildEmitInObjectProperties(boilerplate_object, original_boilerplate_object, |
8383 object_properties, target, offset, data_target, data_offset); | 8383 object_properties, target, offset, data_target, data_offset); |
8384 } | 8384 } |
8385 | 8385 |
8386 // Create allocation site info. | 8386 // Create allocation site info. |
8387 if (mode == TRACK_ALLOCATION_SITE && | 8387 if (mode == TRACK_ALLOCATION_SITE && |
8388 boilerplate_object->map()->CanTrackAllocationSite()) { | 8388 AllocationSite::CanTrack(boilerplate_object->map()->instance_type())) { |
8389 elements_offset += AllocationMemento::kSize; | 8389 elements_offset += AllocationMemento::kSize; |
8390 *offset += AllocationMemento::kSize; | 8390 *offset += AllocationMemento::kSize; |
8391 BuildCreateAllocationMemento(target, JSArray::kSize, allocation_site); | 8391 BuildCreateAllocationMemento(target, JSArray::kSize, allocation_site); |
8392 } | 8392 } |
8393 } | 8393 } |
8394 | 8394 |
8395 | 8395 |
8396 HValue* HOptimizedGraphBuilder::BuildEmitObjectHeader( | 8396 HValue* HOptimizedGraphBuilder::BuildEmitObjectHeader( |
8397 Handle<JSObject> boilerplate_object, | 8397 Handle<JSObject> boilerplate_object, |
8398 HInstruction* target, | 8398 HInstruction* target, |
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9885 if (ShouldProduceTraceOutput()) { | 9885 if (ShouldProduceTraceOutput()) { |
9886 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 9886 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
9887 } | 9887 } |
9888 | 9888 |
9889 #ifdef DEBUG | 9889 #ifdef DEBUG |
9890 graph_->Verify(false); // No full verify. | 9890 graph_->Verify(false); // No full verify. |
9891 #endif | 9891 #endif |
9892 } | 9892 } |
9893 | 9893 |
9894 } } // namespace v8::internal | 9894 } } // namespace v8::internal |
OLD | NEW |