| Summary: | [WHLSL] ParseConstexpr is very general | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Myles C. Maxfield <mmaxfield> |
| Component: | WebGPU | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED MOVED | ||
| Severity: | Normal | ||
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=189022 | ||
| Bug Depends on: | |||
| Bug Blocks: | 176199 | ||
Migrated to https://github.com/gpuweb/WHLSL/issues/79 |
It's called in a few places: vector<float, 4> // that "4" is a constexpr float[10] // that "10" is a constexpr enum asdf : int { XYZ = -3 // that "-3" is a constexpr } switch (foo) { case MyEnum.XYZ: // that "MyEnum.XYZ" is a constexpr } Because of all that, parseConstexpr can return something like operator-((x + y).z) We should do a bunch of filtering to make sure the right kind of constexprs are allowed in the various places where they are allowed.