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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 16950004: Reduce the amount of full code generated to fill out array literals. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Feedback. Rebased. Created 7 years, 6 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/mips/full-codegen-mips.cc ('k') | src/x64/full-codegen-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 6618 matching lines...) Expand 10 before | Expand all | Expand 10 after
6629 6629
6630 __ bind(&need_incremental); 6630 __ bind(&need_incremental);
6631 6631
6632 // Fall through when we need to inform the incremental marker. 6632 // Fall through when we need to inform the incremental marker.
6633 } 6633 }
6634 6634
6635 6635
6636 void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) { 6636 void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) {
6637 // ----------- S t a t e ------------- 6637 // ----------- S t a t e -------------
6638 // -- rax : element value to store 6638 // -- rax : element value to store
6639 // -- rbx : array literal
6640 // -- rdi : map of array literal
6641 // -- rcx : element index as smi 6639 // -- rcx : element index as smi
6642 // -- rdx : array literal index in function
6643 // -- rsp[0] : return address 6640 // -- rsp[0] : return address
6641 // -- rsp[8] : array literal index in function
6642 // -- rsp[16]: array literal
6643 // clobbers rbx, rdx, rdi
6644 // ----------------------------------- 6644 // -----------------------------------
6645 6645
6646 Label element_done; 6646 Label element_done;
6647 Label double_elements; 6647 Label double_elements;
6648 Label smi_element; 6648 Label smi_element;
6649 Label slow_elements; 6649 Label slow_elements;
6650 Label fast_elements; 6650 Label fast_elements;
6651 6651
6652 // Get array literal index, array literal and its map.
6653 __ movq(rdx, Operand(rsp, 1 * kPointerSize));
6654 __ movq(rbx, Operand(rsp, 2 * kPointerSize));
6655 __ movq(rdi, FieldOperand(rbx, JSObject::kMapOffset));
6656
6652 __ CheckFastElements(rdi, &double_elements); 6657 __ CheckFastElements(rdi, &double_elements);
6653 6658
6654 // FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS 6659 // FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS
6655 __ JumpIfSmi(rax, &smi_element); 6660 __ JumpIfSmi(rax, &smi_element);
6656 __ CheckFastSmiElements(rdi, &fast_elements); 6661 __ CheckFastSmiElements(rdi, &fast_elements);
6657 6662
6658 // Store into the array literal requires a elements transition. Call into 6663 // Store into the array literal requires a elements transition. Call into
6659 // the runtime. 6664 // the runtime.
6660 6665
6661 __ bind(&slow_elements); 6666 __ bind(&slow_elements);
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
7094 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); 7099 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET);
7095 } 7100 }
7096 } 7101 }
7097 7102
7098 7103
7099 #undef __ 7104 #undef __
7100 7105
7101 } } // namespace v8::internal 7106 } } // namespace v8::internal
7102 7107
7103 #endif // V8_TARGET_ARCH_X64 7108 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698