MCPcopy Create free account
hub / github.com/ReadyTalk/avian / pickAnyFrameTarget

Function pickAnyFrameTarget

src/codegen/compiler/regalloc.cpp:161–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161Target 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
178Target pickTarget(Context* c,
179 Value* value,

Callers 1

pickTargetFunction · 0.85

Calls 2

totalFrameSizeFunction · 0.85
frameCostFunction · 0.85

Tested by

no test coverage detected