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

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 10442015: Rollback of r11638, r11636 on trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 7 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 | « src/mips/builtins-mips.cc ('k') | src/mips/codegen-mips.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 7352 matching lines...) Expand 10 before | Expand all | Expand 10 after
7363 { REG(t0), REG(a1), REG(a2), OMIT_REMEMBERED_SET }, 7363 { REG(t0), REG(a1), REG(a2), OMIT_REMEMBERED_SET },
7364 // Used in StoreStubCompiler::CompileStoreField via GenerateStoreField. 7364 // Used in StoreStubCompiler::CompileStoreField via GenerateStoreField.
7365 { REG(a1), REG(a2), REG(a3), EMIT_REMEMBERED_SET }, 7365 { REG(a1), REG(a2), REG(a3), EMIT_REMEMBERED_SET },
7366 { REG(a3), REG(a2), REG(a1), EMIT_REMEMBERED_SET }, 7366 { REG(a3), REG(a2), REG(a1), EMIT_REMEMBERED_SET },
7367 // Used in KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField. 7367 // Used in KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField.
7368 { REG(a2), REG(a1), REG(a3), EMIT_REMEMBERED_SET }, 7368 { REG(a2), REG(a1), REG(a3), EMIT_REMEMBERED_SET },
7369 { REG(a3), REG(a1), REG(a2), EMIT_REMEMBERED_SET }, 7369 { REG(a3), REG(a1), REG(a2), EMIT_REMEMBERED_SET },
7370 // KeyedStoreStubCompiler::GenerateStoreFastElement. 7370 // KeyedStoreStubCompiler::GenerateStoreFastElement.
7371 { REG(a3), REG(a2), REG(t0), EMIT_REMEMBERED_SET }, 7371 { REG(a3), REG(a2), REG(t0), EMIT_REMEMBERED_SET },
7372 { REG(a2), REG(a3), REG(t0), EMIT_REMEMBERED_SET }, 7372 { REG(a2), REG(a3), REG(t0), EMIT_REMEMBERED_SET },
7373 // ElementsTransitionGenerator::GenerateMapChangeElementTransition 7373 // ElementsTransitionGenerator::GenerateSmiOnlyToObject
7374 // and ElementsTransitionGenerator::GenerateSmiToDouble 7374 // and ElementsTransitionGenerator::GenerateSmiOnlyToDouble
7375 // and ElementsTransitionGenerator::GenerateDoubleToObject 7375 // and ElementsTransitionGenerator::GenerateDoubleToObject
7376 { REG(a2), REG(a3), REG(t5), EMIT_REMEMBERED_SET }, 7376 { REG(a2), REG(a3), REG(t5), EMIT_REMEMBERED_SET },
7377 { REG(a2), REG(a3), REG(t5), OMIT_REMEMBERED_SET }, 7377 { REG(a2), REG(a3), REG(t5), OMIT_REMEMBERED_SET },
7378 // ElementsTransitionGenerator::GenerateDoubleToObject 7378 // ElementsTransitionGenerator::GenerateDoubleToObject
7379 { REG(t2), REG(a2), REG(a0), EMIT_REMEMBERED_SET }, 7379 { REG(t2), REG(a2), REG(a0), EMIT_REMEMBERED_SET },
7380 { REG(a2), REG(t2), REG(t5), EMIT_REMEMBERED_SET }, 7380 { REG(a2), REG(t2), REG(t5), EMIT_REMEMBERED_SET },
7381 // StoreArrayLiteralElementStub::Generate 7381 // StoreArrayLiteralElementStub::Generate
7382 { REG(t1), REG(a0), REG(t2), EMIT_REMEMBERED_SET }, 7382 { REG(t1), REG(a0), REG(t2), EMIT_REMEMBERED_SET },
7383 // Null termination. 7383 // Null termination.
7384 { REG(no_reg), REG(no_reg), REG(no_reg), EMIT_REMEMBERED_SET} 7384 { REG(no_reg), REG(no_reg), REG(no_reg), EMIT_REMEMBERED_SET}
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
7630 // -- t0 : array literal index in function as smi 7630 // -- t0 : array literal index in function as smi
7631 // ----------------------------------- 7631 // -----------------------------------
7632 7632
7633 Label element_done; 7633 Label element_done;
7634 Label double_elements; 7634 Label double_elements;
7635 Label smi_element; 7635 Label smi_element;
7636 Label slow_elements; 7636 Label slow_elements;
7637 Label fast_elements; 7637 Label fast_elements;
7638 7638
7639 __ CheckFastElements(a2, t1, &double_elements); 7639 __ CheckFastElements(a2, t1, &double_elements);
7640 // Check for FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS elements 7640 // FAST_SMI_ONLY_ELEMENTS or FAST_ELEMENTS
7641 __ JumpIfSmi(a0, &smi_element); 7641 __ JumpIfSmi(a0, &smi_element);
7642 __ CheckFastSmiElements(a2, t1, &fast_elements); 7642 __ CheckFastSmiOnlyElements(a2, t1, &fast_elements);
7643 7643
7644 // Store into the array literal requires a elements transition. Call into 7644 // Store into the array literal requires a elements transition. Call into
7645 // the runtime. 7645 // the runtime.
7646 __ bind(&slow_elements); 7646 __ bind(&slow_elements);
7647 // call. 7647 // call.
7648 __ Push(a1, a3, a0); 7648 __ Push(a1, a3, a0);
7649 __ lw(t1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 7649 __ lw(t1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
7650 __ lw(t1, FieldMemOperand(t1, JSFunction::kLiteralsOffset)); 7650 __ lw(t1, FieldMemOperand(t1, JSFunction::kLiteralsOffset));
7651 __ Push(t1, t0); 7651 __ Push(t1, t0);
7652 __ TailCallRuntime(Runtime::kStoreArrayLiteralElement, 5, 1); 7652 __ TailCallRuntime(Runtime::kStoreArrayLiteralElement, 5, 1);
7653 7653
7654 // Array literal has ElementsKind of FAST_*_ELEMENTS and value is an object. 7654 // Array literal has ElementsKind of FAST_ELEMENTS and value is an object.
7655 __ bind(&fast_elements); 7655 __ bind(&fast_elements);
7656 __ lw(t1, FieldMemOperand(a1, JSObject::kElementsOffset)); 7656 __ lw(t1, FieldMemOperand(a1, JSObject::kElementsOffset));
7657 __ sll(t2, a3, kPointerSizeLog2 - kSmiTagSize); 7657 __ sll(t2, a3, kPointerSizeLog2 - kSmiTagSize);
7658 __ Addu(t2, t1, t2); 7658 __ Addu(t2, t1, t2);
7659 __ Addu(t2, t2, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); 7659 __ Addu(t2, t2, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
7660 __ sw(a0, MemOperand(t2, 0)); 7660 __ sw(a0, MemOperand(t2, 0));
7661 // Update the write barrier for the array store. 7661 // Update the write barrier for the array store.
7662 __ RecordWrite(t1, t2, a0, kRAHasNotBeenSaved, kDontSaveFPRegs, 7662 __ RecordWrite(t1, t2, a0, kRAHasNotBeenSaved, kDontSaveFPRegs,
7663 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); 7663 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK);
7664 __ Ret(USE_DELAY_SLOT); 7664 __ Ret(USE_DELAY_SLOT);
7665 __ mov(v0, a0); 7665 __ mov(v0, a0);
7666 7666
7667 // Array literal has ElementsKind of FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS, 7667 // Array literal has ElementsKind of FAST_SMI_ONLY_ELEMENTS or
7668 // and value is Smi. 7668 // FAST_ELEMENTS, and value is Smi.
7669 __ bind(&smi_element); 7669 __ bind(&smi_element);
7670 __ lw(t1, FieldMemOperand(a1, JSObject::kElementsOffset)); 7670 __ lw(t1, FieldMemOperand(a1, JSObject::kElementsOffset));
7671 __ sll(t2, a3, kPointerSizeLog2 - kSmiTagSize); 7671 __ sll(t2, a3, kPointerSizeLog2 - kSmiTagSize);
7672 __ Addu(t2, t1, t2); 7672 __ Addu(t2, t1, t2);
7673 __ sw(a0, FieldMemOperand(t2, FixedArray::kHeaderSize)); 7673 __ sw(a0, FieldMemOperand(t2, FixedArray::kHeaderSize));
7674 __ Ret(USE_DELAY_SLOT); 7674 __ Ret(USE_DELAY_SLOT);
7675 __ mov(v0, a0); 7675 __ mov(v0, a0);
7676 7676
7677 // Array literal has ElementsKind of FAST_*_DOUBLE_ELEMENTS. 7677 // Array literal has ElementsKind of FAST_DOUBLE_ELEMENTS.
7678 __ bind(&double_elements); 7678 __ bind(&double_elements);
7679 __ lw(t1, FieldMemOperand(a1, JSObject::kElementsOffset)); 7679 __ lw(t1, FieldMemOperand(a1, JSObject::kElementsOffset));
7680 __ StoreNumberToDoubleElements(a0, a3, a1, t1, t2, t3, t5, a2, 7680 __ StoreNumberToDoubleElements(a0, a3, a1, t1, t2, t3, t5, a2,
7681 &slow_elements); 7681 &slow_elements);
7682 __ Ret(USE_DELAY_SLOT); 7682 __ Ret(USE_DELAY_SLOT);
7683 __ mov(v0, a0); 7683 __ mov(v0, a0);
7684 } 7684 }
7685 7685
7686 7686
7687 #undef __ 7687 #undef __
7688 7688
7689 } } // namespace v8::internal 7689 } } // namespace v8::internal
7690 7690
7691 #endif // V8_TARGET_ARCH_MIPS 7691 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/mips/codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698