mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Bug 1054334 - SpiderMonkey: Constify some static variables r=nbp
This commit is contained in:
parent
fc4fb65096
commit
51500b337a
@ -6129,9 +6129,9 @@ GenerateFFIInterpExit(ModuleCompiler &m, const ModuleCompiler::ExitDescriptor &e
|
||||
JS_ASSERT(masm.framePushed() == 0);
|
||||
|
||||
// Argument types for InvokeFromAsmJS_*:
|
||||
MIRType typeArray[] = { MIRType_Pointer, // exitDatum
|
||||
MIRType_Int32, // argc
|
||||
MIRType_Pointer }; // argv
|
||||
static const MIRType typeArray[] = { MIRType_Pointer, // exitDatum
|
||||
MIRType_Int32, // argc
|
||||
MIRType_Pointer }; // argv
|
||||
MIRTypeVector invokeArgTypes(m.cx());
|
||||
invokeArgTypes.infallibleAppend(typeArray, ArrayLength(typeArray));
|
||||
|
||||
|
@ -348,7 +348,7 @@ const JSFunctionSpec js::ReferenceTypeDescr::typeObjectMethods[] = {
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
static int32_t ReferenceSizes[] = {
|
||||
static const int32_t ReferenceSizes[] = {
|
||||
#define REFERENCE_SIZE(_kind, _type, _name) \
|
||||
sizeof(_type),
|
||||
JS_FOR_EACH_REFERENCE_TYPE_REPR(REFERENCE_SIZE) 0
|
||||
@ -427,7 +427,7 @@ js::ReferenceTypeDescr::call(JSContext *cx, unsigned argc, Value *vp)
|
||||
* Note: these are partially defined in SIMD.cpp
|
||||
*/
|
||||
|
||||
static int32_t X4Sizes[] = {
|
||||
static const int32_t X4Sizes[] = {
|
||||
#define X4_SIZE(_kind, _type, _name) \
|
||||
sizeof(_type) * 4,
|
||||
JS_FOR_EACH_X4_TYPE_REPR(X4_SIZE) 0
|
||||
|
@ -1638,7 +1638,7 @@ ComparatorNumericRightMinusLeft(const NumericElement &a, const NumericElement &b
|
||||
typedef bool (*ComparatorNumeric)(const NumericElement &a, const NumericElement &b,
|
||||
bool *lessOrEqualp);
|
||||
|
||||
ComparatorNumeric SortComparatorNumerics[] = {
|
||||
static const ComparatorNumeric SortComparatorNumerics[] = {
|
||||
nullptr,
|
||||
nullptr,
|
||||
ComparatorNumericLeftMinusRight,
|
||||
@ -1661,7 +1661,7 @@ ComparatorInt32RightMinusLeft(const Value &a, const Value &b, bool *lessOrEqualp
|
||||
|
||||
typedef bool (*ComparatorInt32)(const Value &a, const Value &b, bool *lessOrEqualp);
|
||||
|
||||
ComparatorInt32 SortComparatorInt32s[] = {
|
||||
static const ComparatorInt32 SortComparatorInt32s[] = {
|
||||
nullptr,
|
||||
nullptr,
|
||||
ComparatorInt32LeftMinusRight,
|
||||
|
@ -796,7 +796,7 @@ class ScriptedIndirectProxyHandler : public BaseProxyHandler
|
||||
* eventually moving towards eliminating one of those slots, and so we don't
|
||||
* want to add a dependency here.
|
||||
*/
|
||||
static Class CallConstructHolder = {
|
||||
static const Class CallConstructHolder = {
|
||||
"CallConstructHolder",
|
||||
JSCLASS_HAS_RESERVED_SLOTS(2) | JSCLASS_IS_ANONYMOUS
|
||||
};
|
||||
|
@ -5096,7 +5096,7 @@ static const JSClass env_class = {
|
||||
* setter and method with attached JitInfo. This object can be used to test
|
||||
* IonMonkey DOM optimizations in the shell.
|
||||
*/
|
||||
static uint32_t DOM_OBJECT_SLOT = 0;
|
||||
static const uint32_t DOM_OBJECT_SLOT = 0;
|
||||
|
||||
static bool
|
||||
dom_genericGetter(JSContext* cx, unsigned argc, JS::Value *vp);
|
||||
@ -5554,7 +5554,7 @@ ShellBuildId(JS::BuildIdCharVector *buildId)
|
||||
return buildId->append(buildid, sizeof(buildid));
|
||||
}
|
||||
|
||||
static JS::AsmJSCacheOps asmJSCacheOps = {
|
||||
static const JS::AsmJSCacheOps asmJSCacheOps = {
|
||||
ShellOpenAsmJSCacheEntryForRead,
|
||||
ShellCloseAsmJSCacheEntryForRead,
|
||||
ShellOpenAsmJSCacheEntryForWrite,
|
||||
|
Loading…
Reference in New Issue
Block a user