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

Side by Side Diff: src/full-codegen/ia32/full-codegen-ia32.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_IA32 5 #if V8_TARGET_ARCH_IA32
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 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1504 __ push(Immediate(Smi::FromInt(expr->literal_index()))); 1504 __ push(Immediate(Smi::FromInt(expr->literal_index())));
1505 __ push(Immediate(constant_elements)); 1505 __ push(Immediate(constant_elements));
1506 __ push(Immediate(Smi::FromInt(expr->ComputeFlags()))); 1506 __ push(Immediate(Smi::FromInt(expr->ComputeFlags())));
1507 __ CallRuntime(Runtime::kCreateArrayLiteral); 1507 __ CallRuntime(Runtime::kCreateArrayLiteral);
1508 } else { 1508 } else {
1509 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1509 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1510 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); 1510 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index())));
1511 __ mov(ecx, Immediate(constant_elements)); 1511 __ mov(ecx, Immediate(constant_elements));
1512 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); 1512 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode);
1513 __ CallStub(&stub); 1513 __ CallStub(&stub);
1514 RestoreContext();
1514 } 1515 }
1515 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); 1516 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER);
1516 1517
1517 bool result_saved = false; // Is the result saved to the stack? 1518 bool result_saved = false; // Is the result saved to the stack?
1518 ZoneList<Expression*>* subexprs = expr->values(); 1519 ZoneList<Expression*>* subexprs = expr->values();
1519 int length = subexprs->length(); 1520 int length = subexprs->length();
1520 1521
1521 // Emit code to evaluate all the non-constant subexpressions and to store 1522 // Emit code to evaluate all the non-constant subexpressions and to store
1522 // them into the newly cloned array. 1523 // them into the newly cloned array.
1523 for (int array_index = 0; array_index < length; array_index++) { 1524 for (int array_index = 0; array_index < length; array_index++) {
(...skipping 2096 matching lines...) Expand 10 before | Expand all | Expand 10 after
3620 isolate->builtins()->OnStackReplacement()->entry(), 3621 isolate->builtins()->OnStackReplacement()->entry(),
3621 Assembler::target_address_at(call_target_address, unoptimized_code)); 3622 Assembler::target_address_at(call_target_address, unoptimized_code));
3622 return ON_STACK_REPLACEMENT; 3623 return ON_STACK_REPLACEMENT;
3623 } 3624 }
3624 3625
3625 3626
3626 } // namespace internal 3627 } // namespace internal
3627 } // namespace v8 3628 } // namespace v8
3628 3629
3629 #endif // V8_TARGET_ARCH_IA32 3630 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698