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

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

Issue 564143003: Revert revision 40228 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/raw_object.h ('k') | no next file » | 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 149 }
150 case kStackmapCid: { 150 case kStackmapCid: {
151 const RawStackmap* map = reinterpret_cast<const RawStackmap*>(this); 151 const RawStackmap* map = reinterpret_cast<const RawStackmap*>(this);
152 intptr_t length = map->ptr()->length_; 152 intptr_t length = map->ptr()->length_;
153 instance_size = Stackmap::InstanceSize(length); 153 instance_size = Stackmap::InstanceSize(length);
154 break; 154 break;
155 } 155 }
156 case kLocalVarDescriptorsCid: { 156 case kLocalVarDescriptorsCid: {
157 const RawLocalVarDescriptors* raw_descriptors = 157 const RawLocalVarDescriptors* raw_descriptors =
158 reinterpret_cast<const RawLocalVarDescriptors*>(this); 158 reinterpret_cast<const RawLocalVarDescriptors*>(this);
159 intptr_t num_descriptors = raw_descriptors->ptr()->num_entries_; 159 intptr_t num_descriptors = raw_descriptors->ptr()->length_;
160 instance_size = LocalVarDescriptors::InstanceSize(num_descriptors); 160 instance_size = LocalVarDescriptors::InstanceSize(num_descriptors);
161 break; 161 break;
162 } 162 }
163 case kExceptionHandlersCid: { 163 case kExceptionHandlersCid: {
164 const RawExceptionHandlers* raw_handlers = 164 const RawExceptionHandlers* raw_handlers =
165 reinterpret_cast<const RawExceptionHandlers*>(this); 165 reinterpret_cast<const RawExceptionHandlers*>(this);
166 intptr_t num_handlers = raw_handlers->ptr()->length_; 166 intptr_t num_handlers = raw_handlers->ptr()->length_;
167 instance_size = ExceptionHandlers::InstanceSize(num_handlers); 167 instance_size = ExceptionHandlers::InstanceSize(num_handlers);
168 break; 168 break;
169 } 169 }
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 515
516 516
517 intptr_t RawStackmap::VisitStackmapPointers(RawStackmap* raw_obj, 517 intptr_t RawStackmap::VisitStackmapPointers(RawStackmap* raw_obj,
518 ObjectPointerVisitor* visitor) { 518 ObjectPointerVisitor* visitor) {
519 return Stackmap::InstanceSize(raw_obj->ptr()->length_); 519 return Stackmap::InstanceSize(raw_obj->ptr()->length_);
520 } 520 }
521 521
522 522
523 intptr_t RawLocalVarDescriptors::VisitLocalVarDescriptorsPointers( 523 intptr_t RawLocalVarDescriptors::VisitLocalVarDescriptorsPointers(
524 RawLocalVarDescriptors* raw_obj, ObjectPointerVisitor* visitor) { 524 RawLocalVarDescriptors* raw_obj, ObjectPointerVisitor* visitor) {
525 intptr_t num_entries = raw_obj->ptr()->num_entries_; 525 RawLocalVarDescriptors* obj = raw_obj->ptr();
526 visitor->VisitPointers(raw_obj->from(), raw_obj->to(num_entries)); 526 intptr_t len = obj->length_;
527 return LocalVarDescriptors::InstanceSize(num_entries); 527 visitor->VisitPointer(reinterpret_cast<RawObject**>(&obj->names_));
528 return LocalVarDescriptors::InstanceSize(len);
528 } 529 }
529 530
530 531
531 intptr_t RawExceptionHandlers::VisitExceptionHandlersPointers( 532 intptr_t RawExceptionHandlers::VisitExceptionHandlersPointers(
532 RawExceptionHandlers* raw_obj, ObjectPointerVisitor* visitor) { 533 RawExceptionHandlers* raw_obj, ObjectPointerVisitor* visitor) {
533 RawExceptionHandlers* obj = raw_obj->ptr(); 534 RawExceptionHandlers* obj = raw_obj->ptr();
534 intptr_t len = obj->length_; 535 intptr_t len = obj->length_;
535 visitor->VisitPointer( 536 visitor->VisitPointer(
536 reinterpret_cast<RawObject**>(&obj->handled_types_data_)); 537 reinterpret_cast<RawObject**>(&obj->handled_types_data_));
537 return ExceptionHandlers::InstanceSize(len); 538 return ExceptionHandlers::InstanceSize(len);
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 intptr_t RawUserTag::VisitUserTagPointers( 884 intptr_t RawUserTag::VisitUserTagPointers(
884 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { 885 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) {
885 // Make sure that we got here with the tagged pointer as this. 886 // Make sure that we got here with the tagged pointer as this.
886 ASSERT(raw_obj->IsHeapObject()); 887 ASSERT(raw_obj->IsHeapObject());
887 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 888 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
888 return UserTag::InstanceSize(); 889 return UserTag::InstanceSize();
889 } 890 }
890 891
891 892
892 } // namespace dart 893 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698