| 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" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/assembler_macros.h" | 9 #include "vm/assembler_macros.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1488 // Uses EAX, EBX, EDI as temporary registers. | 1488 // Uses EAX, EBX, EDI as temporary registers. |
| 1489 void StubCode::GenerateCallNoSuchMethodFunctionStub(Assembler* assembler) { | 1489 void StubCode::GenerateCallNoSuchMethodFunctionStub(Assembler* assembler) { |
| 1490 // The target function was not found, so invoke method | 1490 // The target function was not found, so invoke method |
| 1491 // "void noSuchMethod(function_name, Array arguments)". | 1491 // "void noSuchMethod(function_name, Array arguments)". |
| 1492 // TODO(regis): For now, we simply pass the actual arguments, both positional | 1492 // TODO(regis): For now, we simply pass the actual arguments, both positional |
| 1493 // and named, as the argument array. This is not correct if out-of-order | 1493 // and named, as the argument array. This is not correct if out-of-order |
| 1494 // named arguments were passed. | 1494 // named arguments were passed. |
| 1495 // The signature of the "noSuchMethod" method has to change from | 1495 // The signature of the "noSuchMethod" method has to change from |
| 1496 // noSuchMethod(String name, Array arguments) to something like | 1496 // noSuchMethod(String name, Array arguments) to something like |
| 1497 // noSuchMethod(InvocationMirror call). | 1497 // noSuchMethod(InvocationMirror call). |
| 1498 // Also, the class NoSuchMethodException has to be modified accordingly. | 1498 // Also, the class NoSuchMethodError has to be modified accordingly. |
| 1499 // Total number of args is the first Smi in args descriptor array (EDX). | 1499 // Total number of args is the first Smi in args descriptor array (EDX). |
| 1500 const Immediate raw_null = | 1500 const Immediate raw_null = |
| 1501 Immediate(reinterpret_cast<intptr_t>(Object::null())); | 1501 Immediate(reinterpret_cast<intptr_t>(Object::null())); |
| 1502 __ movl(EDI, FieldAddress(EDX, Array::data_offset())); | 1502 __ movl(EDI, FieldAddress(EDX, Array::data_offset())); |
| 1503 __ SmiUntag(EDI); | 1503 __ SmiUntag(EDI); |
| 1504 __ movl(EAX, Address(EBP, EDI, TIMES_4, kWordSize)); // Get receiver. | 1504 __ movl(EAX, Address(EBP, EDI, TIMES_4, kWordSize)); // Get receiver. |
| 1505 | 1505 |
| 1506 // Create a stub frame as we are pushing some objects on the stack before | 1506 // Create a stub frame as we are pushing some objects on the stack before |
| 1507 // calling into the runtime. | 1507 // calling into the runtime. |
| 1508 AssemblerMacros::EnterStubFrame(assembler); | 1508 AssemblerMacros::EnterStubFrame(assembler); |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1949 __ movl(EAX, Address(ESP, 4 * kWordSize)); // Load error object. | 1949 __ movl(EAX, Address(ESP, 4 * kWordSize)); // Load error object. |
| 1950 __ movl(EBP, Address(ESP, 3 * kWordSize)); // Load target frame_pointer. | 1950 __ movl(EBP, Address(ESP, 3 * kWordSize)); // Load target frame_pointer. |
| 1951 __ movl(EBX, Address(ESP, 1 * kWordSize)); // Load target PC into EBX. | 1951 __ movl(EBX, Address(ESP, 1 * kWordSize)); // Load target PC into EBX. |
| 1952 __ movl(ESP, Address(ESP, 2 * kWordSize)); // Load target stack_pointer. | 1952 __ movl(ESP, Address(ESP, 2 * kWordSize)); // Load target stack_pointer. |
| 1953 __ jmp(EBX); // Jump to the exception handler code. | 1953 __ jmp(EBX); // Jump to the exception handler code. |
| 1954 } | 1954 } |
| 1955 | 1955 |
| 1956 } // namespace dart | 1956 } // namespace dart |
| 1957 | 1957 |
| 1958 #endif // defined TARGET_ARCH_IA32 | 1958 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |