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

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

Issue 467933002: Fix issue 20476: creating multiple LocalVariables with same name (finally_ret_val35), confuses the … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/parser.h » ('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 "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 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 985
986 // <Statement> ::= Return { value: <Expression> 986 // <Statement> ::= Return { value: <Expression>
987 // inlined_finally_list: <InlinedFinally>* } 987 // inlined_finally_list: <InlinedFinally>* }
988 void EffectGraphVisitor::VisitReturnNode(ReturnNode* node) { 988 void EffectGraphVisitor::VisitReturnNode(ReturnNode* node) {
989 ValueGraphVisitor for_value(owner()); 989 ValueGraphVisitor for_value(owner());
990 node->value()->Visit(&for_value); 990 node->value()->Visit(&for_value);
991 Append(for_value); 991 Append(for_value);
992 Value* return_value = for_value.value(); 992 Value* return_value = for_value.value();
993 993
994 if (node->inlined_finally_list_length() > 0) { 994 if (node->inlined_finally_list_length() > 0) {
995 LocalVariable* temp = node->saved_return_value_var(); 995 LocalVariable* temp = owner()->parsed_function()->finally_return_temp_var();
996 ASSERT(temp != NULL);
996 Do(BuildStoreLocal(*temp, return_value)); 997 Do(BuildStoreLocal(*temp, return_value));
997 for (intptr_t i = 0; i < node->inlined_finally_list_length(); i++) { 998 for (intptr_t i = 0; i < node->inlined_finally_list_length(); i++) {
998 InlineBailout("EffectGraphVisitor::VisitReturnNode (exception)"); 999 InlineBailout("EffectGraphVisitor::VisitReturnNode (exception)");
999 EffectGraphVisitor for_effect(owner()); 1000 EffectGraphVisitor for_effect(owner());
1000 node->InlinedFinallyNodeAt(i)->Visit(&for_effect); 1001 node->InlinedFinallyNodeAt(i)->Visit(&for_effect);
1001 Append(for_effect); 1002 Append(for_effect);
1002 if (!is_open()) { 1003 if (!is_open()) {
1003 return; 1004 return;
1004 } 1005 }
1005 } 1006 }
(...skipping 2986 matching lines...) Expand 10 before | Expand all | Expand 10 after
3992 Report::MessageF(Report::kBailout, 3993 Report::MessageF(Report::kBailout,
3993 Script::Handle(function.script()), 3994 Script::Handle(function.script()),
3994 function.token_pos(), 3995 function.token_pos(),
3995 "FlowGraphBuilder Bailout: %s %s", 3996 "FlowGraphBuilder Bailout: %s %s",
3996 String::Handle(function.name()).ToCString(), 3997 String::Handle(function.name()).ToCString(),
3997 reason); 3998 reason);
3998 UNREACHABLE(); 3999 UNREACHABLE();
3999 } 4000 }
4000 4001
4001 } // namespace dart 4002 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698