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

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

Issue 11883023: Collect debugging info for catch clauses (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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/code_descriptors.h ('k') | runtime/vm/flow_graph_compiler.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/flow_graph_builder.h" 5 #include "vm/flow_graph_builder.h"
6 6
7 #include "vm/ast_printer.h" 7 #include "vm/ast_printer.h"
8 #include "vm/code_descriptors.h" 8 #include "vm/code_descriptors.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 2824 matching lines...) Expand 10 before | Expand all | Expand 10 after
2835 // that we can set the appropriate handler pc when we generate 2835 // that we can set the appropriate handler pc when we generate
2836 // code for this catch block. 2836 // code for this catch block.
2837 catch_block->set_try_index(try_index); 2837 catch_block->set_try_index(try_index);
2838 EffectGraphVisitor for_catch_block(owner(), temp_index(), loop_depth()); 2838 EffectGraphVisitor for_catch_block(owner(), temp_index(), loop_depth());
2839 catch_block->Visit(&for_catch_block); 2839 catch_block->Visit(&for_catch_block);
2840 TargetEntryInstr* catch_entry = 2840 TargetEntryInstr* catch_entry =
2841 new TargetEntryInstr(owner()->AllocateBlockId(), 2841 new TargetEntryInstr(owner()->AllocateBlockId(),
2842 old_try_index, 2842 old_try_index,
2843 loop_depth()); 2843 loop_depth());
2844 catch_entry->set_catch_try_index(try_index); 2844 catch_entry->set_catch_try_index(try_index);
2845 catch_entry->set_catch_handler_types(catch_block->handler_types());
2845 owner()->AddCatchEntry(catch_entry); 2846 owner()->AddCatchEntry(catch_entry);
2846 ASSERT(!for_catch_block.is_open()); 2847 ASSERT(!for_catch_block.is_open());
2847 AppendFragment(catch_entry, for_catch_block); 2848 AppendFragment(catch_entry, for_catch_block);
2848 if (node->end_catch_label() != NULL) { 2849 if (node->end_catch_label() != NULL) {
2849 JoinEntryInstr* join = node->end_catch_label()->join_for_continue(); 2850 JoinEntryInstr* join = node->end_catch_label()->join_for_continue();
2850 if (join != NULL) { 2851 if (join != NULL) {
2851 join->set_loop_depth(loop_depth()); 2852 join->set_loop_depth(loop_depth());
2852 if (is_open()) Goto(join); 2853 if (is_open()) Goto(join);
2853 exit_ = join; 2854 exit_ = join;
2854 } 2855 }
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
3094 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 3095 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
3095 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 3096 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
3096 OS::SNPrint(chars, len, kFormat, function_name, reason); 3097 OS::SNPrint(chars, len, kFormat, function_name, reason);
3097 const Error& error = Error::Handle( 3098 const Error& error = Error::Handle(
3098 LanguageError::New(String::Handle(String::New(chars)))); 3099 LanguageError::New(String::Handle(String::New(chars))));
3099 Isolate::Current()->long_jump_base()->Jump(1, error); 3100 Isolate::Current()->long_jump_base()->Jump(1, error);
3100 } 3101 }
3101 3102
3102 3103
3103 } // namespace dart 3104 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_descriptors.h ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698