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

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

Issue 10829036: Change the stack map search to require an exact match. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 | « no previous file | 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 #ifndef VM_CODE_DESCRIPTORS_H_ 5 #ifndef VM_CODE_DESCRIPTORS_H_
6 #define VM_CODE_DESCRIPTORS_H_ 6 #define VM_CODE_DESCRIPTORS_H_
7 7
8 #include "vm/globals.h" 8 #include "vm/globals.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 private: 56 private:
57 GrowableArray<struct PcDesc> list_; 57 GrowableArray<struct PcDesc> list_;
58 DISALLOW_COPY_AND_ASSIGN(DescriptorList); 58 DISALLOW_COPY_AND_ASSIGN(DescriptorList);
59 }; 59 };
60 60
61 61
62 class StackmapBuilder : public ZoneAllocated { 62 class StackmapBuilder : public ZoneAllocated {
63 public: 63 public:
64 StackmapBuilder() : 64 StackmapBuilder() :
65 builder_(new BitmapBuilder()), 65 builder_(new BitmapBuilder()),
66 code_(Code::ZoneHandle()),
67 stack_map_(Stackmap::ZoneHandle()), 66 stack_map_(Stackmap::ZoneHandle()),
68 list_(GrowableObjectArray::ZoneHandle( 67 list_(GrowableObjectArray::ZoneHandle(
69 GrowableObjectArray::New(Heap::kOld))) { } 68 GrowableObjectArray::New(Heap::kOld))) { }
70 ~StackmapBuilder() { } 69 ~StackmapBuilder() { }
71 70
72 // Gets state of stack slot (object or regular value). 71 // Gets state of stack slot (object or regular value).
73 bool IsSlotObject(intptr_t stack_slot) const { 72 bool IsSlotObject(intptr_t stack_slot) const {
74 ASSERT(builder_ != NULL); 73 ASSERT(builder_ != NULL);
75 return builder_->Get(stack_slot); 74 return builder_->Get(stack_slot);
76 } 75 }
(...skipping 22 matching lines...) Expand all
99 98
100 bool Verify(); 99 bool Verify();
101 100
102 RawArray* FinalizeStackmaps(const Code& code); 101 RawArray* FinalizeStackmaps(const Code& code);
103 102
104 private: 103 private:
105 intptr_t Length() const { return list_.Length(); } 104 intptr_t Length() const { return list_.Length(); }
106 RawStackmap* Map(int index) const; 105 RawStackmap* Map(int index) const;
107 106
108 BitmapBuilder* builder_; 107 BitmapBuilder* builder_;
109 Code& code_;
110 Stackmap& stack_map_; 108 Stackmap& stack_map_;
111 GrowableObjectArray& list_; 109 GrowableObjectArray& list_;
112 DISALLOW_COPY_AND_ASSIGN(StackmapBuilder); 110 DISALLOW_COPY_AND_ASSIGN(StackmapBuilder);
113 }; 111 };
114 112
115 113
116 class ExceptionHandlerList : public ZoneAllocated { 114 class ExceptionHandlerList : public ZoneAllocated {
117 public: 115 public:
118 struct HandlerDesc { 116 struct HandlerDesc {
119 intptr_t try_index; // Try block index handled by the handler. 117 intptr_t try_index; // Try block index handled by the handler.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 152 }
155 153
156 private: 154 private:
157 GrowableArray<struct HandlerDesc> list_; 155 GrowableArray<struct HandlerDesc> list_;
158 DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerList); 156 DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerList);
159 }; 157 };
160 158
161 } // namespace dart 159 } // namespace dart
162 160
163 #endif // VM_CODE_DESCRIPTORS_H_ 161 #endif // VM_CODE_DESCRIPTORS_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/code_descriptors_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698