18417, "e-kayrakli", "Should we have a module/user code equivalent of '--verify'?", "2021-09-13T23:03:54Z"
The Chapel compiler has a
--verify flag that's mainly used by developers/nightly testing to sanity check the AST and the state of the compiler. Should we have a module level flag that gets set with
--verify or have something separate but equivalent?
This came about when we noticed a performance issue with a verification for a string optimization that happened with
--boundsChecking. This verification was too slow to the extent that it was causing testing to timeout. More references for this context:
- Remove expensive string check by mppf · Pull Request #18399 · chapel-lang/chapel · GitHub
- Control numCodepoints caching with a config param by e-kayrakli · Pull Request #18403 · chapel-lang/chapel · GitHub
Are there other potential use cases for this verification? Things that I can think of besides the string metadata caching are:
- UTF-8 validation during string deinit and/or string methods that assumes UTF-8 data
- Constant domain optimization: we could
operator =is called on a domain where
- We can make
localAccessdo a check on the index and halt if it isn't local. (Currently, I think we get an OOB error that might look a little strange to the user)