Home | History | Annotate | Download | only in wasm

Lines Matching defs:sig

83   void Verify(ErrorCode expected, FunctionSig* sig, const byte* start,
88 VerifyWasmCode(zone()->allocator(), module, sig, start, end);
124 FunctionSig sig(1, 2, types);
125 EXPECT_FAILURE(&sig, code);
141 FunctionSig sig(1, 1, types);
142 EXPECT_VERIFIES(&sig, code);
151 FunctionSig sig(1, 1, types);
152 EXPECT_FAILURE(&sig, code);
591 FunctionSig sig(1, 1, types);
594 EXPECT_VERIFIES(&sig, code);
596 EXPECT_FAILURE(&sig, code);
1044 #define DECODE_TEST(name, opcode, sig) \
1046 FunctionSig* sig = WasmOpcodes::Signature(kExpr##name); \
1047 if (sig->parameter_count() == 1) { \
1048 TestUnop(kExpr##name, sig); \
1050 TestBinop(kExpr##name, sig); \
1125 FunctionSig sig(1, 0, &local_type);
1127 EXPECT_VERIFIES(&sig, code);
1129 EXPECT_FAILURE(&sig, code);
1141 FunctionSig sig(0, 1, &local_type);
1143 EXPECT_VERIFIES(&sig, code);
1145 EXPECT_FAILURE(&sig, code);
1165 byte AddSignature(FunctionSig* sig) {
1166 mod.signatures.push_back(sig);
1170 byte AddFunction(FunctionSig* sig) {
1171 mod.functions.push_back({sig, // sig
1181 byte AddImport(FunctionSig* sig) {
1182 mod.import_table.push_back({sig, // sig
1198 FunctionSig* sig = sigs.i_i();
1206 EXPECT_VERIFIES_INLINE(sig, WASM_CALL_FUNCTION0(0));
1207 EXPECT_VERIFIES_INLINE(sig, WASM_CALL_FUNCTION1(1, WASM_I8(27)));
1208 EXPECT_VERIFIES_INLINE(sig, WASM_CALL_FUNCTION2(2, WASM_I8(37), WASM_I8(77)));
1212 FunctionSig* sig = sigs.i_i();
1220 EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION0(0));
1221 EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(1, WASM_ZERO));
1222 EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(2, WASM_GET_LOCAL(0)));
1226 FunctionSig* sig = sigs.i_i();
1232 EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(0, WASM_I64V_1(17)));
1233 EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(0, WASM_F32(17.1)));
1234 EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(0, WASM_F64(17.1)));
1238 FunctionSig* sig = sigs.i_i();
1244 EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(0, WASM_I8(17)));
1245 EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(0, WASM_I64V_1(27)));
1246 EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(0, WASM_F64(37.2)));
1250 EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(1, WASM_I8(16)));
1251 EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(1, WASM_I64V_1(16)));
1252 EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(1, WASM_F32(17.6)));
1256 FunctionSig* sig = sigs.i_i();
1264 EXPECT_VERIFIES_INLINE(sig, WASM_CALL_INDIRECT0(f0, WASM_ZERO));
1265 EXPECT_VERIFIES_INLINE(sig, WASM_CALL_INDIRECT1(f1, WASM_ZERO, WASM_I8(22)));
1267 sig, WASM_CALL_INDIRECT2(f2, WASM_ZERO, WASM_I8(32), WASM_I8(72)));
1271 FunctionSig* sig = sigs.i_i();
1275 EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT0(0, WASM_ZERO));
1277 EXPECT_VERIFIES_INLINE(sig, WASM_CALL_INDIRECT0(0, WASM_ZERO));
1279 EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT1(1, WASM_ZERO, WASM_I8(22)));
1281 EXPECT_VERIFIES_INLINE(sig, WASM_CALL_INDIRECT1(1, WASM_ZERO, WASM_I8(27)));
1283 EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT1(2, WASM_ZERO, WASM_I8(27)));
1287 FunctionSig* sig = sigs.i_i();
1293 EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT1(f0, WASM_ZERO, WASM_I8(17)));
1294 EXPECT_FAILURE_INLINE(sig,
1296 EXPECT_FAILURE_INLINE(sig,
1299 EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT0(f0, WASM_I8(17)));
1300 EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT0(f0, WASM_I64V_1(27)));
1301 EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT0(f0, WASM_F64(37.2)));
1305 EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT1(f1, WASM_ZERO, WASM_I8(16)));
1306 EXPECT_FAILURE_INLINE(sig,
1308 EXPECT_FAILURE_INLINE(sig,
1313 FunctionSig* sig = sigs.i_i();
1321 EXPECT_VERIFIES_INLINE(sig, WASM_CALL_IMPORT0(f0));
1322 EXPECT_VERIFIES_INLINE(sig, WASM_CALL_IMPORT1(f1, WASM_I8(22)));
1323 EXPECT_VERIFIES_INLINE(sig, WASM_CALL_IMPORT2(f2, WASM_I8(32), WASM_I8(72)));
1327 FunctionSig* sig = sigs.i_i();
1333 EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT0(f0));
1334 EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT1(f0, WASM_I8(17)));
1335 EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT1(f0, WASM_I64V_1(27)));
1336 EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT1(f0, WASM_F64(37.2)));
1340 EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT0(f1));
1341 EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT1(f1, WASM_I8(16)));
1342 EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT1(f1, WASM_I64V_1(16)));
1343 EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT1(f1, WASM_F32(17.6)));
1347 FunctionSig* sig = sigs.i_i();
1358 EXPECT_VERIFIES_INLINE(sig, WASM_LOAD_GLOBAL(0));
1359 EXPECT_VERIFIES_INLINE(sig, WASM_LOAD_GLOBAL(1));
1360 EXPECT_VERIFIES_INLINE(sig, WASM_LOAD_GLOBAL(2));
1361 EXPECT_VERIFIES_INLINE(sig, WASM_LOAD_GLOBAL(3));
1362 EXPECT_VERIFIES_INLINE(sig, WASM_LOAD_GLOBAL(4));
1363 EXPECT_VERIFIES_INLINE(sig, WASM_LOAD_GLOBAL(5));
1365 EXPECT_VERIFIES_INLINE(sig, WASM_STORE_GLOBAL(0, WASM_GET_LOCAL(0)));
1366 EXPECT_VERIFIES_INLINE(sig, WASM_STORE_GLOBAL(1, WASM_GET_LOCAL(0)));
1367 EXPECT_VERIFIES_INLINE(sig, WASM_STORE_GLOBAL(2, WASM_GET_LOCAL(0)));
1368 EXPECT_VERIFIES_INLINE(sig, WASM_STORE_GLOBAL(3, WASM_GET_LOCAL(0)));
1369 EXPECT_VERIFIES_INLINE(sig, WASM_STORE_GLOBAL(4, WASM_GET_LOCAL(0)));
1370 EXPECT_VERIFIES_INLINE(sig, WASM_STORE_GLOBAL(5, WASM_GET_LOCAL(0)));
1374 FunctionSig* sig = sigs.i_i();
1383 EXPECT_FAILURE_INLINE(sig, WASM_LOAD_GLOBAL(0));
1384 EXPECT_FAILURE_INLINE(sig, WASM_LOAD_GLOBAL(1));
1385 EXPECT_FAILURE_INLINE(sig, WASM_LOAD_GLOBAL(2));
1386 EXPECT_FAILURE_INLINE(sig, WASM_LOAD_GLOBAL(3));
1388 EXPECT_FAILURE_INLINE(sig, WASM_STORE_GLOBAL(0, WASM_GET_LOCAL(0)));
1389 EXPECT_FAILURE_INLINE(sig, WASM_STORE_GLOBAL(1, WASM_GET_LOCAL(0)));
1390 EXPECT_FAILURE_INLINE(sig, WASM_STORE_GLOBAL(2, WASM_GET_LOCAL(0)));
1391 EXPECT_FAILURE_INLINE(sig, WASM_STORE_GLOBAL(3, WASM_GET_LOCAL(0)));
1395 FunctionSig* sig = sigs.l_l();
1402 EXPECT_VERIFIES_INLINE(sig, WASM_LOAD_GLOBAL(0));
1403 EXPECT_VERIFIES_INLINE(sig, WASM_LOAD_GLOBAL(1));
1405 EXPECT_VERIFIES_INLINE(sig, WASM_STORE_GLOBAL(0, WASM_GET_LOCAL(0)));
1406 EXPECT_VERIFIES_INLINE(sig, WASM_STORE_GLOBAL(1, WASM_GET_LOCAL(0)));
1410 FunctionSig* sig = sigs.f_ff();
1416 EXPECT_VERIFIES_INLINE(sig, WASM_LOAD_GLOBAL(0));
1417 EXPECT_VERIFIES_INLINE(sig, WASM_STORE_GLOBAL(0, WASM_GET_LOCAL(0)));
1421 FunctionSig* sig = sigs.d_dd();
1427 EXPECT_VERIFIES_INLINE(sig, WASM_LOAD_GLOBAL(0));
1428 EXPECT_VERIFIES_INLINE(sig, WASM_STORE_GLOBAL(0, WASM_GET_LOCAL(0)));
1436 FunctionSig sig(1, 0, &local_type);
1441 EXPECT_VERIFIES_INLINE(&sig, WASM_LOAD_GLOBAL(0));
1443 EXPECT_FAILURE_INLINE(&sig, WASM_LOAD_GLOBAL(0));
1454 FunctionSig sig(0, 1, &local_type);
1459 EXPECT_VERIFIES_INLINE(&sig, WASM_STORE_GLOBAL(0, WASM_GET_LOCAL(0)));
1461 EXPECT_FAILURE_INLINE(&sig, WASM_STORE_GLOBAL(0, WASM_GET_LOCAL(0)));
1581 FunctionSig* sig = sigarray[i];
1584 sig, B2(WASM_IF(WASM_ZERO, WASM_BRV(0, WASM_GET_LOCAL(0))),
1609 FunctionSig sig(1, 2, storage);
1612 EXPECT_VERIFIES(&sig, code1);
1613 EXPECT_VERIFIES(&sig, code2);
1615 EXPECT_FAILURE(&sig, code1);
1616 EXPECT_FAILURE(&sig, code2);
1627 FunctionSig sig(1, 2, storage);
1636 EXPECT_VERIFIES(&sig, code1);
1637 EXPECT_VERIFIES(&sig, code2);
1639 EXPECT_FAILURE(&sig, code1);
1640 EXPECT_FAILURE(&sig, code2);
1651 FunctionSig sig(0, 2, types);
1654 EXPECT_VERIFIES(&sig, code);
1656 EXPECT_FAILURE(&sig, code);
1669 FunctionSig sig(1, 3, types);
1672 EXPECT_VERIFIES(&sig, code);
1674 EXPECT_FAILURE(&sig, code);
1685 FunctionSig sig(1, 2, storage);
1693 EXPECT_VERIFIES(&sig, code1);
1694 EXPECT_VERIFIES(&sig, code2);
1696 EXPECT_FAILURE(&sig, code1);
1697 EXPECT_FAILURE(&sig, code2);
1821 FunctionSig sig(1, 2, types);
1824 &sig,
1828 &sig,
1832 &sig,
1836 &sig,