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 7344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7355 { REG(t0), REG(a1), REG(a2), OMIT_REMEMBERED_SET }, | 7355 { REG(t0), REG(a1), REG(a2), OMIT_REMEMBERED_SET }, |
7356 // Used in StoreStubCompiler::CompileStoreField via GenerateStoreField. | 7356 // Used in StoreStubCompiler::CompileStoreField via GenerateStoreField. |
7357 { REG(a1), REG(a2), REG(a3), EMIT_REMEMBERED_SET }, | 7357 { REG(a1), REG(a2), REG(a3), EMIT_REMEMBERED_SET }, |
7358 { REG(a3), REG(a2), REG(a1), EMIT_REMEMBERED_SET }, | 7358 { REG(a3), REG(a2), REG(a1), EMIT_REMEMBERED_SET }, |
7359 // Used in KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField. | 7359 // Used in KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField. |
7360 { REG(a2), REG(a1), REG(a3), EMIT_REMEMBERED_SET }, | 7360 { REG(a2), REG(a1), REG(a3), EMIT_REMEMBERED_SET }, |
7361 { REG(a3), REG(a1), REG(a2), EMIT_REMEMBERED_SET }, | 7361 { REG(a3), REG(a1), REG(a2), EMIT_REMEMBERED_SET }, |
7362 // KeyedStoreStubCompiler::GenerateStoreFastElement. | 7362 // KeyedStoreStubCompiler::GenerateStoreFastElement. |
7363 { REG(a3), REG(a2), REG(t0), EMIT_REMEMBERED_SET }, | 7363 { REG(a3), REG(a2), REG(t0), EMIT_REMEMBERED_SET }, |
7364 { REG(a2), REG(a3), REG(t0), EMIT_REMEMBERED_SET }, | 7364 { REG(a2), REG(a3), REG(t0), EMIT_REMEMBERED_SET }, |
7365 // ElementsTransitionGenerator::GenerateSmiOnlyToObject | 7365 // ElementsTransitionGenerator::GenerateMapChangeElementTransition |
7366 // and ElementsTransitionGenerator::GenerateSmiOnlyToDouble | 7366 // and ElementsTransitionGenerator::GenerateSmiOnlyToDouble |
7367 // and ElementsTransitionGenerator::GenerateDoubleToObject | 7367 // and ElementsTransitionGenerator::GenerateDoubleToObject |
7368 { REG(a2), REG(a3), REG(t5), EMIT_REMEMBERED_SET }, | 7368 { REG(a2), REG(a3), REG(t5), EMIT_REMEMBERED_SET }, |
7369 { REG(a2), REG(a3), REG(t5), OMIT_REMEMBERED_SET }, | 7369 { REG(a2), REG(a3), REG(t5), OMIT_REMEMBERED_SET }, |
7370 // ElementsTransitionGenerator::GenerateDoubleToObject | 7370 // ElementsTransitionGenerator::GenerateDoubleToObject |
7371 { REG(t2), REG(a2), REG(a0), EMIT_REMEMBERED_SET }, | 7371 { REG(t2), REG(a2), REG(a0), EMIT_REMEMBERED_SET }, |
7372 { REG(a2), REG(t2), REG(t5), EMIT_REMEMBERED_SET }, | 7372 { REG(a2), REG(t2), REG(t5), EMIT_REMEMBERED_SET }, |
7373 // StoreArrayLiteralElementStub::Generate | 7373 // StoreArrayLiteralElementStub::Generate |
7374 { REG(t1), REG(a0), REG(t2), EMIT_REMEMBERED_SET }, | 7374 { REG(t1), REG(a0), REG(t2), EMIT_REMEMBERED_SET }, |
7375 // Null termination. | 7375 // Null termination. |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7622 // -- t0 : array literal index in function as smi | 7622 // -- t0 : array literal index in function as smi |
7623 // ----------------------------------- | 7623 // ----------------------------------- |
7624 | 7624 |
7625 Label element_done; | 7625 Label element_done; |
7626 Label double_elements; | 7626 Label double_elements; |
7627 Label smi_element; | 7627 Label smi_element; |
7628 Label slow_elements; | 7628 Label slow_elements; |
7629 Label fast_elements; | 7629 Label fast_elements; |
7630 | 7630 |
7631 __ CheckFastElements(a2, t1, &double_elements); | 7631 __ CheckFastElements(a2, t1, &double_elements); |
7632 // FAST_SMI_ONLY_ELEMENTS or FAST_ELEMENTS | 7632 // Check Smi or Object elements |
7633 __ JumpIfSmi(a0, &smi_element); | 7633 __ JumpIfSmi(a0, &smi_element); |
7634 __ CheckFastSmiOnlyElements(a2, t1, &fast_elements); | 7634 __ CheckFastSmiOnlyElements(a2, t1, &fast_elements); |
7635 | 7635 |
7636 // Store into the array literal requires a elements transition. Call into | 7636 // Store into the array literal requires a elements transition. Call into |
7637 // the runtime. | 7637 // the runtime. |
7638 __ bind(&slow_elements); | 7638 __ bind(&slow_elements); |
7639 // call. | 7639 // call. |
7640 __ Push(a1, a3, a0); | 7640 __ Push(a1, a3, a0); |
7641 __ lw(t1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 7641 __ lw(t1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
7642 __ lw(t1, FieldMemOperand(t1, JSFunction::kLiteralsOffset)); | 7642 __ lw(t1, FieldMemOperand(t1, JSFunction::kLiteralsOffset)); |
7643 __ Push(t1, t0); | 7643 __ Push(t1, t0); |
7644 __ TailCallRuntime(Runtime::kStoreArrayLiteralElement, 5, 1); | 7644 __ TailCallRuntime(Runtime::kStoreArrayLiteralElement, 5, 1); |
7645 | 7645 |
7646 // Array literal has ElementsKind of FAST_ELEMENTS and value is an object. | 7646 // Array literal has ElementsKind of FAST_ELEMENTS and value is an object. |
7647 __ bind(&fast_elements); | 7647 __ bind(&fast_elements); |
7648 __ lw(t1, FieldMemOperand(a1, JSObject::kElementsOffset)); | 7648 __ lw(t1, FieldMemOperand(a1, JSObject::kElementsOffset)); |
7649 __ sll(t2, a3, kPointerSizeLog2 - kSmiTagSize); | 7649 __ sll(t2, a3, kPointerSizeLog2 - kSmiTagSize); |
7650 __ Addu(t2, t1, t2); | 7650 __ Addu(t2, t1, t2); |
7651 __ Addu(t2, t2, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); | 7651 __ Addu(t2, t2, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
7652 __ sw(a0, MemOperand(t2, 0)); | 7652 __ sw(a0, MemOperand(t2, 0)); |
7653 // Update the write barrier for the array store. | 7653 // Update the write barrier for the array store. |
7654 __ RecordWrite(t1, t2, a0, kRAHasNotBeenSaved, kDontSaveFPRegs, | 7654 __ RecordWrite(t1, t2, a0, kRAHasNotBeenSaved, kDontSaveFPRegs, |
7655 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); | 7655 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); |
7656 __ Ret(USE_DELAY_SLOT); | 7656 __ Ret(USE_DELAY_SLOT); |
7657 __ mov(v0, a0); | 7657 __ mov(v0, a0); |
7658 | 7658 |
7659 // Array literal has ElementsKind of FAST_SMI_ONLY_ELEMENTS or | 7659 // Array literal has FAST_* elements and value is Smi. |
7660 // FAST_ELEMENTS, and value is Smi. | |
7661 __ bind(&smi_element); | 7660 __ bind(&smi_element); |
7662 __ lw(t1, FieldMemOperand(a1, JSObject::kElementsOffset)); | 7661 __ lw(t1, FieldMemOperand(a1, JSObject::kElementsOffset)); |
7663 __ sll(t2, a3, kPointerSizeLog2 - kSmiTagSize); | 7662 __ sll(t2, a3, kPointerSizeLog2 - kSmiTagSize); |
7664 __ Addu(t2, t1, t2); | 7663 __ Addu(t2, t1, t2); |
7665 __ sw(a0, FieldMemOperand(t2, FixedArray::kHeaderSize)); | 7664 __ sw(a0, FieldMemOperand(t2, FixedArray::kHeaderSize)); |
7666 __ Ret(USE_DELAY_SLOT); | 7665 __ Ret(USE_DELAY_SLOT); |
7667 __ mov(v0, a0); | 7666 __ mov(v0, a0); |
7668 | 7667 |
7669 // Array literal has ElementsKind of FAST_DOUBLE_ELEMENTS. | 7668 // Array literal has ElementsKind of FAST_DOUBLE_ELEMENTS. |
7670 __ bind(&double_elements); | 7669 __ bind(&double_elements); |
7671 __ lw(t1, FieldMemOperand(a1, JSObject::kElementsOffset)); | 7670 __ lw(t1, FieldMemOperand(a1, JSObject::kElementsOffset)); |
7672 __ StoreNumberToDoubleElements(a0, a3, a1, t1, t2, t3, t5, a2, | 7671 __ StoreNumberToDoubleElements(a0, a3, a1, t1, t2, t3, t5, a2, |
7673 &slow_elements); | 7672 &slow_elements); |
7674 __ Ret(USE_DELAY_SLOT); | 7673 __ Ret(USE_DELAY_SLOT); |
7675 __ mov(v0, a0); | 7674 __ mov(v0, a0); |
7676 } | 7675 } |
7677 | 7676 |
7678 | 7677 |
7679 #undef __ | 7678 #undef __ |
7680 | 7679 |
7681 } } // namespace v8::internal | 7680 } } // namespace v8::internal |
7682 | 7681 |
7683 #endif // V8_TARGET_ARCH_MIPS | 7682 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |