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

Side by Side Diff: src/x64/codegen-x64.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/x64/code-stubs-x64.cc ('k') | src/x64/debug-x64.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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 __ JumpIfNotSmi(rbx, &convert_hole); 387 __ JumpIfNotSmi(rbx, &convert_hole);
388 __ SmiToInteger32(rbx, rbx); 388 __ SmiToInteger32(rbx, rbx);
389 __ cvtlsi2sd(xmm0, rbx); 389 __ cvtlsi2sd(xmm0, rbx);
390 __ movsd(FieldOperand(r14, r9, times_8, FixedDoubleArray::kHeaderSize), 390 __ movsd(FieldOperand(r14, r9, times_8, FixedDoubleArray::kHeaderSize),
391 xmm0); 391 xmm0);
392 __ jmp(&entry); 392 __ jmp(&entry);
393 __ bind(&convert_hole); 393 __ bind(&convert_hole);
394 394
395 if (FLAG_debug_code) { 395 if (FLAG_debug_code) {
396 __ CompareRoot(rbx, Heap::kTheHoleValueRootIndex); 396 __ CompareRoot(rbx, Heap::kTheHoleValueRootIndex);
397 __ Assert(equal, kObjectFoundInSmiOnlyArray); 397 __ Assert(equal, "object found in smi-only array");
398 } 398 }
399 399
400 __ movq(FieldOperand(r14, r9, times_8, FixedDoubleArray::kHeaderSize), r15); 400 __ movq(FieldOperand(r14, r9, times_8, FixedDoubleArray::kHeaderSize), r15);
401 __ bind(&entry); 401 __ bind(&entry);
402 __ decq(r9); 402 __ decq(r9);
403 __ j(not_sign, &loop); 403 __ j(not_sign, &loop);
404 404
405 __ bind(&done); 405 __ bind(&done);
406 } 406 }
407 407
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 STATIC_ASSERT(kSeqStringTag == 0); 570 STATIC_ASSERT(kSeqStringTag == 0);
571 __ testb(result, Immediate(kStringRepresentationMask)); 571 __ testb(result, Immediate(kStringRepresentationMask));
572 __ j(zero, &seq_string, Label::kNear); 572 __ j(zero, &seq_string, Label::kNear);
573 573
574 // Handle external strings. 574 // Handle external strings.
575 Label ascii_external, done; 575 Label ascii_external, done;
576 if (FLAG_debug_code) { 576 if (FLAG_debug_code) {
577 // Assert that we do not have a cons or slice (indirect strings) here. 577 // Assert that we do not have a cons or slice (indirect strings) here.
578 // Sequential strings have already been ruled out. 578 // Sequential strings have already been ruled out.
579 __ testb(result, Immediate(kIsIndirectStringMask)); 579 __ testb(result, Immediate(kIsIndirectStringMask));
580 __ Assert(zero, kExternalStringExpectedButNotFound); 580 __ Assert(zero, "external string expected, but not found");
581 } 581 }
582 // Rule out short external strings. 582 // Rule out short external strings.
583 STATIC_CHECK(kShortExternalStringTag != 0); 583 STATIC_CHECK(kShortExternalStringTag != 0);
584 __ testb(result, Immediate(kShortExternalStringTag)); 584 __ testb(result, Immediate(kShortExternalStringTag));
585 __ j(not_zero, call_runtime); 585 __ j(not_zero, call_runtime);
586 // Check encoding. 586 // Check encoding.
587 STATIC_ASSERT(kTwoByteStringTag == 0); 587 STATIC_ASSERT(kTwoByteStringTag == 0);
588 __ testb(result, Immediate(kStringEncodingMask)); 588 __ testb(result, Immediate(kStringEncodingMask));
589 __ movq(result, FieldOperand(string, ExternalString::kResourceDataOffset)); 589 __ movq(result, FieldOperand(string, ExternalString::kResourceDataOffset));
590 __ j(not_equal, &ascii_external, Label::kNear); 590 __ j(not_equal, &ascii_external, Label::kNear);
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 i++) { 740 i++) {
741 patcher.masm()->nop(); 741 patcher.masm()->nop();
742 } 742 }
743 } 743 }
744 } 744 }
745 745
746 746
747 } } // namespace v8::internal 747 } } // namespace v8::internal
748 748
749 #endif // V8_TARGET_ARCH_X64 749 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/debug-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698