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

Side by Side Diff: src/crankshaft/mips64/lithium-mips64.cc

Issue 2353303002: [crankshaft] HCallWithDescriptor is now able to pass arguments on the stack. (Closed)
Patch Set: arm64 fix Created 4 years, 3 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/mips/lithium-mips.cc ('k') | src/crankshaft/ppc/lithium-ppc.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 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-mips64.h" 5 #include "src/crankshaft/mips64/lithium-mips64.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_MIPS64 9 #if V8_TARGET_ARCH_MIPS64
10 10
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 999
1000 LInstruction* LChunkBuilder::DoDeclareGlobals(HDeclareGlobals* instr) { 1000 LInstruction* LChunkBuilder::DoDeclareGlobals(HDeclareGlobals* instr) {
1001 LOperand* context = UseFixed(instr->context(), cp); 1001 LOperand* context = UseFixed(instr->context(), cp);
1002 return MarkAsCall(new(zone()) LDeclareGlobals(context), instr); 1002 return MarkAsCall(new(zone()) LDeclareGlobals(context), instr);
1003 } 1003 }
1004 1004
1005 1005
1006 LInstruction* LChunkBuilder::DoCallWithDescriptor( 1006 LInstruction* LChunkBuilder::DoCallWithDescriptor(
1007 HCallWithDescriptor* instr) { 1007 HCallWithDescriptor* instr) {
1008 CallInterfaceDescriptor descriptor = instr->descriptor(); 1008 CallInterfaceDescriptor descriptor = instr->descriptor();
1009 DCHECK_EQ(descriptor.GetParameterCount() +
1010 LCallWithDescriptor::kImplicitRegisterParameterCount,
1011 instr->OperandCount());
1009 1012
1010 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); 1013 LOperand* target = UseRegisterOrConstantAtStart(instr->target());
1011 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); 1014 ZoneList<LOperand*> ops(instr->OperandCount(), zone());
1012 // Target 1015 // Target
1013 ops.Add(target, zone()); 1016 ops.Add(target, zone());
1014 // Context 1017 // Context
1015 LOperand* op = UseFixed(instr->OperandAt(1), cp); 1018 LOperand* op = UseFixed(instr->OperandAt(1), cp);
1016 ops.Add(op, zone()); 1019 ops.Add(op, zone());
1017 // Other register parameters 1020 // Load register parameters.
1018 for (int i = LCallWithDescriptor::kImplicitRegisterParameterCount; 1021 int i = 0;
1019 i < instr->OperandCount(); i++) { 1022 for (; i < descriptor.GetRegisterParameterCount(); i++) {
1020 op = 1023 op = UseFixed(instr->OperandAt(
1021 UseFixed(instr->OperandAt(i), 1024 i + LCallWithDescriptor::kImplicitRegisterParameterCount),
1022 descriptor.GetRegisterParameter( 1025 descriptor.GetRegisterParameter(i));
1023 i - LCallWithDescriptor::kImplicitRegisterParameterCount));
1024 ops.Add(op, zone()); 1026 ops.Add(op, zone());
1025 } 1027 }
1028 // Push stack parameters.
1029 for (; i < descriptor.GetParameterCount(); i++) {
1030 op = UseAny(instr->OperandAt(
1031 i + LCallWithDescriptor::kImplicitRegisterParameterCount));
1032 AddInstruction(new (zone()) LPushArgument(op), instr);
1033 }
1026 1034
1027 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( 1035 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor(
1028 descriptor, ops, zone()); 1036 descriptor, ops, zone());
1029 if (instr->syntactic_tail_call_mode() == TailCallMode::kAllow) { 1037 if (instr->syntactic_tail_call_mode() == TailCallMode::kAllow) {
1030 result->MarkAsSyntacticTailCall(); 1038 result->MarkAsSyntacticTailCall();
1031 } 1039 }
1032 return MarkAsCall(DefineFixed(result, v0), instr); 1040 return MarkAsCall(DefineFixed(result, v0), instr);
1033 } 1041 }
1034 1042
1035 1043
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after
2399 LOperand* index = UseTempRegister(instr->index()); 2407 LOperand* index = UseTempRegister(instr->index());
2400 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); 2408 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index);
2401 LInstruction* result = DefineSameAsFirst(load); 2409 LInstruction* result = DefineSameAsFirst(load);
2402 return AssignPointerMap(result); 2410 return AssignPointerMap(result);
2403 } 2411 }
2404 2412
2405 } // namespace internal 2413 } // namespace internal
2406 } // namespace v8 2414 } // namespace v8
2407 2415
2408 #endif // V8_TARGET_ARCH_MIPS64 2416 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-mips.cc ('k') | src/crankshaft/ppc/lithium-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698