OLD | NEW |
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 7464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7475 | 7475 |
7476 __ bind(&need_incremental); | 7476 __ bind(&need_incremental); |
7477 | 7477 |
7478 // Fall through when we need to inform the incremental marker. | 7478 // Fall through when we need to inform the incremental marker. |
7479 } | 7479 } |
7480 | 7480 |
7481 | 7481 |
7482 void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) { | 7482 void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) { |
7483 // ----------- S t a t e ------------- | 7483 // ----------- S t a t e ------------- |
7484 // -- a0 : element value to store | 7484 // -- a0 : element value to store |
7485 // -- a1 : array literal | |
7486 // -- a2 : map of array literal | |
7487 // -- a3 : element index as smi | 7485 // -- a3 : element index as smi |
7488 // -- t0 : array literal index in function as smi | 7486 // -- sp[0] : array literal index in function as smi |
| 7487 // -- sp[4] : array literal |
| 7488 // clobbers a1, a2, t0 |
7489 // ----------------------------------- | 7489 // ----------------------------------- |
7490 | 7490 |
7491 Label element_done; | 7491 Label element_done; |
7492 Label double_elements; | 7492 Label double_elements; |
7493 Label smi_element; | 7493 Label smi_element; |
7494 Label slow_elements; | 7494 Label slow_elements; |
7495 Label fast_elements; | 7495 Label fast_elements; |
7496 | 7496 |
| 7497 // Get array literal index, array literal and its map. |
| 7498 __ lw(t0, MemOperand(sp, 0 * kPointerSize)); |
| 7499 __ lw(a1, MemOperand(sp, 1 * kPointerSize)); |
| 7500 __ lw(a2, FieldMemOperand(a1, JSObject::kMapOffset)); |
| 7501 |
7497 __ CheckFastElements(a2, t1, &double_elements); | 7502 __ CheckFastElements(a2, t1, &double_elements); |
7498 // Check for FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS elements | 7503 // Check for FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS elements |
7499 __ JumpIfSmi(a0, &smi_element); | 7504 __ JumpIfSmi(a0, &smi_element); |
7500 __ CheckFastSmiElements(a2, t1, &fast_elements); | 7505 __ CheckFastSmiElements(a2, t1, &fast_elements); |
7501 | 7506 |
7502 // Store into the array literal requires a elements transition. Call into | 7507 // Store into the array literal requires a elements transition. Call into |
7503 // the runtime. | 7508 // the runtime. |
7504 __ bind(&slow_elements); | 7509 __ bind(&slow_elements); |
7505 // call. | 7510 // call. |
7506 __ Push(a1, a3, a0); | 7511 __ Push(a1, a3, a0); |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7910 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); | 7915 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
7911 } | 7916 } |
7912 } | 7917 } |
7913 | 7918 |
7914 | 7919 |
7915 #undef __ | 7920 #undef __ |
7916 | 7921 |
7917 } } // namespace v8::internal | 7922 } } // namespace v8::internal |
7918 | 7923 |
7919 #endif // V8_TARGET_ARCH_MIPS | 7924 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |