Backed out changeset 74d0a284f6ff (bug 1278303)

This commit is contained in:
Sebastian Hengst 2016-06-10 19:34:35 +02:00
parent 6dfb5f0411
commit ca91e1647e
2 changed files with 1 additions and 15 deletions

View File

@ -71,7 +71,7 @@ LoopUnroller::getReplacementDefinition(MDefinition* def)
// the block itself. // the block itself.
MOZ_ASSERT(def->isConstant()); MOZ_ASSERT(def->isConstant());
MConstant* constant = MConstant::Copy(alloc, def->toConstant()); MConstant* constant = new(alloc) MConstant(*def->toConstant());
oldPreheader->insertBefore(*oldPreheader->begin(), constant); oldPreheader->insertBefore(*oldPreheader->begin(), constant);
return constant; return constant;
} }

View File

@ -1019,17 +1019,6 @@ class MInstruction
{ {
MResumePoint* resumePoint_; MResumePoint* resumePoint_;
protected:
// All MInstructions are using the "MFoo::New(alloc)" notation instead of
// the TempObject new operator. This code redefines the new operator as
// protected, and delegates to the TempObject new operator. Thus, the
// following code prevents calls to "new(alloc) MFoo" outside the MFoo
// members.
template <typename... Args>
inline void* operator new(size_t nbytes, Args&&... args) {
return TempObject::operator new(nbytes, mozilla::Forward<Args>(args)...);
}
public: public:
MInstruction() MInstruction()
: resumePoint_(nullptr) : resumePoint_(nullptr)
@ -1458,9 +1447,6 @@ class MConstant : public MNullaryInstruction
static MConstant* NewInt64(TempAllocator& alloc, int64_t i); static MConstant* NewInt64(TempAllocator& alloc, int64_t i);
static MConstant* NewAsmJS(TempAllocator& alloc, const Value& v, MIRType type); static MConstant* NewAsmJS(TempAllocator& alloc, const Value& v, MIRType type);
static MConstant* NewConstraintlessObject(TempAllocator& alloc, JSObject* v); static MConstant* NewConstraintlessObject(TempAllocator& alloc, JSObject* v);
static MConstant* Copy(TempAllocator& alloc, MConstant* src) {
return new(alloc) MConstant(*src);
}
// Try to convert this constant to boolean, similar to js::ToBoolean. // Try to convert this constant to boolean, similar to js::ToBoolean.
// Returns false if the type is MIRType::Magic*. // Returns false if the type is MIRType::Magic*.