Revision: 12187
Author:   [email protected]
Date:     Wed Jul 25 07:27:14 2012
Log:      Fix static initializer check.

[email protected]
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10824013
http://code.google.com/p/v8/source/detail?r=12187

Modified:
 /branches/bleeding_edge/src/arm/full-codegen-arm.cc
 /branches/bleeding_edge/src/full-codegen.h
 /branches/bleeding_edge/src/ia32/full-codegen-ia32.cc
 /branches/bleeding_edge/src/mips/full-codegen-mips.cc
 /branches/bleeding_edge/src/x64/full-codegen-x64.cc

=======================================
--- /branches/bleeding_edge/src/arm/full-codegen-arm.cc Wed Jul 25 06:51:29 2012 +++ /branches/bleeding_edge/src/arm/full-codegen-arm.cc Wed Jul 25 07:27:14 2012
@@ -336,10 +336,6 @@
   __ mov(r3, Operand(Smi::FromInt(reset_value)));
   __ str(r3, FieldMemOperand(r2, JSGlobalPropertyCell::kValueOffset));
 }
-
-
-const int FullCodeGenerator::kMaxBackEdgeWeight = 127;
-const int FullCodeGenerator::kBackEdgeDistanceUnit = 142;


 void FullCodeGenerator::EmitStackCheck(IterationStatement* stmt,
=======================================
--- /branches/bleeding_edge/src/full-codegen.h  Wed Jul 25 06:51:29 2012
+++ /branches/bleeding_edge/src/full-codegen.h  Wed Jul 25 07:27:14 2012
@@ -113,8 +113,20 @@

   Zone* zone() const { return zone_; }

-  static const int kMaxBackEdgeWeight;
-  static const int kBackEdgeDistanceUnit;
+  static const int kMaxBackEdgeWeight = 127;
+
+#if V8_TARGET_ARCH_IA32
+  static const int kBackEdgeDistanceUnit = 100;
+#elif V8_TARGET_ARCH_X64
+  static const int kBackEdgeDistanceUnit = 162;
+#elif V8_TARGET_ARCH_ARM
+  static const int kBackEdgeDistanceUnit = 142;
+#elif V8_TARGET_ARCH_MIPS
+  static const int kBackEdgeDistanceUnit = 142;
+#else
+#error Unsupported target architecture.
+#endif
+

  private:
   class Breakable;
=======================================
--- /branches/bleeding_edge/src/ia32/full-codegen-ia32.cc Wed Jul 25 06:51:29 2012 +++ /branches/bleeding_edge/src/ia32/full-codegen-ia32.cc Wed Jul 25 07:27:14 2012
@@ -323,10 +323,6 @@
   __ mov(FieldOperand(ebx, JSGlobalPropertyCell::kValueOffset),
          Immediate(Smi::FromInt(reset_value)));
 }
-
-
-const int FullCodeGenerator::kMaxBackEdgeWeight = 127;
-const int FullCodeGenerator::kBackEdgeDistanceUnit = 100;


 void FullCodeGenerator::EmitStackCheck(IterationStatement* stmt,
=======================================
--- /branches/bleeding_edge/src/mips/full-codegen-mips.cc Wed Jul 25 06:51:29 2012 +++ /branches/bleeding_edge/src/mips/full-codegen-mips.cc Wed Jul 25 07:27:14 2012
@@ -338,10 +338,6 @@
   __ li(a3, Operand(Smi::FromInt(reset_value)));
   __ sw(a3, FieldMemOperand(a2, JSGlobalPropertyCell::kValueOffset));
 }
-
-
-const int FullCodeGenerator::kMaxBackEdgeWeight = 127;
-const int FullCodeGenerator::kBackEdgeDistanceUnit = 142;


 void FullCodeGenerator::EmitStackCheck(IterationStatement* stmt,
=======================================
--- /branches/bleeding_edge/src/x64/full-codegen-x64.cc Wed Jul 25 06:51:29 2012 +++ /branches/bleeding_edge/src/x64/full-codegen-x64.cc Wed Jul 25 07:27:14 2012
@@ -319,10 +319,6 @@
   __ movq(FieldOperand(rbx, JSGlobalPropertyCell::kValueOffset),
           kScratchRegister);
 }
-
-
-const int FullCodeGenerator::kMaxBackEdgeWeight = 127;
-const int FullCodeGenerator::kBackEdgeDistanceUnit = 162;


 void FullCodeGenerator::EmitStackCheck(IterationStatement* stmt,

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

Reply via email to