OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |