OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/ppc/lithium-codegen-ppc.h" | 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.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/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
(...skipping 4042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4053 Handle<Code> ic = | 4053 Handle<Code> ic = |
4054 CodeFactory::CallICInOptimizedCode(isolate(), arity, mode).code(); | 4054 CodeFactory::CallICInOptimizedCode(isolate(), arity, mode).code(); |
4055 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 4055 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
4056 } else { | 4056 } else { |
4057 __ mov(r3, Operand(arity)); | 4057 __ mov(r3, Operand(arity)); |
4058 CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr); | 4058 CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr); |
4059 } | 4059 } |
4060 } | 4060 } |
4061 | 4061 |
4062 | 4062 |
4063 void LCodeGen::DoCallNew(LCallNew* instr) { | |
4064 DCHECK(ToRegister(instr->context()).is(cp)); | |
4065 DCHECK(ToRegister(instr->constructor()).is(r4)); | |
4066 DCHECK(ToRegister(instr->result()).is(r3)); | |
4067 | |
4068 __ mov(r3, Operand(instr->arity())); | |
4069 // No cell in r5 for construct type feedback in optimized code | |
4070 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex); | |
4071 CallConstructStub stub(isolate(), NO_CALL_CONSTRUCTOR_FLAGS); | |
4072 CallCode(stub.GetCode(), RelocInfo::CONSTRUCT_CALL, instr); | |
4073 } | |
4074 | |
4075 | |
4076 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { | 4063 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
4077 DCHECK(ToRegister(instr->context()).is(cp)); | 4064 DCHECK(ToRegister(instr->context()).is(cp)); |
4078 DCHECK(ToRegister(instr->constructor()).is(r4)); | 4065 DCHECK(ToRegister(instr->constructor()).is(r4)); |
4079 DCHECK(ToRegister(instr->result()).is(r3)); | 4066 DCHECK(ToRegister(instr->result()).is(r3)); |
4080 | 4067 |
4081 __ mov(r3, Operand(instr->arity())); | 4068 __ mov(r3, Operand(instr->arity())); |
4082 if (instr->arity() == 1) { | 4069 if (instr->arity() == 1) { |
4083 // We only need the allocation site for the case we have a length argument. | 4070 // We only need the allocation site for the case we have a length argument. |
4084 // The case may bail out to the runtime, which will determine the correct | 4071 // The case may bail out to the runtime, which will determine the correct |
4085 // elements kind with the site. | 4072 // elements kind with the site. |
(...skipping 1962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6048 __ Push(scope_info); | 6035 __ Push(scope_info); |
6049 __ push(ToRegister(instr->function())); | 6036 __ push(ToRegister(instr->function())); |
6050 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6037 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6051 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6038 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6052 } | 6039 } |
6053 | 6040 |
6054 | 6041 |
6055 #undef __ | 6042 #undef __ |
6056 } // namespace internal | 6043 } // namespace internal |
6057 } // namespace v8 | 6044 } // namespace v8 |
OLD | NEW |