| 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 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1055 // | 1055 // |
| 1056 // We distinguish those kinds of nodes via is_regular_return(). | 1056 // We distinguish those kinds of nodes via is_regular_return(). |
| 1057 // | 1057 // |
| 1058 if (function.is_async_closure() && node->is_regular_return()) { | 1058 if (function.is_async_closure() && node->is_regular_return()) { |
| 1059 // Temporary store the computed return value. | 1059 // Temporary store the computed return value. |
| 1060 Do(BuildStoreExprTemp(return_value)); | 1060 Do(BuildStoreExprTemp(return_value)); |
| 1061 | 1061 |
| 1062 LocalVariable* rcv_var = node->scope()->LookupVariable( | 1062 LocalVariable* rcv_var = node->scope()->LookupVariable( |
| 1063 Symbols::AsyncCompleter(), false); | 1063 Symbols::AsyncCompleter(), false); |
| 1064 ASSERT(rcv_var != NULL && rcv_var->is_captured()); | 1064 ASSERT(rcv_var != NULL && rcv_var->is_captured()); |
| 1065 Value* rcv_value = Bind(BuildLoadLocal(*rcv_var)); | |
| 1066 Value* returned_value = Bind(BuildLoadExprTemp()); | |
| 1067 ZoneGrowableArray<PushArgumentInstr*>* arguments = | 1065 ZoneGrowableArray<PushArgumentInstr*>* arguments = |
| 1068 new(I) ZoneGrowableArray<PushArgumentInstr*>(2); | 1066 new(I) ZoneGrowableArray<PushArgumentInstr*>(2); |
| 1067 Value* rcv_value = Bind(BuildLoadLocal(*rcv_var)); |
| 1069 arguments->Add(PushArgument(rcv_value)); | 1068 arguments->Add(PushArgument(rcv_value)); |
| 1069 Value* returned_value = Bind(BuildLoadExprTemp()); |
| 1070 arguments->Add(PushArgument(returned_value)); | 1070 arguments->Add(PushArgument(returned_value)); |
| 1071 InstanceCallInstr* call = new(I) InstanceCallInstr( | 1071 InstanceCallInstr* call = new(I) InstanceCallInstr( |
| 1072 Scanner::kNoSourcePos, | 1072 Scanner::kNoSourcePos, |
| 1073 Symbols::CompleterComplete(), | 1073 Symbols::CompleterComplete(), |
| 1074 Token::kILLEGAL, | 1074 Token::kILLEGAL, |
| 1075 arguments, | 1075 arguments, |
| 1076 Object::null_array(), | 1076 Object::null_array(), |
| 1077 1, | 1077 1, |
| 1078 owner()->ic_data_array()); | 1078 owner()->ic_data_array()); |
| 1079 Do(call); | 1079 Do(call); |
| (...skipping 2912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3992 Report::MessageF(Report::kBailout, | 3992 Report::MessageF(Report::kBailout, |
| 3993 Script::Handle(function.script()), | 3993 Script::Handle(function.script()), |
| 3994 function.token_pos(), | 3994 function.token_pos(), |
| 3995 "FlowGraphBuilder Bailout: %s %s", | 3995 "FlowGraphBuilder Bailout: %s %s", |
| 3996 String::Handle(function.name()).ToCString(), | 3996 String::Handle(function.name()).ToCString(), |
| 3997 reason); | 3997 reason); |
| 3998 UNREACHABLE(); | 3998 UNREACHABLE(); |
| 3999 } | 3999 } |
| 4000 | 4000 |
| 4001 } // namespace dart | 4001 } // namespace dart |
| OLD | NEW |