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 // Scratch points at the cell payload. Calculate the start of the object. | |
1550 __ RecordWriteField(scratch1, Cell::kValueOffset, x14, function, | |
1551 kLRHasNotBeenSaved, kDontSaveFPRegs, | |
1552 OMIT_REMEMBERED_SET, OMIT_SMI_CHECK); | |
1553 } else { | 1547 } else { |
1554 __ StoreRoot(function, Heap::kInstanceofCacheFunctionRootIndex); | 1548 __ StoreRoot(function, Heap::kInstanceofCacheFunctionRootIndex); |
1555 __ StoreRoot(map, Heap::kInstanceofCacheMapRootIndex); | 1549 __ StoreRoot(map, Heap::kInstanceofCacheMapRootIndex); |
1556 } | 1550 } |
1557 | 1551 |
1558 Label return_true, return_result; | 1552 Label return_true, return_result; |
1559 Register smi_value = scratch1; | 1553 Register smi_value = scratch1; |
1560 { | 1554 { |
1561 // Loop through the prototype chain looking for the function prototype. | 1555 // Loop through the prototype chain looking for the function prototype. |
1562 Register chain_map = x1; | 1556 Register chain_map = x1; |
(...skipping 4186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5749 kStackUnwindSpace, NULL, spill_offset, | 5743 kStackUnwindSpace, NULL, spill_offset, |
5750 MemOperand(fp, 6 * kPointerSize), NULL); | 5744 MemOperand(fp, 6 * kPointerSize), NULL); |
5751 } | 5745 } |
5752 | 5746 |
5753 | 5747 |
5754 #undef __ | 5748 #undef __ |
5755 | 5749 |
5756 } } // namespace v8::internal | 5750 } } // namespace v8::internal |
5757 | 5751 |
5758 #endif // V8_TARGET_ARCH_ARM64 | 5752 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |