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

Function argument_list_pop

src/engine/function.c:3222–3248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3220}
3221
3222void argument_list_pop( struct arg_list * formal, int formal_count,
3223 FRAME * frame, STACK * s )
3224{
3225 int i;
3226 for ( i = formal_count - 1; i >= 0; --i )
3227 {
3228 int j;
3229 for ( j = formal[ i ].size - 1; j >= 0 ; --j )
3230 {
3231 struct argument * formal_arg = &formal[ i ].args[ j ];
3232
3233 if ( formal_arg->flags == ARG_VARIADIC )
3234 continue;
3235 if ( formal_arg->index != -1 )
3236 {
3237 LIST * const old = stack_pop( s );
3238 LIST * * const pos = &frame->module->fixed_variables[
3239 formal_arg->index ];
3240 list_free( *pos );
3241 *pos = old;
3242 }
3243 else
3244 var_set( frame->module, formal_arg->arg_name, stack_pop( s ),
3245 VAR_SET );
3246 }
3247 }
3248}
3249
3250
3251struct argument_compiler

Callers 1

function_runFunction · 0.85

Calls 3

stack_popFunction · 0.85
list_freeFunction · 0.85
var_setFunction · 0.85

Tested by

no test coverage detected