Changeset 189351 in webkit for trunk/Source/JavaScriptCore/jit/GPRInfo.h
- Timestamp:
- Sep 4, 2015, 9:39:31 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/GPRInfo.h
r189293 r189351 66 66 67 67 bool operator!() const { return m_gpr == InvalidGPRReg; } 68 explicit operator bool() const { return m_gpr != InvalidGPRReg; } 69 70 bool operator==(JSValueRegs other) { return m_gpr == other.m_gpr; } 71 bool operator!=(JSValueRegs other) { return !(*this == other); } 68 72 69 73 GPRReg gpr() const { return m_gpr; } … … 111 115 112 116 bool operator!() const { return m_base == InvalidGPRReg; } 117 explicit operator bool() const { return m_base != InvalidGPRReg; } 113 118 114 119 bool isAddress() const { return m_offset != notAddress(); } … … 167 172 } 168 173 169 bool operator!() const 170 { 171 return static_cast<GPRReg>(m_tagGPR) == InvalidGPRReg 172 && static_cast<GPRReg>(m_payloadGPR) == InvalidGPRReg; 173 } 174 bool operator!() const { return !static_cast<bool>(*this); } 175 explicit operator bool() const 176 { 177 return static_cast<GPRReg>(m_tagGPR) != InvalidGPRReg 178 || static_cast<GPRReg>(m_payloadGPR) != InvalidGPRReg; 179 } 180 181 bool operator==(JSValueRegs other) const 182 { 183 return m_tagGPR == other.m_tagGPR 184 && m_payloadGPR == other.m_payloadGPR; 185 } 186 bool operator!=(JSValueRegs other) const { return !(*this == other); } 174 187 175 188 GPRReg tagGPR() const { return static_cast<GPRReg>(m_tagGPR); } … … 239 252 return result; 240 253 } 241 242 bool operator!() const 243 { 244 return static_cast<GPRReg>(m_baseOrTag) == InvalidGPRReg 245 && static_cast<GPRReg>(m_payload) == InvalidGPRReg; 254 255 bool operator!() const { return !static_cast<bool>(*this); } 256 explicit operator bool() const 257 { 258 return static_cast<GPRReg>(m_baseOrTag) != InvalidGPRReg 259 || static_cast<GPRReg>(m_payload) != InvalidGPRReg; 246 260 } 247 261
Note:
See TracChangeset
for help on using the changeset viewer.