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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.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_ARM 5 #if V8_TARGET_ARCH_ARM
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 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after
1590 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 1590 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
1591 __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); 1591 __ mov(r2, Operand(Smi::FromInt(expr->literal_index())));
1592 __ mov(r1, Operand(constant_elements)); 1592 __ mov(r1, Operand(constant_elements));
1593 if (MustCreateArrayLiteralWithRuntime(expr)) { 1593 if (MustCreateArrayLiteralWithRuntime(expr)) {
1594 __ mov(r0, Operand(Smi::FromInt(expr->ComputeFlags()))); 1594 __ mov(r0, Operand(Smi::FromInt(expr->ComputeFlags())));
1595 __ Push(r3, r2, r1, r0); 1595 __ Push(r3, r2, r1, r0);
1596 __ CallRuntime(Runtime::kCreateArrayLiteral); 1596 __ CallRuntime(Runtime::kCreateArrayLiteral);
1597 } else { 1597 } else {
1598 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); 1598 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode);
1599 __ CallStub(&stub); 1599 __ CallStub(&stub);
1600 RestoreContext();
1600 } 1601 }
1601 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); 1602 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER);
1602 1603
1603 bool result_saved = false; // Is the result saved to the stack? 1604 bool result_saved = false; // Is the result saved to the stack?
1604 ZoneList<Expression*>* subexprs = expr->values(); 1605 ZoneList<Expression*>* subexprs = expr->values();
1605 int length = subexprs->length(); 1606 int length = subexprs->length();
1606 1607
1607 // Emit code to evaluate all the non-constant subexpressions and to store 1608 // Emit code to evaluate all the non-constant subexpressions and to store
1608 // them into the newly cloned array. 1609 // them into the newly cloned array.
1609 for (int array_index = 0; array_index < length; array_index++) { 1610 for (int array_index = 0; array_index < length; array_index++) {
(...skipping 2180 matching lines...) Expand 10 before | Expand all | Expand 10 after
3790 DCHECK(interrupt_address == 3791 DCHECK(interrupt_address ==
3791 isolate->builtins()->OnStackReplacement()->entry()); 3792 isolate->builtins()->OnStackReplacement()->entry());
3792 return ON_STACK_REPLACEMENT; 3793 return ON_STACK_REPLACEMENT;
3793 } 3794 }
3794 3795
3795 3796
3796 } // namespace internal 3797 } // namespace internal
3797 } // namespace v8 3798 } // namespace v8
3798 3799
3799 #endif // V8_TARGET_ARCH_ARM 3800 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698