Revision: 5278
Author: [email protected]
Date: Mon Aug 16 10:14:34 2010
Log: Give correct value ranges to enumeration types used as opaque types.

This allows to remove special handling of GCC 4.4 (disabling of Value Range Propagation) from SConstruct.

BUG=http://code.google.com/p/v8/issues/detail?id=830

Review URL: http://codereview.chromium.org/3135022
http://code.google.com/p/v8/source/detail?r=5278

Modified:
 /branches/bleeding_edge/SConstruct
 /branches/bleeding_edge/src/frames.h
 /branches/bleeding_edge/src/objects.h
 /branches/bleeding_edge/src/platform.h

=======================================
--- /branches/bleeding_edge/SConstruct  Wed Aug 11 03:52:34 2010
+++ /branches/bleeding_edge/SConstruct  Mon Aug 16 10:14:34 2010
@@ -54,15 +54,8 @@
 else:
   ARM_LINK_FLAGS = []

-# TODO: Sort these issues out properly but as a temporary solution for gcc 4.4 -# on linux we need these compiler flags to avoid crashes in the v8 test suite
-# and avoid dtoa.c strict aliasing issues
-if os.environ.get('GCC_VERSION') == '44':
-    GCC_EXTRA_CCFLAGS = ['-fno-tree-vrp']
-    GCC_DTOA_EXTRA_CCFLAGS = []
-else:
-    GCC_EXTRA_CCFLAGS = []
-    GCC_DTOA_EXTRA_CCFLAGS = []
+GCC_EXTRA_CCFLAGS = []
+GCC_DTOA_EXTRA_CCFLAGS = []

 ANDROID_FLAGS = ['-march=armv7-a',
                  '-mtune=cortex-a8',
=======================================
--- /branches/bleeding_edge/src/frames.h        Fri May  7 23:54:36 2010
+++ /branches/bleeding_edge/src/frames.h        Mon Aug 16 10:14:34 2010
@@ -112,7 +112,13 @@

   // Opaque data type for identifying stack frames. Used extensively
   // by the debugger.
-  enum Id { NO_ID = 0 };
+ // ID_MIN_VALUE and ID_MAX_VALUE are specified to ensure that enumeration type
+  // has correct value range (see Issue 830 for more details).
+  enum Id {
+    ID_MIN_VALUE = kMinInt,
+    ID_MAX_VALUE = kMaxInt,
+    NO_ID = 0
+  };

   // Copy constructor; it breaks the connection to host iterator.
   StackFrame(const StackFrame& original) {
=======================================
--- /branches/bleeding_edge/src/objects.h       Mon Aug 16 09:06:46 2010
+++ /branches/bleeding_edge/src/objects.h       Mon Aug 16 10:14:34 2010
@@ -2783,7 +2783,12 @@
  public:
   // Opaque data type for encapsulating code flags like kind, inline
   // cache state, and arguments count.
-  enum Flags { };
+  // FLAGS_MIN_VALUE and FLAGS_MAX_VALUE are specified to ensure that
+ // enumeration type has correct value range (see Issue 830 for more details).
+  enum Flags {
+    FLAGS_MIN_VALUE = kMinInt,
+    FLAGS_MAX_VALUE = kMaxInt
+  };

   enum Kind {
     FUNCTION,
=======================================
--- /branches/bleeding_edge/src/platform.h      Fri Aug 13 04:11:36 2010
+++ /branches/bleeding_edge/src/platform.h      Mon Aug 16 10:14:34 2010
@@ -363,7 +363,13 @@
 class Thread: public ThreadHandle {
  public:
   // Opaque data type for thread-local storage keys.
-  enum LocalStorageKey {};
+ // LOCAL_STORAGE_KEY_MIN_VALUE and LOCAL_STORAGE_KEY_MAX_VALUE are specified + // to ensure that enumeration type has correct value range (see Issue 830 for
+  // more details).
+  enum LocalStorageKey {
+    LOCAL_STORAGE_KEY_MIN_VALUE = kMinInt,
+    LOCAL_STORAGE_KEY_MAX_VALUE = kMaxInt
+  };

   // Create new thread.
   Thread();

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

Reply via email to