Summary: | We should support delete in the DFG | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Keith Miller <keith_miller> | ||||||||||
Component: | New Bugs | Assignee: | Keith Miller <keith_miller> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | commit-queue, mark.lam, msaboff, saam | ||||||||||
Priority: | P2 | ||||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Keith Miller
2016-04-14 16:11:49 PDT
Created attachment 276460 [details]
Patch
Created attachment 276461 [details]
Benchmark results
I also tested this on a custom micro benchmark: function test(condition) { if (condition) delete base.id; let result = []; for (let i = 0; i < 100; i++) result.push(i); return result; } noInline(test); for (i = 0; i < 100000; i++) test(false); And got: delete-by-id 176.3282+-2.1856 ^ 40.1055+-0.4254 ^ definitely 4.3966x faster Comment on attachment 276460 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=276460&action=review > Source/JavaScriptCore/jit/JITPropertyAccess.cpp:533 > + emitTagBool(returnValueGPR); I am not a fan of the change JSValue->bool. The biggest problem of baseline JIT is binary size. We should instead go in the direction of making those load-store part of the slow path, not outside. Created attachment 276651 [details]
Patch for landing
Created attachment 276655 [details]
Patch for landing
Comment on attachment 276460 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=276460&action=review >> Source/JavaScriptCore/jit/JITPropertyAccess.cpp:533 >> + emitTagBool(returnValueGPR); > > I am not a fan of the change JSValue->bool. > > The biggest problem of baseline JIT is binary size. We should instead go in the direction of making those load-store part of the slow path, not outside. Fixed. I created a second operation that returns the EncodedValue for the baseline. Comment on attachment 276655 [details] Patch for landing Clearing flags on attachment: 276655 Committed r199683: <http://trac.webkit.org/changeset/199683> All reviewed patches have been landed. Closing bug. |