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 3333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3344 __ b(ne, &loop); | 3344 __ b(ne, &loop); |
3345 | 3345 |
3346 __ bind(&invoke); | 3346 __ bind(&invoke); |
3347 DCHECK(instr->HasPointerMap()); | 3347 DCHECK(instr->HasPointerMap()); |
3348 LPointerMap* pointers = instr->pointer_map(); | 3348 LPointerMap* pointers = instr->pointer_map(); |
3349 SafepointGenerator safepoint_generator( | 3349 SafepointGenerator safepoint_generator( |
3350 this, pointers, Safepoint::kLazyDeopt); | 3350 this, pointers, Safepoint::kLazyDeopt); |
3351 // The number of arguments is stored in receiver which is r0, as expected | 3351 // The number of arguments is stored in receiver which is r0, as expected |
3352 // by InvokeFunction. | 3352 // by InvokeFunction. |
3353 ParameterCount actual(receiver); | 3353 ParameterCount actual(receiver); |
3354 __ InvokeFunction(function, actual, CALL_FUNCTION, safepoint_generator); | 3354 __ InvokeFunction(function, no_reg, actual, CALL_FUNCTION, |
| 3355 safepoint_generator); |
3355 } | 3356 } |
3356 | 3357 |
3357 | 3358 |
3358 void LCodeGen::DoPushArgument(LPushArgument* instr) { | 3359 void LCodeGen::DoPushArgument(LPushArgument* instr) { |
3359 LOperand* argument = instr->value(); | 3360 LOperand* argument = instr->value(); |
3360 if (argument->IsDoubleRegister() || argument->IsDoubleStackSlot()) { | 3361 if (argument->IsDoubleRegister() || argument->IsDoubleStackSlot()) { |
3361 Abort(kDoPushArgumentNotImplementedForDoubleType); | 3362 Abort(kDoPushArgumentNotImplementedForDoubleType); |
3362 } else { | 3363 } else { |
3363 Register argument_reg = EmitLoadRegister(argument, ip); | 3364 Register argument_reg = EmitLoadRegister(argument, ip); |
3364 __ push(argument_reg); | 3365 __ push(argument_reg); |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3720 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { | 3721 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { |
3721 DCHECK(ToRegister(instr->context()).is(cp)); | 3722 DCHECK(ToRegister(instr->context()).is(cp)); |
3722 DCHECK(ToRegister(instr->function()).is(r1)); | 3723 DCHECK(ToRegister(instr->function()).is(r1)); |
3723 DCHECK(instr->HasPointerMap()); | 3724 DCHECK(instr->HasPointerMap()); |
3724 | 3725 |
3725 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); | 3726 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); |
3726 if (known_function.is_null()) { | 3727 if (known_function.is_null()) { |
3727 LPointerMap* pointers = instr->pointer_map(); | 3728 LPointerMap* pointers = instr->pointer_map(); |
3728 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt); | 3729 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt); |
3729 ParameterCount count(instr->arity()); | 3730 ParameterCount count(instr->arity()); |
3730 __ InvokeFunction(r1, count, CALL_FUNCTION, generator); | 3731 __ InvokeFunction(r1, no_reg, count, CALL_FUNCTION, generator); |
3731 } else { | 3732 } else { |
3732 CallKnownFunction(known_function, | 3733 CallKnownFunction(known_function, |
3733 instr->hydrogen()->formal_parameter_count(), | 3734 instr->hydrogen()->formal_parameter_count(), |
3734 instr->arity(), instr); | 3735 instr->arity(), instr); |
3735 } | 3736 } |
3736 } | 3737 } |
3737 | 3738 |
3738 | 3739 |
3739 void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) { | 3740 void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) { |
3740 DCHECK(ToRegister(instr->result()).is(r0)); | 3741 DCHECK(ToRegister(instr->result()).is(r0)); |
(...skipping 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5762 __ push(ToRegister(instr->function())); | 5763 __ push(ToRegister(instr->function())); |
5763 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5764 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5764 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5765 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5765 } | 5766 } |
5766 | 5767 |
5767 | 5768 |
5768 #undef __ | 5769 #undef __ |
5769 | 5770 |
5770 } // namespace internal | 5771 } // namespace internal |
5771 } // namespace v8 | 5772 } // namespace v8 |
OLD | NEW |