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

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: rm garbage file. Created 5 years, 3 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 | « runtime/vm/raw_object.h ('k') | runtime/vm/visitor.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 (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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 if (visitor->visit_function_code() || !CheckUsageCounter(raw_obj)) { 436 if (visitor->visit_function_code() || !CheckUsageCounter(raw_obj)) {
437 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 437 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
438 return Function::InstanceSize(); 438 return Function::InstanceSize();
439 } 439 }
440 visitor->VisitPointers(raw_obj->from(), raw_obj->to_no_code()); 440 visitor->VisitPointers(raw_obj->from(), raw_obj->to_no_code());
441 441
442 if (ShouldVisitCode(raw_obj->ptr()->instructions_->ptr()->code_)) { 442 if (ShouldVisitCode(raw_obj->ptr()->instructions_->ptr()->code_)) {
443 visitor->VisitPointer( 443 visitor->VisitPointer(
444 reinterpret_cast<RawObject**>(&raw_obj->ptr()->instructions_)); 444 reinterpret_cast<RawObject**>(&raw_obj->ptr()->instructions_));
445 } else { 445 } else {
446 visitor->skipped_code_functions()->Add(raw_obj); 446 visitor->add_skipped_code_function(raw_obj);
447 } 447 }
448 448
449 if (ShouldVisitCode(raw_obj->ptr()->unoptimized_code_)) { 449 if (ShouldVisitCode(raw_obj->ptr()->unoptimized_code_)) {
450 visitor->VisitPointer( 450 visitor->VisitPointer(
451 reinterpret_cast<RawObject**>(&raw_obj->ptr()->unoptimized_code_)); 451 reinterpret_cast<RawObject**>(&raw_obj->ptr()->unoptimized_code_));
452 } else { 452 } else {
453 visitor->skipped_code_functions()->Add(raw_obj); 453 visitor->add_skipped_code_function(raw_obj);
454 } 454 }
455 return Function::InstanceSize(); 455 return Function::InstanceSize();
456 } 456 }
457 457
458 458
459 intptr_t RawField::VisitFieldPointers(RawField* raw_obj, 459 intptr_t RawField::VisitFieldPointers(RawField* raw_obj,
460 ObjectPointerVisitor* visitor) { 460 ObjectPointerVisitor* visitor) {
461 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 461 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
462 return Field::InstanceSize(); 462 return Field::InstanceSize();
463 } 463 }
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 intptr_t RawUserTag::VisitUserTagPointers( 932 intptr_t RawUserTag::VisitUserTagPointers(
933 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { 933 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) {
934 // Make sure that we got here with the tagged pointer as this. 934 // Make sure that we got here with the tagged pointer as this.
935 ASSERT(raw_obj->IsHeapObject()); 935 ASSERT(raw_obj->IsHeapObject());
936 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 936 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
937 return UserTag::InstanceSize(); 937 return UserTag::InstanceSize();
938 } 938 }
939 939
940 940
941 } // namespace dart 941 } // namespace dart
OLDNEW
« no previous file with comments | « 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