Bug 1277247 - remove some move member definitions that can be implicitly generated (r=bbouvier)
authorLuke Wagner <luke@mozilla.com>
Sat, 02 Jul 2016 23:47:56 -0500
changeset 328533 067521ccd17907843e1db644ca0f02a1f5a6520a
parent 328532 1fe160cfbce20585e6a619f93b1843ef72de20f2
child 328534 eac0c056235ee1174fc092fe159d2d5710331fbd
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbouvier
bugs1277247
milestone50.0a1
Bug 1277247 - remove some move member definitions that can be implicitly generated (r=bbouvier) MozReview-Commit-ID: CTwveGZTf8V
js/src/asmjs/WasmAST.h
js/src/asmjs/WasmGenerator.h
js/src/asmjs/WasmModule.h
js/src/asmjs/WasmTypes.h
--- a/js/src/asmjs/WasmAST.h
+++ b/js/src/asmjs/WasmAST.h
@@ -144,20 +144,16 @@ class AstSig : public AstBase
       : args_(Move(args)),
         ret_(ret)
     {}
     AstSig(AstName name, AstSig&& rhs)
       : name_(name),
         args_(Move(rhs.args_)),
         ret_(rhs.ret_)
     {}
-    void operator=(AstSig&& rhs) {
-        args_ = Move(rhs.args_);
-        ret_ = rhs.ret_;
-    }
     const AstValTypeVector& args() const {
         return args_;
     }
     ExprType ret() const {
         return ret_;
     }
     AstName name() const {
         return name_;
@@ -572,18 +568,17 @@ typedef AstVector<AstSegment*> AstSegmen
 
 class AstMemory : public AstNode
 {
     uint32_t initialSize_;
     Maybe<uint32_t> maxSize_;
     AstSegmentVector segments_;
 
   public:
-    explicit AstMemory(uint32_t initialSize, Maybe<uint32_t> maxSize,
-                           AstSegmentVector&& segments)
+    explicit AstMemory(uint32_t initialSize, Maybe<uint32_t> maxSize, AstSegmentVector&& segments)
       : initialSize_(initialSize),
         maxSize_(maxSize),
         segments_(Move(segments))
     {}
     uint32_t initialSize() const { return initialSize_; }
     const Maybe<uint32_t>& maxSize() const { return maxSize_; }
     const AstSegmentVector& segments() const { return segments_; }
 };
--- a/js/src/asmjs/WasmGenerator.h
+++ b/js/src/asmjs/WasmGenerator.h
@@ -39,20 +39,16 @@ struct TableModuleGeneratorData
 {
     uint32_t globalDataOffset;
     uint32_t numElems;
     Uint32Vector elemFuncIndices;
 
     TableModuleGeneratorData()
       : globalDataOffset(0), numElems(0)
     {}
-    TableModuleGeneratorData(TableModuleGeneratorData&& rhs)
-      : globalDataOffset(rhs.globalDataOffset), numElems(rhs.numElems),
-        elemFuncIndices(Move(rhs.elemFuncIndices))
-    {}
 };
 
 typedef Vector<TableModuleGeneratorData, 0, SystemAllocPolicy> TableModuleGeneratorDataVector;
 
 struct ImportModuleGeneratorData
 {
     const DeclaredSig* sig;
     uint32_t globalDataOffset;
--- a/js/src/asmjs/WasmModule.h
+++ b/js/src/asmjs/WasmModule.h
@@ -70,19 +70,16 @@ struct LinkData : LinkDataCacheablePod
     };
 
     struct FuncTable {
         uint32_t globalDataOffset;
         Uint32Vector elemOffsets;
         FuncTable(uint32_t globalDataOffset, Uint32Vector&& elemOffsets)
           : globalDataOffset(globalDataOffset), elemOffsets(Move(elemOffsets))
         {}
-        FuncTable(FuncTable&& rhs)
-          : globalDataOffset(rhs.globalDataOffset), elemOffsets(Move(rhs.elemOffsets))
-        {}
         FuncTable() = default;
         WASM_DECLARE_SERIALIZABLE(FuncTable)
     };
     typedef Vector<FuncTable, 0, SystemAllocPolicy> FuncTableVector;
 
     InternalLinkVector  internalLinks;
     SymbolicLinkArray   symbolicLinks;
     FuncTableVector     funcTables;
--- a/js/src/asmjs/WasmTypes.h
+++ b/js/src/asmjs/WasmTypes.h
@@ -351,34 +351,25 @@ class Val
 // duration of module validation+compilation). Thus, long-lived objects like
 // WasmModule must use malloced allocation.
 
 class Sig
 {
     ValTypeVector args_;
     ExprType ret_;
 
-    Sig(const Sig&) = delete;
-    Sig& operator=(const Sig&) = delete;
-
   public:
     Sig() : args_(), ret_(ExprType::Void) {}
-    Sig(Sig&& rhs) : args_(Move(rhs.args_)), ret_(rhs.ret_) {}
     Sig(ValTypeVector&& args, ExprType ret) : args_(Move(args)), ret_(ret) {}
 
     MOZ_MUST_USE bool clone(const Sig& rhs) {
         ret_ = rhs.ret_;
         MOZ_ASSERT(args_.empty());
         return args_.appendAll(rhs.args_);
     }
-    Sig& operator=(Sig&& rhs) {
-        ret_ = rhs.ret_;
-        args_ = Move(rhs.args_);
-        return *this;
-    }
 
     ValType arg(unsigned i) const { return args_[i]; }
     const ValTypeVector& args() const { return args_; }
     const ExprType& ret() const { return ret_; }
 
     HashNumber hash() const {
         return AddContainerToHash(args_, HashNumber(ret_));
     }
@@ -416,19 +407,18 @@ typedef Vector<GlobalDesc, 0, SystemAllo
 // ModuleGenerator. These signature objects are read-only and have the same
 // lifetime as the ModuleGenerator. This type is useful since some uses of Sig
 // need this extended lifetime and want to statically distinguish from the
 // common stack-allocated Sig objects that get passed around.
 
 struct DeclaredSig : Sig
 {
     DeclaredSig() = default;
-    DeclaredSig(DeclaredSig&& rhs) : Sig(Move(rhs)) {}
     explicit DeclaredSig(Sig&& sig) : Sig(Move(sig)) {}
-    void operator=(Sig&& rhs) { Sig& base = *this; base = Move(rhs); }
+    void operator=(Sig&& rhs) { Sig::operator=(Move(rhs)); }
 };
 
 typedef Vector<DeclaredSig, 0, SystemAllocPolicy> DeclaredSigVector;
 typedef Vector<const DeclaredSig*, 0, SystemAllocPolicy> DeclaredSigPtrVector;
 
 // The (,Profiling,Func)Offsets classes are used to record the offsets of
 // different key points in a CodeRange during compilation.