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 #include "src/serialize.h" | 10 #include "src/serialize.h" |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 if (maps.at(i)->dependent_code()->number_of_entries( | 451 if (maps.at(i)->dependent_code()->number_of_entries( |
452 DependentCode::kWeakCodeGroup) == 0) { | 452 DependentCode::kWeakCodeGroup) == 0) { |
453 isolate()->heap()->AddRetainedMap(maps.at(i)); | 453 isolate()->heap()->AddRetainedMap(maps.at(i)); |
454 } | 454 } |
455 Map::AddDependentCode(maps.at(i), DependentCode::kWeakCodeGroup, code); | 455 Map::AddDependentCode(maps.at(i), DependentCode::kWeakCodeGroup, code); |
456 } | 456 } |
457 for (int i = 0; i < objects.length(); i++) { | 457 for (int i = 0; i < objects.length(); i++) { |
458 AddWeakObjectToCodeDependency(isolate(), objects.at(i), code); | 458 AddWeakObjectToCodeDependency(isolate(), objects.at(i), code); |
459 } | 459 } |
460 if (FLAG_enable_ool_constant_pool) { | 460 if (FLAG_enable_ool_constant_pool) { |
461 code->constant_pool()->set_weak_object_state( | 461 ConstantPoolArray* constant_pool = |
| 462 reinterpret_cast<ConstantPoolArray*>(code->constant_pool()); |
| 463 constant_pool->set_weak_object_state( |
462 ConstantPoolArray::WEAK_OBJECTS_IN_OPTIMIZED_CODE); | 464 ConstantPoolArray::WEAK_OBJECTS_IN_OPTIMIZED_CODE); |
463 } | 465 } |
464 code->set_can_have_weak_objects(true); | 466 code->set_can_have_weak_objects(true); |
465 } | 467 } |
466 | 468 |
467 | 469 |
468 void LChunk::CommitDependencies(Handle<Code> code) const { | 470 void LChunk::CommitDependencies(Handle<Code> code) const { |
469 if (!code->is_optimized_code()) return; | 471 if (!code->is_optimized_code()) return; |
470 HandleScope scope(isolate()); | 472 HandleScope scope(isolate()); |
471 | 473 |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 | 723 |
722 | 724 |
723 LPhase::~LPhase() { | 725 LPhase::~LPhase() { |
724 if (ShouldProduceTraceOutput()) { | 726 if (ShouldProduceTraceOutput()) { |
725 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 727 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
726 } | 728 } |
727 } | 729 } |
728 | 730 |
729 | 731 |
730 } } // namespace v8::internal | 732 } } // namespace v8::internal |
OLD | NEW |