Bug 1316635: Remove dead oldElems arguments; r?luke draft
authorBenjamin Bouvier <benj@benj.me>
Thu, 10 Nov 2016 18:43:51 +0100
changeset 437277 dac68d37b9c7f9a252bb6f02301988aeb7bf77ba
parent 437276 7035a732d4455d787e021328c2c4e11dade63cf5
child 536602 1bf8416aab6ea91d3ba70825173ce696b928b949
push id35371
push userbbouvier@mozilla.com
push dateThu, 10 Nov 2016 17:45:13 +0000
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;