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 7643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7654 | 7654 |
7655 __ bind(&need_incremental); | 7655 __ bind(&need_incremental); |
7656 | 7656 |
7657 // Fall through when we need to inform the incremental marker. | 7657 // Fall through when we need to inform the incremental marker. |
7658 } | 7658 } |
7659 | 7659 |
7660 | 7660 |
7661 void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) { | 7661 void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) { |
7662 // ----------- S t a t e ------------- | 7662 // ----------- S t a t e ------------- |
7663 // -- eax : element value to store | 7663 // -- eax : element value to store |
7664 // -- ebx : array literal | |
7665 // -- edi : map of array literal | |
7666 // -- ecx : element index as smi | 7664 // -- ecx : element index as smi |
7667 // -- edx : array literal index in function | |
7668 // -- esp[0] : return address | 7665 // -- esp[0] : return address |
| 7666 // -- esp[4] : array literal index in function |
| 7667 // -- esp[8] : array literal |
| 7668 // clobbers ebx, edx, edi |
7669 // ----------------------------------- | 7669 // ----------------------------------- |
7670 | 7670 |
7671 Label element_done; | 7671 Label element_done; |
7672 Label double_elements; | 7672 Label double_elements; |
7673 Label smi_element; | 7673 Label smi_element; |
7674 Label slow_elements; | 7674 Label slow_elements; |
7675 Label slow_elements_from_double; | 7675 Label slow_elements_from_double; |
7676 Label fast_elements; | 7676 Label fast_elements; |
7677 | 7677 |
| 7678 // Get array literal index, array literal and its map. |
| 7679 __ mov(edx, Operand(esp, 1 * kPointerSize)); |
| 7680 __ mov(ebx, Operand(esp, 2 * kPointerSize)); |
| 7681 __ mov(edi, FieldOperand(ebx, JSObject::kMapOffset)); |
| 7682 |
7678 __ CheckFastElements(edi, &double_elements); | 7683 __ CheckFastElements(edi, &double_elements); |
7679 | 7684 |
7680 // Check for FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS elements | 7685 // Check for FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS elements |
7681 __ JumpIfSmi(eax, &smi_element); | 7686 __ JumpIfSmi(eax, &smi_element); |
7682 __ CheckFastSmiElements(edi, &fast_elements, Label::kNear); | 7687 __ CheckFastSmiElements(edi, &fast_elements, Label::kNear); |
7683 | 7688 |
7684 // Store into the array literal requires a elements transition. Call into | 7689 // Store into the array literal requires a elements transition. Call into |
7685 // the runtime. | 7690 // the runtime. |
7686 | 7691 |
7687 __ bind(&slow_elements); | 7692 __ bind(&slow_elements); |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8089 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); | 8094 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); |
8090 } | 8095 } |
8091 } | 8096 } |
8092 | 8097 |
8093 | 8098 |
8094 #undef __ | 8099 #undef __ |
8095 | 8100 |
8096 } } // namespace v8::internal | 8101 } } // namespace v8::internal |
8097 | 8102 |
8098 #endif // V8_TARGET_ARCH_IA32 | 8103 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |