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

Side by Side Diff: src/arm/macro-assembler-arm.h

Issue 1553703002: [runtime] TailCallRuntime and CallRuntime should use default argument counts (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2015-12-29_TailCallRuntime_default_result_size_1_1550923002
Patch Set: Created 4 years, 11 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
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 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_ 5 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_
6 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_ 6 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_
7 7
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/frames.h" 10 #include "src/frames.h"
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 TypeFeedbackId ast_id = TypeFeedbackId::None(), 1058 TypeFeedbackId ast_id = TypeFeedbackId::None(),
1059 Condition cond = al); 1059 Condition cond = al);
1060 1060
1061 // Call a code stub. 1061 // Call a code stub.
1062 void TailCallStub(CodeStub* stub, Condition cond = al); 1062 void TailCallStub(CodeStub* stub, Condition cond = al);
1063 1063
1064 // Call a runtime routine. 1064 // Call a runtime routine.
1065 void CallRuntime(const Runtime::Function* f, 1065 void CallRuntime(const Runtime::Function* f,
1066 int num_arguments, 1066 int num_arguments,
1067 SaveFPRegsMode save_doubles = kDontSaveFPRegs); 1067 SaveFPRegsMode save_doubles = kDontSaveFPRegs);
1068 void CallRuntimeSaveDoubles(Runtime::FunctionId id) { 1068 void CallRuntimeSaveDoubles(Runtime::FunctionId fid) {
1069 const Runtime::Function* function = Runtime::FunctionForId(id); 1069 const Runtime::Function* function = Runtime::FunctionForId(fid);
1070 CallRuntime(function, function->nargs, kSaveFPRegs); 1070 CallRuntime(function, function->nargs, kSaveFPRegs);
1071 } 1071 }
1072 1072
1073 // Convenience function: Same as above, but takes the fid instead. 1073 // Convenience function: Same as above, but takes the fid instead.
1074 void CallRuntime(Runtime::FunctionId id, 1074 void CallRuntime(Runtime::FunctionId fid,
1075 int num_arguments,
1076 SaveFPRegsMode save_doubles = kDontSaveFPRegs) { 1075 SaveFPRegsMode save_doubles = kDontSaveFPRegs) {
1077 CallRuntime(Runtime::FunctionForId(id), num_arguments, save_doubles); 1076 const Runtime::Function* function = Runtime::FunctionForId(fid);
1077 CallRuntime(function, function->nargs, save_doubles);
1078 }
1079
1080 // Convenience function: Same as above, but takes the fid instead.
1081 void CallRuntime(Runtime::FunctionId fid, int num_arguments,
1082 SaveFPRegsMode save_doubles = kDontSaveFPRegs) {
1083 CallRuntime(Runtime::FunctionForId(fid), num_arguments, save_doubles);
1078 } 1084 }
1079 1085
1080 // Convenience function: call an external reference. 1086 // Convenience function: call an external reference.
1081 void CallExternalReference(const ExternalReference& ext, 1087 void CallExternalReference(const ExternalReference& ext,
1082 int num_arguments); 1088 int num_arguments);
1083 1089
1084 // Tail call of a runtime routine (jump).
1085 // Like JumpToExternalReference, but also takes care of passing the number
1086 // of parameters.
1087 void TailCallExternalReference(const ExternalReference& ext,
1088 int num_arguments);
1089
1090 // Convenience function: tail call a runtime routine (jump). 1090 // Convenience function: tail call a runtime routine (jump).
1091 void TailCallRuntime(Runtime::FunctionId fid, int num_arguments); 1091 void TailCallRuntime(Runtime::FunctionId fid);
1092 1092
1093 int CalculateStackPassedWords(int num_reg_arguments, 1093 int CalculateStackPassedWords(int num_reg_arguments,
1094 int num_double_arguments); 1094 int num_double_arguments);
1095 1095
1096 // Before calling a C-function from generated code, align arguments on stack. 1096 // Before calling a C-function from generated code, align arguments on stack.
1097 // After aligning the frame, non-register arguments must be stored in 1097 // After aligning the frame, non-register arguments must be stored in
1098 // sp[0], sp[4], etc., not pushed. The argument count assumes all arguments 1098 // sp[0], sp[4], etc., not pushed. The argument count assumes all arguments
1099 // are word sized. If double arguments are used, this function assumes that 1099 // are word sized. If double arguments are used, this function assumes that
1100 // all double arguments are stored before core registers; otherwise the 1100 // all double arguments are stored before core registers; otherwise the
1101 // correct alignment of the double values is not guaranteed. 1101 // correct alignment of the double values is not guaranteed.
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 1539 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
1540 #else 1540 #else
1541 #define ACCESS_MASM(masm) masm-> 1541 #define ACCESS_MASM(masm) masm->
1542 #endif 1542 #endif
1543 1543
1544 1544
1545 } // namespace internal 1545 } // namespace internal
1546 } // namespace v8 1546 } // namespace v8
1547 1547
1548 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ 1548 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698