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

Side by Side Diff: runtime/vm/intrinsifier_x64.cc

Issue 2962543002: Revert "VM: Reland Inline instance object hash code into object header on 64bit." (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « runtime/vm/intrinsifier_arm64.cc ('k') | runtime/vm/method_recognizer.h » ('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 (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" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after
1747 ASSERT(kSmiTag == 0); 1747 ASSERT(kSmiTag == 0);
1748 ASSERT(kSmiTagShift == 1); 1748 ASSERT(kSmiTagShift == 1);
1749 __ addq(RAX, RAX); // Smi tag RAX, setting Z flag. 1749 __ addq(RAX, RAX); // Smi tag RAX, setting Z flag.
1750 __ j(ZERO, &fall_through, Assembler::kNearJump); 1750 __ j(ZERO, &fall_through, Assembler::kNearJump);
1751 __ ret(); 1751 __ ret();
1752 __ Bind(&fall_through); 1752 __ Bind(&fall_through);
1753 // Hash not yet computed. 1753 // Hash not yet computed.
1754 } 1754 }
1755 1755
1756 1756
1757 void Intrinsifier::Object_getHash(Assembler* assembler) {
1758 __ movq(RAX, Address(RSP, +1 * kWordSize)); // Object.
1759 __ movl(RAX, FieldAddress(RAX, String::hash_offset()));
1760 __ SmiTag(RAX);
1761 __ ret();
1762 }
1763
1764
1765 void Intrinsifier::Object_setHash(Assembler* assembler) {
1766 __ movq(RAX, Address(RSP, +2 * kWordSize)); // Object.
1767 __ movq(RDX, Address(RSP, +1 * kWordSize)); // Value.
1768 __ SmiUntag(RDX);
1769 __ movl(FieldAddress(RAX, String::hash_offset()), RDX);
1770 __ ret();
1771 }
1772
1773
1774 void GenerateSubstringMatchesSpecialization(Assembler* assembler, 1757 void GenerateSubstringMatchesSpecialization(Assembler* assembler,
1775 intptr_t receiver_cid, 1758 intptr_t receiver_cid,
1776 intptr_t other_cid, 1759 intptr_t other_cid,
1777 Label* return_true, 1760 Label* return_true,
1778 Label* return_false) { 1761 Label* return_false) {
1779 __ movq(R8, FieldAddress(RAX, String::length_offset())); 1762 __ movq(R8, FieldAddress(RAX, String::length_offset()));
1780 __ movq(R9, FieldAddress(RCX, String::length_offset())); 1763 __ movq(R9, FieldAddress(RCX, String::length_offset()));
1781 1764
1782 // if (other.length == 0) return true; 1765 // if (other.length == 0) return true;
1783 __ testq(R9, R9); 1766 __ testq(R9, R9);
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
2319 __ movq(Address(THR, Thread::async_stack_trace_offset()), RAX); 2302 __ movq(Address(THR, Thread::async_stack_trace_offset()), RAX);
2320 __ LoadObject(RAX, Object::null_object()); 2303 __ LoadObject(RAX, Object::null_object());
2321 __ ret(); 2304 __ ret();
2322 } 2305 }
2323 2306
2324 #undef __ 2307 #undef __
2325 2308
2326 } // namespace dart 2309 } // namespace dart
2327 2310
2328 #endif // defined TARGET_ARCH_X64 2311 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_arm64.cc ('k') | runtime/vm/method_recognizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698