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

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 8551006: Version 3.7.9. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 1 month 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 | « no previous file | src/arm/lithium-arm.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5797 matching lines...) Expand 10 before | Expand all | Expand 10 after
5808 __ jmp(&return_r0); 5808 __ jmp(&return_r0);
5809 5809
5810 if (FLAG_string_slices) { 5810 if (FLAG_string_slices) {
5811 __ bind(&create_slice); 5811 __ bind(&create_slice);
5812 // r0: original string 5812 // r0: original string
5813 // r1: instance type 5813 // r1: instance type
5814 // r2: length 5814 // r2: length
5815 // r3: from index (untagged smi) 5815 // r3: from index (untagged smi)
5816 // r6 (a.k.a. to): to (smi) 5816 // r6 (a.k.a. to): to (smi)
5817 // r7 (a.k.a. from): from offset (smi) 5817 // r7 (a.k.a. from): from offset (smi)
5818 Label allocate_slice, sliced_string, seq_string; 5818 Label allocate_slice, sliced_string, seq_or_external_string;
5819 STATIC_ASSERT(kSeqStringTag == 0); 5819 // If the string is not indirect, it can only be sequential or external.
5820 __ tst(r1, Operand(kStringRepresentationMask));
5821 __ b(eq, &seq_string);
5822 STATIC_ASSERT(kIsIndirectStringMask == (kSlicedStringTag & kConsStringTag)); 5820 STATIC_ASSERT(kIsIndirectStringMask == (kSlicedStringTag & kConsStringTag));
5823 STATIC_ASSERT(kIsIndirectStringMask != 0); 5821 STATIC_ASSERT(kIsIndirectStringMask != 0);
5824 __ tst(r1, Operand(kIsIndirectStringMask)); 5822 __ tst(r1, Operand(kIsIndirectStringMask));
5825 // External string. Jump to runtime. 5823 __ b(eq, &seq_or_external_string);
5826 __ b(eq, &runtime);
5827 5824
5828 __ tst(r1, Operand(kSlicedNotConsMask)); 5825 __ tst(r1, Operand(kSlicedNotConsMask));
5829 __ b(ne, &sliced_string); 5826 __ b(ne, &sliced_string);
5830 // Cons string. Check whether it is flat, then fetch first part. 5827 // Cons string. Check whether it is flat, then fetch first part.
5831 __ ldr(r5, FieldMemOperand(r0, ConsString::kSecondOffset)); 5828 __ ldr(r5, FieldMemOperand(r0, ConsString::kSecondOffset));
5832 __ LoadRoot(r9, Heap::kEmptyStringRootIndex); 5829 __ LoadRoot(r9, Heap::kEmptyStringRootIndex);
5833 __ cmp(r5, r9); 5830 __ cmp(r5, r9);
5834 __ b(ne, &runtime); 5831 __ b(ne, &runtime);
5835 __ ldr(r5, FieldMemOperand(r0, ConsString::kFirstOffset)); 5832 __ ldr(r5, FieldMemOperand(r0, ConsString::kFirstOffset));
5836 __ jmp(&allocate_slice); 5833 __ jmp(&allocate_slice);
5837 5834
5838 __ bind(&sliced_string); 5835 __ bind(&sliced_string);
5839 // Sliced string. Fetch parent and correct start index by offset. 5836 // Sliced string. Fetch parent and correct start index by offset.
5840 __ ldr(r5, FieldMemOperand(r0, SlicedString::kOffsetOffset)); 5837 __ ldr(r5, FieldMemOperand(r0, SlicedString::kOffsetOffset));
5841 __ add(r7, r7, r5); 5838 __ add(r7, r7, r5);
5842 __ ldr(r5, FieldMemOperand(r0, SlicedString::kParentOffset)); 5839 __ ldr(r5, FieldMemOperand(r0, SlicedString::kParentOffset));
5843 __ jmp(&allocate_slice); 5840 __ jmp(&allocate_slice);
5844 5841
5845 __ bind(&seq_string); 5842 __ bind(&seq_or_external_string);
5846 // Sequential string. Just move string to the right register. 5843 // Sequential or external string. Just move string to the correct register.
5847 __ mov(r5, r0); 5844 __ mov(r5, r0);
5848 5845
5849 __ bind(&allocate_slice); 5846 __ bind(&allocate_slice);
5850 // r1: instance type of original string 5847 // r1: instance type of original string
5851 // r2: length 5848 // r2: length
5852 // r5: underlying subject string 5849 // r5: underlying subject string
5853 // r7 (a.k.a. from): from offset (smi) 5850 // r7 (a.k.a. from): from offset (smi)
5854 // Allocate new sliced string. At this point we do not reload the instance 5851 // Allocate new sliced string. At this point we do not reload the instance
5855 // type including the string encoding because we simply rely on the info 5852 // type including the string encoding because we simply rely on the info
5856 // provided by the original string. It does not matter if the original 5853 // provided by the original string. It does not matter if the original
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after
7182 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r10, 7179 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r10,
7183 &slow_elements); 7180 &slow_elements);
7184 __ Ret(); 7181 __ Ret();
7185 } 7182 }
7186 7183
7187 #undef __ 7184 #undef __
7188 7185
7189 } } // namespace v8::internal 7186 } } // namespace v8::internal
7190 7187
7191 #endif // V8_TARGET_ARCH_ARM 7188 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698