Changeset 205507 in webkit for trunk/Source/JavaScriptCore/dfg/DFGEdge.h
- Timestamp:
- Sep 6, 2016, 2:35:24 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGEdge.h
r205504 r205507 190 190 191 191 #if USE(JSVALUE64) 192 static constexpr uint32_t shift() { return 8; }192 static uint32_t shift() { return 7; } 193 193 194 194 static uintptr_t makeWord(Node* node, UseKind useKind, ProofStatus proofStatus, KillStatus killStatus) … … 198 198 ASSERT((shiftedValue >> shift()) == bitwise_cast<uintptr_t>(node)); 199 199 ASSERT(useKind >= 0 && useKind < LastUseKind); 200 static_assert((static_cast<uintptr_t>(LastUseKind) << 2) < (static_cast<uintptr_t>(1) << shift()), "We rely on this being true to not clobber the node pointer."); 201 uintptr_t result = shiftedValue | (static_cast<uintptr_t>(useKind) << 2) | (DFG::doesKill(killStatus) << 1) | static_cast<uintptr_t>(DFG::isProved(proofStatus)); 202 if (!ASSERT_DISABLED) { 203 union U { 204 U() { word = 0; } 205 uintptr_t word; 206 Edge edge; 207 } u; 208 u.word = result; 209 ASSERT(u.edge.useKindUnchecked() == useKind); 210 ASSERT(u.edge.node() == node); 211 ASSERT(u.edge.proofStatusUnchecked() == proofStatus); 212 ASSERT(u.edge.killStatusUnchecked() == killStatus); 213 } 214 return result; 200 ASSERT((static_cast<uintptr_t>(LastUseKind) << 2) <= (static_cast<uintptr_t>(2) << shift())); 201 return shiftedValue | (static_cast<uintptr_t>(useKind) << 2) | (DFG::doesKill(killStatus) << 1) | static_cast<uintptr_t>(DFG::isProved(proofStatus)); 215 202 } 216 203
Note:
See TracChangeset
for help on using the changeset viewer.