From: verwaest@chromium.org Date: Tue, 19 Mar 2013 13:11:49 +0000 (+0000) Subject: Turn Flags into a uint32_t typedef. X-Git-Tag: upstream/4.7.83~14815 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=002ba9c76d5ebb1233d2b51829d2a67606ef27cb;p=platform%2Fupstream%2Fv8.git Turn Flags into a uint32_t typedef. 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 --- diff --git a/src/objects.h b/src/objects.h index 96a3800..933a075 100644 --- a/src/objects.h +++ b/src/objects.h @@ -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) \ diff --git a/test/mjsunit/regress/regress-1122.js b/test/mjsunit/regress/regress-1122.js index 294d52a..8f0bfb6 100644 --- a/test/mjsunit/regress/regress-1122.js +++ b/test/mjsunit/regress/regress-1122.js @@ -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)");