OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 __ pop(ebx); | 772 __ pop(ebx); |
773 __ fstp_d(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize)); | 773 __ fstp_d(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize)); |
774 } | 774 } |
775 __ jmp(&entry); | 775 __ jmp(&entry); |
776 | 776 |
777 // Found hole, store hole_nan_as_double instead. | 777 // Found hole, store hole_nan_as_double instead. |
778 __ bind(&convert_hole); | 778 __ bind(&convert_hole); |
779 | 779 |
780 if (FLAG_debug_code) { | 780 if (FLAG_debug_code) { |
781 __ cmp(ebx, masm->isolate()->factory()->the_hole_value()); | 781 __ cmp(ebx, masm->isolate()->factory()->the_hole_value()); |
782 __ Assert(equal, kObjectFoundInSmiOnlyArray); | 782 __ Assert(equal, "object found in smi-only array"); |
783 } | 783 } |
784 | 784 |
785 if (CpuFeatures::IsSupported(SSE2)) { | 785 if (CpuFeatures::IsSupported(SSE2)) { |
786 CpuFeatureScope use_sse2(masm, SSE2); | 786 CpuFeatureScope use_sse2(masm, SSE2); |
787 __ movdbl(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize), | 787 __ movdbl(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize), |
788 the_hole_nan); | 788 the_hole_nan); |
789 } else { | 789 } else { |
790 __ fld_d(Operand::StaticVariable(canonical_the_hole_nan_reference)); | 790 __ fld_d(Operand::StaticVariable(canonical_the_hole_nan_reference)); |
791 __ fstp_d(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize)); | 791 __ fstp_d(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize)); |
792 } | 792 } |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 STATIC_ASSERT(kSeqStringTag == 0); | 1004 STATIC_ASSERT(kSeqStringTag == 0); |
1005 __ test(result, Immediate(kStringRepresentationMask)); | 1005 __ test(result, Immediate(kStringRepresentationMask)); |
1006 __ j(zero, &seq_string, Label::kNear); | 1006 __ j(zero, &seq_string, Label::kNear); |
1007 | 1007 |
1008 // Handle external strings. | 1008 // Handle external strings. |
1009 Label ascii_external, done; | 1009 Label ascii_external, done; |
1010 if (FLAG_debug_code) { | 1010 if (FLAG_debug_code) { |
1011 // Assert that we do not have a cons or slice (indirect strings) here. | 1011 // Assert that we do not have a cons or slice (indirect strings) here. |
1012 // Sequential strings have already been ruled out. | 1012 // Sequential strings have already been ruled out. |
1013 __ test(result, Immediate(kIsIndirectStringMask)); | 1013 __ test(result, Immediate(kIsIndirectStringMask)); |
1014 __ Assert(zero, kExternalStringExpectedButNotFound); | 1014 __ Assert(zero, "external string expected, but not found"); |
1015 } | 1015 } |
1016 // Rule out short external strings. | 1016 // Rule out short external strings. |
1017 STATIC_CHECK(kShortExternalStringTag != 0); | 1017 STATIC_CHECK(kShortExternalStringTag != 0); |
1018 __ test_b(result, kShortExternalStringMask); | 1018 __ test_b(result, kShortExternalStringMask); |
1019 __ j(not_zero, call_runtime); | 1019 __ j(not_zero, call_runtime); |
1020 // Check encoding. | 1020 // Check encoding. |
1021 STATIC_ASSERT(kTwoByteStringTag == 0); | 1021 STATIC_ASSERT(kTwoByteStringTag == 0); |
1022 __ test_b(result, kStringEncodingMask); | 1022 __ test_b(result, kStringEncodingMask); |
1023 __ mov(result, FieldOperand(string, ExternalString::kResourceDataOffset)); | 1023 __ mov(result, FieldOperand(string, ExternalString::kResourceDataOffset)); |
1024 __ j(not_equal, &ascii_external, Label::kNear); | 1024 __ j(not_equal, &ascii_external, Label::kNear); |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1172 Code* stub = GetCodeAgeStub(age, parity); | 1172 Code* stub = GetCodeAgeStub(age, parity); |
1173 CodePatcher patcher(sequence, young_length); | 1173 CodePatcher patcher(sequence, young_length); |
1174 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); | 1174 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); |
1175 } | 1175 } |
1176 } | 1176 } |
1177 | 1177 |
1178 | 1178 |
1179 } } // namespace v8::internal | 1179 } } // namespace v8::internal |
1180 | 1180 |
1181 #endif // V8_TARGET_ARCH_IA32 | 1181 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |