summaryrefslogtreecommitdiff
path: root/test/gen-spec-js/action.txt
blob: 47e365a636337362971e82c8988815304f0c5af9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
;;; TOOL: run-gen-spec-js
;;; ARGS: --prefix=%(test_dir)s/gen-spec-empty-prefix.js
(module
  (import "spectest" "print" (func (param i32)))
  (func (export "print_i32") (param i32) local.get 0 call 0)

  (global (export "global") i32 (i32.const 14)))

(invoke "print_i32" (i32.const 1))
(get "global")
(;; STDOUT ;;;
// A deliberately empty file for testing.

// action.txt:3
let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x05\x01\x60\x01\x7f\x00\x02\x12\x01\x08\x73\x70\x65\x63\x74\x65\x73\x74\x05\x70\x72\x69\x6e\x74\x00\x00\x03\x02\x01\x00\x06\x06\x01\x7f\x00\x41\x0e\x0b\x07\x16\x02\x09\x70\x72\x69\x6e\x74\x5f\x69\x33\x32\x00\x01\x06\x67\x6c\x6f\x62\x61\x6c\x03\x00\x0a\x08\x01\x06\x00\x20\x00\x10\x00\x0b");

// action.txt:9
call($1, "print_i32", [1]);

// action.txt:10
get($1, "global");

;;; STDOUT ;;)