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 8289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8300 void HOptimizedGraphBuilder::BuildEmitDeepCopy( | 8300 void HOptimizedGraphBuilder::BuildEmitDeepCopy( |
8301 Handle<JSObject> boilerplate_object, | 8301 Handle<JSObject> boilerplate_object, |
8302 Handle<JSObject> original_boilerplate_object, | 8302 Handle<JSObject> original_boilerplate_object, |
8303 Handle<Object> allocation_site_object, | 8303 Handle<Object> allocation_site_object, |
8304 HInstruction* target, | 8304 HInstruction* target, |
8305 int* offset, | 8305 int* offset, |
8306 HInstruction* data_target, | 8306 HInstruction* data_target, |
8307 int* data_offset, | 8307 int* data_offset, |
8308 AllocationSiteMode mode) { | 8308 AllocationSiteMode mode) { |
8309 bool create_allocation_site_info = mode == TRACK_ALLOCATION_SITE && | 8309 bool create_allocation_site_info = mode == TRACK_ALLOCATION_SITE && |
8310 boilerplate_object->map()->CanTrackAllocationSite(); | 8310 AllocationSite::CanTrack(boilerplate_object->map()->instance_type()); |
8311 | 8311 |
8312 // If using allocation sites, then the payload on the site should already | 8312 // If using allocation sites, then the payload on the site should already |
8313 // be filled in as a valid (boilerplate) array. | 8313 // be filled in as a valid (boilerplate) array. |
8314 ASSERT(!create_allocation_site_info || | 8314 ASSERT(!create_allocation_site_info || |
8315 AllocationSite::cast(*allocation_site_object)->IsLiteralSite()); | 8315 AllocationSite::cast(*allocation_site_object)->IsLiteralSite()); |
8316 | 8316 |
8317 HInstruction* allocation_site = NULL; | 8317 HInstruction* allocation_site = NULL; |
8318 | 8318 |
8319 if (create_allocation_site_info) { | 8319 if (create_allocation_site_info) { |
8320 allocation_site = Add<HConstant>(allocation_site_object); | 8320 allocation_site = Add<HConstant>(allocation_site_object); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8356 // Copy in-object properties. | 8356 // Copy in-object properties. |
8357 if (boilerplate_object->map()->NumberOfFields() != 0) { | 8357 if (boilerplate_object->map()->NumberOfFields() != 0) { |
8358 HValue* object_properties = | 8358 HValue* object_properties = |
8359 Add<HInnerAllocatedObject>(target, object_offset); | 8359 Add<HInnerAllocatedObject>(target, object_offset); |
8360 BuildEmitInObjectProperties(boilerplate_object, original_boilerplate_object, | 8360 BuildEmitInObjectProperties(boilerplate_object, original_boilerplate_object, |
8361 object_properties, target, offset, data_target, data_offset); | 8361 object_properties, target, offset, data_target, data_offset); |
8362 } | 8362 } |
8363 | 8363 |
8364 // Create allocation site info. | 8364 // Create allocation site info. |
8365 if (mode == TRACK_ALLOCATION_SITE && | 8365 if (mode == TRACK_ALLOCATION_SITE && |
8366 boilerplate_object->map()->CanTrackAllocationSite()) { | 8366 AllocationSite::CanTrack(boilerplate_object->map()->instance_type())) { |
8367 elements_offset += AllocationMemento::kSize; | 8367 elements_offset += AllocationMemento::kSize; |
8368 *offset += AllocationMemento::kSize; | 8368 *offset += AllocationMemento::kSize; |
8369 BuildCreateAllocationMemento(target, JSArray::kSize, allocation_site); | 8369 BuildCreateAllocationMemento(target, JSArray::kSize, allocation_site); |
8370 } | 8370 } |
8371 } | 8371 } |
8372 | 8372 |
8373 | 8373 |
8374 HValue* HOptimizedGraphBuilder::BuildEmitObjectHeader( | 8374 HValue* HOptimizedGraphBuilder::BuildEmitObjectHeader( |
8375 Handle<JSObject> boilerplate_object, | 8375 Handle<JSObject> boilerplate_object, |
8376 HInstruction* target, | 8376 HInstruction* target, |
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9863 if (ShouldProduceTraceOutput()) { | 9863 if (ShouldProduceTraceOutput()) { |
9864 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 9864 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
9865 } | 9865 } |
9866 | 9866 |
9867 #ifdef DEBUG | 9867 #ifdef DEBUG |
9868 graph_->Verify(false); // No full verify. | 9868 graph_->Verify(false); // No full verify. |
9869 #endif | 9869 #endif |
9870 } | 9870 } |
9871 | 9871 |
9872 } } // namespace v8::internal | 9872 } } // namespace v8::internal |
OLD | NEW |