hphp/runtime/vm/jit/ir-builder.cpp
/*
 * Returns true iff a guard to constrain was found, and tc was more specific
 * than the guard's existing constraint. Note that this doesn't necessarily
 * mean that the guard was constrained: tc.weak might be true.
 */
Returns true iff a guard to constrain was found, and tc was more specific
than the guard's existing constraint. Note that this doesn't necessarily
mean that the guard was constrained: tc.weak might be true.
Returns true iff a guard to constrain was found and tc was more specific than the guard ' s existing constraint . Note that this doesn ' t necessarily mean that the guard was constrained : tc . weak might be true .
bool IRBuilder::constrainGuard(const IRInstruction* inst, TypeConstraint tc) {
  if (!shouldConstrainGuards()) return false;
  auto& guard = m_constraints.guards[inst];
  auto newTc = applyConstraint(guard, tc);
  ITRACE(2, "constrainGuard({}, {}): {} -> {}\n", *inst, tc, guard, newTc);
  Indent _i;
  auto const changed = guard != newTc;
  if (!tc.weak) guard = newTc;
  return changed;
}
bool IRBuilder :: constrainGuard ( const IRInstruction * inst , TypeConstraint tc ) { if ( ! shouldConstrainGuards ( ) ) return false ; auto & guard = m_constraints . guards [ inst ] ; auto newTc = applyConstraint ( guard , tc ) ; ITRACE ( 2 , " \n " , * inst , tc , guard , newTc ) ; Indent _i ; auto const changed = guard != newTc ; if ( ! tc . weak ) guard = newTc ; return changed ; }
Returns true iff a guard to constrain was found, and tc was more specific
 than the guard's existing constraint.
Returns true iff a guard to constrain was found and tc was more specific than the guard ' s existing constraint .