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

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

Issue 2954453002: VM: Reland Inline instance object hash code into object header on 64bit. (Closed)
Patch Set: Incorporate last minute code review feedback Created 3 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
« no previous file with comments | « runtime/vm/intermediate_language_dbc.cc ('k') | runtime/vm/intrinsifier_x64.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 (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
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 1814 matching lines...) Expand 10 before | Expand all | Expand 10 after
1825 __ ldr(R0, Address(SP, 0 * kWordSize)); 1825 __ ldr(R0, Address(SP, 0 * kWordSize));
1826 __ ldr(R0, FieldAddress(R0, String::hash_offset()), kUnsignedWord); 1826 __ ldr(R0, FieldAddress(R0, String::hash_offset()), kUnsignedWord);
1827 __ adds(R0, R0, Operand(R0)); // Smi tag the hash code, setting Z flag. 1827 __ adds(R0, R0, Operand(R0)); // Smi tag the hash code, setting Z flag.
1828 __ b(&fall_through, EQ); 1828 __ b(&fall_through, EQ);
1829 __ ret(); 1829 __ ret();
1830 // Hash not yet computed. 1830 // Hash not yet computed.
1831 __ Bind(&fall_through); 1831 __ Bind(&fall_through);
1832 } 1832 }
1833 1833
1834 1834
1835 void Intrinsifier::Object_getHash(Assembler* assembler) {
1836 __ ldr(R0, Address(SP, 0 * kWordSize));
1837 __ ldr(R0, FieldAddress(R0, String::hash_offset()), kUnsignedWord);
1838 __ SmiTag(R0);
1839 __ ret();
1840 }
1841
1842
1843 void Intrinsifier::Object_setHash(Assembler* assembler) {
1844 __ ldr(R0, Address(SP, 1 * kWordSize)); // Object.
1845 __ ldr(R1, Address(SP, 0 * kWordSize)); // Value.
1846 __ SmiUntag(R1);
1847 __ str(R1, FieldAddress(R0, String::hash_offset()), kUnsignedWord);
1848 __ ret();
1849 }
1850
1851
1835 void GenerateSubstringMatchesSpecialization(Assembler* assembler, 1852 void GenerateSubstringMatchesSpecialization(Assembler* assembler,
1836 intptr_t receiver_cid, 1853 intptr_t receiver_cid,
1837 intptr_t other_cid, 1854 intptr_t other_cid,
1838 Label* return_true, 1855 Label* return_true,
1839 Label* return_false) { 1856 Label* return_false) {
1840 __ SmiUntag(R1); 1857 __ SmiUntag(R1);
1841 __ ldr(R8, FieldAddress(R0, String::length_offset())); // this.length 1858 __ ldr(R8, FieldAddress(R0, String::length_offset())); // this.length
1842 __ SmiUntag(R8); 1859 __ SmiUntag(R8);
1843 __ ldr(R9, FieldAddress(R2, String::length_offset())); // other.length 1860 __ ldr(R9, FieldAddress(R2, String::length_offset())); // other.length
1844 __ SmiUntag(R9); 1861 __ SmiUntag(R9);
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
2383 2400
2384 void Intrinsifier::SetAsyncThreadStackTrace(Assembler* assembler) { 2401 void Intrinsifier::SetAsyncThreadStackTrace(Assembler* assembler) {
2385 __ ldr(R0, Address(THR, Thread::async_stack_trace_offset())); 2402 __ ldr(R0, Address(THR, Thread::async_stack_trace_offset()));
2386 __ LoadObject(R0, Object::null_object()); 2403 __ LoadObject(R0, Object::null_object());
2387 __ ret(); 2404 __ ret();
2388 } 2405 }
2389 2406
2390 } // namespace dart 2407 } // namespace dart
2391 2408
2392 #endif // defined TARGET_ARCH_ARM64 2409 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_dbc.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698