RESOLVED FIXED 160211
We don't optimize for-in properly in baseline JIT (maybe other JITs too) with an object with symbols
https://bugs.webkit.org/show_bug.cgi?id=160211
Summary We don't optimize for-in properly in baseline JIT (maybe other JITs too) with...
Saam Barati
Reported 2016-07-26 14:12:28 PDT
``` var one = Symbol(); var args = {}; args[one] = 1; args.two = 2; function kv(obj) { var arr = []; for (var key in obj) { arr.push(key); arr.push(obj[key]); } return arr; } log(kv(args)); var c = 30; while (c--) { kv({c: c}); } log(kv(args)); function log(m) { var div = document.createElement('div'); document.body.appendChild(div); div.textContent = JSON.stringify(m); } ``` The result should not change. But we currently get: ["two",2] ["two",1] expected: ["two",2] ["two",2]
Attachments
patch (2.23 KB, patch)
2016-07-27 12:27 PDT, Saam Barati
ggaren: review+
patch for landing (3.13 KB, patch)
2016-07-27 12:46 PDT, Saam Barati
no flags
patch for landing (3.31 KB, patch)
2016-07-27 13:59 PDT, Saam Barati
no flags
Radar WebKit Bug Importer
Comment 1 2016-07-27 11:41:10 PDT
Saam Barati
Comment 2 2016-07-27 12:27:21 PDT
Geoffrey Garen
Comment 3 2016-07-27 12:29:26 PDT
Comment on attachment 284714 [details] patch r=me
Saam Barati
Comment 4 2016-07-27 12:46:12 PDT
Created attachment 284719 [details] patch for landing
Saam Barati
Comment 5 2016-07-27 13:59:10 PDT
Created attachment 284727 [details] patch for landing added more to the test
WebKit Commit Bot
Comment 6 2016-07-27 14:12:23 PDT
Comment on attachment 284727 [details] patch for landing Clearing flags on attachment: 284727 Committed r203793: <http://trac.webkit.org/changeset/203793>
WebKit Commit Bot
Comment 7 2016-07-27 14:12:27 PDT
All reviewed patches have been landed. Closing bug.
Alexey Shvayka
Comment 8 2021-05-14 13:26:31 PDT
*** Bug 159664 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.