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

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.cc

Issue 2304573004: Port FastCloneShallowArrayStub to Turbofan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: break live range of allocation_site so instruction selection uses nice addressing modes Created 4 years, 3 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after
1586 __ ld(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 1586 __ ld(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
1587 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); 1587 __ li(a2, Operand(Smi::FromInt(expr->literal_index())));
1588 __ li(a1, Operand(constant_elements)); 1588 __ li(a1, Operand(constant_elements));
1589 if (MustCreateArrayLiteralWithRuntime(expr)) { 1589 if (MustCreateArrayLiteralWithRuntime(expr)) {
1590 __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); 1590 __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags())));
1591 __ Push(a3, a2, a1, a0); 1591 __ Push(a3, a2, a1, a0);
1592 __ CallRuntime(Runtime::kCreateArrayLiteral); 1592 __ CallRuntime(Runtime::kCreateArrayLiteral);
1593 } else { 1593 } else {
1594 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); 1594 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode);
1595 __ CallStub(&stub); 1595 __ CallStub(&stub);
1596 RestoreContext();
1596 } 1597 }
1597 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); 1598 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER);
1598 1599
1599 bool result_saved = false; // Is the result saved to the stack? 1600 bool result_saved = false; // Is the result saved to the stack?
1600 ZoneList<Expression*>* subexprs = expr->values(); 1601 ZoneList<Expression*>* subexprs = expr->values();
1601 int length = subexprs->length(); 1602 int length = subexprs->length();
1602 1603
1603 // Emit code to evaluate all the non-constant subexpressions and to store 1604 // Emit code to evaluate all the non-constant subexpressions and to store
1604 // them into the newly cloned array. 1605 // them into the newly cloned array.
1605 for (int array_index = 0; array_index < length; array_index++) { 1606 for (int array_index = 0; array_index < length; array_index++) {
(...skipping 2132 matching lines...) Expand 10 before | Expand all | Expand 10 after
3738 reinterpret_cast<uint64_t>( 3739 reinterpret_cast<uint64_t>(
3739 isolate->builtins()->OnStackReplacement()->entry())); 3740 isolate->builtins()->OnStackReplacement()->entry()));
3740 return ON_STACK_REPLACEMENT; 3741 return ON_STACK_REPLACEMENT;
3741 } 3742 }
3742 3743
3743 3744
3744 } // namespace internal 3745 } // namespace internal
3745 } // namespace v8 3746 } // namespace v8
3746 3747
3747 #endif // V8_TARGET_ARCH_MIPS64 3748 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698