jsc-tailcall: Add a bunch of operators
Created attachment 259675 [details] Patch
Comment on attachment 259675 [details] Patch r=me
Committed r188870 <http://trac.webkit.org/changeset/188870>.
(In reply to comment #3) > Committed r188870 <http://trac.webkit.org/changeset/188870>. This was on the jsc-tailcall branch.
Committed r189351: <http://trac.webkit.org/changeset/189351>
Comment on attachment 259675 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=259675&action=review > Source/JavaScriptCore/jit/GPRInfo.h:71 > + bool operator==(JSValueRegs other) { return m_gpr == other.m_gpr; } > + bool operator!=(JSValueRegs other) { return !(*this == other); } Is more efficient code generated if we make the argument type be const JSValueRegs&? > Source/JavaScriptCore/jit/GPRInfo.h:181 > + bool operator==(JSValueRegs other) const Same question. > Source/JavaScriptCore/jit/GPRInfo.h:186 > + bool operator!=(JSValueRegs other) const { return !(*this == other); } Same question.
(In reply to comment #6) > Comment on attachment 259675 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=259675&action=review > > > Source/JavaScriptCore/jit/GPRInfo.h:71 > > + bool operator==(JSValueRegs other) { return m_gpr == other.m_gpr; } > > + bool operator!=(JSValueRegs other) { return !(*this == other); } > > Is more efficient code generated if we make the argument type be const > JSValueRegs&? > > > Source/JavaScriptCore/jit/GPRInfo.h:181 > > + bool operator==(JSValueRegs other) const > > Same question. > > > Source/JavaScriptCore/jit/GPRInfo.h:186 > > + bool operator!=(JSValueRegs other) const { return !(*this == other); } > > Same question. JSValueRegs is an integer on 64 bit platforms, and two int8_t (thus packed as a single integer) on 32 bit platforms. So, passing by value is better here. In practice, it probably doesn't matter at all since those functions will usually be inlined.