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

Function function_call_member_rule

src/engine/function.cpp:503–612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501}
502
503static LIST * function_call_member_rule( JAM_FUNCTION * function, FRAME * frame, STACK * s, int32_t n_args, OBJECT * rulename, OBJECT * file, int32_t line )
504{
505 FRAME inner[ 1 ];
506 int32_t i;
507 LIST * first = stack_pop( s );
508 LIST * result = L0;
509 RULE * rule;
510 module_t * module;
511 OBJECT * real_rulename = 0;
512
513 frame->file = file;
514 frame->line = line;
515
516 if ( list_empty( first ) )
517 {
518 backtrace_line( frame );
519 out_printf( "warning: object is empty\n" );
520 backtrace( frame );
521
522 list_free( first );
523
524 for( i = 0; i < n_args; ++i )
525 {
526 list_free( stack_pop( s ) );
527 }
528
529 return result;
530 }
531
532 /* FIXME: handle generic case */
533 assert( list_length( first ) == 1 );
534
535 module = bindmodule( list_front( first ) );
536 if ( module->class_module )
537 {
538 rule = bindrule( rulename, module );
539 if ( rule->procedure )
540 {
541 real_rulename = object_copy( function_rulename( rule->procedure ) );
542 }
543 else
544 {
545 string buf[ 1 ];
546 string_new( buf );
547 string_append( buf, object_str( module->name ) );
548 string_push_back( buf, '.' );
549 string_append( buf, object_str( rulename ) );
550 real_rulename = object_new( buf->value );
551 string_free( buf );
552 }
553 }
554 else
555 {
556 string buf[ 1 ];
557 string_new( buf );
558 string_append( buf, object_str( list_front( first ) ) );
559 string_push_back( buf, '.' );
560 string_append( buf, object_str( rulename ) );

Callers 1

function_runFunction · 0.85

Calls 15

stack_popFunction · 0.85
backtrace_lineFunction · 0.85
out_printfFunction · 0.85
backtraceFunction · 0.85
list_freeFunction · 0.85
list_lengthFunction · 0.85
bindmoduleFunction · 0.85
bindruleFunction · 0.85
object_copyFunction · 0.85
function_rulenameFunction · 0.85
string_newFunction · 0.85
string_appendFunction · 0.85

Tested by

no test coverage detected