| 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/code_descriptors.h" | 10 #include "vm/code_descriptors.h" |
| (...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2018 StoreIndexedInstr* store = new StoreIndexedInstr( | 2018 StoreIndexedInstr* store = new StoreIndexedInstr( |
| 2019 array, index, for_value.value(), | 2019 array, index, for_value.value(), |
| 2020 emit_store_barrier, index_scale, class_id, deopt_id); | 2020 emit_store_barrier, index_scale, class_id, deopt_id); |
| 2021 Do(store); | 2021 Do(store); |
| 2022 } | 2022 } |
| 2023 ReturnDefinition(ExitTempLocalScope(tmp_var)); | 2023 ReturnDefinition(ExitTempLocalScope(tmp_var)); |
| 2024 } | 2024 } |
| 2025 } | 2025 } |
| 2026 | 2026 |
| 2027 | 2027 |
| 2028 void EffectGraphVisitor::VisitStringInterpolateNode( |
| 2029 StringInterpolateNode* node) { |
| 2030 ValueGraphVisitor for_argument(owner(), temp_index()); |
| 2031 node->value()->Visit(&for_argument); |
| 2032 Append(for_argument); |
| 2033 StringInterpolateInstr* instr = |
| 2034 new StringInterpolateInstr(for_argument.value(), node->token_pos()); |
| 2035 ReturnDefinition(instr); |
| 2036 } |
| 2037 |
| 2038 |
| 2028 void EffectGraphVisitor::VisitClosureNode(ClosureNode* node) { | 2039 void EffectGraphVisitor::VisitClosureNode(ClosureNode* node) { |
| 2029 const Function& function = node->function(); | 2040 const Function& function = node->function(); |
| 2030 | 2041 |
| 2031 if (function.IsImplicitStaticClosureFunction()) { | 2042 if (function.IsImplicitStaticClosureFunction()) { |
| 2032 const Instance& closure = | 2043 const Instance& closure = |
| 2033 Instance::ZoneHandle(function.ImplicitStaticClosure()); | 2044 Instance::ZoneHandle(function.ImplicitStaticClosure()); |
| 2034 ReturnDefinition(new ConstantInstr(closure)); | 2045 ReturnDefinition(new ConstantInstr(closure)); |
| 2035 return; | 2046 return; |
| 2036 } | 2047 } |
| 2037 if (function.IsNonImplicitClosureFunction()) { | 2048 if (function.IsNonImplicitClosureFunction()) { |
| (...skipping 1794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3832 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; | 3843 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; |
| 3833 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); | 3844 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); |
| 3834 OS::SNPrint(chars, len, kFormat, function_name, reason); | 3845 OS::SNPrint(chars, len, kFormat, function_name, reason); |
| 3835 const Error& error = Error::Handle( | 3846 const Error& error = Error::Handle( |
| 3836 LanguageError::New(String::Handle(String::New(chars)))); | 3847 LanguageError::New(String::Handle(String::New(chars)))); |
| 3837 Isolate::Current()->long_jump_base()->Jump(1, error); | 3848 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 3838 } | 3849 } |
| 3839 | 3850 |
| 3840 | 3851 |
| 3841 } // namespace dart | 3852 } // namespace dart |
| OLD | NEW |