testapp.wat 558 B

12345678910111213141516171819202122
  1. ;; Copyright (C) 2023 Midokura Japan KK. All rights reserved.
  2. ;; SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  3. (module
  4. (func (export "test_data_drop") (result i32)
  5. (memory.init 0 (i32.const 0) (i32.const 0) (i32.const 4))
  6. data.drop 0
  7. (i32.load (i32.const 0))
  8. )
  9. (func (export "test_elem_drop") (result i32)
  10. (table.init 0 (i32.const 0) (i32.const 0) (i32.const 4))
  11. elem.drop 0
  12. i32.const 3
  13. table.get 0
  14. ref.is_null
  15. )
  16. (func $f)
  17. (memory 1 1)
  18. (table 4 4 funcref)
  19. (data "abcd")
  20. (elem func $f $f $f $f)
  21. )