NEW 211796
Constant-fold common case of OpIsConstructor by speculating m_structure
https://bugs.webkit.org/show_bug.cgi?id=211796
Summary Constant-fold common case of OpIsConstructor by speculating m_structure
Alexey Shvayka
Reported 2020-05-12 12:58:49 PDT
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
Note You need to log in before you can comment on or make changes to this bug.