| 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 2300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2311 __ popl(ECX); // Pop type arguments. | 2311 __ popl(ECX); // Pop type arguments. |
| 2312 __ popl(ECX); // Pop instantiator type arguments. | 2312 __ popl(ECX); // Pop instantiator type arguments. |
| 2313 } | 2313 } |
| 2314 | 2314 |
| 2315 if (IsResultNeeded(node)) { | 2315 if (IsResultNeeded(node)) { |
| 2316 __ pushl(EAX); // Set up return value from allocate. | 2316 __ pushl(EAX); // Set up return value from allocate. |
| 2317 } | 2317 } |
| 2318 | 2318 |
| 2319 // First argument(this) for constructor call which follows. | 2319 // First argument(this) for constructor call which follows. |
| 2320 __ pushl(EAX); | 2320 __ pushl(EAX); |
| 2321 // Second argument is the implicit constructor phase parameter. | 2321 // Second argument is the implicit construction phase parameter. |
| 2322 // Run both the constructor initializer list and the constructor body. | 2322 // Run both the constructor initializer list and the constructor body. |
| 2323 __ PushObject(Smi::ZoneHandle(Smi::New(Function::kCtorPhaseAll))); | 2323 __ PushObject(Smi::ZoneHandle(Smi::New(Function::kCtorPhaseAll))); |
| 2324 | 2324 |
| 2325 | 2325 |
| 2326 // Now setup rest of the arguments for the constructor call. | 2326 // Now setup rest of the arguments for the constructor call. |
| 2327 node->arguments()->Visit(this); | 2327 node->arguments()->Visit(this); |
| 2328 | 2328 |
| 2329 // Call the constructor. | 2329 // Call the constructor. |
| 2330 // +2 to include implicit receiver and phase arguments. | 2330 // +2 to include implicit receiver and phase arguments. |
| 2331 int num_args = node->arguments()->length() + 2; | 2331 int num_args = node->arguments()->length() + 2; |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2645 const Class& cls = Class::Handle(parsed_function_.function().owner()); | 2645 const Class& cls = Class::Handle(parsed_function_.function().owner()); |
| 2646 const Script& script = Script::Handle(cls.script()); | 2646 const Script& script = Script::Handle(cls.script()); |
| 2647 Parser::ReportMsg(script, token_index, "Error", error_msg, format, args); | 2647 Parser::ReportMsg(script, token_index, "Error", error_msg, format, args); |
| 2648 Isolate::Current()->long_jump_base()->Jump(1, error_msg); | 2648 Isolate::Current()->long_jump_base()->Jump(1, error_msg); |
| 2649 UNREACHABLE(); | 2649 UNREACHABLE(); |
| 2650 } | 2650 } |
| 2651 | 2651 |
| 2652 } // namespace dart | 2652 } // namespace dart |
| 2653 | 2653 |
| 2654 #endif // defined TARGET_ARCH_IA32 | 2654 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |