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

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

Issue 1230063010: Test tracing of string allocations (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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_ia32.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) 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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 1865 matching lines...) Expand 10 before | Expand all | Expand 10 after
1876 1876
1877 1877
1878 // Allocates one-byte string of length 'end - start'. The content is not 1878 // Allocates one-byte string of length 'end - start'. The content is not
1879 // initialized. 1879 // initialized.
1880 // 'length-reg' (T2) contains tagged length. 1880 // 'length-reg' (T2) contains tagged length.
1881 // Returns new string as tagged pointer in V0. 1881 // Returns new string as tagged pointer in V0.
1882 static void TryAllocateOnebyteString(Assembler* assembler, 1882 static void TryAllocateOnebyteString(Assembler* assembler,
1883 Label* ok, 1883 Label* ok,
1884 Label* failure) { 1884 Label* failure) {
1885 const Register length_reg = T2; 1885 const Register length_reg = T2;
1886 1886 __ MaybeTraceAllocation(kOneByteStringCid, V0, failure);
1887 __ mov(T6, length_reg); // Save the length register. 1887 __ mov(T6, length_reg); // Save the length register.
1888 // TODO(koda): Protect against negative length and overflow here. 1888 // TODO(koda): Protect against negative length and overflow here.
1889 __ SmiUntag(length_reg); 1889 __ SmiUntag(length_reg);
1890 const intptr_t fixed_size = sizeof(RawString) + kObjectAlignment - 1; 1890 const intptr_t fixed_size = sizeof(RawString) + kObjectAlignment - 1;
1891 __ AddImmediate(length_reg, fixed_size); 1891 __ AddImmediate(length_reg, fixed_size);
1892 __ LoadImmediate(TMP, ~(kObjectAlignment - 1)); 1892 __ LoadImmediate(TMP, ~(kObjectAlignment - 1));
1893 __ and_(length_reg, length_reg, TMP); 1893 __ and_(length_reg, length_reg, TMP);
1894 1894
1895 Isolate* isolate = Isolate::Current(); 1895 Isolate* isolate = Isolate::Current();
1896 Heap* heap = isolate->heap(); 1896 Heap* heap = isolate->heap();
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
2169 Isolate* isolate = Isolate::Current(); 2169 Isolate* isolate = Isolate::Current();
2170 __ LoadImmediate(V0, reinterpret_cast<uword>(isolate)); 2170 __ LoadImmediate(V0, reinterpret_cast<uword>(isolate));
2171 // Set return value. 2171 // Set return value.
2172 __ Ret(); 2172 __ Ret();
2173 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); 2173 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset()));
2174 } 2174 }
2175 2175
2176 } // namespace dart 2176 } // namespace dart
2177 2177
2178 #endif // defined TARGET_ARCH_MIPS 2178 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698