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 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1961 } else { | 1961 } else { |
1962 DCHECK(instr->target()->IsRegister()); | 1962 DCHECK(instr->target()->IsRegister()); |
1963 Register target = ToRegister(instr->target()); | 1963 Register target = ToRegister(instr->target()); |
1964 generator.BeforeCall(__ CallSize(target)); | 1964 generator.BeforeCall(__ CallSize(target)); |
1965 __ Add(target, target, Code::kHeaderSize - kHeapObjectTag); | 1965 __ Add(target, target, Code::kHeaderSize - kHeapObjectTag); |
1966 __ Call(target); | 1966 __ Call(target); |
1967 } | 1967 } |
1968 generator.AfterCall(); | 1968 generator.AfterCall(); |
1969 } | 1969 } |
1970 | 1970 |
1971 RecordPushedArgumentsDelta(instr->hydrogen()->argument_delta()); | 1971 HCallWithDescriptor* hinstr = instr->hydrogen(); |
| 1972 RecordPushedArgumentsDelta(hinstr->argument_delta()); |
| 1973 |
| 1974 // HCallWithDescriptor instruction is translated to zero or more |
| 1975 // LPushArguments (they handle parameters passed on the stack) followed by |
| 1976 // a LCallWithDescriptor. Each LPushArguments instruction generated records |
| 1977 // the number of arguments pushed thus we need to offset them here. |
| 1978 // The |argument_delta()| used above "knows" only about JS parameters while |
| 1979 // we are dealing here with particular calling convention details. |
| 1980 RecordPushedArgumentsDelta(-hinstr->descriptor().GetStackParameterCount()); |
1972 } | 1981 } |
1973 | 1982 |
1974 | 1983 |
1975 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { | 1984 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { |
1976 CallRuntime(instr->function(), instr->arity(), instr); | 1985 CallRuntime(instr->function(), instr->arity(), instr); |
1977 RecordPushedArgumentsDelta(instr->hydrogen()->argument_delta()); | 1986 RecordPushedArgumentsDelta(instr->hydrogen()->argument_delta()); |
1978 } | 1987 } |
1979 | 1988 |
1980 | 1989 |
1981 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { | 1990 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { |
(...skipping 3668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5650 // Index is equal to negated out of object property index plus 1. | 5659 // Index is equal to negated out of object property index plus 1. |
5651 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5660 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
5652 __ Ldr(result, FieldMemOperand(result, | 5661 __ Ldr(result, FieldMemOperand(result, |
5653 FixedArray::kHeaderSize - kPointerSize)); | 5662 FixedArray::kHeaderSize - kPointerSize)); |
5654 __ Bind(deferred->exit()); | 5663 __ Bind(deferred->exit()); |
5655 __ Bind(&done); | 5664 __ Bind(&done); |
5656 } | 5665 } |
5657 | 5666 |
5658 } // namespace internal | 5667 } // namespace internal |
5659 } // namespace v8 | 5668 } // namespace v8 |
OLD | NEW |