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

Side by Side Diff: src/arm/code-stubs-arm.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 | « no previous file | src/arm/full-codegen-arm.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 7037 matching lines...) Expand 10 before | Expand all | Expand 10 after
7048 7048
7049 __ bind(&need_incremental); 7049 __ bind(&need_incremental);
7050 7050
7051 // Fall through when we need to inform the incremental marker. 7051 // Fall through when we need to inform the incremental marker.
7052 } 7052 }
7053 7053
7054 7054
7055 void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) { 7055 void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) {
7056 // ----------- S t a t e ------------- 7056 // ----------- S t a t e -------------
7057 // -- r0 : element value to store 7057 // -- r0 : element value to store
7058 // -- r1 : array literal
7059 // -- r2 : map of array literal
7060 // -- r3 : element index as smi 7058 // -- r3 : element index as smi
7061 // -- r4 : array literal index in function as smi 7059 // -- sp[0] : array literal index in function as smi
7060 // -- sp[4] : array literal
7061 // clobbers r1, r2, r4
7062 // ----------------------------------- 7062 // -----------------------------------
7063 7063
7064 Label element_done; 7064 Label element_done;
7065 Label double_elements; 7065 Label double_elements;
7066 Label smi_element; 7066 Label smi_element;
7067 Label slow_elements; 7067 Label slow_elements;
7068 Label fast_elements; 7068 Label fast_elements;
7069 7069
7070 // Get array literal index, array literal and its map.
7071 __ ldr(r4, MemOperand(sp, 0 * kPointerSize));
7072 __ ldr(r1, MemOperand(sp, 1 * kPointerSize));
7073 __ ldr(r2, FieldMemOperand(r1, JSObject::kMapOffset));
7074
7070 __ CheckFastElements(r2, r5, &double_elements); 7075 __ CheckFastElements(r2, r5, &double_elements);
7071 // FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS 7076 // FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS
7072 __ JumpIfSmi(r0, &smi_element); 7077 __ JumpIfSmi(r0, &smi_element);
7073 __ CheckFastSmiElements(r2, r5, &fast_elements); 7078 __ CheckFastSmiElements(r2, r5, &fast_elements);
7074 7079
7075 // Store into the array literal requires a elements transition. Call into 7080 // Store into the array literal requires a elements transition. Call into
7076 // the runtime. 7081 // the runtime.
7077 __ bind(&slow_elements); 7082 __ bind(&slow_elements);
7078 // call. 7083 // call.
7079 __ Push(r1, r3, r0); 7084 __ Push(r1, r3, r0);
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
7483 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); 7488 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET);
7484 } 7489 }
7485 } 7490 }
7486 7491
7487 7492
7488 #undef __ 7493 #undef __
7489 7494
7490 } } // namespace v8::internal 7495 } } // namespace v8::internal
7491 7496
7492 #endif // V8_TARGET_ARCH_ARM 7497 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698