| 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/globals.h" // Needed here to get TARGET_ARCH_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 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 2280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2291 | 2291 |
| 2292 | 2292 |
| 2293 // Pushes the type arguments of the instantiator on the stack. | 2293 // Pushes the type arguments of the instantiator on the stack. |
| 2294 void CodeGenerator::GenerateInstantiatorTypeArguments(intptr_t token_index) { | 2294 void CodeGenerator::GenerateInstantiatorTypeArguments(intptr_t token_index) { |
| 2295 const Class& instantiator_class = Class::Handle( | 2295 const Class& instantiator_class = Class::Handle( |
| 2296 parsed_function().function().owner()); | 2296 parsed_function().function().owner()); |
| 2297 if (instantiator_class.NumTypeParameters() == 0) { | 2297 if (instantiator_class.NumTypeParameters() == 0) { |
| 2298 // The type arguments are compile time constants. | 2298 // The type arguments are compile time constants. |
| 2299 AbstractTypeArguments& type_arguments = AbstractTypeArguments::ZoneHandle(); | 2299 AbstractTypeArguments& type_arguments = AbstractTypeArguments::ZoneHandle(); |
| 2300 // TODO(regis): Temporary type should be allocated in new gen heap. | 2300 // TODO(regis): Temporary type should be allocated in new gen heap. |
| 2301 Type& type = Type::Handle( | 2301 Type& type = Type::Handle(Type::New(instantiator_class, type_arguments)); |
| 2302 Type::NewParameterizedType(instantiator_class, type_arguments)); | |
| 2303 Error& error = Error::Handle(); | 2302 Error& error = Error::Handle(); |
| 2304 type ^= ClassFinalizer::FinalizeAndCanonicalizeType(instantiator_class, | 2303 type ^= ClassFinalizer::FinalizeAndCanonicalizeType(instantiator_class, |
| 2305 type, | 2304 type, |
| 2306 &error); | 2305 &error); |
| 2307 if (!error.IsNull()) { | 2306 if (!error.IsNull()) { |
| 2308 ErrorMsg(token_index, error.ToErrorCString()); | 2307 ErrorMsg(token_index, error.ToErrorCString()); |
| 2309 } | 2308 } |
| 2310 type_arguments = type.arguments(); | 2309 type_arguments = type.arguments(); |
| 2311 __ PushObject(type_arguments); | 2310 __ PushObject(type_arguments); |
| 2312 } else { | 2311 } else { |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2794 const Error& error = Error::Handle( | 2793 const Error& error = Error::Handle( |
| 2795 Parser::FormatError(script, token_index, "Error", format, args)); | 2794 Parser::FormatError(script, token_index, "Error", format, args)); |
| 2796 va_end(args); | 2795 va_end(args); |
| 2797 Isolate::Current()->long_jump_base()->Jump(1, error); | 2796 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 2798 UNREACHABLE(); | 2797 UNREACHABLE(); |
| 2799 } | 2798 } |
| 2800 | 2799 |
| 2801 } // namespace dart | 2800 } // namespace dart |
| 2802 | 2801 |
| 2803 #endif // defined TARGET_ARCH_X64 | 2802 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |