Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: src/arm64/macro-assembler-arm64.h

Issue 297763006: Improve write barriers in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/arm64/macro-assembler-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ 5 #ifndef V8_ARM64_MACRO_ASSEMBLER_ARM64_H_
6 #define V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ 6 #define V8_ARM64_MACRO_ASSEMBLER_ARM64_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "src/globals.h" 10 #include "src/globals.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 if (kBranchTypeFirstCondition <= type && type <= kBranchTypeLastCondition) { 82 if (kBranchTypeFirstCondition <= type && type <= kBranchTypeLastCondition) {
83 return static_cast<BranchType>( 83 return static_cast<BranchType>(
84 InvertCondition(static_cast<Condition>(type))); 84 InvertCondition(static_cast<Condition>(type)));
85 } else { 85 } else {
86 return static_cast<BranchType>(type ^ 1); 86 return static_cast<BranchType>(type ^ 1);
87 } 87 }
88 } 88 }
89 89
90 enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET }; 90 enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET };
91 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK }; 91 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK };
92 enum PointersToHereCheck {
93 kPointersToHereMaybeInteresting,
94 kPointersToHereAreAlwaysInteresting
95 };
92 enum LinkRegisterStatus { kLRHasNotBeenSaved, kLRHasBeenSaved }; 96 enum LinkRegisterStatus { kLRHasNotBeenSaved, kLRHasBeenSaved };
93 enum TargetAddressStorageMode { 97 enum TargetAddressStorageMode {
94 CAN_INLINE_TARGET_ADDRESS, 98 CAN_INLINE_TARGET_ADDRESS,
95 NEVER_INLINE_TARGET_ADDRESS 99 NEVER_INLINE_TARGET_ADDRESS
96 }; 100 };
97 enum UntagMode { kNotSpeculativeUntag, kSpeculativeUntag }; 101 enum UntagMode { kNotSpeculativeUntag, kSpeculativeUntag };
98 enum ArrayHasHoles { kArrayCantHaveHoles, kArrayCanHaveHoles }; 102 enum ArrayHasHoles { kArrayCantHaveHoles, kArrayCanHaveHoles };
99 enum CopyHint { kCopyUnknown, kCopyShort, kCopyLong }; 103 enum CopyHint { kCopyUnknown, kCopyShort, kCopyLong };
100 enum DiscardMoveMode { kDontDiscardForSameWReg, kDiscardForSameWReg }; 104 enum DiscardMoveMode { kDontDiscardForSameWReg, kDiscardForSameWReg };
101 enum SeqStringSetCharCheckIndexType { kIndexIsSmi, kIndexIsInteger32 }; 105 enum SeqStringSetCharCheckIndexType { kIndexIsSmi, kIndexIsInteger32 };
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after
1780 // The offset is the offset from the start of the object, not the offset from 1784 // The offset is the offset from the start of the object, not the offset from
1781 // the tagged HeapObject pointer. For use with FieldOperand(reg, off). 1785 // the tagged HeapObject pointer. For use with FieldOperand(reg, off).
1782 void RecordWriteField( 1786 void RecordWriteField(
1783 Register object, 1787 Register object,
1784 int offset, 1788 int offset,
1785 Register value, 1789 Register value,
1786 Register scratch, 1790 Register scratch,
1787 LinkRegisterStatus lr_status, 1791 LinkRegisterStatus lr_status,
1788 SaveFPRegsMode save_fp, 1792 SaveFPRegsMode save_fp,
1789 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, 1793 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET,
1790 SmiCheck smi_check = INLINE_SMI_CHECK); 1794 SmiCheck smi_check = INLINE_SMI_CHECK,
1795 PointersToHereCheck pointers_to_here_check_for_value =
1796 kPointersToHereMaybeInteresting);
1791 1797
1792 // As above, but the offset has the tag presubtracted. For use with 1798 // As above, but the offset has the tag presubtracted. For use with
1793 // MemOperand(reg, off). 1799 // MemOperand(reg, off).
1794 inline void RecordWriteContextSlot( 1800 inline void RecordWriteContextSlot(
1795 Register context, 1801 Register context,
1796 int offset, 1802 int offset,
1797 Register value, 1803 Register value,
1798 Register scratch, 1804 Register scratch,
1799 LinkRegisterStatus lr_status, 1805 LinkRegisterStatus lr_status,
1800 SaveFPRegsMode save_fp, 1806 SaveFPRegsMode save_fp,
1801 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, 1807 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET,
1802 SmiCheck smi_check = INLINE_SMI_CHECK) { 1808 SmiCheck smi_check = INLINE_SMI_CHECK,
1809 PointersToHereCheck pointers_to_here_check_for_value =
1810 kPointersToHereMaybeInteresting) {
1803 RecordWriteField(context, 1811 RecordWriteField(context,
1804 offset + kHeapObjectTag, 1812 offset + kHeapObjectTag,
1805 value, 1813 value,
1806 scratch, 1814 scratch,
1807 lr_status, 1815 lr_status,
1808 save_fp, 1816 save_fp,
1809 remembered_set_action, 1817 remembered_set_action,
1810 smi_check); 1818 smi_check,
1819 pointers_to_here_check_for_value);
1811 } 1820 }
1812 1821
1822 void RecordWriteForMap(
1823 Register object,
1824 Register map,
1825 Register dst,
1826 LinkRegisterStatus lr_status,
1827 SaveFPRegsMode save_fp);
1828
1813 // For a given |object| notify the garbage collector that the slot |address| 1829 // For a given |object| notify the garbage collector that the slot |address|
1814 // has been written. |value| is the object being stored. The value and 1830 // has been written. |value| is the object being stored. The value and
1815 // address registers are clobbered by the operation. 1831 // address registers are clobbered by the operation.
1816 void RecordWrite( 1832 void RecordWrite(
1817 Register object, 1833 Register object,
1818 Register address, 1834 Register address,
1819 Register value, 1835 Register value,
1820 LinkRegisterStatus lr_status, 1836 LinkRegisterStatus lr_status,
1821 SaveFPRegsMode save_fp, 1837 SaveFPRegsMode save_fp,
1822 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, 1838 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET,
1823 SmiCheck smi_check = INLINE_SMI_CHECK); 1839 SmiCheck smi_check = INLINE_SMI_CHECK,
1840 PointersToHereCheck pointers_to_here_check_for_value =
1841 kPointersToHereMaybeInteresting);
1824 1842
1825 // Checks the color of an object. If the object is already grey or black 1843 // Checks the color of an object. If the object is already grey or black
1826 // then we just fall through, since it is already live. If it is white and 1844 // then we just fall through, since it is already live. If it is white and
1827 // we can determine that it doesn't need to be scanned, then we just mark it 1845 // we can determine that it doesn't need to be scanned, then we just mark it
1828 // black and fall through. For the rest we jump to the label so the 1846 // black and fall through. For the rest we jump to the label so the
1829 // incremental marker can fix its assumptions. 1847 // incremental marker can fix its assumptions.
1830 void EnsureNotWhite(Register object, 1848 void EnsureNotWhite(Register object,
1831 Register scratch1, 1849 Register scratch1,
1832 Register scratch2, 1850 Register scratch2,
1833 Register scratch3, 1851 Register scratch3,
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
2299 #error "Unsupported option" 2317 #error "Unsupported option"
2300 #define CODE_COVERAGE_STRINGIFY(x) #x 2318 #define CODE_COVERAGE_STRINGIFY(x) #x
2301 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) 2319 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
2302 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 2320 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
2303 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 2321 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
2304 #else 2322 #else
2305 #define ACCESS_MASM(masm) masm-> 2323 #define ACCESS_MASM(masm) masm->
2306 #endif 2324 #endif
2307 2325
2308 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ 2326 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_
OLDNEW
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/arm64/macro-assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698