Commit 102db47c authored by vegorov@chromium.org's avatar vegorov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5278 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3202df6c
......@@ -54,15 +54,8 @@ if ARM_TARGET_LIB:
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',
......
......@@ -112,7 +112,13 @@ class StackFrame BASE_EMBEDDED {
// 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) {
......
......@@ -2783,7 +2783,12 @@ class Code: public HeapObject {
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,
......
......@@ -363,7 +363,13 @@ class ThreadHandle {
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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment