Revision: 3950
Author: [email protected]
Date: Thu Feb 25 05:06:05 2010
Log: Adding 'static const' for arg numbers used with CallCFunction.
Review URL: http://codereview.chromium.org/660078
http://code.google.com/p/v8/source/detail?r=3950

Modified:
 /branches/bleeding_edge/src/arm/regexp-macro-assembler-arm.cc
 /branches/bleeding_edge/src/ia32/codegen-ia32.cc
 /branches/bleeding_edge/src/ia32/regexp-macro-assembler-ia32.cc
 /branches/bleeding_edge/src/x64/codegen-x64.cc
 /branches/bleeding_edge/src/x64/regexp-macro-assembler-x64.cc

=======================================
--- /branches/bleeding_edge/src/arm/regexp-macro-assembler-arm.cc Tue Jan 26 03:08:42 2010 +++ /branches/bleeding_edge/src/arm/regexp-macro-assembler-arm.cc Thu Feb 25 05:06:05 2010
@@ -765,7 +765,7 @@
     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 @@
 // 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());
=======================================
--- /branches/bleeding_edge/src/ia32/codegen-ia32.cc Thu Feb 25 04:18:55 2010 +++ /branches/bleeding_edge/src/ia32/codegen-ia32.cc Thu Feb 25 05:06:05 2010
@@ -5743,7 +5743,7 @@
   ASSERT(args->length() == 0);
   frame_->SpillAll();

-  int num_arguments = 0;
+  static const int num_arguments = 0;
   __ PrepareCallCFunction(num_arguments, eax);

   // Call V8::RandomPositiveSmi().
=======================================
--- /branches/bleeding_edge/src/ia32/regexp-macro-assembler-ia32.cc Thu Feb 25 04:18:55 2010 +++ /branches/bleeding_edge/src/ia32/regexp-macro-assembler-ia32.cc Thu Feb 25 05:06:05 2010
@@ -324,7 +324,7 @@
     __ 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 @@
     __ 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 @@
 // 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);
=======================================
--- /branches/bleeding_edge/src/x64/codegen-x64.cc      Thu Feb 25 04:18:55 2010
+++ /branches/bleeding_edge/src/x64/codegen-x64.cc      Thu Feb 25 05:06:05 2010
@@ -3958,7 +3958,7 @@
   frame_->SpillAll();
   __ push(rsi);

-  int num_arguments = 0;
+  static const int num_arguments = 0;
   __ PrepareCallCFunction(num_arguments);

   // Call V8::RandomPositiveSmi().
=======================================
--- /branches/bleeding_edge/src/x64/regexp-macro-assembler-x64.cc Fri Jan 29 02:33:27 2010 +++ /branches/bleeding_edge/src/x64/regexp-macro-assembler-x64.cc Thu Feb 25 05:06:05 2010
@@ -335,7 +335,7 @@
 #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 @@
 #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::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).

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to