| 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/mips64/lithium-codegen-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
| 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" |
| (...skipping 3453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3464 __ dsll(scratch, length, kPointerSizeLog2); | 3464 __ dsll(scratch, length, kPointerSizeLog2); |
| 3465 | 3465 |
| 3466 __ bind(&invoke); | 3466 __ bind(&invoke); |
| 3467 DCHECK(instr->HasPointerMap()); | 3467 DCHECK(instr->HasPointerMap()); |
| 3468 LPointerMap* pointers = instr->pointer_map(); | 3468 LPointerMap* pointers = instr->pointer_map(); |
| 3469 SafepointGenerator safepoint_generator( | 3469 SafepointGenerator safepoint_generator( |
| 3470 this, pointers, Safepoint::kLazyDeopt); | 3470 this, pointers, Safepoint::kLazyDeopt); |
| 3471 // The number of arguments is stored in receiver which is a0, as expected | 3471 // The number of arguments is stored in receiver which is a0, as expected |
| 3472 // by InvokeFunction. | 3472 // by InvokeFunction. |
| 3473 ParameterCount actual(receiver); | 3473 ParameterCount actual(receiver); |
| 3474 __ InvokeFunction(function, actual, CALL_FUNCTION, safepoint_generator); | 3474 __ InvokeFunction(function, no_reg, actual, CALL_FUNCTION, |
| 3475 safepoint_generator); |
| 3475 } | 3476 } |
| 3476 | 3477 |
| 3477 | 3478 |
| 3478 void LCodeGen::DoPushArgument(LPushArgument* instr) { | 3479 void LCodeGen::DoPushArgument(LPushArgument* instr) { |
| 3479 LOperand* argument = instr->value(); | 3480 LOperand* argument = instr->value(); |
| 3480 if (argument->IsDoubleRegister() || argument->IsDoubleStackSlot()) { | 3481 if (argument->IsDoubleRegister() || argument->IsDoubleStackSlot()) { |
| 3481 Abort(kDoPushArgumentNotImplementedForDoubleType); | 3482 Abort(kDoPushArgumentNotImplementedForDoubleType); |
| 3482 } else { | 3483 } else { |
| 3483 Register argument_reg = EmitLoadRegister(argument, at); | 3484 Register argument_reg = EmitLoadRegister(argument, at); |
| 3484 __ push(argument_reg); | 3485 __ push(argument_reg); |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3904 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { | 3905 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { |
| 3905 DCHECK(ToRegister(instr->context()).is(cp)); | 3906 DCHECK(ToRegister(instr->context()).is(cp)); |
| 3906 DCHECK(ToRegister(instr->function()).is(a1)); | 3907 DCHECK(ToRegister(instr->function()).is(a1)); |
| 3907 DCHECK(instr->HasPointerMap()); | 3908 DCHECK(instr->HasPointerMap()); |
| 3908 | 3909 |
| 3909 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); | 3910 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); |
| 3910 if (known_function.is_null()) { | 3911 if (known_function.is_null()) { |
| 3911 LPointerMap* pointers = instr->pointer_map(); | 3912 LPointerMap* pointers = instr->pointer_map(); |
| 3912 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt); | 3913 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt); |
| 3913 ParameterCount count(instr->arity()); | 3914 ParameterCount count(instr->arity()); |
| 3914 __ InvokeFunction(a1, count, CALL_FUNCTION, generator); | 3915 __ InvokeFunction(a1, no_reg, count, CALL_FUNCTION, generator); |
| 3915 } else { | 3916 } else { |
| 3916 CallKnownFunction(known_function, | 3917 CallKnownFunction(known_function, |
| 3917 instr->hydrogen()->formal_parameter_count(), | 3918 instr->hydrogen()->formal_parameter_count(), |
| 3918 instr->arity(), instr); | 3919 instr->arity(), instr); |
| 3919 } | 3920 } |
| 3920 } | 3921 } |
| 3921 | 3922 |
| 3922 | 3923 |
| 3923 void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) { | 3924 void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) { |
| 3924 DCHECK(ToRegister(instr->result()).is(v0)); | 3925 DCHECK(ToRegister(instr->result()).is(v0)); |
| (...skipping 2078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6003 __ Push(at, ToRegister(instr->function())); | 6004 __ Push(at, ToRegister(instr->function())); |
| 6004 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6005 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6005 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6006 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6006 } | 6007 } |
| 6007 | 6008 |
| 6008 | 6009 |
| 6009 #undef __ | 6010 #undef __ |
| 6010 | 6011 |
| 6011 } // namespace internal | 6012 } // namespace internal |
| 6012 } // namespace v8 | 6013 } // namespace v8 |
| OLD | NEW |