v8_4_5/src/hydrogen-instructions.cc
// Returns a representation if all uses agree on the same representation.
// Integer32 is also returned when some uses are Smi but others are Integer32.
Returns a representation if all uses agree on the same representation.
Integer32 is also returned when some uses are Smi but others are Integer32.
Returns a representation if all uses agree on the same representation . Integer32 is also returned when some uses are Smi but others are Integer32 .
Representation HValue::RepresentationFromUseRequirements() {
  Representation rep = Representation::None();
  for (HUseIterator it(uses()); !it.Done(); it.Advance()) {
    if (it.value()->block()->IsUnreachable()) continue;
    Representation use_rep =
        it.value()->RequiredInputRepresentation(it.index());
    if (rep.IsNone()) {
      rep = use_rep;
      continue;
    }
    if (use_rep.IsNone() || rep.Equals(use_rep)) continue;
    if (rep.generalize(use_rep).IsInteger32()) {
      rep = Representation::Integer32();
      continue;
    }
    return Representation::None();
  }
  return rep;
}
Representation HValue :: RepresentationFromUseRequirements ( ) { Representation rep = Representation :: None ( ) ; for ( HUseIterator it ( uses ( ) ) ; ! it . Done ( ) ; it . Advance ( ) ) { if ( it . value ( ) -> block ( ) -> IsUnreachable ( ) ) continue ; Representation use_rep = it . value ( ) -> RequiredInputRepresentation ( it . index ( ) ) ; if ( rep . IsNone ( ) ) { rep = use_rep ; continue ; } if ( use_rep . IsNone ( ) || rep . Equals ( use_rep ) ) continue ; if ( rep . generalize ( use_rep ) . IsInteger32 ( ) ) { rep = Representation :: Integer32 ( ) ; continue ; } return Representation :: None ( ) ; } return rep ; }
Returns a representation if all uses agree on the same representation.
Returns a representation if all uses agree on the same representation .
// Ignore the use requirement from never run code // We check for observed_input_representation elsewhere.