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

Side by Side Diff: src/arm/codegen-arm.cc

Issue 559913002: Rename ascii to one-byte where applicable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/arm/simulator-arm.h" 9 #include "src/arm/simulator-arm.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 // Sequential strings have already been ruled out. 752 // Sequential strings have already been ruled out.
753 __ tst(result, Operand(kIsIndirectStringMask)); 753 __ tst(result, Operand(kIsIndirectStringMask));
754 __ Assert(eq, kExternalStringExpectedButNotFound); 754 __ Assert(eq, kExternalStringExpectedButNotFound);
755 } 755 }
756 // Rule out short external strings. 756 // Rule out short external strings.
757 STATIC_ASSERT(kShortExternalStringTag != 0); 757 STATIC_ASSERT(kShortExternalStringTag != 0);
758 __ tst(result, Operand(kShortExternalStringMask)); 758 __ tst(result, Operand(kShortExternalStringMask));
759 __ b(ne, call_runtime); 759 __ b(ne, call_runtime);
760 __ ldr(string, FieldMemOperand(string, ExternalString::kResourceDataOffset)); 760 __ ldr(string, FieldMemOperand(string, ExternalString::kResourceDataOffset));
761 761
762 Label ascii, done; 762 Label one_byte, done;
763 __ bind(&check_encoding); 763 __ bind(&check_encoding);
764 STATIC_ASSERT(kTwoByteStringTag == 0); 764 STATIC_ASSERT(kTwoByteStringTag == 0);
765 __ tst(result, Operand(kStringEncodingMask)); 765 __ tst(result, Operand(kStringEncodingMask));
766 __ b(ne, &ascii); 766 __ b(ne, &one_byte);
767 // Two-byte string. 767 // Two-byte string.
768 __ ldrh(result, MemOperand(string, index, LSL, 1)); 768 __ ldrh(result, MemOperand(string, index, LSL, 1));
769 __ jmp(&done); 769 __ jmp(&done);
770 __ bind(&ascii); 770 __ bind(&one_byte);
771 // Ascii string. 771 // One-byte string.
772 __ ldrb(result, MemOperand(string, index)); 772 __ ldrb(result, MemOperand(string, index));
773 __ bind(&done); 773 __ bind(&done);
774 } 774 }
775 775
776 776
777 static MemOperand ExpConstant(int index, Register base) { 777 static MemOperand ExpConstant(int index, Register base) {
778 return MemOperand(base, index * kDoubleSize); 778 return MemOperand(base, index * kDoubleSize);
779 } 779 }
780 780
781 781
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 patcher.masm()->add(r0, pc, Operand(-8)); 928 patcher.masm()->add(r0, pc, Operand(-8));
929 patcher.masm()->ldr(pc, MemOperand(pc, -4)); 929 patcher.masm()->ldr(pc, MemOperand(pc, -4));
930 patcher.masm()->emit_code_stub_address(stub); 930 patcher.masm()->emit_code_stub_address(stub);
931 } 931 }
932 } 932 }
933 933
934 934
935 } } // namespace v8::internal 935 } } // namespace v8::internal
936 936
937 #endif // V8_TARGET_ARCH_ARM 937 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/full-codegen-arm.cc » ('j') | src/jsregexp.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698