Adding 'static const' for arg numbers used with CallCFunction.

Review URL: http://codereview.chromium.org/660078

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
serya@chromium.org 2010-02-25 13:06:05 +00:00
parent 945673574e
commit 164daeda7a
5 changed files with 10 additions and 10 deletions

View File

@ -765,7 +765,7 @@ Handle<Object> RegExpMacroAssemblerARM::GetCode(Handle<String> source) {
Label grow_failed;
// Call GrowStack(backtrack_stackpointer())
int num_arguments = 2;
static const int num_arguments = 2;
FrameAlign(num_arguments, r0);
__ mov(r0, backtrack_stackpointer());
__ add(r1, frame_pointer(), Operand(kStackHighEnd));
@ -966,7 +966,7 @@ void RegExpMacroAssemblerARM::WriteStackPointerToRegister(int reg) {
// Private methods:
void RegExpMacroAssemblerARM::CallCheckStackGuardState(Register scratch) {
int num_arguments = 3;
static const int num_arguments = 3;
FrameAlign(num_arguments, scratch);
// RegExp code frame pointer.
__ mov(r2, frame_pointer());

View File

@ -5743,7 +5743,7 @@ void CodeGenerator::GenerateRandomPositiveSmi(ZoneList<Expression*>* args) {
ASSERT(args->length() == 0);
frame_->SpillAll();
int num_arguments = 0;
static const int num_arguments = 0;
__ PrepareCallCFunction(num_arguments, eax);
// Call V8::RandomPositiveSmi().

View File

@ -324,7 +324,7 @@ void RegExpMacroAssemblerIA32::CheckNotBackReferenceIgnoreCase(
__ push(backtrack_stackpointer());
__ push(ebx);
const int argument_count = 3;
static const int argument_count = 3;
__ PrepareCallCFunction(argument_count, ecx);
// Put arguments into allocated stack area, last argument highest on stack.
// Parameters are
@ -784,7 +784,7 @@ Handle<Object> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) {
__ push(edi);
// Call GrowStack(backtrack_stackpointer())
int num_arguments = 2;
static const int num_arguments = 2;
__ PrepareCallCFunction(num_arguments, ebx);
__ lea(eax, Operand(ebp, kStackHighEnd));
__ mov(Operand(esp, 1 * kPointerSize), eax);
@ -951,7 +951,7 @@ void RegExpMacroAssemblerIA32::WriteStackPointerToRegister(int reg) {
// Private methods:
void RegExpMacroAssemblerIA32::CallCheckStackGuardState(Register scratch) {
int num_arguments = 3;
static const int num_arguments = 3;
__ PrepareCallCFunction(num_arguments, scratch);
// RegExp code frame pointer.
__ mov(Operand(esp, 2 * kPointerSize), ebp);

View File

@ -3958,7 +3958,7 @@ void CodeGenerator::GenerateRandomPositiveSmi(ZoneList<Expression*>* args) {
frame_->SpillAll();
__ push(rsi);
int num_arguments = 0;
static const int num_arguments = 0;
__ PrepareCallCFunction(num_arguments);
// Call V8::RandomPositiveSmi().

View File

@ -335,7 +335,7 @@ void RegExpMacroAssemblerX64::CheckNotBackReferenceIgnoreCase(
#endif
__ push(backtrack_stackpointer());
int num_arguments = 3;
static const int num_arguments = 3;
__ PrepareCallCFunction(num_arguments);
// Put arguments into parameter registers. Parameters are
@ -849,7 +849,7 @@ Handle<Object> RegExpMacroAssemblerX64::GetCode(Handle<String> source) {
#endif
// Call GrowStack(backtrack_stackpointer())
int num_arguments = 2;
static const int num_arguments = 2;
__ PrepareCallCFunction(num_arguments);
#ifdef _WIN64
// Microsoft passes parameters in rcx, rdx.
@ -1029,7 +1029,7 @@ void RegExpMacroAssemblerX64::WriteStackPointerToRegister(int reg) {
void RegExpMacroAssemblerX64::CallCheckStackGuardState() {
// This function call preserves no register values. Caller should
// store anything volatile in a C call or overwritten by this function.
int num_arguments = 3;
static const int num_arguments = 3;
__ PrepareCallCFunction(num_arguments);
#ifdef _WIN64
// Second argument: Code* of self. (Do this before overwriting r8).