| 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 } else { | 2251 } else { |
| 2252 instantiator_class = outer_function.owner(); | 2252 instantiator_class = outer_function.owner(); |
| 2253 } | 2253 } |
| 2254 if (instantiator_class.NumTypeParameters() == 0) { | 2254 if (instantiator_class.NumTypeParameters() == 0) { |
| 2255 // The type arguments are compile time constants. | 2255 // The type arguments are compile time constants. |
| 2256 AbstractTypeArguments& type_arguments = AbstractTypeArguments::ZoneHandle(); | 2256 AbstractTypeArguments& type_arguments = AbstractTypeArguments::ZoneHandle(); |
| 2257 // TODO(regis): Temporary type should be allocated in new gen heap. | 2257 // TODO(regis): Temporary type should be allocated in new gen heap. |
| 2258 Type& type = Type::Handle( | 2258 Type& type = Type::Handle( |
| 2259 Type::NewParameterizedType(instantiator_class, type_arguments)); | 2259 Type::NewParameterizedType(instantiator_class, type_arguments)); |
| 2260 String& errmsg = String::Handle(); | 2260 String& errmsg = String::Handle(); |
| 2261 type = ClassFinalizer::FinalizeAndCanonicalizeType(type, &errmsg); | 2261 type ^= ClassFinalizer::FinalizeAndCanonicalizeType(instantiator_class, |
| 2262 type, |
| 2263 &errmsg); |
| 2262 if (!errmsg.IsNull()) { | 2264 if (!errmsg.IsNull()) { |
| 2263 ErrorMsg(token_index, errmsg.ToCString()); | 2265 ErrorMsg(token_index, errmsg.ToCString()); |
| 2264 } | 2266 } |
| 2265 type_arguments = type.arguments(); | 2267 type_arguments = type.arguments(); |
| 2266 __ PushObject(type_arguments); | 2268 __ PushObject(type_arguments); |
| 2267 } else { | 2269 } else { |
| 2268 ASSERT(parsed_function().instantiator() != NULL); | 2270 ASSERT(parsed_function().instantiator() != NULL); |
| 2269 parsed_function().instantiator()->Visit(this); | 2271 parsed_function().instantiator()->Visit(this); |
| 2270 if (!outer_function.IsFactory()) { | 2272 if (!outer_function.IsFactory()) { |
| 2271 __ popl(EAX); // Pop instantiator. | 2273 __ popl(EAX); // Pop instantiator. |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2741 message_buffer, kMessageBufferSize, | 2743 message_buffer, kMessageBufferSize, |
| 2742 format, args); | 2744 format, args); |
| 2743 va_end(args); | 2745 va_end(args); |
| 2744 Isolate::Current()->long_jump_base()->Jump(1, message_buffer); | 2746 Isolate::Current()->long_jump_base()->Jump(1, message_buffer); |
| 2745 UNREACHABLE(); | 2747 UNREACHABLE(); |
| 2746 } | 2748 } |
| 2747 | 2749 |
| 2748 } // namespace dart | 2750 } // namespace dart |
| 2749 | 2751 |
| 2750 #endif // defined TARGET_ARCH_IA32 | 2752 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |