File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1485,11 +1485,16 @@ void evalCtors(Module& wasm,
14851485 }
14861486 }
14871487 } catch (FailToEvalException& fail) {
1488- // that 's it, we failed to even create the instance
1488+ // That 's it, we failed to even create the instance.
14891489 if (!quiet) {
14901490 std::cout << " ...stopping since could not create module instance: "
14911491 << fail.why << " \n " ;
14921492 }
1493+ } catch (NonconstantException& fail) {
1494+ // We can also fail during start due to a non-constant operation.
1495+ if (!quiet) {
1496+ std::cout << " ...stopping since non-constant in start\n " ;
1497+ }
14931498 } catch (TopologicalSort::CycleException e) {
14941499 // We use a topological sort for GC globals. If there is a non-breakable
14951500 // cycle there, we will hit an error (we can break cycles in nullable and
Original file line number Diff line number Diff line change 1+ ;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.
2+ ;; RUN: foreach %s %t wasm-ctor-eval --ctors=test --kept-exports=test --quiet -all -S -o - | filecheck %s
3+
4+ ;; A non-constant (relaxed SIMD) operation in the start function. We should not
5+ ;; error.
6+ (module
7+ ;; CHECK: (type $0 (func (param v128)))
8+
9+ ;; CHECK: (type $1 (func))
10+
11+ ;; CHECK: (import "a" "b" (func $import (type $0) (param v128)))
12+ (import " a" " b" (func $import (param v128 )))
13+
14+ ;; CHECK: (export "test" (func $0))
15+ (export " test" (func $0 ))
16+
17+ ;; CHECK: (start $0)
18+ (start $0 )
19+
20+ ;; CHECK: (func $0 (type $1)
21+ ;; CHECK-NEXT: (call $import
22+ ;; CHECK-NEXT: (f32x4.relaxed_min
23+ ;; CHECK-NEXT: (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
24+ ;; CHECK-NEXT: (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
25+ ;; CHECK-NEXT: )
26+ ;; CHECK-NEXT: )
27+ ;; CHECK-NEXT: )
28+ (func $0
29+ ;; The import avoids vacuum from removing the entire body.
30+ (call $import
31+ (f32x4.relaxed_min
32+ (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000 )
33+ (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000 )
34+ )
35+ )
36+ )
37+ )
38+
You can’t perform that action at this time.
0 commit comments