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

Unified Diff: runtime/vm/code_descriptors.h

Issue 23445012: Mark exception handlers if they have a stacktrace specified. Do not build a stacktrace if the handl… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/code_descriptors.h
===================================================================
--- runtime/vm/code_descriptors.h (revision 26792)
+++ runtime/vm/code_descriptors.h (working copy)
@@ -101,6 +101,7 @@
intptr_t outer_try_index; // Try block in which this try block is nested.
intptr_t pc_offset; // Handler PC offset value.
const Array* handler_types; // Catch clause guards.
+ bool needs_stacktrace;
siva 2013/08/28 17:00:09 // Handler catch block declares stacktrace.
};
ExceptionHandlerList() : list_() {}
@@ -114,13 +115,15 @@
data.outer_try_index = -1;
data.pc_offset = -1;
data.handler_types = NULL;
+ data.needs_stacktrace = false;
list_.Add(data);
}
void AddHandler(intptr_t try_index,
intptr_t outer_try_index,
intptr_t pc_offset,
- const Array& handler_types) {
+ const Array& handler_types,
+ bool needs_stacktrace) {
ASSERT(try_index >= 0);
while (Length() <= try_index) {
AddPlaceHolder();
@@ -129,6 +132,7 @@
list_[try_index].pc_offset = pc_offset;
ASSERT(handler_types.IsZoneHandle());
list_[try_index].handler_types = &handler_types;
+ list_[try_index].needs_stacktrace = needs_stacktrace;
}
RawExceptionHandlers* FinalizeExceptionHandlers(uword entry_point) {
@@ -140,7 +144,8 @@
ASSERT(list_[i].handler_types != NULL);
handlers.SetHandlerInfo(i,
list_[i].outer_try_index,
- (entry_point + list_[i].pc_offset));
+ (entry_point + list_[i].pc_offset),
+ list_[i].needs_stacktrace);
handlers.SetHandledTypes(i, *list_[i].handler_types);
}
return handlers.raw();
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/exceptions.cc » ('j') | runtime/vm/exceptions.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698