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

Side by Side Diff: src/crankshaft/ia32/lithium-codegen-ia32.cc

Issue 2024253002: [stubs] Remove N-argument Hydrogen-based Array constructor stub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm64 Created 4 years, 6 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/crankshaft/ia32/lithium-codegen-ia32.h" 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 3510 matching lines...) Expand 10 before | Expand all | Expand 10 after
3521 } 3521 }
3522 } 3522 }
3523 3523
3524 3524
3525 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { 3525 void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
3526 DCHECK(ToRegister(instr->context()).is(esi)); 3526 DCHECK(ToRegister(instr->context()).is(esi));
3527 DCHECK(ToRegister(instr->constructor()).is(edi)); 3527 DCHECK(ToRegister(instr->constructor()).is(edi));
3528 DCHECK(ToRegister(instr->result()).is(eax)); 3528 DCHECK(ToRegister(instr->result()).is(eax));
3529 3529
3530 __ Move(eax, Immediate(instr->arity())); 3530 __ Move(eax, Immediate(instr->arity()));
3531 if (instr->arity() == 1) { 3531 __ mov(ebx, instr->hydrogen()->site());
3532 // We only need the allocation site for the case we have a length argument.
3533 // The case may bail out to the runtime, which will determine the correct
3534 // elements kind with the site.
3535 __ mov(ebx, instr->hydrogen()->site());
3536 } else {
3537 __ mov(ebx, isolate()->factory()->undefined_value());
3538 }
3539 3532
3540 ElementsKind kind = instr->hydrogen()->elements_kind(); 3533 ElementsKind kind = instr->hydrogen()->elements_kind();
3541 AllocationSiteOverrideMode override_mode = 3534 AllocationSiteOverrideMode override_mode =
3542 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) 3535 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE)
3543 ? DISABLE_ALLOCATION_SITES 3536 ? DISABLE_ALLOCATION_SITES
3544 : DONT_OVERRIDE; 3537 : DONT_OVERRIDE;
3545 3538
3546 if (instr->arity() == 0) { 3539 if (instr->arity() == 0) {
3547 ArrayNoArgumentConstructorStub stub(isolate(), kind, override_mode); 3540 ArrayNoArgumentConstructorStub stub(isolate(), kind, override_mode);
3548 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 3541 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
(...skipping 13 matching lines...) Expand all
3562 override_mode); 3555 override_mode);
3563 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 3556 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
3564 __ jmp(&done, Label::kNear); 3557 __ jmp(&done, Label::kNear);
3565 __ bind(&packed_case); 3558 __ bind(&packed_case);
3566 } 3559 }
3567 3560
3568 ArraySingleArgumentConstructorStub stub(isolate(), kind, override_mode); 3561 ArraySingleArgumentConstructorStub stub(isolate(), kind, override_mode);
3569 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 3562 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
3570 __ bind(&done); 3563 __ bind(&done);
3571 } else { 3564 } else {
3572 ArrayNArgumentsConstructorStub stub(isolate(), kind, override_mode); 3565 ArrayNArgumentsConstructorStub stub(isolate());
3573 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 3566 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
3574 } 3567 }
3575 } 3568 }
3576 3569
3577 3570
3578 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { 3571 void LCodeGen::DoCallRuntime(LCallRuntime* instr) {
3579 DCHECK(ToRegister(instr->context()).is(esi)); 3572 DCHECK(ToRegister(instr->context()).is(esi));
3580 CallRuntime(instr->function(), instr->arity(), instr, instr->save_doubles()); 3573 CallRuntime(instr->function(), instr->arity(), instr, instr->save_doubles());
3581 } 3574 }
3582 3575
(...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after
5319 __ bind(deferred->exit()); 5312 __ bind(deferred->exit());
5320 __ bind(&done); 5313 __ bind(&done);
5321 } 5314 }
5322 5315
5323 #undef __ 5316 #undef __
5324 5317
5325 } // namespace internal 5318 } // namespace internal
5326 } // namespace v8 5319 } // namespace v8
5327 5320
5328 #endif // V8_TARGET_ARCH_IA32 5321 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698