| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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/globals.h" // Needed here to get TARGET_ARCH_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/code_generator.h" | 8 #include "vm/code_generator.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 2240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2251 } | 2251 } |
| 2252 if (outer_function.IsFactory()) { | 2252 if (outer_function.IsFactory()) { |
| 2253 instantiator_class = outer_function.signature_class(); | 2253 instantiator_class = outer_function.signature_class(); |
| 2254 } else { | 2254 } else { |
| 2255 instantiator_class = outer_function.owner(); | 2255 instantiator_class = outer_function.owner(); |
| 2256 } | 2256 } |
| 2257 if (instantiator_class.NumTypeParameters() == 0) { | 2257 if (instantiator_class.NumTypeParameters() == 0) { |
| 2258 // The type arguments are compile time constants. | 2258 // The type arguments are compile time constants. |
| 2259 TypeArguments& type_arguments = TypeArguments::ZoneHandle(); | 2259 TypeArguments& type_arguments = TypeArguments::ZoneHandle(); |
| 2260 // TODO(regis): Temporary type should be allocated in new gen heap. | 2260 // TODO(regis): Temporary type should be allocated in new gen heap. |
| 2261 AbstractType& type = AbstractType::Handle( | 2261 Type& type = Type::Handle( |
| 2262 Type::NewParameterizedType(instantiator_class, type_arguments)); | 2262 Type::NewParameterizedType(instantiator_class, type_arguments)); |
| 2263 String& errmsg = String::Handle(); | 2263 String& errmsg = String::Handle(); |
| 2264 type = ClassFinalizer::FinalizeAndCanonicalizeType(type, &errmsg); | 2264 type = ClassFinalizer::FinalizeAndCanonicalizeType(type, &errmsg); |
| 2265 if (!errmsg.IsNull()) { | 2265 if (!errmsg.IsNull()) { |
| 2266 ErrorMsg(token_index, errmsg.ToCString()); | 2266 ErrorMsg(token_index, errmsg.ToCString()); |
| 2267 } | 2267 } |
| 2268 type_arguments = type.arguments(); | 2268 type_arguments = type.arguments(); |
| 2269 __ PushObject(type_arguments); | 2269 __ PushObject(type_arguments); |
| 2270 } else { | 2270 } else { |
| 2271 ASSERT(parsed_function().instantiator() != NULL); | 2271 ASSERT(parsed_function().instantiator() != NULL); |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2742 message_buffer, kMessageBufferSize, | 2742 message_buffer, kMessageBufferSize, |
| 2743 format, args); | 2743 format, args); |
| 2744 va_end(args); | 2744 va_end(args); |
| 2745 Isolate::Current()->long_jump_base()->Jump(1, message_buffer); | 2745 Isolate::Current()->long_jump_base()->Jump(1, message_buffer); |
| 2746 UNREACHABLE(); | 2746 UNREACHABLE(); |
| 2747 } | 2747 } |
| 2748 | 2748 |
| 2749 } // namespace dart | 2749 } // namespace dart |
| 2750 | 2750 |
| 2751 #endif // defined TARGET_ARCH_IA32 | 2751 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |