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

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

Issue 868103002: VM: Use PC offset instead of absolute PC in exception handler info. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 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/object.h » ('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/ast.h" 8 #include "vm/ast.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 return Object::empty_exception_handlers().raw(); 169 return Object::empty_exception_handlers().raw();
170 } 170 }
171 const ExceptionHandlers& handlers = 171 const ExceptionHandlers& handlers =
172 ExceptionHandlers::Handle(ExceptionHandlers::New(num_handlers)); 172 ExceptionHandlers::Handle(ExceptionHandlers::New(num_handlers));
173 for (intptr_t i = 0; i < num_handlers; i++) { 173 for (intptr_t i = 0; i < num_handlers; i++) {
174 // Assert that every element in the array has been initialized. 174 // Assert that every element in the array has been initialized.
175 ASSERT(list_[i].handler_types != NULL); 175 ASSERT(list_[i].handler_types != NULL);
176 bool has_catch_all = ContainsDynamic(*list_[i].handler_types); 176 bool has_catch_all = ContainsDynamic(*list_[i].handler_types);
177 handlers.SetHandlerInfo(i, 177 handlers.SetHandlerInfo(i,
178 list_[i].outer_try_index, 178 list_[i].outer_try_index,
179 (entry_point + list_[i].pc_offset), 179 list_[i].pc_offset,
180 list_[i].needs_stacktrace, 180 list_[i].needs_stacktrace,
181 has_catch_all); 181 has_catch_all);
182 handlers.SetHandledTypes(i, *list_[i].handler_types); 182 handlers.SetHandledTypes(i, *list_[i].handler_types);
183 } 183 }
184 return handlers.raw(); 184 return handlers.raw();
185 } 185 }
186 186
187 private: 187 private:
188 GrowableArray<struct HandlerDesc> list_; 188 GrowableArray<struct HandlerDesc> list_;
189 DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerList); 189 DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerList);
190 }; 190 };
191 191
192 } // namespace dart 192 } // namespace dart
193 193
194 #endif // VM_CODE_DESCRIPTORS_H_ 194 #endif // VM_CODE_DESCRIPTORS_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698