Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Side by Side Diff: src/lithium.cc

Issue 980523004: Retain maps embedded in optimized code for several garbage collections. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Check constructor. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 Handle<Map> map(Map::cast(it.rinfo()->target_object())); 441 Handle<Map> map(Map::cast(it.rinfo()->target_object()));
442 maps.Add(map, zone()); 442 maps.Add(map, zone());
443 } else { 443 } else {
444 Handle<HeapObject> object( 444 Handle<HeapObject> object(
445 HeapObject::cast(it.rinfo()->target_object())); 445 HeapObject::cast(it.rinfo()->target_object()));
446 objects.Add(object, zone()); 446 objects.Add(object, zone());
447 } 447 }
448 } 448 }
449 } 449 }
450 for (int i = 0; i < maps.length(); i++) { 450 for (int i = 0; i < maps.length(); i++) {
451 if (maps.at(i)->dependent_code()->number_of_entries(
452 DependentCode::kWeakCodeGroup) == 0) {
453 isolate()->heap()->AddRetainedMap(maps.at(i));
454 }
451 Map::AddDependentCode(maps.at(i), DependentCode::kWeakCodeGroup, code); 455 Map::AddDependentCode(maps.at(i), DependentCode::kWeakCodeGroup, code);
452 } 456 }
453 for (int i = 0; i < objects.length(); i++) { 457 for (int i = 0; i < objects.length(); i++) {
454 AddWeakObjectToCodeDependency(isolate(), objects.at(i), code); 458 AddWeakObjectToCodeDependency(isolate(), objects.at(i), code);
455 } 459 }
456 if (FLAG_enable_ool_constant_pool) { 460 if (FLAG_enable_ool_constant_pool) {
457 code->constant_pool()->set_weak_object_state( 461 code->constant_pool()->set_weak_object_state(
458 ConstantPoolArray::WEAK_OBJECTS_IN_OPTIMIZED_CODE); 462 ConstantPoolArray::WEAK_OBJECTS_IN_OPTIMIZED_CODE);
459 } 463 }
460 code->set_can_have_weak_objects(true); 464 code->set_can_have_weak_objects(true);
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 721
718 722
719 LPhase::~LPhase() { 723 LPhase::~LPhase() {
720 if (ShouldProduceTraceOutput()) { 724 if (ShouldProduceTraceOutput()) {
721 isolate()->GetHTracer()->TraceLithium(name(), chunk_); 725 isolate()->GetHTracer()->TraceLithium(name(), chunk_);
722 } 726 }
723 } 727 }
724 728
725 729
726 } } // namespace v8::internal 730 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698