| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1324 // Input parameters: | 1324 // Input parameters: |
| 1325 // RBP - 8 : PC marker => RawInstruction object. | 1325 // RBP - 8 : PC marker => RawInstruction object. |
| 1326 // RBP : points to previous frame pointer. | 1326 // RBP : points to previous frame pointer. |
| 1327 // RBP + 8 : points to return address. | 1327 // RBP + 8 : points to return address. |
| 1328 // RBP + 16 : address of last argument (arg n-1). | 1328 // RBP + 16 : address of last argument (arg n-1). |
| 1329 // RBP + 16 + 8*(n-1) : address of first argument (arg 0). | 1329 // RBP + 16 + 8*(n-1) : address of first argument (arg 0). |
| 1330 // RBX : ic-data. | 1330 // RBX : ic-data. |
| 1331 // R10 : arguments descriptor array. | 1331 // R10 : arguments descriptor array. |
| 1332 void StubCode::GenerateCallNoSuchMethodFunctionStub(Assembler* assembler) { | 1332 void StubCode::GenerateCallNoSuchMethodFunctionStub(Assembler* assembler) { |
| 1333 // The target function was not found, so invoke method | 1333 // The target function was not found, so invoke method |
| 1334 // "dynamic noSuchMethod(InvocationMirror invocation)". | 1334 // "dynamic noSuchMethod(Invocation invocation)". |
| 1335 const Immediate& raw_null = | 1335 const Immediate& raw_null = |
| 1336 Immediate(reinterpret_cast<intptr_t>(Object::null())); | 1336 Immediate(reinterpret_cast<intptr_t>(Object::null())); |
| 1337 __ movq(R13, FieldAddress(R10, ArgumentsDescriptor::count_offset())); | 1337 __ movq(R13, FieldAddress(R10, ArgumentsDescriptor::count_offset())); |
| 1338 __ movq(RAX, Address(RBP, R13, TIMES_4, kWordSize)); // Get receiver. | 1338 __ movq(RAX, Address(RBP, R13, TIMES_4, kWordSize)); // Get receiver. |
| 1339 | 1339 |
| 1340 // Create a stub frame. | 1340 // Create a stub frame. |
| 1341 __ EnterStubFrame(); | 1341 __ EnterStubFrame(); |
| 1342 | 1342 |
| 1343 __ pushq(raw_null); // Setup space on stack for result from noSuchMethod. | 1343 __ pushq(raw_null); // Setup space on stack for result from noSuchMethod. |
| 1344 __ pushq(RAX); // Receiver. | 1344 __ pushq(RAX); // Receiver. |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2072 __ cmpq(left, right); | 2072 __ cmpq(left, right); |
| 2073 __ Bind(&done); | 2073 __ Bind(&done); |
| 2074 __ popq(right); | 2074 __ popq(right); |
| 2075 __ popq(left); | 2075 __ popq(left); |
| 2076 __ ret(); | 2076 __ ret(); |
| 2077 } | 2077 } |
| 2078 | 2078 |
| 2079 } // namespace dart | 2079 } // namespace dart |
| 2080 | 2080 |
| 2081 #endif // defined TARGET_ARCH_X64 | 2081 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |