@@ -182,20 +182,6 @@ bool WebAssemblyAsmTypeCheck::getGlobal(SMLoc ErrorLoc, const MCInst &Inst,
182182 return false ;
183183}
184184
185- bool WebAssemblyAsmTypeCheck::getTable (SMLoc ErrorLoc, const MCInst &Inst,
186- wasm::ValType &Type) {
187- const MCSymbolRefExpr *SymRef;
188- if (getSymRef (ErrorLoc, Inst, SymRef))
189- return true ;
190- auto WasmSym = cast<MCSymbolWasm>(&SymRef->getSymbol ());
191- if (WasmSym->getType ().getValueOr (wasm::WASM_SYMBOL_TYPE_DATA) !=
192- wasm::WASM_SYMBOL_TYPE_TABLE)
193- return typeError (ErrorLoc, StringRef (" symbol " ) + WasmSym->getName () +
194- " missing .tabletype" );
195- Type = static_cast <wasm::ValType>(WasmSym->getTableType ().ElemType );
196- return false ;
197- }
198-
199185bool WebAssemblyAsmTypeCheck::endOfFunction (SMLoc ErrorLoc) {
200186 // Check the return types.
201187 for (auto RVT : llvm::reverse (ReturnTypes)) {
@@ -239,19 +225,6 @@ bool WebAssemblyAsmTypeCheck::typeCheck(SMLoc ErrorLoc, const MCInst &Inst) {
239225 return true ;
240226 if (popType (ErrorLoc, Type))
241227 return true ;
242- } else if (Name == " table.get" ) {
243- if (getTable (ErrorLoc, Inst, Type))
244- return true ;
245- if (popType (ErrorLoc, wasm::ValType::I32))
246- return true ;
247- Stack.push_back (Type);
248- } else if (Name == " table.set" ) {
249- if (getTable (ErrorLoc, Inst, Type))
250- return true ;
251- if (popType (ErrorLoc, Type))
252- return true ;
253- if (popType (ErrorLoc, wasm::ValType::I32))
254- return true ;
255228 } else if (Name == " drop" ) {
256229 if (popType (ErrorLoc, {}))
257230 return true ;
0 commit comments