Bug 327896: JS_STATIC_ASSERT is now used to assert constant conditions during compilation time instead of waiting for runtime to check for JS_ASSERT. r=brendan
This commit is contained in:
@@ -45,6 +45,8 @@
|
||||
#include <stddef.h>
|
||||
#include "jsprvtd.h"
|
||||
#include "jspubtd.h"
|
||||
#include "jsconfig.h"
|
||||
#include "jsutil.h"
|
||||
|
||||
JS_BEGIN_EXTERN_C
|
||||
|
||||
@@ -180,6 +182,11 @@ typedef enum JSOp {
|
||||
#define ATOM_INDEX_LIMIT_LOG2 23
|
||||
#define ATOM_INDEX_LIMIT ((uint32)1 << ATOM_INDEX_LIMIT_LOG2)
|
||||
|
||||
#if JS_HAS_SHARP_VARS
|
||||
JS_STATIC_ASSERT(sizeof(jsatomid) * JS_BITS_PER_BYTE >=
|
||||
ATOM_INDEX_LIMIT_LOG2 + 1);
|
||||
#endif
|
||||
|
||||
/* Actual argument count operand format helpers. */
|
||||
#define ARGC_HI(argc) ((jsbytecode)((argc) >> 8))
|
||||
#define ARGC_LO(argc) ((jsbytecode)(argc))
|
||||
|
||||
Reference in New Issue
Block a user