Skip to content

Commit 829e329

Browse files
skishorefacebook-github-bot
authored andcommitted
Simplify ArraySpec::widenToBespoke
Summary: None of these branches are needed. The first one is unnecessary because if the vanilla bit is unset, masking it off is a no-op. The second one is unnecessary because ArraySpec::Top has integer value 0 (it's ArraySpec::Bottom that has a special non-zero integer value). Reviewed By: ricklavoie Differential Revision: D20379283 fbshipit-source-id: d6e01b2107eb9a9e848d21edf8e69384ea8bc385
1 parent 146a32b commit 829e329

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

hphp/runtime/vm/jit/type-specialization-inl.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,8 @@ inline ArraySpec ArraySpec::narrowToVanilla() const {
202202
}
203203

204204
inline ArraySpec ArraySpec::widenToBespoke() const {
205-
if (!(m_sort & IsVanilla)) return *this;
206205
auto result = *this;
207206
result.m_sort &= ~IsVanilla;
208-
if (!result.m_sort) return Top();
209207
assertx(result.checkInvariants());
210208
return result;
211209
}

0 commit comments

Comments
 (0)