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

Side by Side Diff: runtime/vm/raw_object.cc

Issue 1287463003: Refactor skipped code functions interface. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/raw_object.h" 5 #include "vm/raw_object.h"
6 6
7 #include "vm/class_table.h" 7 #include "vm/class_table.h"
8 #include "vm/dart.h" 8 #include "vm/dart.h"
9 #include "vm/freelist.h" 9 #include "vm/freelist.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 if (visitor->visit_function_code() || !CheckUsageCounter(raw_obj)) { 441 if (visitor->visit_function_code() || !CheckUsageCounter(raw_obj)) {
442 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 442 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
443 return Function::InstanceSize(); 443 return Function::InstanceSize();
444 } 444 }
445 visitor->VisitPointers(raw_obj->from(), raw_obj->to_no_code()); 445 visitor->VisitPointers(raw_obj->from(), raw_obj->to_no_code());
446 446
447 if (ShouldVisitCode(raw_obj->ptr()->instructions_->ptr()->code_)) { 447 if (ShouldVisitCode(raw_obj->ptr()->instructions_->ptr()->code_)) {
448 visitor->VisitPointer( 448 visitor->VisitPointer(
449 reinterpret_cast<RawObject**>(&raw_obj->ptr()->instructions_)); 449 reinterpret_cast<RawObject**>(&raw_obj->ptr()->instructions_));
450 } else { 450 } else {
451 visitor->skipped_code_functions()->Add(raw_obj); 451 visitor->add_skipped_code_function(raw_obj);
452 } 452 }
453 453
454 if (ShouldVisitCode(raw_obj->ptr()->unoptimized_code_)) { 454 if (ShouldVisitCode(raw_obj->ptr()->unoptimized_code_)) {
455 visitor->VisitPointer( 455 visitor->VisitPointer(
456 reinterpret_cast<RawObject**>(&raw_obj->ptr()->unoptimized_code_)); 456 reinterpret_cast<RawObject**>(&raw_obj->ptr()->unoptimized_code_));
457 } else { 457 } else {
458 visitor->skipped_code_functions()->Add(raw_obj); 458 visitor->add_skipped_code_function(raw_obj);
459 } 459 }
460 return Function::InstanceSize(); 460 return Function::InstanceSize();
461 } 461 }
462 462
463 463
464 intptr_t RawField::VisitFieldPointers(RawField* raw_obj, 464 intptr_t RawField::VisitFieldPointers(RawField* raw_obj,
465 ObjectPointerVisitor* visitor) { 465 ObjectPointerVisitor* visitor) {
466 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 466 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
467 return Field::InstanceSize(); 467 return Field::InstanceSize();
468 } 468 }
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 intptr_t RawUserTag::VisitUserTagPointers( 937 intptr_t RawUserTag::VisitUserTagPointers(
938 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { 938 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) {
939 // Make sure that we got here with the tagged pointer as this. 939 // Make sure that we got here with the tagged pointer as this.
940 ASSERT(raw_obj->IsHeapObject()); 940 ASSERT(raw_obj->IsHeapObject());
941 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 941 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
942 return UserTag::InstanceSize(); 942 return UserTag::InstanceSize();
943 } 943 }
944 944
945 945
946 } // namespace dart 946 } // namespace dart
OLDNEW
« runtime/vm/gc_marker.cc ('K') | « runtime/vm/raw_object.h ('k') | runtime/vm/visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698