| 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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 // Restore result into RBX. | 476 // Restore result into RBX. |
| 477 __ movq(RBX, Address(RBP, kFirstLocalSlotFromFp * kWordSize)); | 477 __ movq(RBX, Address(RBP, kFirstLocalSlotFromFp * kWordSize)); |
| 478 } | 478 } |
| 479 // Code above cannot cause GC. | 479 // Code above cannot cause GC. |
| 480 // There is a Dart Frame on the stack. We must restore PP and leave frame. | 480 // There is a Dart Frame on the stack. We must restore PP and leave frame. |
| 481 __ LeaveDartFrame(); | 481 __ LeaveDartFrame(); |
| 482 | 482 |
| 483 // Frame is fully rewritten at this point and it is safe to perform a GC. | 483 // Frame is fully rewritten at this point and it is safe to perform a GC. |
| 484 // Materialize any objects that were deferred by FillFrame because they | 484 // Materialize any objects that were deferred by FillFrame because they |
| 485 // require allocation. | 485 // require allocation. |
| 486 __ EnterStubFrame(); | 486 // Enter stub frame with loading PP. The caller's PP is not materialized yet. |
| 487 __ EnterStubFrame(true); |
| 487 if (preserve_result) { | 488 if (preserve_result) { |
| 488 __ pushq(Immediate(0)); // Workaround for dropped stack slot during GC. | 489 __ pushq(Immediate(0)); // Workaround for dropped stack slot during GC. |
| 489 __ pushq(RBX); // Preserve result, it will be GC-d here. | 490 __ pushq(RBX); // Preserve result, it will be GC-d here. |
| 490 } | 491 } |
| 491 __ pushq(Immediate(Smi::RawValue(0))); // Space for the result. | 492 __ pushq(Immediate(Smi::RawValue(0))); // Space for the result. |
| 492 __ CallRuntime(kDeoptimizeMaterializeRuntimeEntry, 0); | 493 __ CallRuntime(kDeoptimizeMaterializeRuntimeEntry, 0); |
| 493 // Result tells stub how many bytes to remove from the expression stack | 494 // Result tells stub how many bytes to remove from the expression stack |
| 494 // of the bottom-most frame. They were used as materialization arguments. | 495 // of the bottom-most frame. They were used as materialization arguments. |
| 495 __ popq(RBX); | 496 __ popq(RBX); |
| 496 __ SmiUntag(RBX); | 497 __ SmiUntag(RBX); |
| (...skipping 1601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2098 | 2099 |
| 2099 __ movq(left, Address(RSP, 2 * kWordSize)); | 2100 __ movq(left, Address(RSP, 2 * kWordSize)); |
| 2100 __ movq(right, Address(RSP, 1 * kWordSize)); | 2101 __ movq(right, Address(RSP, 1 * kWordSize)); |
| 2101 GenerateIdenticalWithNumberCheckStub(assembler, left, right); | 2102 GenerateIdenticalWithNumberCheckStub(assembler, left, right); |
| 2102 __ ret(); | 2103 __ ret(); |
| 2103 } | 2104 } |
| 2104 | 2105 |
| 2105 } // namespace dart | 2106 } // namespace dart |
| 2106 | 2107 |
| 2107 #endif // defined TARGET_ARCH_X64 | 2108 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |