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

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

Issue 2572563004: Improve the casing of Stackmap and Stacktrace. (Closed)
Patch Set: Build fixes Created 4 years 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/raw_object_snapshot.cc » ('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/become.h" 7 #include "vm/become.h"
8 #include "vm/class_table.h" 8 #include "vm/class_table.h"
9 #include "vm/dart.h" 9 #include "vm/dart.h"
10 #include "vm/freelist.h" 10 #include "vm/freelist.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 instance_size = PcDescriptors::InstanceSize(length); 138 instance_size = PcDescriptors::InstanceSize(length);
139 break; 139 break;
140 } 140 }
141 case kCodeSourceMapCid: { 141 case kCodeSourceMapCid: {
142 const RawCodeSourceMap* raw_code_source_map = 142 const RawCodeSourceMap* raw_code_source_map =
143 reinterpret_cast<const RawCodeSourceMap*>(this); 143 reinterpret_cast<const RawCodeSourceMap*>(this);
144 intptr_t length = raw_code_source_map->ptr()->length_; 144 intptr_t length = raw_code_source_map->ptr()->length_;
145 instance_size = CodeSourceMap::InstanceSize(length); 145 instance_size = CodeSourceMap::InstanceSize(length);
146 break; 146 break;
147 } 147 }
148 case kStackmapCid: { 148 case kStackMapCid: {
149 const RawStackmap* map = reinterpret_cast<const RawStackmap*>(this); 149 const RawStackMap* map = reinterpret_cast<const RawStackMap*>(this);
150 intptr_t length = map->ptr()->length_; 150 intptr_t length = map->ptr()->length_;
151 instance_size = Stackmap::InstanceSize(length); 151 instance_size = StackMap::InstanceSize(length);
152 break; 152 break;
153 } 153 }
154 case kLocalVarDescriptorsCid: { 154 case kLocalVarDescriptorsCid: {
155 const RawLocalVarDescriptors* raw_descriptors = 155 const RawLocalVarDescriptors* raw_descriptors =
156 reinterpret_cast<const RawLocalVarDescriptors*>(this); 156 reinterpret_cast<const RawLocalVarDescriptors*>(this);
157 intptr_t num_descriptors = raw_descriptors->ptr()->num_entries_; 157 intptr_t num_descriptors = raw_descriptors->ptr()->num_entries_;
158 instance_size = LocalVarDescriptors::InstanceSize(num_descriptors); 158 instance_size = LocalVarDescriptors::InstanceSize(num_descriptors);
159 break; 159 break;
160 } 160 }
161 case kExceptionHandlersCid: { 161 case kExceptionHandlersCid: {
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 } 600 }
601 601
602 602
603 intptr_t RawCodeSourceMap::VisitCodeSourceMapPointers( 603 intptr_t RawCodeSourceMap::VisitCodeSourceMapPointers(
604 RawCodeSourceMap* raw_obj, 604 RawCodeSourceMap* raw_obj,
605 ObjectPointerVisitor* visitor) { 605 ObjectPointerVisitor* visitor) {
606 return CodeSourceMap::InstanceSize(raw_obj->ptr()->length_); 606 return CodeSourceMap::InstanceSize(raw_obj->ptr()->length_);
607 } 607 }
608 608
609 609
610 intptr_t RawStackmap::VisitStackmapPointers(RawStackmap* raw_obj, 610 intptr_t RawStackMap::VisitStackMapPointers(RawStackMap* raw_obj,
611 ObjectPointerVisitor* visitor) { 611 ObjectPointerVisitor* visitor) {
612 return Stackmap::InstanceSize(raw_obj->ptr()->length_); 612 return StackMap::InstanceSize(raw_obj->ptr()->length_);
613 } 613 }
614 614
615 615
616 intptr_t RawLocalVarDescriptors::VisitLocalVarDescriptorsPointers( 616 intptr_t RawLocalVarDescriptors::VisitLocalVarDescriptorsPointers(
617 RawLocalVarDescriptors* raw_obj, 617 RawLocalVarDescriptors* raw_obj,
618 ObjectPointerVisitor* visitor) { 618 ObjectPointerVisitor* visitor) {
619 intptr_t num_entries = raw_obj->ptr()->num_entries_; 619 intptr_t num_entries = raw_obj->ptr()->num_entries_;
620 visitor->VisitPointers(raw_obj->from(), raw_obj->to(num_entries)); 620 visitor->VisitPointers(raw_obj->from(), raw_obj->to(num_entries));
621 return LocalVarDescriptors::InstanceSize(num_entries); 621 return LocalVarDescriptors::InstanceSize(num_entries);
622 } 622 }
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 948
949 949
950 intptr_t RawSendPort::VisitSendPortPointers(RawSendPort* raw_obj, 950 intptr_t RawSendPort::VisitSendPortPointers(RawSendPort* raw_obj,
951 ObjectPointerVisitor* visitor) { 951 ObjectPointerVisitor* visitor) {
952 // Make sure that we got here with the tagged pointer as this. 952 // Make sure that we got here with the tagged pointer as this.
953 ASSERT(raw_obj->IsHeapObject()); 953 ASSERT(raw_obj->IsHeapObject());
954 return SendPort::InstanceSize(); 954 return SendPort::InstanceSize();
955 } 955 }
956 956
957 957
958 intptr_t RawStacktrace::VisitStacktracePointers(RawStacktrace* raw_obj, 958 intptr_t RawStackTrace::VisitStackTracePointers(RawStackTrace* raw_obj,
959 ObjectPointerVisitor* visitor) { 959 ObjectPointerVisitor* visitor) {
960 // Make sure that we got here with the tagged pointer as this. 960 // Make sure that we got here with the tagged pointer as this.
961 ASSERT(raw_obj->IsHeapObject()); 961 ASSERT(raw_obj->IsHeapObject());
962 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 962 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
963 return Stacktrace::InstanceSize(); 963 return StackTrace::InstanceSize();
964 } 964 }
965 965
966 966
967 intptr_t RawRegExp::VisitRegExpPointers(RawRegExp* raw_obj, 967 intptr_t RawRegExp::VisitRegExpPointers(RawRegExp* raw_obj,
968 ObjectPointerVisitor* visitor) { 968 ObjectPointerVisitor* visitor) {
969 // Make sure that we got here with the tagged pointer as this. 969 // Make sure that we got here with the tagged pointer as this.
970 ASSERT(raw_obj->IsHeapObject()); 970 ASSERT(raw_obj->IsHeapObject());
971 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 971 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
972 return RegExp::InstanceSize(); 972 return RegExp::InstanceSize();
973 } 973 }
(...skipping 22 matching lines...) Expand all
996 intptr_t RawUserTag::VisitUserTagPointers(RawUserTag* raw_obj, 996 intptr_t RawUserTag::VisitUserTagPointers(RawUserTag* raw_obj,
997 ObjectPointerVisitor* visitor) { 997 ObjectPointerVisitor* visitor) {
998 // Make sure that we got here with the tagged pointer as this. 998 // Make sure that we got here with the tagged pointer as this.
999 ASSERT(raw_obj->IsHeapObject()); 999 ASSERT(raw_obj->IsHeapObject());
1000 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 1000 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
1001 return UserTag::InstanceSize(); 1001 return UserTag::InstanceSize();
1002 } 1002 }
1003 1003
1004 1004
1005 } // namespace dart 1005 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698