| 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 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 6 | 6 |
| 7 #include "src/crankshaft/x87/lithium-codegen-x87.h" | 7 #include "src/crankshaft/x87/lithium-codegen-x87.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 4116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4127 Handle<Code> ic = | 4127 Handle<Code> ic = |
| 4128 CodeFactory::CallICInOptimizedCode(isolate(), arity, mode).code(); | 4128 CodeFactory::CallICInOptimizedCode(isolate(), arity, mode).code(); |
| 4129 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 4129 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 4130 } else { | 4130 } else { |
| 4131 __ Set(eax, arity); | 4131 __ Set(eax, arity); |
| 4132 CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr); | 4132 CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr); |
| 4133 } | 4133 } |
| 4134 } | 4134 } |
| 4135 | 4135 |
| 4136 | 4136 |
| 4137 void LCodeGen::DoCallNew(LCallNew* instr) { | |
| 4138 DCHECK(ToRegister(instr->context()).is(esi)); | |
| 4139 DCHECK(ToRegister(instr->constructor()).is(edi)); | |
| 4140 DCHECK(ToRegister(instr->result()).is(eax)); | |
| 4141 | |
| 4142 // No cell in ebx for construct type feedback in optimized code | |
| 4143 __ mov(ebx, isolate()->factory()->undefined_value()); | |
| 4144 CallConstructStub stub(isolate(), NO_CALL_CONSTRUCTOR_FLAGS); | |
| 4145 __ Move(eax, Immediate(instr->arity())); | |
| 4146 CallCode(stub.GetCode(), RelocInfo::CONSTRUCT_CALL, instr); | |
| 4147 } | |
| 4148 | |
| 4149 | |
| 4150 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { | 4137 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
| 4151 DCHECK(ToRegister(instr->context()).is(esi)); | 4138 DCHECK(ToRegister(instr->context()).is(esi)); |
| 4152 DCHECK(ToRegister(instr->constructor()).is(edi)); | 4139 DCHECK(ToRegister(instr->constructor()).is(edi)); |
| 4153 DCHECK(ToRegister(instr->result()).is(eax)); | 4140 DCHECK(ToRegister(instr->result()).is(eax)); |
| 4154 | 4141 |
| 4155 __ Move(eax, Immediate(instr->arity())); | 4142 __ Move(eax, Immediate(instr->arity())); |
| 4156 if (instr->arity() == 1) { | 4143 if (instr->arity() == 1) { |
| 4157 // We only need the allocation site for the case we have a length argument. | 4144 // We only need the allocation site for the case we have a length argument. |
| 4158 // The case may bail out to the runtime, which will determine the correct | 4145 // The case may bail out to the runtime, which will determine the correct |
| 4159 // elements kind with the site. | 4146 // elements kind with the site. |
| (...skipping 2055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6215 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6202 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6216 } | 6203 } |
| 6217 | 6204 |
| 6218 | 6205 |
| 6219 #undef __ | 6206 #undef __ |
| 6220 | 6207 |
| 6221 } // namespace internal | 6208 } // namespace internal |
| 6222 } // namespace v8 | 6209 } // namespace v8 |
| 6223 | 6210 |
| 6224 #endif // V8_TARGET_ARCH_X87 | 6211 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |