| 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_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 2399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2410 __ addl(ESP, Immediate((node->arguments()->length() + 1) * kWordSize)); | 2410 __ addl(ESP, Immediate((node->arguments()->length() + 1) * kWordSize)); |
| 2411 // Restore the context. | 2411 // Restore the context. |
| 2412 __ popl(CTX); | 2412 __ popl(CTX); |
| 2413 // Result is in EAX. | 2413 // Result is in EAX. |
| 2414 if (IsResultNeeded(node)) { | 2414 if (IsResultNeeded(node)) { |
| 2415 __ pushl(EAX); | 2415 __ pushl(EAX); |
| 2416 } | 2416 } |
| 2417 } | 2417 } |
| 2418 | 2418 |
| 2419 | 2419 |
| 2420 // Pushes either the instantiator or null. |
| 2420 // Pushes the type arguments of the instantiator on the stack. | 2421 // Pushes the type arguments of the instantiator on the stack. |
| 2421 // Destroys EBX. | 2422 // Destroys EBX, ECX. |
| 2422 void CodeGenerator::GenerateInstantiatorTypeArguments(intptr_t token_index, | 2423 void CodeGenerator::GenerateInstantiatorTypeArguments(intptr_t token_index, |
| 2423 bool push_instantiator) { | 2424 bool push_instantiator) { |
| 2424 if (push_instantiator) { | 2425 if (push_instantiator) { |
| 2425 const Immediate raw_null = | 2426 const Immediate raw_null = |
| 2426 Immediate(reinterpret_cast<intptr_t>(Object::null())); | 2427 Immediate(reinterpret_cast<intptr_t>(Object::null())); |
| 2427 __ pushl(raw_null); // Initial instantiator. | 2428 __ pushl(raw_null); // Initial instantiator. |
| 2428 } | 2429 } |
| 2429 const Class& instantiator_class = Class::Handle( | 2430 const Class& instantiator_class = Class::Handle( |
| 2430 parsed_function().function().owner()); | 2431 parsed_function().function().owner()); |
| 2431 if (instantiator_class.NumTypeParameters() == 0) { | 2432 if (instantiator_class.NumTypeParameters() == 0) { |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2973 const Error& error = Error::Handle( | 2974 const Error& error = Error::Handle( |
| 2974 Parser::FormatError(script, token_index, "Error", format, args)); | 2975 Parser::FormatError(script, token_index, "Error", format, args)); |
| 2975 va_end(args); | 2976 va_end(args); |
| 2976 Isolate::Current()->long_jump_base()->Jump(1, error); | 2977 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 2977 UNREACHABLE(); | 2978 UNREACHABLE(); |
| 2978 } | 2979 } |
| 2979 | 2980 |
| 2980 } // namespace dart | 2981 } // namespace dart |
| 2981 | 2982 |
| 2982 #endif // defined TARGET_ARCH_IA32 | 2983 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |