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:
parent
945673574e
commit
164daeda7a
@ -765,7 +765,7 @@ Handle<Object> RegExpMacroAssemblerARM::GetCode(Handle<String> source) {
|
|||||||
Label grow_failed;
|
Label grow_failed;
|
||||||
|
|
||||||
// Call GrowStack(backtrack_stackpointer())
|
// Call GrowStack(backtrack_stackpointer())
|
||||||
int num_arguments = 2;
|
static const int num_arguments = 2;
|
||||||
FrameAlign(num_arguments, r0);
|
FrameAlign(num_arguments, r0);
|
||||||
__ mov(r0, backtrack_stackpointer());
|
__ mov(r0, backtrack_stackpointer());
|
||||||
__ add(r1, frame_pointer(), Operand(kStackHighEnd));
|
__ add(r1, frame_pointer(), Operand(kStackHighEnd));
|
||||||
@ -966,7 +966,7 @@ void RegExpMacroAssemblerARM::WriteStackPointerToRegister(int reg) {
|
|||||||
// Private methods:
|
// Private methods:
|
||||||
|
|
||||||
void RegExpMacroAssemblerARM::CallCheckStackGuardState(Register scratch) {
|
void RegExpMacroAssemblerARM::CallCheckStackGuardState(Register scratch) {
|
||||||
int num_arguments = 3;
|
static const int num_arguments = 3;
|
||||||
FrameAlign(num_arguments, scratch);
|
FrameAlign(num_arguments, scratch);
|
||||||
// RegExp code frame pointer.
|
// RegExp code frame pointer.
|
||||||
__ mov(r2, frame_pointer());
|
__ mov(r2, frame_pointer());
|
||||||
|
@ -5743,7 +5743,7 @@ void CodeGenerator::GenerateRandomPositiveSmi(ZoneList<Expression*>* args) {
|
|||||||
ASSERT(args->length() == 0);
|
ASSERT(args->length() == 0);
|
||||||
frame_->SpillAll();
|
frame_->SpillAll();
|
||||||
|
|
||||||
int num_arguments = 0;
|
static const int num_arguments = 0;
|
||||||
__ PrepareCallCFunction(num_arguments, eax);
|
__ PrepareCallCFunction(num_arguments, eax);
|
||||||
|
|
||||||
// Call V8::RandomPositiveSmi().
|
// Call V8::RandomPositiveSmi().
|
||||||
|
@ -324,7 +324,7 @@ void RegExpMacroAssemblerIA32::CheckNotBackReferenceIgnoreCase(
|
|||||||
__ push(backtrack_stackpointer());
|
__ push(backtrack_stackpointer());
|
||||||
__ push(ebx);
|
__ push(ebx);
|
||||||
|
|
||||||
const int argument_count = 3;
|
static const int argument_count = 3;
|
||||||
__ PrepareCallCFunction(argument_count, ecx);
|
__ PrepareCallCFunction(argument_count, ecx);
|
||||||
// Put arguments into allocated stack area, last argument highest on stack.
|
// Put arguments into allocated stack area, last argument highest on stack.
|
||||||
// Parameters are
|
// Parameters are
|
||||||
@ -784,7 +784,7 @@ Handle<Object> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) {
|
|||||||
__ push(edi);
|
__ push(edi);
|
||||||
|
|
||||||
// Call GrowStack(backtrack_stackpointer())
|
// Call GrowStack(backtrack_stackpointer())
|
||||||
int num_arguments = 2;
|
static const int num_arguments = 2;
|
||||||
__ PrepareCallCFunction(num_arguments, ebx);
|
__ PrepareCallCFunction(num_arguments, ebx);
|
||||||
__ lea(eax, Operand(ebp, kStackHighEnd));
|
__ lea(eax, Operand(ebp, kStackHighEnd));
|
||||||
__ mov(Operand(esp, 1 * kPointerSize), eax);
|
__ mov(Operand(esp, 1 * kPointerSize), eax);
|
||||||
@ -951,7 +951,7 @@ void RegExpMacroAssemblerIA32::WriteStackPointerToRegister(int reg) {
|
|||||||
// Private methods:
|
// Private methods:
|
||||||
|
|
||||||
void RegExpMacroAssemblerIA32::CallCheckStackGuardState(Register scratch) {
|
void RegExpMacroAssemblerIA32::CallCheckStackGuardState(Register scratch) {
|
||||||
int num_arguments = 3;
|
static const int num_arguments = 3;
|
||||||
__ PrepareCallCFunction(num_arguments, scratch);
|
__ PrepareCallCFunction(num_arguments, scratch);
|
||||||
// RegExp code frame pointer.
|
// RegExp code frame pointer.
|
||||||
__ mov(Operand(esp, 2 * kPointerSize), ebp);
|
__ mov(Operand(esp, 2 * kPointerSize), ebp);
|
||||||
|
@ -3958,7 +3958,7 @@ void CodeGenerator::GenerateRandomPositiveSmi(ZoneList<Expression*>* args) {
|
|||||||
frame_->SpillAll();
|
frame_->SpillAll();
|
||||||
__ push(rsi);
|
__ push(rsi);
|
||||||
|
|
||||||
int num_arguments = 0;
|
static const int num_arguments = 0;
|
||||||
__ PrepareCallCFunction(num_arguments);
|
__ PrepareCallCFunction(num_arguments);
|
||||||
|
|
||||||
// Call V8::RandomPositiveSmi().
|
// Call V8::RandomPositiveSmi().
|
||||||
|
@ -335,7 +335,7 @@ void RegExpMacroAssemblerX64::CheckNotBackReferenceIgnoreCase(
|
|||||||
#endif
|
#endif
|
||||||
__ push(backtrack_stackpointer());
|
__ push(backtrack_stackpointer());
|
||||||
|
|
||||||
int num_arguments = 3;
|
static const int num_arguments = 3;
|
||||||
__ PrepareCallCFunction(num_arguments);
|
__ PrepareCallCFunction(num_arguments);
|
||||||
|
|
||||||
// Put arguments into parameter registers. Parameters are
|
// Put arguments into parameter registers. Parameters are
|
||||||
@ -849,7 +849,7 @@ Handle<Object> RegExpMacroAssemblerX64::GetCode(Handle<String> source) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Call GrowStack(backtrack_stackpointer())
|
// Call GrowStack(backtrack_stackpointer())
|
||||||
int num_arguments = 2;
|
static const int num_arguments = 2;
|
||||||
__ PrepareCallCFunction(num_arguments);
|
__ PrepareCallCFunction(num_arguments);
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
// Microsoft passes parameters in rcx, rdx.
|
// Microsoft passes parameters in rcx, rdx.
|
||||||
@ -1029,7 +1029,7 @@ void RegExpMacroAssemblerX64::WriteStackPointerToRegister(int reg) {
|
|||||||
void RegExpMacroAssemblerX64::CallCheckStackGuardState() {
|
void RegExpMacroAssemblerX64::CallCheckStackGuardState() {
|
||||||
// This function call preserves no register values. Caller should
|
// This function call preserves no register values. Caller should
|
||||||
// store anything volatile in a C call or overwritten by this function.
|
// 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);
|
__ PrepareCallCFunction(num_arguments);
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
// Second argument: Code* of self. (Do this before overwriting r8).
|
// Second argument: Code* of self. (Do this before overwriting r8).
|
||||||
|
Loading…
Reference in New Issue
Block a user