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

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

Issue 1129113002: Delta encode pc descriptors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
« runtime/vm/object_test.cc ('K') | « runtime/vm/object_test.cc ('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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 case kTypeArgumentsCid: { 135 case kTypeArgumentsCid: {
136 const RawTypeArguments* raw_array = 136 const RawTypeArguments* raw_array =
137 reinterpret_cast<const RawTypeArguments*>(this); 137 reinterpret_cast<const RawTypeArguments*>(this);
138 intptr_t array_length = Smi::Value(raw_array->ptr()->length_); 138 intptr_t array_length = Smi::Value(raw_array->ptr()->length_);
139 instance_size = TypeArguments::InstanceSize(array_length); 139 instance_size = TypeArguments::InstanceSize(array_length);
140 break; 140 break;
141 } 141 }
142 case kPcDescriptorsCid: { 142 case kPcDescriptorsCid: {
143 const RawPcDescriptors* raw_descriptors = 143 const RawPcDescriptors* raw_descriptors =
144 reinterpret_cast<const RawPcDescriptors*>(this); 144 reinterpret_cast<const RawPcDescriptors*>(this);
145 const intptr_t num_descriptors = raw_descriptors->ptr()->length_; 145 intptr_t length = raw_descriptors->ptr()->length_;
146 const intptr_t rec_size_in_bytes = 146 instance_size = PcDescriptors::InstanceSize(length);
147 raw_descriptors->ptr()->record_size_in_bytes_;
148 instance_size = PcDescriptors::InstanceSize(num_descriptors,
149 rec_size_in_bytes);
150 break; 147 break;
151 } 148 }
152 case kStackmapCid: { 149 case kStackmapCid: {
153 const RawStackmap* map = reinterpret_cast<const RawStackmap*>(this); 150 const RawStackmap* map = reinterpret_cast<const RawStackmap*>(this);
154 intptr_t length = map->ptr()->length_; 151 intptr_t length = map->ptr()->length_;
155 instance_size = Stackmap::InstanceSize(length); 152 instance_size = Stackmap::InstanceSize(length);
156 break; 153 break;
157 } 154 }
158 case kLocalVarDescriptorsCid: { 155 case kLocalVarDescriptorsCid: {
159 const RawLocalVarDescriptors* raw_descriptors = 156 const RawLocalVarDescriptors* raw_descriptors =
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 553
557 554
558 intptr_t RawPcDescriptors::RecordSize(bool has_try_index) { 555 intptr_t RawPcDescriptors::RecordSize(bool has_try_index) {
559 return has_try_index ? RawPcDescriptors::kFullRecSize 556 return has_try_index ? RawPcDescriptors::kFullRecSize
560 : RawPcDescriptors::kCompressedRecSize; 557 : RawPcDescriptors::kCompressedRecSize;
561 } 558 }
562 559
563 560
564 intptr_t RawPcDescriptors::VisitPcDescriptorsPointers( 561 intptr_t RawPcDescriptors::VisitPcDescriptorsPointers(
565 RawPcDescriptors* raw_obj, ObjectPointerVisitor* visitor) { 562 RawPcDescriptors* raw_obj, ObjectPointerVisitor* visitor) {
566 return PcDescriptors::InstanceSize(raw_obj->ptr()->length_, 563 return PcDescriptors::InstanceSize(raw_obj->ptr()->length_);
567 raw_obj->ptr()->record_size_in_bytes_);
568 } 564 }
569 565
570 566
571 intptr_t RawStackmap::VisitStackmapPointers(RawStackmap* raw_obj, 567 intptr_t RawStackmap::VisitStackmapPointers(RawStackmap* raw_obj,
572 ObjectPointerVisitor* visitor) { 568 ObjectPointerVisitor* visitor) {
573 return Stackmap::InstanceSize(raw_obj->ptr()->length_); 569 return Stackmap::InstanceSize(raw_obj->ptr()->length_);
574 } 570 }
575 571
576 572
577 intptr_t RawLocalVarDescriptors::VisitLocalVarDescriptorsPointers( 573 intptr_t RawLocalVarDescriptors::VisitLocalVarDescriptorsPointers(
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 intptr_t RawUserTag::VisitUserTagPointers( 923 intptr_t RawUserTag::VisitUserTagPointers(
928 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { 924 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) {
929 // Make sure that we got here with the tagged pointer as this. 925 // Make sure that we got here with the tagged pointer as this.
930 ASSERT(raw_obj->IsHeapObject()); 926 ASSERT(raw_obj->IsHeapObject());
931 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 927 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
932 return UserTag::InstanceSize(); 928 return UserTag::InstanceSize();
933 } 929 }
934 930
935 931
936 } // namespace dart 932 } // namespace dart
OLDNEW
« runtime/vm/object_test.cc ('K') | « runtime/vm/object_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698