| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/crankshaft/lithium.h" | 5 #include "src/crankshaft/lithium.h" |
| 6 | 6 |
| 7 #include "src/scopes.h" | 7 #include "src/scopes.h" |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_IA32 | 9 #if V8_TARGET_ARCH_IA32 |
| 10 #include "src/crankshaft/ia32/lithium-ia32.h" // NOLINT | 10 #include "src/crankshaft/ia32/lithium-ia32.h" // NOLINT |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 Handle<Map> map(Map::cast(it.rinfo()->target_object())); | 434 Handle<Map> map(Map::cast(it.rinfo()->target_object())); |
| 435 maps.Add(map, zone()); | 435 maps.Add(map, zone()); |
| 436 } else { | 436 } else { |
| 437 Handle<HeapObject> object( | 437 Handle<HeapObject> object( |
| 438 HeapObject::cast(it.rinfo()->target_object())); | 438 HeapObject::cast(it.rinfo()->target_object())); |
| 439 objects.Add(object, zone()); | 439 objects.Add(object, zone()); |
| 440 } | 440 } |
| 441 } | 441 } |
| 442 } | 442 } |
| 443 for (int i = 0; i < maps.length(); i++) { | 443 for (int i = 0; i < maps.length(); i++) { |
| 444 if (maps.at(i)->dependent_code()->number_of_entries( | 444 if (maps.at(i)->dependent_code()->IsEmpty(DependentCode::kWeakCodeGroup)) { |
| 445 DependentCode::kWeakCodeGroup) == 0) { | |
| 446 isolate()->heap()->AddRetainedMap(maps.at(i)); | 445 isolate()->heap()->AddRetainedMap(maps.at(i)); |
| 447 } | 446 } |
| 448 Map::AddDependentCode(maps.at(i), DependentCode::kWeakCodeGroup, code); | 447 Map::AddDependentCode(maps.at(i), DependentCode::kWeakCodeGroup, code); |
| 449 } | 448 } |
| 450 for (int i = 0; i < objects.length(); i++) { | 449 for (int i = 0; i < objects.length(); i++) { |
| 451 AddWeakObjectToCodeDependency(isolate(), objects.at(i), code); | 450 AddWeakObjectToCodeDependency(isolate(), objects.at(i), code); |
| 452 } | 451 } |
| 453 code->set_can_have_weak_objects(true); | 452 code->set_can_have_weak_objects(true); |
| 454 } | 453 } |
| 455 | 454 |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 | 704 |
| 706 LPhase::~LPhase() { | 705 LPhase::~LPhase() { |
| 707 if (ShouldProduceTraceOutput()) { | 706 if (ShouldProduceTraceOutput()) { |
| 708 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 707 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
| 709 } | 708 } |
| 710 } | 709 } |
| 711 | 710 |
| 712 | 711 |
| 713 } // namespace internal | 712 } // namespace internal |
| 714 } // namespace v8 | 713 } // namespace v8 |
| OLD | NEW |