| 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 2368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2379 Do(store); | 2379 Do(store); |
| 2380 } | 2380 } |
| 2381 ReturnDefinition(ExitTempLocalScope(tmp_var)); | 2381 ReturnDefinition(ExitTempLocalScope(tmp_var)); |
| 2382 } | 2382 } |
| 2383 } | 2383 } |
| 2384 | 2384 |
| 2385 | 2385 |
| 2386 void EffectGraphVisitor::VisitStringInterpolateNode( | 2386 void EffectGraphVisitor::VisitStringInterpolateNode( |
| 2387 StringInterpolateNode* node) { | 2387 StringInterpolateNode* node) { |
| 2388 ValueGraphVisitor for_argument(owner()); | 2388 ValueGraphVisitor for_argument(owner()); |
| 2389 node->value()->Visit(&for_argument); | 2389 ArrayNode* arguments = node->value(); |
| 2390 bool is_singleton = false; |
| 2391 if (arguments->length() == 1) { |
| 2392 arguments->ElementAt(0)->Visit(&for_argument); |
| 2393 is_singleton = true; |
| 2394 } else { |
| 2395 arguments->Visit(&for_argument); |
| 2396 } |
| 2390 Append(for_argument); | 2397 Append(for_argument); |
| 2391 StringInterpolateInstr* instr = | 2398 StringInterpolateInstr* instr = |
| 2392 new(I) StringInterpolateInstr(for_argument.value(), node->token_pos()); | 2399 new(I) StringInterpolateInstr(for_argument.value(), node->token_pos(), |
| 2400 is_singleton); |
| 2393 ReturnDefinition(instr); | 2401 ReturnDefinition(instr); |
| 2394 } | 2402 } |
| 2395 | 2403 |
| 2396 | 2404 |
| 2397 void EffectGraphVisitor::VisitClosureNode(ClosureNode* node) { | 2405 void EffectGraphVisitor::VisitClosureNode(ClosureNode* node) { |
| 2398 const Function& function = node->function(); | 2406 const Function& function = node->function(); |
| 2399 | 2407 |
| 2400 if (function.IsImplicitStaticClosureFunction()) { | 2408 if (function.IsImplicitStaticClosureFunction()) { |
| 2401 const Instance& closure = | 2409 const Instance& closure = |
| 2402 Instance::ZoneHandle(I, function.ImplicitStaticClosure()); | 2410 Instance::ZoneHandle(I, function.ImplicitStaticClosure()); |
| (...skipping 1820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4223 Report::MessageF(Report::kBailout, | 4231 Report::MessageF(Report::kBailout, |
| 4224 Script::Handle(function.script()), | 4232 Script::Handle(function.script()), |
| 4225 function.token_pos(), | 4233 function.token_pos(), |
| 4226 "FlowGraphBuilder Bailout: %s %s", | 4234 "FlowGraphBuilder Bailout: %s %s", |
| 4227 String::Handle(function.name()).ToCString(), | 4235 String::Handle(function.name()).ToCString(), |
| 4228 reason); | 4236 reason); |
| 4229 UNREACHABLE(); | 4237 UNREACHABLE(); |
| 4230 } | 4238 } |
| 4231 | 4239 |
| 4232 } // namespace dart | 4240 } // namespace dart |
| OLD | NEW |