OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/arm64/lithium-codegen-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
6 | 6 |
7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1627 __ Subs(length, length, 1); | 1627 __ Subs(length, length, 1); |
1628 __ B(ne, &loop); | 1628 __ B(ne, &loop); |
1629 | 1629 |
1630 __ Bind(&invoke); | 1630 __ Bind(&invoke); |
1631 DCHECK(instr->HasPointerMap()); | 1631 DCHECK(instr->HasPointerMap()); |
1632 LPointerMap* pointers = instr->pointer_map(); | 1632 LPointerMap* pointers = instr->pointer_map(); |
1633 SafepointGenerator safepoint_generator(this, pointers, Safepoint::kLazyDeopt); | 1633 SafepointGenerator safepoint_generator(this, pointers, Safepoint::kLazyDeopt); |
1634 // The number of arguments is stored in argc (receiver) which is x0, as | 1634 // The number of arguments is stored in argc (receiver) which is x0, as |
1635 // expected by InvokeFunction. | 1635 // expected by InvokeFunction. |
1636 ParameterCount actual(argc); | 1636 ParameterCount actual(argc); |
1637 __ InvokeFunction(function, actual, CALL_FUNCTION, safepoint_generator); | 1637 __ InvokeFunction(function, no_reg, actual, CALL_FUNCTION, |
| 1638 safepoint_generator); |
1638 } | 1639 } |
1639 | 1640 |
1640 | 1641 |
1641 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 1642 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
1642 Register result = ToRegister(instr->result()); | 1643 Register result = ToRegister(instr->result()); |
1643 | 1644 |
1644 if (instr->hydrogen()->from_inlined()) { | 1645 if (instr->hydrogen()->from_inlined()) { |
1645 // When we are inside an inlined function, the arguments are the last things | 1646 // When we are inside an inlined function, the arguments are the last things |
1646 // that have been pushed on the stack. Therefore the arguments array can be | 1647 // that have been pushed on the stack. Therefore the arguments array can be |
1647 // accessed directly from jssp. | 1648 // accessed directly from jssp. |
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2999 DCHECK(ToRegister(instr->context()).is(cp)); | 3000 DCHECK(ToRegister(instr->context()).is(cp)); |
3000 // The function is required to be in x1. | 3001 // The function is required to be in x1. |
3001 DCHECK(ToRegister(instr->function()).is(x1)); | 3002 DCHECK(ToRegister(instr->function()).is(x1)); |
3002 DCHECK(instr->HasPointerMap()); | 3003 DCHECK(instr->HasPointerMap()); |
3003 | 3004 |
3004 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); | 3005 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); |
3005 if (known_function.is_null()) { | 3006 if (known_function.is_null()) { |
3006 LPointerMap* pointers = instr->pointer_map(); | 3007 LPointerMap* pointers = instr->pointer_map(); |
3007 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt); | 3008 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt); |
3008 ParameterCount count(instr->arity()); | 3009 ParameterCount count(instr->arity()); |
3009 __ InvokeFunction(x1, count, CALL_FUNCTION, generator); | 3010 __ InvokeFunction(x1, no_reg, count, CALL_FUNCTION, generator); |
3010 } else { | 3011 } else { |
3011 CallKnownFunction(known_function, | 3012 CallKnownFunction(known_function, |
3012 instr->hydrogen()->formal_parameter_count(), | 3013 instr->hydrogen()->formal_parameter_count(), |
3013 instr->arity(), instr); | 3014 instr->arity(), instr); |
3014 } | 3015 } |
3015 RecordPushedArgumentsDelta(instr->hydrogen()->argument_delta()); | 3016 RecordPushedArgumentsDelta(instr->hydrogen()->argument_delta()); |
3016 } | 3017 } |
3017 | 3018 |
3018 | 3019 |
3019 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { | 3020 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { |
(...skipping 2916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5936 Handle<ScopeInfo> scope_info = instr->scope_info(); | 5937 Handle<ScopeInfo> scope_info = instr->scope_info(); |
5937 __ Push(scope_info); | 5938 __ Push(scope_info); |
5938 __ Push(ToRegister(instr->function())); | 5939 __ Push(ToRegister(instr->function())); |
5939 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5940 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5940 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5941 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5941 } | 5942 } |
5942 | 5943 |
5943 | 5944 |
5944 } // namespace internal | 5945 } // namespace internal |
5945 } // namespace v8 | 5946 } // namespace v8 |
OLD | NEW |