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

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

Issue 10352012: Using SubtypeTestCache object instead of an array, that way we do not need to patch and can communi… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
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/freelist.h" 8 #include "vm/freelist.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 RawContextScope* raw_obj, ObjectPointerVisitor* visitor) { 447 RawContextScope* raw_obj, ObjectPointerVisitor* visitor) {
448 intptr_t num_variables = raw_obj->ptr()->num_variables_; 448 intptr_t num_variables = raw_obj->ptr()->num_variables_;
449 visitor->VisitPointers(raw_obj->from(), raw_obj->to(num_variables)); 449 visitor->VisitPointers(raw_obj->from(), raw_obj->to(num_variables));
450 return ContextScope::InstanceSize(num_variables); 450 return ContextScope::InstanceSize(num_variables);
451 } 451 }
452 452
453 453
454 intptr_t RawICData::VisitICDataPointers(RawICData* raw_obj, 454 intptr_t RawICData::VisitICDataPointers(RawICData* raw_obj,
455 ObjectPointerVisitor* visitor) { 455 ObjectPointerVisitor* visitor) {
456 // Make sure that we got here with the tagged pointer as this. 456 // Make sure that we got here with the tagged pointer as this.
457 ASSERT(raw_obj->IsHeapObject());
458 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 457 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
459 return ICData::InstanceSize(); 458 return ICData::InstanceSize();
460 } 459 }
461 460
462 461
462 intptr_t RawSubtypeTestCache::VisitSubtypeTestCachePointers(
463 RawSubtypeTestCache* raw_obj, ObjectPointerVisitor* visitor) {
464 // Make sure that we got here with the tagged pointer as this.
465 RawSubtypeTestCache* obj = raw_obj->ptr();
466 visitor->VisitPointer(reinterpret_cast<RawObject**>(&obj->cache_));
467 return SubtypeTestCache::InstanceSize();
468 }
469
470
463 intptr_t RawError::VisitErrorPointers(RawError* raw_obj, 471 intptr_t RawError::VisitErrorPointers(RawError* raw_obj,
464 ObjectPointerVisitor* visitor) { 472 ObjectPointerVisitor* visitor) {
465 // Error is an abstract class. 473 // Error is an abstract class.
466 UNREACHABLE(); 474 UNREACHABLE();
467 return 0; 475 return 0;
468 } 476 }
469 477
470 478
471 intptr_t RawApiError::VisitApiErrorPointers( 479 intptr_t RawApiError::VisitApiErrorPointers(
472 RawApiError* raw_obj, ObjectPointerVisitor* visitor) { 480 RawApiError* raw_obj, ObjectPointerVisitor* visitor) {
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 intptr_t RawJSRegExp::VisitJSRegExpPointers(RawJSRegExp* raw_obj, 708 intptr_t RawJSRegExp::VisitJSRegExpPointers(RawJSRegExp* raw_obj,
701 ObjectPointerVisitor* visitor) { 709 ObjectPointerVisitor* visitor) {
702 // Make sure that we got here with the tagged pointer as this. 710 // Make sure that we got here with the tagged pointer as this.
703 ASSERT(raw_obj->IsHeapObject()); 711 ASSERT(raw_obj->IsHeapObject());
704 intptr_t length = Smi::Value(raw_obj->ptr()->data_length_); 712 intptr_t length = Smi::Value(raw_obj->ptr()->data_length_);
705 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 713 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
706 return JSRegExp::InstanceSize(length); 714 return JSRegExp::InstanceSize(length);
707 } 715 }
708 716
709 } // namespace dart 717 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698