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

Side by Side Diff: src/crankshaft/lithium.cc

Issue 1435313002: Refactor dependent code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | 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/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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698