Reviewers: Christian Plesner Hansen,

Description:
Fix build (someone tell gcc you can't take the address of a static
const int and someone tell MSVC it's OK to define a static const int
in a .cc file).

Please review this at http://codereview.chromium.org/13656

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
   M     src/jsregexp.cc
   M     src/objects.cc


Index: src/objects.cc
===================================================================
--- src/objects.cc      (revision 941)
+++ src/objects.cc      (working copy)
@@ -48,9 +48,6 @@
  const int kGetterIndex = 0;
  const int kSetterIndex = 1;

-const int String::kMaxAsciiCharCode;
-const int String::kMaxUC16CharCode;
-
  bool Object::IsInstanceOf(FunctionTemplateInfo* expected) {
    // There is a constraint on the object; check
    if (!this->IsJSObject()) return false;
Index: src/jsregexp.cc
===================================================================
--- src/jsregexp.cc     (revision 941)
+++ src/jsregexp.cc     (working copy)
@@ -1715,9 +1715,12 @@
                            bool check_offset,
                            bool ascii) {
    ZoneList<CharacterRange>* ranges = cc->ranges();
-  const int max_char = ascii ?
-                       String::kMaxAsciiCharCode :
-                       String::kMaxUC16CharCode;
+  int max_char;
+  if (ascii) {
+    max_char = String::kMaxAsciiCharCode;
+  } else {
+    max_char = String::kMaxUC16CharCode;
+  }

    Label success;




--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to