зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1302401 - This check is responsible for using the auto type specifier for variable declarations to improve code readability and maintainability. r=Waldo
MozReview-Commit-ID: 5elj65A6dzO --HG-- extra : rebase_source : 2696ee83dab7856cb8f599ef9f3c13fd4cd5e5f7
This commit is contained in:
Родитель
32ebdc26d1
Коммит
f833237445
|
@ -1814,7 +1814,8 @@ class LIRGraph
|
|||
return mir_.numBlockIds();
|
||||
}
|
||||
MOZ_MUST_USE bool initBlock(MBasicBlock* mir) {
|
||||
LBlock* lir = new (&blocks_[mir->id()]) LBlock(mir);
|
||||
auto* block = &blocks_[mir->id()];
|
||||
auto* lir = new (block) LBlock(mir);
|
||||
return lir->init(mir_.alloc());
|
||||
}
|
||||
uint32_t getVirtualRegister() {
|
||||
|
|
|
@ -6180,7 +6180,7 @@ class MAbs
|
|||
TRIVIAL_NEW_WRAPPERS
|
||||
|
||||
static MAbs* NewAsmJS(TempAllocator& alloc, MDefinition* num, MIRType type) {
|
||||
MAbs* ins = new(alloc) MAbs(num, type);
|
||||
auto* ins = new(alloc) MAbs(num, type);
|
||||
if (type == MIRType::Int32)
|
||||
ins->implicitTruncate_ = true;
|
||||
return ins;
|
||||
|
@ -6718,7 +6718,7 @@ class MAdd : public MBinaryArithInstruction
|
|||
static MAdd* NewAsmJS(TempAllocator& alloc, MDefinition* left, MDefinition* right,
|
||||
MIRType type)
|
||||
{
|
||||
MAdd* add = new(alloc) MAdd(left, right);
|
||||
auto* add = new(alloc) MAdd(left, right);
|
||||
add->specialization_ = type;
|
||||
add->setResultType(type);
|
||||
if (type == MIRType::Int32) {
|
||||
|
@ -6763,7 +6763,7 @@ class MSub : public MBinaryArithInstruction
|
|||
static MSub* NewAsmJS(TempAllocator& alloc, MDefinition* left, MDefinition* right,
|
||||
MIRType type, bool mustPreserveNaN = false)
|
||||
{
|
||||
MSub* sub = new(alloc) MSub(left, right);
|
||||
auto* sub = new(alloc) MSub(left, right);
|
||||
sub->specialization_ = type;
|
||||
sub->setResultType(type);
|
||||
sub->setMustPreserveNaN(mustPreserveNaN);
|
||||
|
@ -6941,7 +6941,7 @@ class MDiv : public MBinaryArithInstruction
|
|||
MIRType type, bool unsignd, bool trapOnError = false,
|
||||
bool mustPreserveNaN = false)
|
||||
{
|
||||
MDiv* div = new(alloc) MDiv(left, right, type);
|
||||
auto* div = new(alloc) MDiv(left, right, type);
|
||||
div->unsigned_ = unsignd;
|
||||
div->trapOnError_ = trapOnError;
|
||||
if (trapOnError)
|
||||
|
@ -7068,7 +7068,7 @@ class MMod : public MBinaryArithInstruction
|
|||
static MMod* NewAsmJS(TempAllocator& alloc, MDefinition* left, MDefinition* right,
|
||||
MIRType type, bool unsignd, bool trapOnError = false)
|
||||
{
|
||||
MMod* mod = new(alloc) MMod(left, right, type);
|
||||
auto* mod = new(alloc) MMod(left, right, type);
|
||||
mod->unsigned_ = unsignd;
|
||||
mod->trapOnError_ = trapOnError;
|
||||
if (trapOnError)
|
||||
|
@ -8893,7 +8893,7 @@ class MNot
|
|||
public:
|
||||
static MNot* NewAsmJS(TempAllocator& alloc, MDefinition* input) {
|
||||
MOZ_ASSERT(input->type() == MIRType::Int32 || input->type() == MIRType::Int64);
|
||||
MNot* ins = new(alloc) MNot(input);
|
||||
auto* ins = new(alloc) MNot(input);
|
||||
ins->setResultType(MIRType::Int32);
|
||||
return ins;
|
||||
}
|
||||
|
@ -11718,7 +11718,7 @@ class MGetDOMProperty
|
|||
static MGetDOMProperty* New(TempAllocator& alloc, const JSJitInfo* info, MDefinition* obj,
|
||||
MDefinition* guard, MDefinition* globalGuard)
|
||||
{
|
||||
MGetDOMProperty* res = new(alloc) MGetDOMProperty(info);
|
||||
auto* res = new(alloc) MGetDOMProperty(info);
|
||||
if (!res || !res->init(alloc, obj, guard, globalGuard))
|
||||
return nullptr;
|
||||
return res;
|
||||
|
@ -11792,7 +11792,7 @@ class MGetDOMMember : public MGetDOMProperty
|
|||
static MGetDOMMember* New(TempAllocator& alloc, const JSJitInfo* info, MDefinition* obj,
|
||||
MDefinition* guard, MDefinition* globalGuard)
|
||||
{
|
||||
MGetDOMMember* res = new(alloc) MGetDOMMember(info);
|
||||
auto* res = new(alloc) MGetDOMMember(info);
|
||||
if (!res || !res->init(alloc, obj, guard, globalGuard))
|
||||
return nullptr;
|
||||
return res;
|
||||
|
|
|
@ -34,7 +34,7 @@ class JSObject2WrappedJSMap
|
|||
|
||||
public:
|
||||
static JSObject2WrappedJSMap* newMap(int length) {
|
||||
JSObject2WrappedJSMap* map = new JSObject2WrappedJSMap();
|
||||
auto* map = new JSObject2WrappedJSMap();
|
||||
if (!map->mTable.init(length)) {
|
||||
// This is a decent estimate of the size of the hash table's
|
||||
// entry storage. The |2| is because on average the capacity is
|
||||
|
@ -592,7 +592,7 @@ class JSObject2JSObjectMap
|
|||
|
||||
public:
|
||||
static JSObject2JSObjectMap* newMap(int length) {
|
||||
JSObject2JSObjectMap* map = new JSObject2JSObjectMap();
|
||||
auto* map = new JSObject2JSObjectMap();
|
||||
if (!map->mTable.init(length)) {
|
||||
// This is a decent estimate of the size of the hash table's
|
||||
// entry storage. The |2| is because on average the capacity is
|
||||
|
|
Загрузка…
Ссылка в новой задаче