wa-lang.org/wazero@v1.0.2/internal/integration_test/spectest/v2/testdata/block.wast (about) 1 ;; Test `block` operator 2 3 (module 4 ;; Auxiliary definition 5 (memory 1) 6 7 (func $dummy) 8 9 (func (export "empty") 10 (block) 11 (block $l) 12 ) 13 14 (func (export "singular") (result i32) 15 (block (nop)) 16 (block (result i32) (i32.const 7)) 17 ) 18 19 (func (export "multi") (result i32) 20 (block (call $dummy) (call $dummy) (call $dummy) (call $dummy)) 21 (block (result i32) 22 (call $dummy) (call $dummy) (call $dummy) (i32.const 7) (call $dummy) 23 ) 24 (drop) 25 (block (result i32 i64 i32) 26 (call $dummy) (call $dummy) (call $dummy) (i32.const 8) (call $dummy) 27 (call $dummy) (call $dummy) (call $dummy) (i64.const 7) (call $dummy) 28 (call $dummy) (call $dummy) (call $dummy) (i32.const 9) (call $dummy) 29 ) 30 (drop) (drop) 31 ) 32 33 (func (export "nested") (result i32) 34 (block (result i32) 35 (block (call $dummy) (block) (nop)) 36 (block (result i32) (call $dummy) (i32.const 9)) 37 ) 38 ) 39 40 (func (export "deep") (result i32) 41 (block (result i32) (block (result i32) 42 (block (result i32) (block (result i32) 43 (block (result i32) (block (result i32) 44 (block (result i32) (block (result i32) 45 (block (result i32) (block (result i32) 46 (block (result i32) (block (result i32) 47 (block (result i32) (block (result i32) 48 (block (result i32) (block (result i32) 49 (block (result i32) (block (result i32) 50 (block (result i32) (block (result i32) 51 (block (result i32) (block (result i32) 52 (block (result i32) (block (result i32) 53 (block (result i32) (block (result i32) 54 (block (result i32) (block (result i32) 55 (block (result i32) (block (result i32) 56 (block (result i32) (block (result i32) 57 (block (result i32) (block (result i32) 58 (block (result i32) (block (result i32) 59 (block (result i32) (block (result i32) 60 (call $dummy) (i32.const 150) 61 )) 62 )) 63 )) 64 )) 65 )) 66 )) 67 )) 68 )) 69 )) 70 )) 71 )) 72 )) 73 )) 74 )) 75 )) 76 )) 77 )) 78 )) 79 )) 80 ) 81 82 (func (export "as-select-first") (result i32) 83 (select (block (result i32) (i32.const 1)) (i32.const 2) (i32.const 3)) 84 ) 85 (func (export "as-select-mid") (result i32) 86 (select (i32.const 2) (block (result i32) (i32.const 1)) (i32.const 3)) 87 ) 88 (func (export "as-select-last") (result i32) 89 (select (i32.const 2) (i32.const 3) (block (result i32) (i32.const 1))) 90 ) 91 92 (func (export "as-loop-first") (result i32) 93 (loop (result i32) (block (result i32) (i32.const 1)) (call $dummy) (call $dummy)) 94 ) 95 (func (export "as-loop-mid") (result i32) 96 (loop (result i32) (call $dummy) (block (result i32) (i32.const 1)) (call $dummy)) 97 ) 98 (func (export "as-loop-last") (result i32) 99 (loop (result i32) (call $dummy) (call $dummy) (block (result i32) (i32.const 1))) 100 ) 101 102 (func (export "as-if-condition") 103 (block (result i32) (i32.const 1)) (if (then (call $dummy))) 104 ) 105 (func (export "as-if-then") (result i32) 106 (if (result i32) (i32.const 1) (then (block (result i32) (i32.const 1))) (else (i32.const 2))) 107 ) 108 (func (export "as-if-else") (result i32) 109 (if (result i32) (i32.const 1) (then (i32.const 2)) (else (block (result i32) (i32.const 1)))) 110 ) 111 112 (func (export "as-br_if-first") (result i32) 113 (block (result i32) (br_if 0 (block (result i32) (i32.const 1)) (i32.const 2))) 114 ) 115 (func (export "as-br_if-last") (result i32) 116 (block (result i32) (br_if 0 (i32.const 2) (block (result i32) (i32.const 1)))) 117 ) 118 119 (func (export "as-br_table-first") (result i32) 120 (block (result i32) (block (result i32) (i32.const 1)) (i32.const 2) (br_table 0 0)) 121 ) 122 (func (export "as-br_table-last") (result i32) 123 (block (result i32) (i32.const 2) (block (result i32) (i32.const 1)) (br_table 0 0)) 124 ) 125 126 (func $func (param i32 i32) (result i32) (local.get 0)) 127 (type $check (func (param i32 i32) (result i32))) 128 (table funcref (elem $func)) 129 (func (export "as-call_indirect-first") (result i32) 130 (block (result i32) 131 (call_indirect (type $check) 132 (block (result i32) (i32.const 1)) (i32.const 2) (i32.const 0) 133 ) 134 ) 135 ) 136 (func (export "as-call_indirect-mid") (result i32) 137 (block (result i32) 138 (call_indirect (type $check) 139 (i32.const 2) (block (result i32) (i32.const 1)) (i32.const 0) 140 ) 141 ) 142 ) 143 (func (export "as-call_indirect-last") (result i32) 144 (block (result i32) 145 (call_indirect (type $check) 146 (i32.const 1) (i32.const 2) (block (result i32) (i32.const 0)) 147 ) 148 ) 149 ) 150 151 (func (export "as-store-first") 152 (block (result i32) (i32.const 1)) (i32.const 1) (i32.store) 153 ) 154 (func (export "as-store-last") 155 (i32.const 10) (block (result i32) (i32.const 1)) (i32.store) 156 ) 157 158 (func (export "as-memory.grow-value") (result i32) 159 (memory.grow (block (result i32) (i32.const 1))) 160 ) 161 162 (func $f (param i32) (result i32) (local.get 0)) 163 164 (func (export "as-call-value") (result i32) 165 (call $f (block (result i32) (i32.const 1))) 166 ) 167 (func (export "as-return-value") (result i32) 168 (block (result i32) (i32.const 1)) (return) 169 ) 170 (func (export "as-drop-operand") 171 (drop (block (result i32) (i32.const 1))) 172 ) 173 (func (export "as-br-value") (result i32) 174 (block (result i32) (br 0 (block (result i32) (i32.const 1)))) 175 ) 176 (func (export "as-local.set-value") (result i32) 177 (local i32) (local.set 0 (block (result i32) (i32.const 1))) (local.get 0) 178 ) 179 (func (export "as-local.tee-value") (result i32) 180 (local i32) (local.tee 0 (block (result i32) (i32.const 1))) 181 ) 182 (global $a (mut i32) (i32.const 10)) 183 (func (export "as-global.set-value") (result i32) 184 (global.set $a (block (result i32) (i32.const 1))) 185 (global.get $a) 186 ) 187 188 (func (export "as-load-operand") (result i32) 189 (i32.load (block (result i32) (i32.const 1))) 190 ) 191 192 (func (export "as-unary-operand") (result i32) 193 (i32.ctz (block (result i32) (call $dummy) (i32.const 13))) 194 ) 195 (func (export "as-binary-operand") (result i32) 196 (i32.mul 197 (block (result i32) (call $dummy) (i32.const 3)) 198 (block (result i32) (call $dummy) (i32.const 4)) 199 ) 200 ) 201 (func (export "as-test-operand") (result i32) 202 (i32.eqz (block (result i32) (call $dummy) (i32.const 13))) 203 ) 204 (func (export "as-compare-operand") (result i32) 205 (f32.gt 206 (block (result f32) (call $dummy) (f32.const 3)) 207 (block (result f32) (call $dummy) (f32.const 3)) 208 ) 209 ) 210 (func (export "as-binary-operands") (result i32) 211 (i32.mul 212 (block (result i32 i32) 213 (call $dummy) (i32.const 3) (call $dummy) (i32.const 4) 214 ) 215 ) 216 ) 217 (func (export "as-compare-operands") (result i32) 218 (f32.gt 219 (block (result f32 f32) 220 (call $dummy) (f32.const 3) (call $dummy) (f32.const 3) 221 ) 222 ) 223 ) 224 (func (export "as-mixed-operands") (result i32) 225 (block (result i32 i32) 226 (call $dummy) (i32.const 3) (call $dummy) (i32.const 4) 227 ) 228 (i32.const 5) 229 (i32.add) 230 (i32.mul) 231 ) 232 233 (func (export "break-bare") (result i32) 234 (block (br 0) (unreachable)) 235 (block (br_if 0 (i32.const 1)) (unreachable)) 236 (block (br_table 0 (i32.const 0)) (unreachable)) 237 (block (br_table 0 0 0 (i32.const 1)) (unreachable)) 238 (i32.const 19) 239 ) 240 (func (export "break-value") (result i32) 241 (block (result i32) (br 0 (i32.const 18)) (i32.const 19)) 242 ) 243 (func (export "break-multi-value") (result i32 i32 i64) 244 (block (result i32 i32 i64) 245 (br 0 (i32.const 18) (i32.const -18) (i64.const 18)) 246 (i32.const 19) (i32.const -19) (i64.const 19) 247 ) 248 ) 249 (func (export "break-repeated") (result i32) 250 (block (result i32) 251 (br 0 (i32.const 18)) 252 (br 0 (i32.const 19)) 253 (drop (br_if 0 (i32.const 20) (i32.const 0))) 254 (drop (br_if 0 (i32.const 20) (i32.const 1))) 255 (br 0 (i32.const 21)) 256 (br_table 0 (i32.const 22) (i32.const 4)) 257 (br_table 0 0 0 (i32.const 23) (i32.const 1)) 258 (i32.const 21) 259 ) 260 ) 261 (func (export "break-inner") (result i32) 262 (local i32) 263 (local.set 0 (i32.const 0)) 264 (local.set 0 (i32.add (local.get 0) (block (result i32) (block (result i32) (br 1 (i32.const 0x1)))))) 265 (local.set 0 (i32.add (local.get 0) (block (result i32) (block (br 0)) (i32.const 0x2)))) 266 (local.set 0 267 (i32.add (local.get 0) (block (result i32) (i32.ctz (br 0 (i32.const 0x4))))) 268 ) 269 (local.set 0 270 (i32.add (local.get 0) (block (result i32) (i32.ctz (block (result i32) (br 1 (i32.const 0x8)))))) 271 ) 272 (local.get 0) 273 ) 274 275 (func (export "param") (result i32) 276 (i32.const 1) 277 (block (param i32) (result i32) 278 (i32.const 2) 279 (i32.add) 280 ) 281 ) 282 (func (export "params") (result i32) 283 (i32.const 1) 284 (i32.const 2) 285 (block (param i32 i32) (result i32) 286 (i32.add) 287 ) 288 ) 289 (func (export "params-id") (result i32) 290 (i32.const 1) 291 (i32.const 2) 292 (block (param i32 i32) (result i32 i32)) 293 (i32.add) 294 ) 295 (func (export "param-break") (result i32) 296 (i32.const 1) 297 (block (param i32) (result i32) 298 (i32.const 2) 299 (i32.add) 300 (br 0) 301 ) 302 ) 303 (func (export "params-break") (result i32) 304 (i32.const 1) 305 (i32.const 2) 306 (block (param i32 i32) (result i32) 307 (i32.add) 308 (br 0) 309 ) 310 ) 311 (func (export "params-id-break") (result i32) 312 (i32.const 1) 313 (i32.const 2) 314 (block (param i32 i32) (result i32 i32) (br 0)) 315 (i32.add) 316 ) 317 318 (func (export "effects") (result i32) 319 (local i32) 320 (block 321 (local.set 0 (i32.const 1)) 322 (local.set 0 (i32.mul (local.get 0) (i32.const 3))) 323 (local.set 0 (i32.sub (local.get 0) (i32.const 5))) 324 (local.set 0 (i32.mul (local.get 0) (i32.const 7))) 325 (br 0) 326 (local.set 0 (i32.mul (local.get 0) (i32.const 100))) 327 ) 328 (i32.eq (local.get 0) (i32.const -14)) 329 ) 330 331 (type $block-sig-1 (func)) 332 (type $block-sig-2 (func (result i32))) 333 (type $block-sig-3 (func (param $x i32))) 334 (type $block-sig-4 (func (param i32 f64 i32) (result i32 f64 i32))) 335 336 (func (export "type-use") 337 (block (type $block-sig-1)) 338 (block (type $block-sig-2) (i32.const 0)) 339 (block (type $block-sig-3) (drop)) 340 (i32.const 0) (f64.const 0) (i32.const 0) 341 (block (type $block-sig-4)) 342 (drop) (drop) (drop) 343 (block (type $block-sig-2) (result i32) (i32.const 0)) 344 (block (type $block-sig-3) (param i32) (drop)) 345 (i32.const 0) (f64.const 0) (i32.const 0) 346 (block (type $block-sig-4) 347 (param i32) (param f64 i32) (result i32 f64) (result i32) 348 ) 349 (drop) (drop) (drop) 350 ) 351 ) 352 353 (assert_return (invoke "empty")) 354 (assert_return (invoke "singular") (i32.const 7)) 355 (assert_return (invoke "multi") (i32.const 8)) 356 (assert_return (invoke "nested") (i32.const 9)) 357 (assert_return (invoke "deep") (i32.const 150)) 358 359 (assert_return (invoke "as-select-first") (i32.const 1)) 360 (assert_return (invoke "as-select-mid") (i32.const 2)) 361 (assert_return (invoke "as-select-last") (i32.const 2)) 362 363 (assert_return (invoke "as-loop-first") (i32.const 1)) 364 (assert_return (invoke "as-loop-mid") (i32.const 1)) 365 (assert_return (invoke "as-loop-last") (i32.const 1)) 366 367 (assert_return (invoke "as-if-condition")) 368 (assert_return (invoke "as-if-then") (i32.const 1)) 369 (assert_return (invoke "as-if-else") (i32.const 2)) 370 371 (assert_return (invoke "as-br_if-first") (i32.const 1)) 372 (assert_return (invoke "as-br_if-last") (i32.const 2)) 373 374 (assert_return (invoke "as-br_table-first") (i32.const 1)) 375 (assert_return (invoke "as-br_table-last") (i32.const 2)) 376 377 (assert_return (invoke "as-call_indirect-first") (i32.const 1)) 378 (assert_return (invoke "as-call_indirect-mid") (i32.const 2)) 379 (assert_return (invoke "as-call_indirect-last") (i32.const 1)) 380 381 (assert_return (invoke "as-store-first")) 382 (assert_return (invoke "as-store-last")) 383 384 (assert_return (invoke "as-memory.grow-value") (i32.const 1)) 385 (assert_return (invoke "as-call-value") (i32.const 1)) 386 (assert_return (invoke "as-return-value") (i32.const 1)) 387 (assert_return (invoke "as-drop-operand")) 388 (assert_return (invoke "as-br-value") (i32.const 1)) 389 (assert_return (invoke "as-local.set-value") (i32.const 1)) 390 (assert_return (invoke "as-local.tee-value") (i32.const 1)) 391 (assert_return (invoke "as-global.set-value") (i32.const 1)) 392 (assert_return (invoke "as-load-operand") (i32.const 1)) 393 394 (assert_return (invoke "as-unary-operand") (i32.const 0)) 395 (assert_return (invoke "as-binary-operand") (i32.const 12)) 396 (assert_return (invoke "as-test-operand") (i32.const 0)) 397 (assert_return (invoke "as-compare-operand") (i32.const 0)) 398 (assert_return (invoke "as-binary-operands") (i32.const 12)) 399 (assert_return (invoke "as-compare-operands") (i32.const 0)) 400 (assert_return (invoke "as-mixed-operands") (i32.const 27)) 401 402 (assert_return (invoke "break-bare") (i32.const 19)) 403 (assert_return (invoke "break-value") (i32.const 18)) 404 (assert_return (invoke "break-multi-value") 405 (i32.const 18) (i32.const -18) (i64.const 18) 406 ) 407 (assert_return (invoke "break-repeated") (i32.const 18)) 408 (assert_return (invoke "break-inner") (i32.const 0xf)) 409 410 (assert_return (invoke "param") (i32.const 3)) 411 (assert_return (invoke "params") (i32.const 3)) 412 (assert_return (invoke "params-id") (i32.const 3)) 413 (assert_return (invoke "param-break") (i32.const 3)) 414 (assert_return (invoke "params-break") (i32.const 3)) 415 (assert_return (invoke "params-id-break") (i32.const 3)) 416 417 (assert_return (invoke "effects") (i32.const 1)) 418 419 (assert_return (invoke "type-use")) 420 421 (assert_malformed 422 (module quote 423 "(type $sig (func (param i32) (result i32)))" 424 "(func (i32.const 0) (block (type $sig) (result i32) (param i32)))" 425 ) 426 "unexpected token" 427 ) 428 (assert_malformed 429 (module quote 430 "(type $sig (func (param i32) (result i32)))" 431 "(func (i32.const 0) (block (param i32) (type $sig) (result i32)))" 432 ) 433 "unexpected token" 434 ) 435 (assert_malformed 436 (module quote 437 "(type $sig (func (param i32) (result i32)))" 438 "(func (i32.const 0) (block (param i32) (result i32) (type $sig)))" 439 ) 440 "unexpected token" 441 ) 442 (assert_malformed 443 (module quote 444 "(type $sig (func (param i32) (result i32)))" 445 "(func (i32.const 0) (block (result i32) (type $sig) (param i32)))" 446 ) 447 "unexpected token" 448 ) 449 (assert_malformed 450 (module quote 451 "(type $sig (func (param i32) (result i32)))" 452 "(func (i32.const 0) (block (result i32) (param i32) (type $sig)))" 453 ) 454 "unexpected token" 455 ) 456 (assert_malformed 457 (module quote 458 "(func (i32.const 0) (block (result i32) (param i32)))" 459 ) 460 "unexpected token" 461 ) 462 463 (assert_malformed 464 (module quote "(func (i32.const 0) (block (param $x i32) (drop)))") 465 "unexpected token" 466 ) 467 (assert_malformed 468 (module quote 469 "(type $sig (func))" 470 "(func (block (type $sig) (result i32) (i32.const 0)) (unreachable))" 471 ) 472 "inline function type" 473 ) 474 (assert_malformed 475 (module quote 476 "(type $sig (func (param i32) (result i32)))" 477 "(func (block (type $sig) (result i32) (i32.const 0)) (unreachable))" 478 ) 479 "inline function type" 480 ) 481 (assert_malformed 482 (module quote 483 "(type $sig (func (param i32) (result i32)))" 484 "(func (i32.const 0) (block (type $sig) (param i32) (drop)) (unreachable))" 485 ) 486 "inline function type" 487 ) 488 (assert_malformed 489 (module quote 490 "(type $sig (func (param i32 i32) (result i32)))" 491 "(func (i32.const 0) (block (type $sig) (param i32) (result i32)) (unreachable))" 492 ) 493 "inline function type" 494 ) 495 496 (assert_invalid 497 (module 498 (type $sig (func)) 499 (func (block (type $sig) (i32.const 0))) 500 ) 501 "type mismatch" 502 ) 503 504 (assert_invalid 505 (module (func $type-empty-i32 (result i32) (block))) 506 "type mismatch" 507 ) 508 (assert_invalid 509 (module (func $type-empty-i64 (result i64) (block))) 510 "type mismatch" 511 ) 512 (assert_invalid 513 (module (func $type-empty-f32 (result f32) (block))) 514 "type mismatch" 515 ) 516 (assert_invalid 517 (module (func $type-empty-f64 (result f64) (block))) 518 "type mismatch" 519 ) 520 521 (assert_invalid 522 (module (func $type-value-i32-vs-void 523 (block (i32.const 1)) 524 )) 525 "type mismatch" 526 ) 527 (assert_invalid 528 (module (func $type-value-i64-vs-void 529 (block (i64.const 1)) 530 )) 531 "type mismatch" 532 ) 533 (assert_invalid 534 (module (func $type-value-f32-vs-void 535 (block (f32.const 1.0)) 536 )) 537 "type mismatch" 538 ) 539 (assert_invalid 540 (module (func $type-value-f64-vs-void 541 (block (f64.const 1.0)) 542 )) 543 "type mismatch" 544 ) 545 (assert_invalid 546 (module (func $type-value-nums-vs-void 547 (block (i32.const 1) (i32.const 2)) 548 )) 549 "type mismatch" 550 ) 551 (assert_invalid 552 (module (func $type-value-empty-vs-i32 (result i32) 553 (block (result i32)) 554 )) 555 "type mismatch" 556 ) 557 (assert_invalid 558 (module (func $type-value-empty-vs-i64 (result i64) 559 (block (result i64)) 560 )) 561 "type mismatch" 562 ) 563 (assert_invalid 564 (module (func $type-value-empty-vs-f32 (result f32) 565 (block (result f32)) 566 )) 567 "type mismatch" 568 ) 569 (assert_invalid 570 (module (func $type-value-empty-vs-f64 (result f64) 571 (block (result f64)) 572 )) 573 "type mismatch" 574 ) 575 (assert_invalid 576 (module (func $type-value-empty-vs-nums (result i32 i32) 577 (block (result i32 i32)) 578 )) 579 "type mismatch" 580 ) 581 582 (assert_invalid 583 (module 584 (func $type-value-empty-in-block 585 (i32.const 0) 586 (block (block (result i32)) (drop)) 587 ) 588 ) 589 "type mismatch" 590 ) 591 (assert_invalid 592 (module 593 (func $type-value-empty-in-loop 594 (i32.const 0) 595 (loop (block (result i32)) (drop)) 596 ) 597 ) 598 "type mismatch" 599 ) 600 (assert_invalid 601 (module 602 (func $type-value-empty-in-then 603 (i32.const 0) (i32.const 0) 604 (if (then (block (result i32)) (drop))) 605 ) 606 ) 607 "type mismatch" 608 ) 609 610 (assert_invalid 611 (module (func $type-value-void-vs-i32 (result i32) 612 (block (result i32) (nop)) 613 )) 614 "type mismatch" 615 ) 616 (assert_invalid 617 (module (func $type-value-void-vs-i64 (result i64) 618 (block (result i64) (nop)) 619 )) 620 "type mismatch" 621 ) 622 (assert_invalid 623 (module (func $type-value-void-vs-f32 (result f32) 624 (block (result f32) (nop)) 625 )) 626 "type mismatch" 627 ) 628 (assert_invalid 629 (module (func $type-value-void-vs-f64 (result f64) 630 (block (result f64) (nop)) 631 )) 632 "type mismatch" 633 ) 634 (assert_invalid 635 (module (func $type-value-void-vs-nums (result i32 i32) 636 (block (result i32 i32) (nop)) 637 )) 638 "type mismatch" 639 ) 640 (assert_invalid 641 (module (func $type-value-i32-vs-i64 (result i32) 642 (block (result i32) (i64.const 0)) 643 )) 644 "type mismatch" 645 ) 646 (assert_invalid 647 (module (func $type-value-i32-vs-f32 (result i32) 648 (block (result i32) (f32.const 0.0)) 649 )) 650 "type mismatch" 651 ) 652 (assert_invalid 653 (module (func $type-value-i32-vs-f64 (result i32) 654 (block (result i32) (f64.const 0.0)) 655 )) 656 "type mismatch" 657 ) 658 (assert_invalid 659 (module (func $type-value-i64-vs-i32 (result i64) 660 (block (result i64) (i32.const 0)) 661 )) 662 "type mismatch" 663 ) 664 (assert_invalid 665 (module (func $type-value-i64-vs-f32 (result i64) 666 (block (result i64) (f32.const 0.0)) 667 )) 668 "type mismatch" 669 ) 670 (assert_invalid 671 (module (func $type-value-i64-vs-f64 (result i64) 672 (block (result i64) (f64.const 0.0)) 673 )) 674 "type mismatch" 675 ) 676 (assert_invalid 677 (module (func $type-value-f32-vs-i32 (result f32) 678 (block (result f32) (i32.const 0)) 679 )) 680 "type mismatch" 681 ) 682 (assert_invalid 683 (module (func $type-value-f32-vs-i64 (result f32) 684 (block (result f32) (i64.const 0)) 685 )) 686 "type mismatch" 687 ) 688 (assert_invalid 689 (module (func $type-value-f32-vs-f64 (result f32) 690 (block (result f32) (f64.const 0.0)) 691 )) 692 "type mismatch" 693 ) 694 (assert_invalid 695 (module (func $type-value-f64-vs-i32 (result f64) 696 (block (result f64) (i32.const 0)) 697 )) 698 "type mismatch" 699 ) 700 (assert_invalid 701 (module (func $type-value-f64-vs-i64 (result f64) 702 (block (result f64) (i64.const 0)) 703 )) 704 "type mismatch" 705 ) 706 (assert_invalid 707 (module (func $type-value-f64-vs-f32 (result f32) 708 (block (result f64) (f32.const 0.0)) 709 )) 710 "type mismatch" 711 ) 712 (assert_invalid 713 (module (func $type-value-num-vs-nums (result i32 i32) 714 (block (result i32 i32) (i32.const 0)) 715 )) 716 "type mismatch" 717 ) 718 (assert_invalid 719 (module (func $type-value-partial-vs-nums (result i32 i32) 720 (i32.const 1) (block (result i32 i32) (i32.const 2)) 721 )) 722 "type mismatch" 723 ) 724 (assert_invalid 725 (module (func $type-value-nums-vs-num (result i32) 726 (block (result i32) (i32.const 1) (i32.const 2)) 727 )) 728 "type mismatch" 729 ) 730 731 (assert_invalid 732 (module (func $type-value-unreached-select-i32-i64 (result i32) 733 (block (result i64) (select (unreachable) (unreachable) (unreachable))) 734 )) 735 "type mismatch" 736 ) 737 (assert_invalid 738 (module (func $type-value-unreached-select-i32-f32 (result i32) 739 (block (result f32) (select (unreachable) (unreachable) (unreachable))) 740 )) 741 "type mismatch" 742 ) 743 (assert_invalid 744 (module (func $type-value-unreached-select-i32-f64 (result i32) 745 (block (result f64) (select (unreachable) (unreachable) (unreachable))) 746 )) 747 "type mismatch" 748 ) 749 (assert_invalid 750 (module (func $type-value-unreached-select-i64-i32 (result i64) 751 (block (result i32) (select (unreachable) (unreachable) (unreachable))) 752 )) 753 "type mismatch" 754 ) 755 (assert_invalid 756 (module (func $type-value-unreached-select-i64-f32 (result i64) 757 (block (result f32) (select (unreachable) (unreachable) (unreachable))) 758 )) 759 "type mismatch" 760 ) 761 (assert_invalid 762 (module (func $type-value-unreached-select-i64-f64 (result i64) 763 (block (result f64) (select (unreachable) (unreachable) (unreachable))) 764 )) 765 "type mismatch" 766 ) 767 (assert_invalid 768 (module (func $type-value-unreached-select-f32-i32 (result f32) 769 (block (result i32) (select (unreachable) (unreachable) (unreachable))) 770 )) 771 "type mismatch" 772 ) 773 (assert_invalid 774 (module (func $type-value-unreached-select-f32-i64 (result f32) 775 (block (result i64) (select (unreachable) (unreachable) (unreachable))) 776 )) 777 "type mismatch" 778 ) 779 (assert_invalid 780 (module (func $type-value-unreached-select-f32-f64 (result f32) 781 (block (result f64) (select (unreachable) (unreachable) (unreachable))) 782 )) 783 "type mismatch" 784 ) 785 (assert_invalid 786 (module (func $type-value-unreached-select-f64-i32 (result f64) 787 (block (result i32) (select (unreachable) (unreachable) (unreachable))) 788 )) 789 "type mismatch" 790 ) 791 (assert_invalid 792 (module (func $type-value-unreached-select-f64-i64 (result f64) 793 (block (result i64) (select (unreachable) (unreachable) (unreachable))) 794 )) 795 "type mismatch" 796 ) 797 (assert_invalid 798 (module (func $type-value-unreached-select-f64-f32 (result f64) 799 (block (result f32) (select (unreachable) (unreachable) (unreachable))) 800 )) 801 "type mismatch" 802 ) 803 804 (assert_invalid 805 (module (func $type-break-last-void-vs-i32 (result i32) 806 (block (result i32) (br 0)) 807 )) 808 "type mismatch" 809 ) 810 (assert_invalid 811 (module (func $type-break-last-void-vs-i64 (result i64) 812 (block (result i64) (br 0)) 813 )) 814 "type mismatch" 815 ) 816 (assert_invalid 817 (module (func $type-break-last-void-vs-f32 (result f32) 818 (block (result f32) (br 0)) 819 )) 820 "type mismatch" 821 ) 822 (assert_invalid 823 (module (func $type-break-last-void-vs-f64 (result f64) 824 (block (result f64) (br 0)) 825 )) 826 "type mismatch" 827 ) 828 (assert_invalid 829 (module (func $type-break-last-void-vs-nums (result i32 i32) 830 (block (result i32 i32) (br 0)) 831 )) 832 "type mismatch" 833 ) 834 835 (assert_invalid 836 (module (func $type-break-empty-vs-i32 (result i32) 837 (block (result i32) (br 0) (i32.const 1)) 838 )) 839 "type mismatch" 840 ) 841 (assert_invalid 842 (module (func $type-break-empty-vs-i64 (result i64) 843 (block (result i64) (br 0) (i64.const 1)) 844 )) 845 "type mismatch" 846 ) 847 (assert_invalid 848 (module (func $type-break-empty-vs-f32 (result f32) 849 (block (result f32) (br 0) (f32.const 1.0)) 850 )) 851 "type mismatch" 852 ) 853 (assert_invalid 854 (module (func $type-break-empty-vs-f64 (result f64) 855 (block (result f64) (br 0) (f64.const 1.0)) 856 )) 857 "type mismatch" 858 ) 859 (assert_invalid 860 (module (func $type-break-empty-vs-nums (result i32 i32) 861 (block (result i32 i32) (br 0) (i32.const 1) (i32.const 2)) 862 )) 863 "type mismatch" 864 ) 865 866 (assert_invalid 867 (module (func $type-break-void-vs-i32 (result i32) 868 (block (result i32) (br 0 (nop)) (i32.const 1)) 869 )) 870 "type mismatch" 871 ) 872 (assert_invalid 873 (module (func $type-break-void-vs-i64 (result i64) 874 (block (result i64) (br 0 (nop)) (i64.const 1)) 875 )) 876 "type mismatch" 877 ) 878 (assert_invalid 879 (module (func $type-break-void-vs-f32 (result f32) 880 (block (result f32) (br 0 (nop)) (f32.const 1.0)) 881 )) 882 "type mismatch" 883 ) 884 (assert_invalid 885 (module (func $type-break-void-vs-f64 (result f64) 886 (block (result f64) (br 0 (nop)) (f64.const 1.0)) 887 )) 888 "type mismatch" 889 ) 890 891 (assert_invalid 892 (module (func $type-break-i32-vs-i64 (result i32) 893 (block (result i32) (br 0 (i64.const 1)) (i32.const 1)) 894 )) 895 "type mismatch" 896 ) 897 (assert_invalid 898 (module (func $type-break-i32-vs-f32 (result i32) 899 (block (result i32) (br 0 (f32.const 1.0)) (i32.const 1)) 900 )) 901 "type mismatch" 902 ) 903 (assert_invalid 904 (module (func $type-break-i32-vs-f64 (result i32) 905 (block (result i32) (br 0 (f64.const 1.0)) (i32.const 1)) 906 )) 907 "type mismatch" 908 ) 909 (assert_invalid 910 (module (func $type-break-i64-vs-i32 (result i64) 911 (block (result i64) (br 0 (i32.const 1)) (i64.const 1)) 912 )) 913 "type mismatch" 914 ) 915 (assert_invalid 916 (module (func $type-break-i64-vs-f32 (result i64) 917 (block (result i64) (br 0 (f32.const 1.0)) (i64.const 1)) 918 )) 919 "type mismatch" 920 ) 921 (assert_invalid 922 (module (func $type-break-i64-vs-f64 (result i64) 923 (block (result i64) (br 0 (f64.const 1.0)) (i64.const 1)) 924 )) 925 "type mismatch" 926 ) 927 (assert_invalid 928 (module (func $type-break-f32-vs-i32 (result f32) 929 (block (result f32) (br 0 (i32.const 1)) (f32.const 1.0)) 930 )) 931 "type mismatch" 932 ) 933 (assert_invalid 934 (module (func $type-break-f32-vs-i64 (result f32) 935 (block (result f32) (br 0 (i64.const 1)) (f32.const 1.0)) 936 )) 937 "type mismatch" 938 ) 939 (assert_invalid 940 (module (func $type-break-f32-vs-f64 (result f32) 941 (block (result f32) (br 0 (f64.const 1.0)) (f32.const 1.0)) 942 )) 943 "type mismatch" 944 ) 945 (assert_invalid 946 (module (func $type-break-f64-vs-i32 (result f64) 947 (block (result i64) (br 0 (i32.const 1)) (f64.const 1.0)) 948 )) 949 "type mismatch" 950 ) 951 (assert_invalid 952 (module (func $type-break-f64-vs-i64 (result f64) 953 (block (result f64) (br 0 (i64.const 1)) (f64.const 1.0)) 954 )) 955 "type mismatch" 956 ) 957 (assert_invalid 958 (module (func $type-break-f64-vs-f32 (result f64) 959 (block (result f64) (br 0 (f32.const 1.0)) (f64.const 1)) 960 )) 961 "type mismatch" 962 ) 963 (assert_invalid 964 (module (func $type-break-num-vs-nums (result i32 i32) 965 (block (result i32 i32) (br 0 (i32.const 0)) (i32.const 1) (i32.const 2)) 966 )) 967 "type mismatch" 968 ) 969 (assert_invalid 970 (module (func $type-break-partial-vs-nums (result i32 i32) 971 (i32.const 1) (block (result i32 i32) (br 0 (i32.const 0)) (i32.const 2)) 972 )) 973 "type mismatch" 974 ) 975 976 (assert_invalid 977 (module (func $type-break-first-void-vs-i32 (result i32) 978 (block (result i32) (br 0 (nop)) (br 0 (i32.const 1))) 979 )) 980 "type mismatch" 981 ) 982 (assert_invalid 983 (module (func $type-break-first-void-vs-i64 (result i64) 984 (block (result i64) (br 0 (nop)) (br 0 (i64.const 1))) 985 )) 986 "type mismatch" 987 ) 988 (assert_invalid 989 (module (func $type-break-first-void-vs-f32 (result f32) 990 (block (result f32) (br 0 (nop)) (br 0 (f32.const 1.0))) 991 )) 992 "type mismatch" 993 ) 994 (assert_invalid 995 (module (func $type-break-first-void-vs-f64 (result f64) 996 (block (result f64) (br 0 (nop)) (br 0 (f64.const 1.0))) 997 )) 998 "type mismatch" 999 ) 1000 (assert_invalid 1001 (module (func $type-break-first-void-vs-nums (result i32 i32) 1002 (block (result i32 i32) (br 0 (nop)) (br 0 (i32.const 1) (i32.const 2))) 1003 )) 1004 "type mismatch" 1005 ) 1006 1007 (assert_invalid 1008 (module (func $type-break-first-i32-vs-i64 (result i32) 1009 (block (result i32) (br 0 (i64.const 1)) (br 0 (i32.const 1))) 1010 )) 1011 "type mismatch" 1012 ) 1013 (assert_invalid 1014 (module (func $type-break-first-i32-vs-f32 (result i32) 1015 (block (result i32) (br 0 (f32.const 1.0)) (br 0 (i32.const 1))) 1016 )) 1017 "type mismatch" 1018 ) 1019 (assert_invalid 1020 (module (func $type-break-first-i32-vs-f64 (result i32) 1021 (block (result i32) (br 0 (f64.const 1.0)) (br 0 (i32.const 1))) 1022 )) 1023 "type mismatch" 1024 ) 1025 (assert_invalid 1026 (module (func $type-break-first-i64-vs-i32 (result i64) 1027 (block (result i64) (br 0 (i32.const 1)) (br 0 (i64.const 1))) 1028 )) 1029 "type mismatch" 1030 ) 1031 (assert_invalid 1032 (module (func $type-break-first-i64-vs-f32 (result i64) 1033 (block (result i64) (br 0 (f32.const 1.0)) (br 0 (i64.const 1))) 1034 )) 1035 "type mismatch" 1036 ) 1037 (assert_invalid 1038 (module (func $type-break-first-i64-vs-f64 (result i64) 1039 (block (result i64) (br 0 (f64.const 1.0)) (br 0 (i64.const 1))) 1040 )) 1041 "type mismatch" 1042 ) 1043 (assert_invalid 1044 (module (func $type-break-first-f32-vs-i32 (result f32) 1045 (block (result f32) (br 0 (i32.const 1)) (br 0 (f32.const 1.0))) 1046 )) 1047 "type mismatch" 1048 ) 1049 (assert_invalid 1050 (module (func $type-break-first-f32-vs-i64 (result f32) 1051 (block (result f32) (br 0 (i64.const 1)) (br 0 (f32.const 1.0))) 1052 )) 1053 "type mismatch" 1054 ) 1055 (assert_invalid 1056 (module (func $type-break-first-f32-vs-f64 (result f32) 1057 (block (result f32) (br 0 (f64.const 1.0)) (br 0 (f32.const 1.0))) 1058 )) 1059 "type mismatch" 1060 ) 1061 (assert_invalid 1062 (module (func $type-break-first-f64-vs-i32 (result f64) 1063 (block (result f64) (br 0 (i32.const 1)) (br 0 (f64.const 1.0))) 1064 )) 1065 "type mismatch" 1066 ) 1067 (assert_invalid 1068 (module (func $type-break-first-f64-vs-i64 (result f64) 1069 (block (result f64) (br 0 (i64.const 1)) (br 0 (f64.const 1.0))) 1070 )) 1071 "type mismatch" 1072 ) 1073 (assert_invalid 1074 (module (func $type-break-first-f64-vs-f32 (result f64) 1075 (block (result f64) (br 0 (f32.const 1.0)) (br 0 (f64.const 1.0))) 1076 )) 1077 "type mismatch" 1078 ) 1079 (assert_invalid 1080 (module (func $type-break-first-num-vs-nums (result i32 i32) 1081 (block (result i32 i32) (br 0 (i32.const 0)) (br 0 (i32.const 1) (i32.const 2))) 1082 )) 1083 "type mismatch" 1084 ) 1085 1086 (assert_invalid 1087 (module (func $type-break-nested-i32-vs-void 1088 (block (result i32) (block (result i32) (br 1 (i32.const 1))) (br 0)) 1089 )) 1090 "type mismatch" 1091 ) 1092 (assert_invalid 1093 (module (func $type-break-nested-i64-vs-void 1094 (block (result i64) (block (result i64) (br 1 (i64.const 1))) (br 0)) 1095 )) 1096 "type mismatch" 1097 ) 1098 (assert_invalid 1099 (module (func $type-break-nested-f32-vs-void 1100 (block (result f32) (block (result f32) (br 1 (f32.const 1.0))) (br 0)) 1101 )) 1102 "type mismatch" 1103 ) 1104 (assert_invalid 1105 (module (func $type-break-nested-f64-vs-void 1106 (block (result f64) (block (result f64) (br 1 (f64.const 1.0))) (br 0)) 1107 )) 1108 "type mismatch" 1109 ) 1110 (assert_invalid 1111 (module (func $type-break-nested-nums-vs-void 1112 (block (result i32 i32) (block (result i32 i32) (br 1 (i32.const 1) (i32.const 2))) (br 0)) 1113 )) 1114 "type mismatch" 1115 ) 1116 1117 (assert_invalid 1118 (module (func $type-break-nested-empty-vs-i32 (result i32) 1119 (block (result i32) (block (br 1)) (br 0 (i32.const 1))) 1120 )) 1121 "type mismatch" 1122 ) 1123 (assert_invalid 1124 (module (func $type-break-nested-empty-vs-i64 (result i64) 1125 (block (result i64) (block (br 1)) (br 0 (i64.const 1))) 1126 )) 1127 "type mismatch" 1128 ) 1129 (assert_invalid 1130 (module (func $type-break-nested-empty-vs-f32 (result f32) 1131 (block (result f32) (block (br 1)) (br 0 (f32.const 1.0))) 1132 )) 1133 "type mismatch" 1134 ) 1135 (assert_invalid 1136 (module (func $type-break-nested-empty-vs-f64 (result f64) 1137 (block (result f64) (block (br 1)) (br 0 (f64.const 1))) 1138 )) 1139 "type mismatch" 1140 ) 1141 (assert_invalid 1142 (module (func $type-break-nested-empty-vs-nums (result i32 i32) 1143 (block (result i32 i32) (block (br 1)) (br 0 (i32.const 1) (i32.const 2))) 1144 )) 1145 "type mismatch" 1146 ) 1147 1148 (assert_invalid 1149 (module (func $type-break-nested-void-vs-i32 (result i32) 1150 (block (result i32) (block (result i32) (br 1 (nop))) (br 0 (i32.const 1))) 1151 )) 1152 "type mismatch" 1153 ) 1154 (assert_invalid 1155 (module (func $type-break-nested-void-vs-i64 (result i64) 1156 (block (result i64) (block (result i64) (br 1 (nop))) (br 0 (i64.const 1))) 1157 )) 1158 "type mismatch" 1159 ) 1160 (assert_invalid 1161 (module (func $type-break-nested-void-vs-f32 (result f32) 1162 (block (result f32) (block (result f32) (br 1 (nop))) (br 0 (f32.const 1.0))) 1163 )) 1164 "type mismatch" 1165 ) 1166 (assert_invalid 1167 (module (func $type-break-nested-void-vs-f64 (result f64) 1168 (block (result f64) (block (result f64) (br 1 (nop))) (br 0 (f64.const 1.0))) 1169 )) 1170 "type mismatch" 1171 ) 1172 (assert_invalid 1173 (module (func $type-break-nested-void-vs-nums (result i32 i32) 1174 (block (result i32 i32) (block (result i32 i32) (br 1 (nop))) (br 0 (i32.const 1) (i32.const 2))) 1175 )) 1176 "type mismatch" 1177 ) 1178 1179 (assert_invalid 1180 (module (func $type-break-nested-i32-vs-i64 (result i32) 1181 (block (result i32) 1182 (block (result i32) (br 1 (i64.const 1))) (br 0 (i32.const 1)) 1183 ) 1184 )) 1185 "type mismatch" 1186 ) 1187 (assert_invalid 1188 (module (func $type-break-nested-i32-vs-f32 (result i32) 1189 (block (result i32) 1190 (block (result i32) (br 1 (f32.const 1.0))) (br 0 (i32.const 1)) 1191 ) 1192 )) 1193 "type mismatch" 1194 ) 1195 (assert_invalid 1196 (module (func $type-break-nested-i32-vs-f64 (result i32) 1197 (block (result i32) 1198 (block (result i32) (br 1 (f64.const 1.0))) (br 0 (i32.const 1)) 1199 ) 1200 )) 1201 "type mismatch" 1202 ) 1203 (assert_invalid 1204 (module (func $type-break-nested-i64-vs-i32 (result i64) 1205 (block (result i64) 1206 (block (result i64) (br 1 (i32.const 1))) (br 0 (i64.const 1)) 1207 ) 1208 )) 1209 "type mismatch" 1210 ) 1211 (assert_invalid 1212 (module (func $type-break-nested-i64-vs-f32 (result i64) 1213 (block (result i64) 1214 (block (result i64) (br 1 (f32.const 1.0))) (br 0 (i64.const 1)) 1215 ) 1216 )) 1217 "type mismatch" 1218 ) 1219 (assert_invalid 1220 (module (func $type-break-nested-i64-vs-f64 (result i64) 1221 (block (result i64) 1222 (block (result i64) (br 1 (f64.const 1.0))) (br 0 (i64.const 1)) 1223 ) 1224 )) 1225 "type mismatch" 1226 ) 1227 (assert_invalid 1228 (module (func $type-break-nested-f32-vs-i32 (result f32) 1229 (block (result f32) 1230 (block (result f32) (br 1 (i32.const 1))) (br 0 (f32.const 1.0)) 1231 ) 1232 )) 1233 "type mismatch" 1234 ) 1235 (assert_invalid 1236 (module (func $type-break-nested-f32-vs-i64 (result f32) 1237 (block (result f32) 1238 (block (result f32) (br 1 (i64.const 1))) (br 0 (f32.const 1.0)) 1239 ) 1240 )) 1241 "type mismatch" 1242 ) 1243 (assert_invalid 1244 (module (func $type-break-nested-f32-vs-f64 (result f32) 1245 (block (result f32) 1246 (block (result f32) (br 1 (f64.const 1.0))) (br 0 (f32.const 1.0)) 1247 ) 1248 )) 1249 "type mismatch" 1250 ) 1251 (assert_invalid 1252 (module (func $type-break-nested-f64-vs-i32 (result f64) 1253 (block (result f64) 1254 (block (result f64) (br 1 (i32.const 1))) (br 0 (f64.const 1.0)) 1255 ) 1256 )) 1257 "type mismatch" 1258 ) 1259 (assert_invalid 1260 (module (func $type-break-nested-f64-vs-i64 (result f64) 1261 (block (result f64) 1262 (block (result f64) (br 1 (i64.const 1))) (br 0 (f64.const 1.0)) 1263 ) 1264 )) 1265 "type mismatch" 1266 ) 1267 (assert_invalid 1268 (module (func $type-break-nested-f64-vs-f32 (result f64) 1269 (block (result f64) 1270 (block (result f64) (br 1 (f32.const 1.0))) (br 0 (f64.const 1.0)) 1271 ) 1272 )) 1273 "type mismatch" 1274 ) 1275 (assert_invalid 1276 (module (func $type-break-nested-num-vs-nums (result i32 i32) 1277 (block (result i32 i32) 1278 (block (result i32 i32) (br 1 (i32.const 0))) (br 0 (i32.const 1) (i32.const 2)) 1279 ) 1280 )) 1281 "type mismatch" 1282 ) 1283 1284 (assert_invalid 1285 (module (func $type-break-operand-empty-vs-i32 (result i32) 1286 (i32.ctz (block (br 0))) 1287 )) 1288 "type mismatch" 1289 ) 1290 (assert_invalid 1291 (module (func $type-break-operand-empty-vs-i64 (result i64) 1292 (i64.ctz (block (br 0))) 1293 )) 1294 "type mismatch" 1295 ) 1296 (assert_invalid 1297 (module (func $type-break-operand-empty-vs-f32 (result f32) 1298 (f32.floor (block (br 0))) 1299 )) 1300 "type mismatch" 1301 ) 1302 (assert_invalid 1303 (module (func $type-break-operand-empty-vs-f64 (result f64) 1304 (f64.floor (block (br 0))) 1305 )) 1306 "type mismatch" 1307 ) 1308 (assert_invalid 1309 (module (func $type-break-operand-empty-vs-nums (result i32) 1310 (i32.add (block (br 0))) 1311 )) 1312 "type mismatch" 1313 ) 1314 1315 (assert_invalid 1316 (module (func $type-break-operand-void-vs-i32 (result i32) 1317 (i32.ctz (block (br 0 (nop)))) 1318 )) 1319 "type mismatch" 1320 ) 1321 (assert_invalid 1322 (module (func $type-break-operand-void-vs-i64 (result i64) 1323 (i64.ctz (block (br 0 (nop)))) 1324 )) 1325 "type mismatch" 1326 ) 1327 (assert_invalid 1328 (module (func $type-break-operand-void-vs-f32 (result f32) 1329 (f32.floor (block (br 0 (nop)))) 1330 )) 1331 "type mismatch" 1332 ) 1333 (assert_invalid 1334 (module (func $type-break-operand-void-vs-f64 (result f64) 1335 (f64.floor (block (br 0 (nop)))) 1336 )) 1337 "type mismatch" 1338 ) 1339 (assert_invalid 1340 (module (func $type-break-operand-void-vs-nums (result i32) 1341 (i32.add (block (br 0 (nop)))) 1342 )) 1343 "type mismatch" 1344 ) 1345 1346 (assert_invalid 1347 (module (func $type-break-operand-i32-vs-i64 (result i32) 1348 (i64.ctz (block (br 0 (i64.const 9)))) 1349 )) 1350 "type mismatch" 1351 ) 1352 (assert_invalid 1353 (module (func $type-break-operand-i32-vs-f32 (result i32) 1354 (f32.floor (block (br 0 (f32.const 9.0)))) 1355 )) 1356 "type mismatch" 1357 ) 1358 (assert_invalid 1359 (module (func $type-break-operand-i32-vs-f64 (result i32) 1360 (f64.floor (block (br 0 (f64.const 9.0)))) 1361 )) 1362 "type mismatch" 1363 ) 1364 (assert_invalid 1365 (module (func $type-break-operand-i64-vs-i32 (result i64) 1366 (i32.ctz (block (br 0 (i32.const 9)))) 1367 )) 1368 "type mismatch" 1369 ) 1370 (assert_invalid 1371 (module (func $type-break-operand-i64-vs-f32 (result i64) 1372 (f32.floor (block (br 0 (f32.const 9.0)))) 1373 )) 1374 "type mismatch" 1375 ) 1376 (assert_invalid 1377 (module (func $type-break-operand-i64-vs-f64 (result i64) 1378 (f64.floor (block (br 0 (f64.const 9.0)))) 1379 )) 1380 "type mismatch" 1381 ) 1382 (assert_invalid 1383 (module (func $type-break-operand-f32-vs-i32 (result f32) 1384 (i32.ctz (block (br 0 (i32.const 9)))) 1385 )) 1386 "type mismatch" 1387 ) 1388 (assert_invalid 1389 (module (func $type-break-operand-f32-vs-i64 (result f32) 1390 (i64.ctz (block (br 0 (i64.const 9)))) 1391 )) 1392 "type mismatch" 1393 ) 1394 (assert_invalid 1395 (module (func $type-break-operand-f32-vs-f64 (result f32) 1396 (f64.floor (block (br 0 (f64.const 9.0)))) 1397 )) 1398 "type mismatch" 1399 ) 1400 (assert_invalid 1401 (module (func $type-break-operand-f64-vs-i32 (result f64) 1402 (i32.ctz (block (br 0 (i32.const 9)))) 1403 )) 1404 "type mismatch" 1405 ) 1406 (assert_invalid 1407 (module (func $type-break-operand-f64-vs-i64 (result f64) 1408 (i64.ctz (block (br 0 (i64.const 9)))) 1409 )) 1410 "type mismatch" 1411 ) 1412 (assert_invalid 1413 (module (func $type-break-operand-f64-vs-f32 (result f64) 1414 (f32.floor (block (br 0 (f32.const 9.0)))) 1415 )) 1416 "type mismatch" 1417 ) 1418 (assert_invalid 1419 (module (func $type-break-operand-num-vs-nums (result i32) 1420 (i32.add (block (br 0 (i64.const 9) (i32.const 10)))) 1421 )) 1422 "type mismatch" 1423 ) 1424 1425 (assert_invalid 1426 (module (func $type-param-void-vs-num 1427 (block (param i32) (drop)) 1428 )) 1429 "type mismatch" 1430 ) 1431 (assert_invalid 1432 (module (func $type-param-void-vs-nums 1433 (block (param i32 f64) (drop) (drop)) 1434 )) 1435 "type mismatch" 1436 ) 1437 (assert_invalid 1438 (module (func $type-param-num-vs-num 1439 (f32.const 0) (block (param i32) (drop)) 1440 )) 1441 "type mismatch" 1442 ) 1443 (assert_invalid 1444 (module (func $type-param-num-vs-nums 1445 (f32.const 0) (block (param f32 i32) (drop) (drop)) 1446 )) 1447 "type mismatch" 1448 ) 1449 (assert_invalid 1450 (module (func $type-param-nested-void-vs-num 1451 (block (block (param i32) (drop))) 1452 )) 1453 "type mismatch" 1454 ) 1455 (assert_invalid 1456 (module (func $type-param-void-vs-nums 1457 (block (block (param i32 f64) (drop) (drop))) 1458 )) 1459 "type mismatch" 1460 ) 1461 (assert_invalid 1462 (module (func $type-param-num-vs-num 1463 (block (f32.const 0) (block (param i32) (drop))) 1464 )) 1465 "type mismatch" 1466 ) 1467 (assert_invalid 1468 (module (func $type-param-num-vs-nums 1469 (block (f32.const 0) (block (param f32 i32) (drop) (drop))) 1470 )) 1471 "type mismatch" 1472 ) 1473 1474 (assert_malformed 1475 (module quote "(func (param i32) (result i32) block (param $x i32) end)") 1476 "unexpected token" 1477 ) 1478 (assert_malformed 1479 (module quote "(func (param i32) (result i32) (block (param $x i32)))") 1480 "unexpected token" 1481 ) 1482 1483 1484 (assert_malformed 1485 (module quote "(func block end $l)") 1486 "mismatching label" 1487 ) 1488 (assert_malformed 1489 (module quote "(func block $a end $l)") 1490 "mismatching label" 1491 )