MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / printSimFunction

Function printSimFunction

src/simulate/simulate_print.cpp:224–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222 };
223
224 void printSimFunction ( TextWriter & ss, Context * context, Function * fun, SimNode * node, bool debugHash ) {
225 SimPrint prv(ss,context);
226 prv.displayHash = debugHash;
227 // append return type and result type
228 if ( debugHash ) {
229 ss << "// " << fun->name << " " << fun->getMangledName() << "\n";
230 }
231 string resT = fun->result->describe();
232 if ( debugHash ) {
233 ss << "(result " << resT << " ";
234 }
235 prv.write(resT.c_str(), uint32_t(resT.length()));
236 if ( debugHash ) {
237 ss << ")\n";
238 }
239 for ( auto & arg : fun->arguments ) {
240 string argT = arg->type->describe();
241 if ( debugHash ) {
242 ss << "(argument " << argT << " ";
243 }
244 prv.write(argT.c_str(), uint32_t(argT.length()));
245 if ( debugHash ) {
246 ss << ")\n";
247 }
248 }
249 node->visit(prv);
250 }
251
252 void printSimNode ( TextWriter & ss, Context * context, SimNode * node, bool debugHash ) {
253 SimPrint prv(ss,context);

Callers 2

simulateMethod · 0.85
linkCppAotMethod · 0.85

Calls 6

getMangledNameMethod · 0.45
describeMethod · 0.45
writeMethod · 0.45
c_strMethod · 0.45
lengthMethod · 0.45
visitMethod · 0.45

Tested by

no test coverage detected