Bug 163224 - [DOMJIT] DOMJIT::Patchpoint should have a way to receive constant folded arguments
Summary: [DOMJIT] DOMJIT::Patchpoint should have a way to receive constant folded argu...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords:
Depends on: 163005
Blocks: 162544
  Show dependency treegraph
 
Reported: 2016-10-10 11:02 PDT by Yusuke Suzuki
Modified: 2016-10-11 22:33 PDT (History)
6 users (show)

See Also:


Attachments
Patch (19.83 KB, patch)
2016-10-11 14:21 PDT, Yusuke Suzuki
fpizlo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2016-10-10 11:02:56 PDT
DOMJIT::Patchpoint for CallDOM takes JSGlobalObject to use it when creating wrapper object.
Currently, DOMJIT::Patchpoint always receives it as GPRReg. However, sometimes, we can get a constant value for that (I'm now assuming `document.getElementById("...")`)
In that case, we can emit more efficient code since we can drop some of checks ("World is normal" check).
Comment 1 Yusuke Suzuki 2016-10-10 11:04:00 PDT
Currently, I'm considering the design like,

DOMJIT::Value = DOMJIT::Reg | JSValue (constant)
DOMJIT::Reg = GPRReg | FPRReg | JSValueRegs

And DOMJIT::PatchpointParams stores DOMJIT::Value instead of DOMJIT::Reg.
Comment 2 Yusuke Suzuki 2016-10-11 14:21:43 PDT
Created attachment 291297 [details]
Patch
Comment 3 Yusuke Suzuki 2016-10-11 14:23:15 PDT
In the final design, DOMJIT::Value becomes,

DOMJIT::Value = DOMJIT::Reg x JSValue (constant)
Comment 4 Saam Barati 2016-10-11 14:30:57 PDT
LGTM too
Comment 5 Yusuke Suzuki 2016-10-11 14:35:55 PDT
Committed r207166: <http://trac.webkit.org/changeset/207166>