| 159 | } |
| 160 | |
| 161 | Target pickAnyFrameTarget(Context* c, Value* v, CostCalculator* costCalculator) |
| 162 | { |
| 163 | Target best; |
| 164 | |
| 165 | unsigned count = totalFrameSize(c); |
| 166 | for (unsigned i = 0; i < count; ++i) { |
| 167 | Target mine(i, lir::Operand::Type::Memory, frameCost(c, v, i, costCalculator)); |
| 168 | if (mine.cost == Target::MinimumFrameCost) { |
| 169 | return mine; |
| 170 | } else if (mine.cost < best.cost) { |
| 171 | best = mine; |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | return best; |
| 176 | } |
| 177 | |
| 178 | Target pickTarget(Context* c, |
| 179 | Value* value, |
no test coverage detected