blob: 5906e4f6027c8290c4934a30ceeb9b6cc88375a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.
;; RUN: foreach %s %t wasm-ctor-eval --ctors=test --kept-exports=test --quiet -all -S -o - | filecheck %s
;; We cannot precompute string views atm.
(module
;; CHECK: (type $0 (func))
;; CHECK: (export "test" (func $test))
(export "test" (func $test))
;; CHECK: (func $test (type $0)
;; CHECK-NEXT: (local $temp-view (ref stringview_wtf16))
;; CHECK-NEXT: (local.set $temp-view
;; CHECK-NEXT: (string.as_wtf16
;; CHECK-NEXT: (string.const "test")
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $test
(local $temp-view (ref stringview_wtf16))
;; This code will remain: we cannot precompute a value that we store in a
;; global, as string.as is not a constant instruction that can appear in a
;; global.
(local.set $temp-view
(string.as_wtf16
(string.const "test")
)
)
)
)
|