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
This commit is contained in:
verwaest@chromium.org 2013-03-19 13:11:49 +00:00
parent a8e9bebabd
commit 002ba9c76d
2 changed files with 3 additions and 8 deletions

View 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) \

View 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)");