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

Function sitesToString

src/codegen/compiler.cpp:205–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203void move(Context* c, Value* value, Site* src, Site* dst);
204
205unsigned sitesToString(Context* c, Site* sites, char* buffer, unsigned size)
206{
207 unsigned total = 0;
208 for (Site* s = sites; s; s = s->next) {
209 total += s->toString(c, buffer + total, size - total);
210
211 if (s->next) {
212 assertT(c, size > total + 2);
213 memcpy(buffer + total, ", ", 2);
214 total += 2;
215 }
216 }
217
218 assertT(c, size > total);
219 buffer[total] = 0;
220
221 return total;
222}
223
224unsigned sitesToString(Context* c, Value* v, char* buffer, unsigned size)
225{

Callers 5

stealFunction · 0.85
snapshotFunction · 0.85
readSourceFunction · 0.85
setSitesFunction · 0.85
restoreFunction · 0.85

Calls 3

assertTFunction · 0.85
snprintfFunction · 0.85
toStringMethod · 0.65

Tested by

no test coverage detected