RESOLVED FIXED 163224
[DOMJIT] DOMJIT::Patchpoint should have a way to receive constant folded arguments
https://bugs.webkit.org/show_bug.cgi?id=163224
Summary [DOMJIT] DOMJIT::Patchpoint should have a way to receive constant folded argu...
Yusuke Suzuki
Reported 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).
Attachments
Patch (19.83 KB, patch)
2016-10-11 14:21 PDT, Yusuke Suzuki
fpizlo: review+
Yusuke Suzuki
Comment 1 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.
Yusuke Suzuki
Comment 2 2016-10-11 14:21:43 PDT
Yusuke Suzuki
Comment 3 2016-10-11 14:23:15 PDT
In the final design, DOMJIT::Value becomes, DOMJIT::Value = DOMJIT::Reg x JSValue (constant)
Saam Barati
Comment 4 2016-10-11 14:30:57 PDT
LGTM too
Yusuke Suzuki
Comment 5 2016-10-11 14:35:55 PDT
Note You need to log in before you can comment on or make changes to this bug.