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

Unified Diff: runtime/vm/code_descriptors.h

Issue 23691024: If a rethrow is encountered in the catch block, then its handler must be marked that it needs stack… (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
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_descriptors.h
===================================================================
--- runtime/vm/code_descriptors.h (revision 26962)
+++ runtime/vm/code_descriptors.h (working copy)
@@ -5,6 +5,7 @@
#ifndef VM_CODE_DESCRIPTORS_H_
#define VM_CODE_DESCRIPTORS_H_
+#include "vm/ast.h"
#include "vm/code_generator.h"
#include "vm/globals.h"
#include "vm/growable_array.h"
@@ -136,6 +137,17 @@
}
+ // Called by rethrows, to mark their enclosing handlers.
+ void SetNeedsStacktrace(intptr_t try_index) {
+ // Rethrows can be generated outside a try by the compiler.
+ if (try_index == CatchClauseNode::kInvalidTryIndex) {
+ return;
+ }
+ ASSERT((0 <= try_index) && (try_index < Length()));
+ list_[try_index].needs_stacktrace = true;
+ }
+
+
static bool ContainsDynamic(const Array& array) {
for (intptr_t i = 0; i < array.Length(); i++) {
if (array.At(i) == Type::DynamicType()) {
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698