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