| ;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. | |
| ;; RUN: wasm-ctor-eval %s --ctors=test,internalized --kept-exports=test,internalized --quiet -all -S -o - | filecheck %s | |
| ;; We should not error on precomputing these strings. | |
| (module | |
| (global $global (ref string) (string.const "one")) | |
| (global $internalized (mut anyref) (ref.null none)) | |
| (export "test" (func $test)) | |
| (export "internalized" (func $internalized)) | |
| (func $test (result externref) | |
| (global.get $global) | |
| ) | |
| (func $internalized (result anyref) | |
| (global.set $internalized | |
| (any.convert_extern | |
| (string.const "two") | |
| ) | |
| ) | |
| (global.get $internalized) | |
| ) | |
| ) | |
| ;; CHECK: (type $0 (func (result externref))) | |
| ;; CHECK: (type $1 (func (result anyref))) | |
| ;; CHECK: (export "test" (func $test_2)) | |
| ;; CHECK: (export "internalized" (func $internalized_3)) | |
| ;; CHECK: (func $test_2 (type $0) (result externref) | |
| ;; CHECK-NEXT: (string.const "one") | |
| ;; CHECK-NEXT: ) | |
| ;; CHECK: (func $internalized_3 (type $1) (result anyref) | |
| ;; CHECK-NEXT: (any.convert_extern | |
| ;; CHECK-NEXT: (string.const "two") | |
| ;; CHECK-NEXT: ) | |
| ;; CHECK-NEXT: ) |