/*
- * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2012, 2013, 2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void addVariable(VariableAccessData* variable)
{
m_variables.append(variable);
+
+ // We may set this early. Merging it here saves us time in prediction propagation.
+ variable->mergeShouldNeverUnbox(m_shouldNeverUnbox);
}
VariableAccessData* someVariable() const
bool mergeShouldNeverUnbox(bool shouldNeverUnbox)
{
- return checkAndSet(m_shouldNeverUnbox, m_shouldNeverUnbox | shouldNeverUnbox);
+ return checkAndSet(m_shouldNeverUnbox, m_shouldNeverUnbox || shouldNeverUnbox);
}
bool mergeArgumentPredictionAwareness()
bool changed = false;
for (unsigned i = 0; i < m_variables.size(); ++i) {
VariableAccessData* variable = m_variables[i]->find();
- changed |= checkAndSet(m_isProfitableToUnbox, m_isProfitableToUnbox | variable->isProfitableToUnbox());
+ changed |= checkAndSet(m_isProfitableToUnbox, m_isProfitableToUnbox || variable->isProfitableToUnbox());
}
if (!changed)
return false;
if (i)
out.print(" ");
- if (operand.isArgument())
- out.print("arg", operand.toArgument(), "(", VariableAccessDataDump(*graph, variable), ")");
- else
- out.print("r", operand.toLocal(), "(", VariableAccessDataDump(*graph, variable), ")");
+ out.print(operand, "(", VariableAccessDataDump(*graph, variable), ")");
}
out.print("\n");
}