array.wast 861 B

123456789101112
  1. ;;-------------------------------------------------------------------------------------------------------
  2. ;; Copyright (C) Microsoft Corporation and contributors. All rights reserved.
  3. ;; Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. ;;-------------------------------------------------------------------------------------------------------
  5. (module
  6. (memory 1)
  7. (data (i32.const 0) "abcdefghijklmnopqrstuvwxyz")
  8. (func (export "goodload") (param $i i32) (result i32) (i32.load8_u offset=0 (get_local $i)))
  9. (func (export "goodstore") (param $i i32) (i32.store8 offset=0 (get_local $i) (get_local 0)))
  10. (func (export "badload") (param $i i32) (result i32) (i32.load offset=4294967295 (get_local $i)))
  11. (func (export "badstore") (param $i i32) (i32.store offset=100000 (get_local $i) (get_local 0)))
  12. )