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

Side by Side Diff: src/x64/ic-x64.cc

Issue 8271007: Porting r9605 to x64 (elements kind conversion in generated code). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed a bunch of issues and included suggestions. Created 9 years, 2 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/macro-assembler-x64.h » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 __ JumpIfNotSmi(rax, &non_smi_value); 705 __ JumpIfNotSmi(rax, &non_smi_value);
706 // It's irrelevant whether array is smi-only or not when writing a smi. 706 // It's irrelevant whether array is smi-only or not when writing a smi.
707 __ movq(FieldOperand(rbx, rcx, times_pointer_size, FixedArray::kHeaderSize), 707 __ movq(FieldOperand(rbx, rcx, times_pointer_size, FixedArray::kHeaderSize),
708 rax); 708 rax);
709 __ ret(0); 709 __ ret(0);
710 710
711 __ bind(&non_smi_value); 711 __ bind(&non_smi_value);
712 // Writing a non-smi, check whether array allows non-smi elements. 712 // Writing a non-smi, check whether array allows non-smi elements.
713 // r9: receiver's map 713 // r9: receiver's map
714 __ CheckFastObjectElements(r9, &slow, Label::kNear); 714 __ CheckFastObjectElements(r9, &slow, Label::kNear);
715 __ lea(rcx, 715 __ movq(FieldOperand(rbx, rcx, times_pointer_size, FixedArray::kHeaderSize),
716 FieldOperand(rbx, rcx, times_pointer_size, FixedArray::kHeaderSize)); 716 rax);
717 __ movq(Operand(rcx, 0), rax); 717 __ movq(rdx, rax); // Preserve the value which is returned.
718 __ movq(rdx, rax); 718 __ RecordWriteArray(
719 __ RecordWrite( 719 rbx, rax, rcx, kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK);
720 rbx, rcx, rdx, kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK);
721 __ ret(0); 720 __ ret(0);
722 721
723 __ bind(&fast_double_with_map_check); 722 __ bind(&fast_double_with_map_check);
724 // Check for fast double array case. If this fails, call through to the 723 // Check for fast double array case. If this fails, call through to the
725 // runtime. 724 // runtime.
726 // rdi: elements array's map 725 // rdi: elements array's map
727 __ CompareRoot(rdi, Heap::kFixedDoubleArrayMapRootIndex); 726 __ CompareRoot(rdi, Heap::kFixedDoubleArrayMapRootIndex);
728 __ j(not_equal, &slow); 727 __ j(not_equal, &slow);
729 __ bind(&fast_double_without_map_check); 728 __ bind(&fast_double_without_map_check);
730 // If the value is a number, store it as a double in the FastDoubleElements 729 // If the value is a number, store it as a double in the FastDoubleElements
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 Condition cc = *jmp_address == Assembler::kJncShortOpcode 1696 Condition cc = *jmp_address == Assembler::kJncShortOpcode
1698 ? not_zero 1697 ? not_zero
1699 : zero; 1698 : zero;
1700 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1699 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1701 } 1700 }
1702 1701
1703 1702
1704 } } // namespace v8::internal 1703 } } // namespace v8::internal
1705 1704
1706 #endif // V8_TARGET_ARCH_X64 1705 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698