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

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

Issue 22715004: Version 3.20.15 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Add TypedArray API and correctness patches r16033 and r16084 Created 7 years, 4 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/ia32/debug-ia32.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 // 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
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
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
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
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/debug-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698