Esempio n. 1
0
Interpolation::Interpolation(PassOwnPtr<InterpolableValue> start, PassOwnPtr<InterpolableValue> end)
    : m_start(start)
    , m_end(end)
    , m_cachedFraction(0)
    , m_cachedIteration(0)
    , m_cachedValue(m_start ? m_start->clone() : nullptr)
{
    RELEASE_ASSERT(typesMatch(m_start.get(), m_end.get()));
}
static bool canEliminate(instruction_iterator move)
{
	// Does the move source a register?
	if(!sourcesRegister(move)) return false;

	// Does the move only have a single destination
	if(isVectorMove(move)) return false;

	// Is the move predicated?
	if(isPredicated(move)) return false;

	// Do all definitions of the move source dominate the move?
	if(!allDefinitionsDominateMove(move)) return false;
	
	// Does the source type match the destination type?
	if(!typesMatch(move)) return false;

	return true;
}