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

Method sv_simulateLabels

src/ast/ast_simulate.cpp:2219–2230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2217 }
2218
2219 void SimulateVisitor::sv_simulateLabels ( const ExprBlock * expr, SimNode_Block * block, const das_map<int32_t,uint32_t> & ofsmap ) {
2220 if ( expr->maxLabelIndex!=-1 ) {
2221 block->totalLabels = expr->maxLabelIndex + 1;
2222 block->labels = (uint32_t *) context.code->allocate(block->totalLabels * sizeof(uint32_t));
2223 for ( uint32_t i=0, is=block->totalLabels; i!=is; ++i ) {
2224 block->labels[i] = -1U;
2225 }
2226 for ( auto & it : ofsmap ) {
2227 block->labels[it.first] = it.second;
2228 }
2229 }
2230 }
2231
2232 ExpressionPtr SimulateVisitor::visit(ExprBlock * expr) {
2233 das_map<int32_t,uint32_t> ofsmap;

Callers

nothing calls this directly

Calls 1

allocateMethod · 0.45

Tested by

no test coverage detected