Turn Flags into a uint32_t typedef.
authorverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 19 Mar 2013 13:11:49 +0000 (13:11 +0000)
committerverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 19 Mar 2013 13:11:49 +0000 (13:11 +0000)
We cannot rely on C++ compilers inferring the int-type from the enum
value range. Whereas Linux/OSX find uint32_t as type for [0,MaxUInt32],
Windows insists it's int.

Update the test to execute its original intent on all platforms: 1 value
larger than max arguments, 1 smaller than max arguments (on all
platforms). This makes the test run a lot faster.

BUG=chromium:194749

Review URL: https://chromiumcodereview.appspot.com/12507010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13988 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/objects.h
test/mjsunit/regress/regress-1122.js

index 96a3800..933a075 100644 (file)
@@ -4299,12 +4299,7 @@ class Code: public HeapObject {
  public:
   // Opaque data type for encapsulating code flags like kind, inline
   // cache state, and arguments count.
-  // 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 = 0,
-    FLAGS_MAX_VALUE = kMaxUInt32
-  };
+  typedef uint32_t Flags;
 
 #define CODE_KIND_LIST(V) \
   V(FUNCTION)             \
index 294d52a..8f0bfb6 100644 (file)
@@ -62,5 +62,5 @@ assertEquals('prefix 16000 suffix',
 assertEquals('prefix undefined suffix',
              function_with_n_params_and_m_args(32000, 10000));
 
-assertThrows("function_with_n_params_and_m_args(66000, 60000)");
-assertThrows("function_with_n_params_and_m_args(60000, 66000)");
+assertThrows("function_with_n_params_and_m_args(66000, 30000)");
+assertThrows("function_with_n_params_and_m_args(30000, 66000)");