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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/full-codegen/full-codegen.h" 7 #include "src/full-codegen/full-codegen.h"
8 #include "src/ast/compile-time-value.h" 8 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 __ Ldr(x3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 1573 __ Ldr(x3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
1574 __ Mov(x2, Smi::FromInt(expr->literal_index())); 1574 __ Mov(x2, Smi::FromInt(expr->literal_index()));
1575 __ Mov(x1, Operand(constant_elements)); 1575 __ Mov(x1, Operand(constant_elements));
1576 if (MustCreateArrayLiteralWithRuntime(expr)) { 1576 if (MustCreateArrayLiteralWithRuntime(expr)) {
1577 __ Mov(x0, Smi::FromInt(expr->ComputeFlags())); 1577 __ Mov(x0, Smi::FromInt(expr->ComputeFlags()));
1578 __ Push(x3, x2, x1, x0); 1578 __ Push(x3, x2, x1, x0);
1579 __ CallRuntime(Runtime::kCreateArrayLiteral); 1579 __ CallRuntime(Runtime::kCreateArrayLiteral);
1580 } else { 1580 } else {
1581 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); 1581 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode);
1582 __ CallStub(&stub); 1582 __ CallStub(&stub);
1583 RestoreContext();
1583 } 1584 }
1584 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); 1585 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER);
1585 1586
1586 bool result_saved = false; // Is the result saved to the stack? 1587 bool result_saved = false; // Is the result saved to the stack?
1587 ZoneList<Expression*>* subexprs = expr->values(); 1588 ZoneList<Expression*>* subexprs = expr->values();
1588 int length = subexprs->length(); 1589 int length = subexprs->length();
1589 1590
1590 // Emit code to evaluate all the non-constant subexpressions and to store 1591 // Emit code to evaluate all the non-constant subexpressions and to store
1591 // them into the newly cloned array. 1592 // them into the newly cloned array.
1592 for (int array_index = 0; array_index < length; array_index++) { 1593 for (int array_index = 0; array_index < length; array_index++) {
(...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after
3800 } 3801 }
3801 3802
3802 return INTERRUPT; 3803 return INTERRUPT;
3803 } 3804 }
3804 3805
3805 3806
3806 } // namespace internal 3807 } // namespace internal
3807 } // namespace v8 3808 } // namespace v8
3808 3809
3809 #endif // V8_TARGET_ARCH_ARM64 3810 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698