Bug 211796
| Summary: | Constant-fold common case of OpIsConstructor by speculating m_structure | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Alexey Shvayka <ashvayka> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Enhancement | CC: | keith_miller |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=144093 | ||
Alexey Shvayka
For many function “types” we could know if it’s constructible from the structure cell.
For example, JSStrictFunction is always constructible, while JSArrowFunction and JSGeneratorFunction are not.
Probably we would just store a TriState on the structure and if every structure flowing into the IsConstructor is either TriState::True or TriState::False we can fold to a constant.
It’s possible we could store this info on the method table too.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |