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/mips/code-stubs-mips.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: 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
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 7482 matching lines...) Expand 10 before | Expand all | Expand 10 after
7493 7493
7494 __ bind(&need_incremental); 7494 __ bind(&need_incremental);
7495 7495
7496 // Fall through when we need to inform the incremental marker. 7496 // Fall through when we need to inform the incremental marker.
7497 } 7497 }
7498 7498
7499 7499
7500 void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) { 7500 void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) {
7501 // ----------- S t a t e ------------- 7501 // ----------- S t a t e -------------
7502 // -- a0 : element value to store 7502 // -- a0 : element value to store
7503 // -- a1 : array literal
7504 // -- a2 : map of array literal
7505 // -- a3 : element index as smi 7503 // -- a3 : element index as smi
7506 // -- t0 : array literal index in function as smi 7504 // -- sp[0] : array literal index in function as smi
7505 // -- sp[4] : array literal
7506 // clobbers a1, a2, t0
7507 // ----------------------------------- 7507 // -----------------------------------
7508 7508
7509 Label element_done; 7509 Label element_done;
7510 Label double_elements; 7510 Label double_elements;
7511 Label smi_element; 7511 Label smi_element;
7512 Label slow_elements; 7512 Label slow_elements;
7513 Label fast_elements; 7513 Label fast_elements;
7514 7514
7515 // Get array literal index, array literal and its map.
7516 __ lw(t0, MemOperand(sp, 0 * kPointerSize));
7517 __ lw(a1, MemOperand(sp, 1 * kPointerSize));
7518 __ lw(a2, FieldMemOperand(a1, JSObject::kMapOffset));
7519
7515 __ CheckFastElements(a2, t1, &double_elements); 7520 __ CheckFastElements(a2, t1, &double_elements);
7516 // Check for FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS elements 7521 // Check for FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS elements
7517 __ JumpIfSmi(a0, &smi_element); 7522 __ JumpIfSmi(a0, &smi_element);
7518 __ CheckFastSmiElements(a2, t1, &fast_elements); 7523 __ CheckFastSmiElements(a2, t1, &fast_elements);
7519 7524
7520 // Store into the array literal requires a elements transition. Call into 7525 // Store into the array literal requires a elements transition. Call into
7521 // the runtime. 7526 // the runtime.
7522 __ bind(&slow_elements); 7527 __ bind(&slow_elements);
7523 // call. 7528 // call.
7524 __ Push(a1, a3, a0); 7529 __ Push(a1, a3, a0);
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
7928 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); 7933 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET);
7929 } 7934 }
7930 } 7935 }
7931 7936
7932 7937
7933 #undef __ 7938 #undef __
7934 7939
7935 } } // namespace v8::internal 7940 } } // namespace v8::internal
7936 7941
7937 #endif // V8_TARGET_ARCH_MIPS 7942 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698