RESOLVED FIXED 230801
[JSC] Optimize PutByVal with for-in
https://bugs.webkit.org/show_bug.cgi?id=230801
Summary [JSC] Optimize PutByVal with for-in
Yusuke Suzuki
Reported 2021-09-26 01:08:22 PDT
[JSC] Optimize PutByVal with for-in
Attachments
Patch (37.95 KB, patch)
2021-09-26 02:36 PDT, Yusuke Suzuki
saam: review+
ews-feeder: commit-queue-
Yusuke Suzuki
Comment 1 2021-09-26 02:36:17 PDT
Saam Barati
Comment 2 2021-09-26 09:29:59 PDT
Comment on attachment 439293 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=439293&action=review > Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:1503 > + OpJeqPtr::emit(this, cond, moveLinkTimeConstant(nullptr, LinkTimeConstant::sentinelString), target.bind(this)); No need for this to be a link time constant. It can live on UnlinkedCodeBlock. It’s not related to global object.
Yusuke Suzuki
Comment 3 2021-09-26 21:13:29 PDT
Comment on attachment 439293 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=439293&action=review Thanks >> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:1503 >> + OpJeqPtr::emit(this, cond, moveLinkTimeConstant(nullptr, LinkTimeConstant::sentinelString), target.bind(this)); > > No need for this to be a link time constant. It can live on UnlinkedCodeBlock. It’s not related to global object. Changed.
Yusuke Suzuki
Comment 4 2021-09-26 21:14:32 PDT
Radar WebKit Bug Importer
Comment 5 2021-09-26 21:15:22 PDT
WebKit Commit Bot
Comment 6 2021-09-26 21:23:03 PDT
Re-opened since this is blocked by bug 230815
Yusuke Suzuki
Comment 7 2021-09-26 21:23:36 PDT
Comment on attachment 439293 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=439293&action=review >>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:1503 >>> + OpJeqPtr::emit(this, cond, moveLinkTimeConstant(nullptr, LinkTimeConstant::sentinelString), target.bind(this)); >> >> No need for this to be a link time constant. It can live on UnlinkedCodeBlock. It’s not related to global object. > > Changed. Ah, no. This should be link-time-constant. Otherwise, it does not work with bytecode cache. I'll revert the patch and reland the original one.
Saam Barati
Comment 8 2021-09-26 21:25:19 PDT
(In reply to Yusuke Suzuki from comment #7) > Comment on attachment 439293 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=439293&action=review > > >>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:1503 > >>> + OpJeqPtr::emit(this, cond, moveLinkTimeConstant(nullptr, LinkTimeConstant::sentinelString), target.bind(this)); > >> > >> No need for this to be a link time constant. It can live on UnlinkedCodeBlock. It’s not related to global object. > > > > Changed. > > Ah, no. This should be link-time-constant. Otherwise, it does not work with > bytecode cache. I'll revert the patch and reland the original one. I see... That's unfortunate. I guess you could also make it so that we test equivalence to the "sentinel string" when serializing bytecode, and then store it as some kind of marker. But, just making it a link time constant sounds simple enough.
Yusuke Suzuki
Comment 9 2021-09-26 22:02:52 PDT
Note You need to log in before you can comment on or make changes to this bug.