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

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

Issue 304553002: Replace STATIC_CHECK with STATIC_ASSERT. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/mips/code-stubs-mips.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 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 "v8.h" 5 #include "v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "codegen.h" 9 #include "codegen.h"
10 #include "heap.h" 10 #include "heap.h"
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 850
851 // Handle external strings. 851 // Handle external strings.
852 Label ascii_external, done; 852 Label ascii_external, done;
853 if (FLAG_debug_code) { 853 if (FLAG_debug_code) {
854 // Assert that we do not have a cons or slice (indirect strings) here. 854 // Assert that we do not have a cons or slice (indirect strings) here.
855 // Sequential strings have already been ruled out. 855 // Sequential strings have already been ruled out.
856 __ test(result, Immediate(kIsIndirectStringMask)); 856 __ test(result, Immediate(kIsIndirectStringMask));
857 __ Assert(zero, kExternalStringExpectedButNotFound); 857 __ Assert(zero, kExternalStringExpectedButNotFound);
858 } 858 }
859 // Rule out short external strings. 859 // Rule out short external strings.
860 STATIC_CHECK(kShortExternalStringTag != 0); 860 STATIC_ASSERT(kShortExternalStringTag != 0);
861 __ test_b(result, kShortExternalStringMask); 861 __ test_b(result, kShortExternalStringMask);
862 __ j(not_zero, call_runtime); 862 __ j(not_zero, call_runtime);
863 // Check encoding. 863 // Check encoding.
864 STATIC_ASSERT(kTwoByteStringTag == 0); 864 STATIC_ASSERT(kTwoByteStringTag == 0);
865 __ test_b(result, kStringEncodingMask); 865 __ test_b(result, kStringEncodingMask);
866 __ mov(result, FieldOperand(string, ExternalString::kResourceDataOffset)); 866 __ mov(result, FieldOperand(string, ExternalString::kResourceDataOffset));
867 __ j(not_equal, &ascii_external, Label::kNear); 867 __ j(not_equal, &ascii_external, Label::kNear);
868 // Two-byte string. 868 // Two-byte string.
869 __ movzx_w(result, Operand(result, index, times_2, 0)); 869 __ movzx_w(result, Operand(result, index, times_2, 0));
870 __ jmp(&done, Label::kNear); 870 __ jmp(&done, Label::kNear);
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 Code* stub = GetCodeAgeStub(isolate, age, parity); 1010 Code* stub = GetCodeAgeStub(isolate, age, parity);
1011 CodePatcher patcher(sequence, young_length); 1011 CodePatcher patcher(sequence, young_length);
1012 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); 1012 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32);
1013 } 1013 }
1014 } 1014 }
1015 1015
1016 1016
1017 } } // namespace v8::internal 1017 } } // namespace v8::internal
1018 1018
1019 #endif // V8_TARGET_ARCH_IA32 1019 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698