| 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" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 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 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1469 // R10 : arguments descriptor array. | 1469 // R10 : arguments descriptor array. |
| 1470 void StubCode::GenerateCallNoSuchMethodFunctionStub(Assembler* assembler) { | 1470 void StubCode::GenerateCallNoSuchMethodFunctionStub(Assembler* assembler) { |
| 1471 // The target function was not found, so invoke method | 1471 // The target function was not found, so invoke method |
| 1472 // "void noSuchMethod(function_name, Array arguments)". | 1472 // "void noSuchMethod(function_name, Array arguments)". |
| 1473 // TODO(regis): For now, we simply pass the actual arguments, both positional | 1473 // TODO(regis): For now, we simply pass the actual arguments, both positional |
| 1474 // and named, as the argument array. This is not correct if out-of-order | 1474 // and named, as the argument array. This is not correct if out-of-order |
| 1475 // named arguments were passed. | 1475 // named arguments were passed. |
| 1476 // The signature of the "noSuchMethod" method has to change from | 1476 // The signature of the "noSuchMethod" method has to change from |
| 1477 // noSuchMethod(String name, Array arguments) to something like | 1477 // noSuchMethod(String name, Array arguments) to something like |
| 1478 // noSuchMethod(InvocationMirror call). | 1478 // noSuchMethod(InvocationMirror call). |
| 1479 // Also, the class NoSuchMethodException has to be modified accordingly. | 1479 // Also, the class NoSuchMethodError has to be modified accordingly. |
| 1480 // Total number of args is the first Smi in args descriptor array (R10). | 1480 // Total number of args is the first Smi in args descriptor array (R10). |
| 1481 const Immediate raw_null = | 1481 const Immediate raw_null = |
| 1482 Immediate(reinterpret_cast<intptr_t>(Object::null())); | 1482 Immediate(reinterpret_cast<intptr_t>(Object::null())); |
| 1483 __ movq(R13, FieldAddress(R10, Array::data_offset())); | 1483 __ movq(R13, FieldAddress(R10, Array::data_offset())); |
| 1484 __ SmiUntag(R13); | 1484 __ SmiUntag(R13); |
| 1485 __ movq(RAX, Address(RBP, R13, TIMES_8, kWordSize)); // Get receiver. | 1485 __ movq(RAX, Address(RBP, R13, TIMES_8, kWordSize)); // Get receiver. |
| 1486 | 1486 |
| 1487 // Create a stub frame. | 1487 // Create a stub frame. |
| 1488 AssemblerMacros::EnterStubFrame(assembler); | 1488 AssemblerMacros::EnterStubFrame(assembler); |
| 1489 | 1489 |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1909 void StubCode::GenerateJumpToErrorHandlerStub(Assembler* assembler) { | 1909 void StubCode::GenerateJumpToErrorHandlerStub(Assembler* assembler) { |
| 1910 __ movq(RAX, RCX); // error object. | 1910 __ movq(RAX, RCX); // error object. |
| 1911 __ movq(RBP, RDX); // target frame_pointer. | 1911 __ movq(RBP, RDX); // target frame_pointer. |
| 1912 __ movq(RSP, RSI); // target stack_pointer. | 1912 __ movq(RSP, RSI); // target stack_pointer. |
| 1913 __ jmp(RDI); // Jump to the exception handler code. | 1913 __ jmp(RDI); // Jump to the exception handler code. |
| 1914 } | 1914 } |
| 1915 | 1915 |
| 1916 } // namespace dart | 1916 } // namespace dart |
| 1917 | 1917 |
| 1918 #endif // defined TARGET_ARCH_X64 | 1918 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |