Bug 159281
Summary: | Linked bytecode should not have save/resume | ||
---|---|---|---|
Product: | WebKit | Reporter: | Filip Pizlo <fpizlo> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | ysuzuki |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=159279 |
Filip Pizlo
The save/resume opcodes are so unusual that they cause confusion in the bytecode liveness analysis. In particular, they don't have context-free use/def behavior and their live-in calculation cannot be expressed in terms of use/def. Normally, the use/def of a bytecode is determined just by that bytecode. Save/resume's use/def is context-sensitive: you need to look at some surrounding code to determine what they use and def. Worse, use/def is insufficient to calculate the live-in of resume. The live-in of resume is invariant: the only thing live-in is the argument token. This is an unusual rule, and would require resume to be special-cased.
Linked bytecode has many clients: the bytecode liveness analysis, the LLInt, baseline JIT, and DFG parser. I think that instead of having so many special cases in linked bytecode for generators, we should do a generator conversion before even getting to linked bytecode. This will mean that linked bytecode won't have to worry about what it means to be a generator.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Filip Pizlo
Yusuke, do you have a bug that this can be duped to?
Yusuke Suzuki
https://bugs.webkit.org/show_bug.cgi?id=152723 this patch will include this separated analysis change to transform save, resume to get_from_scope & put_to_scope.
Yusuke Suzuki
Our generator mechanism was rewritten and this problems is gone!