Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: src/crankshaft/arm64/lithium-codegen-arm64.cc

Issue 2353303002: [crankshaft] HCallWithDescriptor is now able to pass arguments on the stack. (Closed)
Patch Set: arm64 fix Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/crankshaft/arm64/lithium-arm64.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-arm64.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698