Bug 148337

Summary: Add a bunch of operators
Product: WebKit Reporter: Basile Clement <basile_clement>
Component: New BugsAssignee: Basile Clement <basile_clement>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 148662    
Attachments:
Description Flags
Patch saam: review+

Basile Clement
Reported 2015-08-21 15:48:35 PDT
jsc-tailcall: Add a bunch of operators
Attachments
Patch (3.84 KB, patch)
2015-08-21 15:49 PDT, Basile Clement
saam: review+
Basile Clement
Comment 1 2015-08-21 15:49:02 PDT
Saam Barati
Comment 2 2015-08-21 20:28:51 PDT
Comment on attachment 259675 [details] Patch r=me
Basile Clement
Comment 3 2015-08-24 11:08:14 PDT
Basile Clement
Comment 4 2015-08-31 18:17:59 PDT
(In reply to comment #3) > Committed r188870 <http://trac.webkit.org/changeset/188870>. This was on the jsc-tailcall branch.
Basile Clement
Comment 5 2015-09-04 09:39:37 PDT
Darin Adler
Comment 6 2015-09-04 09:58:30 PDT
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.
Basile Clement
Comment 7 2015-09-04 10:16:55 PDT
(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.
Note You need to log in before you can comment on or make changes to this bug.