| 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/parser.h" | 5 #include "vm/parser.h" |
| 6 #include "vm/flags.h" | 6 #include "vm/flags.h" |
| 7 | 7 |
| 8 #ifndef DART_PRECOMPILED_RUNTIME | 8 #ifndef DART_PRECOMPILED_RUNTIME |
| 9 | 9 |
| 10 #include "lib/invocation_mirror.h" | 10 #include "lib/invocation_mirror.h" |
| (...skipping 12997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13008 // Construct the map object. | 13008 // Construct the map object. |
| 13009 const Class& immutable_map_class = | 13009 const Class& immutable_map_class = |
| 13010 Class::Handle(Z, Library::LookupCoreClass(Symbols::ImmutableMap())); | 13010 Class::Handle(Z, Library::LookupCoreClass(Symbols::ImmutableMap())); |
| 13011 ASSERT(!immutable_map_class.IsNull()); | 13011 ASSERT(!immutable_map_class.IsNull()); |
| 13012 // If the immutable map class extends other parameterized classes, we need | 13012 // If the immutable map class extends other parameterized classes, we need |
| 13013 // to adjust the type argument vector. This is currently not the case. | 13013 // to adjust the type argument vector. This is currently not the case. |
| 13014 ASSERT(immutable_map_class.NumTypeArguments() == 2); | 13014 ASSERT(immutable_map_class.NumTypeArguments() == 2); |
| 13015 ArgumentListNode* constr_args = new (Z) ArgumentListNode(TokenPos()); | 13015 ArgumentListNode* constr_args = new (Z) ArgumentListNode(TokenPos()); |
| 13016 constr_args->Add(new (Z) LiteralNode(literal_pos, key_value_array)); | 13016 constr_args->Add(new (Z) LiteralNode(literal_pos, key_value_array)); |
| 13017 const Function& map_constr = Function::ZoneHandle( | 13017 const Function& map_constr = Function::ZoneHandle( |
| 13018 Z, immutable_map_class.LookupConstructor(Library::PrivateCoreLibName( | 13018 Z, immutable_map_class.LookupConstructorAllowPrivate( |
| 13019 Symbols::ImmutableMapConstructor()))); | 13019 Symbols::ImmutableMapConstructor())); |
| 13020 ASSERT(!map_constr.IsNull()); | 13020 ASSERT(!map_constr.IsNull()); |
| 13021 const Object& constructor_result = Object::Handle( | 13021 const Object& constructor_result = Object::Handle( |
| 13022 Z, EvaluateConstConstructorCall(immutable_map_class, map_type_arguments, | 13022 Z, EvaluateConstConstructorCall(immutable_map_class, map_type_arguments, |
| 13023 map_constr, constr_args)); | 13023 map_constr, constr_args)); |
| 13024 if (constructor_result.IsUnhandledException()) { | 13024 if (constructor_result.IsUnhandledException()) { |
| 13025 ReportErrors(Error::Cast(constructor_result), script_, literal_pos, | 13025 ReportErrors(Error::Cast(constructor_result), script_, literal_pos, |
| 13026 "error executing const Map constructor"); | 13026 "error executing const Map constructor"); |
| 13027 } else { | 13027 } else { |
| 13028 const Instance& const_instance = Instance::Cast(constructor_result); | 13028 const Instance& const_instance = Instance::Cast(constructor_result); |
| 13029 CacheConstantValue(literal_pos, const_instance); | 13029 CacheConstantValue(literal_pos, const_instance); |
| (...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14484 const ArgumentListNode& function_args, | 14484 const ArgumentListNode& function_args, |
| 14485 const LocalVariable* temp_for_last_arg, | 14485 const LocalVariable* temp_for_last_arg, |
| 14486 bool is_super_invocation) { | 14486 bool is_super_invocation) { |
| 14487 UNREACHABLE(); | 14487 UNREACHABLE(); |
| 14488 return NULL; | 14488 return NULL; |
| 14489 } | 14489 } |
| 14490 | 14490 |
| 14491 } // namespace dart | 14491 } // namespace dart |
| 14492 | 14492 |
| 14493 #endif // DART_PRECOMPILED_RUNTIME | 14493 #endif // DART_PRECOMPILED_RUNTIME |
| OLD | NEW |