Bug 1316635: Remove dead oldElems arguments; r=luke
authorBenjamin Bouvier <benj@benj.me>
Thu, 10 Nov 2016 18:43:51 +0100
changeset 348816 f3e9a9c4566fe33582bd0dc80bff2c6d3e986d03
parent 348815 aa7d53db2b20305a17e5563d7205b719816648b3
child 348817 fec4c0269a8281c2b945d43869fb72e879d0b660
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs1316635
milestone52.0a1
Bug 1316635: Remove dead oldElems arguments; r=luke MozReview-Commit-ID: KLRWsAC2Nbu
js/src/wasm/WasmCompile.cpp
--- a/js/src/wasm/WasmCompile.cpp
+++ b/js/src/wasm/WasmCompile.cpp
@@ -449,17 +449,17 @@ DecodeFunctionSection(Decoder& d, Module
 
     for (uint32_t sigIndex : funcSigIndexes)
         init->funcSigs.infallibleAppend(&init->sigs[sigIndex]);
 
     return true;
 }
 
 static bool
-DecodeTableSection(Decoder& d, ModuleGeneratorData* init, Uint32Vector* oldElems)
+DecodeTableSection(Decoder& d, ModuleGeneratorData* init)
 {
     uint32_t sectionStart, sectionSize;
     if (!d.startSection(SectionId::Table, &sectionStart, &sectionSize, "table"))
         return false;
     if (sectionStart == Decoder::NotStarted)
         return true;
 
     uint32_t numTables;
@@ -763,17 +763,17 @@ DecodeCodeSection(Decoder& d, ModuleGene
 
     if (!d.finishSection(sectionStart, sectionSize, "code"))
         return false;
 
     return mg.finishFuncDefs();
 }
 
 static bool
-DecodeElemSection(Decoder& d, Uint32Vector&& oldElems, ModuleGenerator& mg)
+DecodeElemSection(Decoder& d, ModuleGenerator& mg)
 {
     uint32_t sectionStart, sectionSize;
     if (!d.startSection(SectionId::Elem, &sectionStart, &sectionSize, "elem"))
         return false;
     if (sectionStart == Decoder::NotStarted)
         return true;
 
     uint32_t numSegments;
@@ -922,18 +922,17 @@ wasm::Compile(const ShareableBytes& byte
 
     ImportVector imports;
     if (!::DecodeImportSection(d, init.get(), &imports))
         return nullptr;
 
     if (!::DecodeFunctionSection(d, init.get()))
         return nullptr;
 
-    Uint32Vector oldElems;
-    if (!DecodeTableSection(d, init.get(), &oldElems))
+    if (!DecodeTableSection(d, init.get()))
         return nullptr;
 
     if (!::DecodeMemorySection(d, init.get()))
         return nullptr;
 
     if (!DecodeGlobalSection(d, init.get()))
         return nullptr;
 
@@ -942,17 +941,17 @@ wasm::Compile(const ShareableBytes& byte
         return nullptr;
 
     if (!DecodeExportSection(d, mg))
         return nullptr;
 
     if (!DecodeStartSection(d, mg))
         return nullptr;
 
-    if (!DecodeElemSection(d, Move(oldElems), mg))
+    if (!DecodeElemSection(d, mg))
         return nullptr;
 
     if (!DecodeCodeSection(d, mg))
         return nullptr;
 
     if (!::DecodeDataSection(d, mg))
         return nullptr;