MCPcopy Create free account
hub / github.com/boostorg/build / compile_emit_loop_jump

Function compile_emit_loop_jump

src/engine/function.cpp:1556–1576  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1554}
1555
1556static void compile_emit_loop_jump( compiler * c, int32_t type )
1557{
1558 struct loop_info * info = NULL;
1559 int32_t i;
1560 for ( i = c->loop_scopes->size; --i >= 0; )
1561 {
1562 struct loop_info * elem = &dynamic_array_at( struct loop_info, c->loop_scopes, i );
1563 if ( elem->type == type )
1564 {
1565 info = elem;
1566 break;
1567 }
1568 }
1569 if ( info == NULL )
1570 {
1571 printf( "warning: ignoring break statement used outside of loop\n" );
1572 return;
1573 }
1574 compile_emit_cleanups( c, info->cleanup_depth );
1575 compile_emit_branch( c, INSTR_JUMP, info->label );
1576}
1577
1578static void compile_push_break_scope( compiler * c, int32_t label )
1579{

Callers 1

compile_parseFunction · 0.85

Calls 2

compile_emit_cleanupsFunction · 0.85
compile_emit_branchFunction · 0.85

Tested by

no test coverage detected