Summary: | for-in bytecode generation is exponential | ||
---|---|---|---|
Product: | WebKit | Reporter: | Saam Barati <saam> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | ashvayka, benjamin, fpizlo, ggaren, gskachkov, jfbastien, keith_miller, mark.lam, msaboff, oliver, ticaiolima, ysuzuki |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Description
Saam Barati
2017-05-22 11:44:54 PDT
Yup. We emit 1072675 instruction words for this function: ``` function foo(o) { for (let i in o) { for (let i in o) { for (let i in o) { for (let i in o) { for (let i in o) { for (let i in o) { for (let i in o) { for (let i in o) { for (let i in o) { 2+2; } } } } } } } } } } ``` Keith is fixing for / in to emit only one loop in https://bugs.webkit.org/show_bug.cgi?id=227989. *** This bug has been marked as a duplicate of bug 227989 *** |