diff --git a/src/arm/regexp-macro-assembler-arm.cc b/src/arm/regexp-macro-assembler-arm.cc index 9dd3b93266..f621be47be 100644 --- a/src/arm/regexp-macro-assembler-arm.cc +++ b/src/arm/regexp-macro-assembler-arm.cc @@ -765,7 +765,7 @@ Handle RegExpMacroAssemblerARM::GetCode(Handle 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()); diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc index 816f16ad2a..d8c317f61a 100644 --- a/src/ia32/codegen-ia32.cc +++ b/src/ia32/codegen-ia32.cc @@ -5743,7 +5743,7 @@ void CodeGenerator::GenerateRandomPositiveSmi(ZoneList* args) { ASSERT(args->length() == 0); frame_->SpillAll(); - int num_arguments = 0; + static const int num_arguments = 0; __ PrepareCallCFunction(num_arguments, eax); // Call V8::RandomPositiveSmi(). diff --git a/src/ia32/regexp-macro-assembler-ia32.cc b/src/ia32/regexp-macro-assembler-ia32.cc index e5edf74f5e..74b9d129cc 100644 --- a/src/ia32/regexp-macro-assembler-ia32.cc +++ b/src/ia32/regexp-macro-assembler-ia32.cc @@ -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 RegExpMacroAssemblerIA32::GetCode(Handle 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); diff --git a/src/x64/codegen-x64.cc b/src/x64/codegen-x64.cc index c8dd0b66f8..bf8bee4712 100644 --- a/src/x64/codegen-x64.cc +++ b/src/x64/codegen-x64.cc @@ -3958,7 +3958,7 @@ void CodeGenerator::GenerateRandomPositiveSmi(ZoneList* args) { frame_->SpillAll(); __ push(rsi); - int num_arguments = 0; + static const int num_arguments = 0; __ PrepareCallCFunction(num_arguments); // Call V8::RandomPositiveSmi(). diff --git a/src/x64/regexp-macro-assembler-x64.cc b/src/x64/regexp-macro-assembler-x64.cc index 026301b2af..6e7d9c9e07 100644 --- a/src/x64/regexp-macro-assembler-x64.cc +++ b/src/x64/regexp-macro-assembler-x64.cc @@ -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 RegExpMacroAssemblerX64::GetCode(Handle 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).