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

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

Issue 958243003: Fix async machinery (issue 22445 and possibly others to be triaged later). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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
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 "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 4074 matching lines...) Expand 10 before | Expand all | Expand 10 after
4085 if (finally_block != NULL) { 4085 if (finally_block != NULL) {
4086 // Create a handler for the code in the catch block, containing the 4086 // Create a handler for the code in the catch block, containing the
4087 // code in the finally block. 4087 // code in the finally block.
4088 owner()->set_try_index(original_handler_index); 4088 owner()->set_try_index(original_handler_index);
4089 EffectGraphVisitor for_finally(owner()); 4089 EffectGraphVisitor for_finally(owner());
4090 for_finally.BuildRestoreContext(catch_block->context_var()); 4090 for_finally.BuildRestoreContext(catch_block->context_var());
4091 4091
4092 finally_block->Visit(&for_finally); 4092 finally_block->Visit(&for_finally);
4093 if (for_finally.is_open()) { 4093 if (for_finally.is_open()) {
4094 // Rethrow the exception. Manually build the graph for rethrow. 4094 // Rethrow the exception. Manually build the graph for rethrow.
4095 // TODO(regis): This is not correct. Issue 22595.
4095 Value* exception = for_finally.Bind( 4096 Value* exception = for_finally.Bind(
4096 for_finally.BuildLoadLocal(catch_block->exception_var())); 4097 for_finally.BuildLoadLocal(catch_block->exception_var()));
4097 for_finally.PushArgument(exception); 4098 for_finally.PushArgument(exception);
4098 Value* stacktrace = for_finally.Bind( 4099 Value* stacktrace = for_finally.Bind(
4099 for_finally.BuildLoadLocal(catch_block->stacktrace_var())); 4100 for_finally.BuildLoadLocal(catch_block->stacktrace_var()));
4100 for_finally.PushArgument(stacktrace); 4101 for_finally.PushArgument(stacktrace);
4101 for_finally.AddInstruction( 4102 for_finally.AddInstruction(
4102 new(I) ReThrowInstr(catch_block->token_pos(), catch_handler_index)); 4103 new(I) ReThrowInstr(catch_block->token_pos(), catch_handler_index));
4103 for_finally.CloseFragment(); 4104 for_finally.CloseFragment();
4104 } 4105 }
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
4357 Report::MessageF(Report::kBailout, 4358 Report::MessageF(Report::kBailout,
4358 Script::Handle(function.script()), 4359 Script::Handle(function.script()),
4359 function.token_pos(), 4360 function.token_pos(),
4360 "FlowGraphBuilder Bailout: %s %s", 4361 "FlowGraphBuilder Bailout: %s %s",
4361 String::Handle(function.name()).ToCString(), 4362 String::Handle(function.name()).ToCString(),
4362 reason); 4363 reason);
4363 UNREACHABLE(); 4364 UNREACHABLE();
4364 } 4365 }
4365 4366
4366 } // namespace dart 4367 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/ast_transformer.cc ('k') | runtime/vm/parser.h » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698