OLD | NEW |
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 #include "src/crankshaft/arm/lithium-codegen-arm.h" | 5 #include "src/crankshaft/arm/lithium-codegen-arm.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" | 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" |
(...skipping 3825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3836 Handle<Code> ic = | 3836 Handle<Code> ic = |
3837 CodeFactory::CallICInOptimizedCode(isolate(), arity, mode).code(); | 3837 CodeFactory::CallICInOptimizedCode(isolate(), arity, mode).code(); |
3838 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3838 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3839 } else { | 3839 } else { |
3840 __ mov(r0, Operand(arity)); | 3840 __ mov(r0, Operand(arity)); |
3841 CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr); | 3841 CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr); |
3842 } | 3842 } |
3843 } | 3843 } |
3844 | 3844 |
3845 | 3845 |
3846 void LCodeGen::DoCallNew(LCallNew* instr) { | |
3847 DCHECK(ToRegister(instr->context()).is(cp)); | |
3848 DCHECK(ToRegister(instr->constructor()).is(r1)); | |
3849 DCHECK(ToRegister(instr->result()).is(r0)); | |
3850 | |
3851 __ mov(r0, Operand(instr->arity())); | |
3852 // No cell in r2 for construct type feedback in optimized code | |
3853 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); | |
3854 CallConstructStub stub(isolate(), NO_CALL_CONSTRUCTOR_FLAGS); | |
3855 CallCode(stub.GetCode(), RelocInfo::CONSTRUCT_CALL, instr); | |
3856 } | |
3857 | |
3858 | |
3859 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { | 3846 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
3860 DCHECK(ToRegister(instr->context()).is(cp)); | 3847 DCHECK(ToRegister(instr->context()).is(cp)); |
3861 DCHECK(ToRegister(instr->constructor()).is(r1)); | 3848 DCHECK(ToRegister(instr->constructor()).is(r1)); |
3862 DCHECK(ToRegister(instr->result()).is(r0)); | 3849 DCHECK(ToRegister(instr->result()).is(r0)); |
3863 | 3850 |
3864 __ mov(r0, Operand(instr->arity())); | 3851 __ mov(r0, Operand(instr->arity())); |
3865 if (instr->arity() == 1) { | 3852 if (instr->arity() == 1) { |
3866 // We only need the allocation site for the case we have a length argument. | 3853 // We only need the allocation site for the case we have a length argument. |
3867 // The case may bail out to the runtime, which will determine the correct | 3854 // The case may bail out to the runtime, which will determine the correct |
3868 // elements kind with the site. | 3855 // elements kind with the site. |
(...skipping 1906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5775 __ push(ToRegister(instr->function())); | 5762 __ push(ToRegister(instr->function())); |
5776 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5763 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5777 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5764 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5778 } | 5765 } |
5779 | 5766 |
5780 | 5767 |
5781 #undef __ | 5768 #undef __ |
5782 | 5769 |
5783 } // namespace internal | 5770 } // namespace internal |
5784 } // namespace v8 | 5771 } // namespace v8 |
OLD | NEW |