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/lithium.h" | 5 #include "src/lithium.h" |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #include "src/scopes.h" | 9 #include "src/scopes.h" |
10 | 10 |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 for (int i = 0; i < maps.length(); i++) { | 449 for (int i = 0; i < maps.length(); i++) { |
450 if (maps.at(i)->dependent_code()->number_of_entries( | 450 if (maps.at(i)->dependent_code()->number_of_entries( |
451 DependentCode::kWeakCodeGroup) == 0) { | 451 DependentCode::kWeakCodeGroup) == 0) { |
452 isolate()->heap()->AddRetainedMap(maps.at(i)); | 452 isolate()->heap()->AddRetainedMap(maps.at(i)); |
453 } | 453 } |
454 Map::AddDependentCode(maps.at(i), DependentCode::kWeakCodeGroup, code); | 454 Map::AddDependentCode(maps.at(i), DependentCode::kWeakCodeGroup, code); |
455 } | 455 } |
456 for (int i = 0; i < objects.length(); i++) { | 456 for (int i = 0; i < objects.length(); i++) { |
457 AddWeakObjectToCodeDependency(isolate(), objects.at(i), code); | 457 AddWeakObjectToCodeDependency(isolate(), objects.at(i), code); |
458 } | 458 } |
459 if (FLAG_enable_ool_constant_pool) { | |
460 code->constant_pool()->set_weak_object_state( | |
461 ConstantPoolArray::WEAK_OBJECTS_IN_OPTIMIZED_CODE); | |
462 } | |
463 code->set_can_have_weak_objects(true); | 459 code->set_can_have_weak_objects(true); |
464 } | 460 } |
465 | 461 |
466 | 462 |
467 void LChunk::CommitDependencies(Handle<Code> code) const { | 463 void LChunk::CommitDependencies(Handle<Code> code) const { |
468 if (!code->is_optimized_code()) return; | 464 if (!code->is_optimized_code()) return; |
469 HandleScope scope(isolate()); | 465 HandleScope scope(isolate()); |
470 | 466 |
471 for (MapSet::const_iterator it = deprecation_dependencies_.begin(), | 467 for (MapSet::const_iterator it = deprecation_dependencies_.begin(), |
472 iend = deprecation_dependencies_.end(); it != iend; ++it) { | 468 iend = deprecation_dependencies_.end(); it != iend; ++it) { |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 | 717 |
722 LPhase::~LPhase() { | 718 LPhase::~LPhase() { |
723 if (ShouldProduceTraceOutput()) { | 719 if (ShouldProduceTraceOutput()) { |
724 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 720 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
725 } | 721 } |
726 } | 722 } |
727 | 723 |
728 | 724 |
729 } // namespace internal | 725 } // namespace internal |
730 } // namespace v8 | 726 } // namespace v8 |
OLD | NEW |