Check UTF-8 validity for all constant strings on compile time
未关闭
@iluuu1994 已经在做这个了。
开始于 2023年3月17日。
Feature
Status: Needs Triage
- 主要语言
- C
- 星标
- 40.4k
- 派生
- 8.1k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 96
描述
Description
Currently the UTF-8 string validity is checked on demand and cached the string if not interned.
However:
- when a string is interned, such flag cannot be cached on runtime (at least not due TS)
- it is not stored back to the source script cache/opcache, ie. the validity is checked on every request at least once
- when a string is created from unvalidated source before checking, the validation cannot be cached
- currently only "valid UTF-8" flag is cached , but when a string is "invalid UTF-8", nothing is cached at all
This is a feature request to:
a) check UTF-8 validity on compile time on every const string
b) store a flag if UTF-8 validity was checked or not
Thanks to #10436 the UTF-8 validity check is very fast and the compile time impact should be minimal.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。