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

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

Issue 10832410: Give a length field to stack bitmaps. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated review comments. Created 8 years, 4 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/bitmap_test.cc ('k') | runtime/vm/code_descriptors_test.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/code_descriptors.h" 5 #include "vm/code_descriptors.h"
6 6
7 namespace dart { 7 namespace dart {
8 8
9 void DescriptorList::AddDescriptor(PcDescriptors::Kind kind, 9 void DescriptorList::AddDescriptor(PcDescriptors::Kind kind,
10 intptr_t pc_offset, 10 intptr_t pc_offset,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 DeoptId(i), 47 DeoptId(i),
48 TokenPos(i), 48 TokenPos(i),
49 TryIndex(i)); 49 TryIndex(i));
50 } 50 }
51 return descriptors.raw(); 51 return descriptors.raw();
52 } 52 }
53 53
54 54
55 void StackmapTableBuilder::AddEntry(intptr_t pc_offset, 55 void StackmapTableBuilder::AddEntry(intptr_t pc_offset,
56 BitmapBuilder* bitmap) { 56 BitmapBuilder* bitmap) {
57 stack_map_ = Stackmap::New(pc_offset, entry_length_, bitmap); 57 bitmap->SetLength(entry_length_);
58 stack_map_ = Stackmap::New(pc_offset, bitmap);
58 list_.Add(stack_map_); 59 list_.Add(stack_map_);
59 } 60 }
60 61
61 62
62 bool StackmapTableBuilder::Verify() { 63 bool StackmapTableBuilder::Verify() {
63 intptr_t num_entries = Length(); 64 intptr_t num_entries = Length();
64 Stackmap& map1 = Stackmap::Handle(); 65 Stackmap& map1 = Stackmap::Handle();
65 Stackmap& map2 = Stackmap::Handle(); 66 Stackmap& map2 = Stackmap::Handle();
66 for (intptr_t i = 1; i < num_entries; i++) { 67 for (intptr_t i = 1; i < num_entries; i++) {
67 map1 = MapAt(i - 1); 68 map1 = MapAt(i - 1);
(...skipping 23 matching lines...) Expand all
91 } 92 }
92 93
93 94
94 RawStackmap* StackmapTableBuilder::MapAt(int index) const { 95 RawStackmap* StackmapTableBuilder::MapAt(int index) const {
95 Stackmap& map = Stackmap::Handle(); 96 Stackmap& map = Stackmap::Handle();
96 map ^= list_.At(index); 97 map ^= list_.At(index);
97 return map.raw(); 98 return map.raw();
98 } 99 }
99 100
100 } // namespace dart 101 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bitmap_test.cc ('k') | runtime/vm/code_descriptors_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698