OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1537 __ IsObjectJSObjectType(prototype, scratch1, scratch2, &slow); | 1537 __ IsObjectJSObjectType(prototype, scratch1, scratch2, &slow); |
1538 | 1538 |
1539 // Update the global instanceof or call site inlined cache with the current | 1539 // Update the global instanceof or call site inlined cache with the current |
1540 // map and function. The cached answer will be set when it is known below. | 1540 // map and function. The cached answer will be set when it is known below. |
1541 if (HasCallSiteInlineCheck()) { | 1541 if (HasCallSiteInlineCheck()) { |
1542 // Patch the (relocated) inlined map check. | 1542 // Patch the (relocated) inlined map check. |
1543 __ GetRelocatedValueLocation(map_check_site, scratch1); | 1543 __ GetRelocatedValueLocation(map_check_site, scratch1); |
1544 // We have a cell, so need another level of dereferencing. | 1544 // We have a cell, so need another level of dereferencing. |
1545 __ Ldr(scratch1, MemOperand(scratch1)); | 1545 __ Ldr(scratch1, MemOperand(scratch1)); |
1546 __ Str(map, FieldMemOperand(scratch1, Cell::kValueOffset)); | 1546 __ Str(map, FieldMemOperand(scratch1, Cell::kValueOffset)); |
| 1547 |
| 1548 __ Mov(x14, map); |
| 1549 // |scratch1| points at the beginning of the cell. Calculate the |
| 1550 // field containing the map. |
| 1551 __ Add(function, scratch1, Operand(Cell::kValueOffset - 1)); |
| 1552 __ RecordWriteField(scratch1, Cell::kValueOffset, x14, function, |
| 1553 kLRHasNotBeenSaved, kDontSaveFPRegs, |
| 1554 OMIT_REMEMBERED_SET, OMIT_SMI_CHECK); |
1547 } else { | 1555 } else { |
1548 __ StoreRoot(function, Heap::kInstanceofCacheFunctionRootIndex); | 1556 __ StoreRoot(function, Heap::kInstanceofCacheFunctionRootIndex); |
1549 __ StoreRoot(map, Heap::kInstanceofCacheMapRootIndex); | 1557 __ StoreRoot(map, Heap::kInstanceofCacheMapRootIndex); |
1550 } | 1558 } |
1551 | 1559 |
1552 Label return_true, return_result; | 1560 Label return_true, return_result; |
1553 Register smi_value = scratch1; | 1561 Register smi_value = scratch1; |
1554 { | 1562 { |
1555 // Loop through the prototype chain looking for the function prototype. | 1563 // Loop through the prototype chain looking for the function prototype. |
1556 Register chain_map = x1; | 1564 Register chain_map = x1; |
(...skipping 4186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5743 kStackUnwindSpace, NULL, spill_offset, | 5751 kStackUnwindSpace, NULL, spill_offset, |
5744 MemOperand(fp, 6 * kPointerSize), NULL); | 5752 MemOperand(fp, 6 * kPointerSize), NULL); |
5745 } | 5753 } |
5746 | 5754 |
5747 | 5755 |
5748 #undef __ | 5756 #undef __ |
5749 | 5757 |
5750 } } // namespace v8::internal | 5758 } } // namespace v8::internal |
5751 | 5759 |
5752 #endif // V8_TARGET_ARCH_ARM64 | 5760 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |