Author: [EMAIL PROTECTED]
Date: Tue Dec  9 01:17:41 2008
New Revision: 942

Modified:
    branches/bleeding_edge/src/jsregexp.cc
    branches/bleeding_edge/src/objects.cc

Log:
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).
Review URL: http://codereview.chromium.org/13656

Modified: branches/bleeding_edge/src/jsregexp.cc
==============================================================================
--- branches/bleeding_edge/src/jsregexp.cc      (original)
+++ branches/bleeding_edge/src/jsregexp.cc      Tue Dec  9 01:17:41 2008
@@ -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;


Modified: branches/bleeding_edge/src/objects.cc
==============================================================================
--- branches/bleeding_edge/src/objects.cc       (original)
+++ branches/bleeding_edge/src/objects.cc       Tue Dec  9 01:17:41 2008
@@ -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;

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

Reply via email to