Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 4274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4285 void EffectGraphVisitor::VisitInlinedFinallyNode(InlinedFinallyNode* node) { | 4285 void EffectGraphVisitor::VisitInlinedFinallyNode(InlinedFinallyNode* node) { |
| 4286 InlineBailout("EffectGraphVisitor::VisitInlinedFinallyNode (exception)"); | 4286 InlineBailout("EffectGraphVisitor::VisitInlinedFinallyNode (exception)"); |
| 4287 const intptr_t try_index = owner()->try_index(); | 4287 const intptr_t try_index = owner()->try_index(); |
| 4288 if (try_index >= 0) { | 4288 if (try_index >= 0) { |
| 4289 // We are about to generate code for an inlined finally block. Exceptions | 4289 // We are about to generate code for an inlined finally block. Exceptions |
| 4290 // thrown in this block of code should be treated as though they are | 4290 // thrown in this block of code should be treated as though they are |
| 4291 // thrown not from the current try block but the outer try block if any. | 4291 // thrown not from the current try block but the outer try block if any. |
| 4292 intptr_t outer_try_index = node->try_index(); | 4292 intptr_t outer_try_index = node->try_index(); |
| 4293 owner()->set_try_index(outer_try_index); | 4293 owner()->set_try_index(outer_try_index); |
| 4294 } | 4294 } |
| 4295 BuildRestoreContext(node->context_var()); | 4295 |
| 4296 // Note: do not restore the saved_try_context here since the inlined | |
| 4297 // code is running at he context level of the return or jump instruction | |
| 4298 // that follows the inlined code. See issue 22822. | |
|
regis
2015/03/16 22:26:14
at he -> at the
I find the comment implying a con
| |
| 4296 | 4299 |
| 4297 JoinEntryInstr* finally_entry = | 4300 JoinEntryInstr* finally_entry = |
| 4298 new(I) JoinEntryInstr(owner()->AllocateBlockId(), owner()->try_index()); | 4301 new(I) JoinEntryInstr(owner()->AllocateBlockId(), owner()->try_index()); |
| 4299 EffectGraphVisitor for_finally_block(owner()); | 4302 EffectGraphVisitor for_finally_block(owner()); |
| 4300 node->finally_block()->Visit(&for_finally_block); | 4303 node->finally_block()->Visit(&for_finally_block); |
| 4301 | 4304 |
| 4302 if (try_index >= 0) { | 4305 if (try_index >= 0) { |
| 4303 owner()->set_try_index(try_index); | 4306 owner()->set_try_index(try_index); |
| 4304 } | 4307 } |
| 4305 | 4308 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4363 Report::MessageF(Report::kBailout, | 4366 Report::MessageF(Report::kBailout, |
| 4364 Script::Handle(function.script()), | 4367 Script::Handle(function.script()), |
| 4365 function.token_pos(), | 4368 function.token_pos(), |
| 4366 "FlowGraphBuilder Bailout: %s %s", | 4369 "FlowGraphBuilder Bailout: %s %s", |
| 4367 String::Handle(function.name()).ToCString(), | 4370 String::Handle(function.name()).ToCString(), |
| 4368 reason); | 4371 reason); |
| 4369 UNREACHABLE(); | 4372 UNREACHABLE(); |
| 4370 } | 4373 } |
| 4371 | 4374 |
| 4372 } // namespace dart | 4375 } // namespace dart |
| OLD | NEW |