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

Function function_call_member_rule

src/engine/function.c:485–582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483}
484
485static LIST * function_call_member_rule( JAM_FUNCTION * function, FRAME * frame, STACK * s, int n_args, OBJECT * rulename, OBJECT * file, int line )
486{
487 FRAME inner[ 1 ];
488 int i;
489 LIST * first = stack_pop( s );
490 LIST * result = L0;
491 LIST * trailing;
492 RULE * rule;
493 module_t * module;
494 OBJECT * real_rulename = 0;
495
496 frame->file = file;
497 frame->line = line;
498
499 if ( list_empty( first ) )
500 {
501 backtrace_line( frame );
502 out_printf( "warning: object is empty\n" );
503 backtrace( frame );
504
505 list_free( first );
506
507 for( i = 0; i < n_args; ++i )
508 {
509 list_free( stack_pop( s ) );
510 }
511
512 return result;
513 }
514
515 /* FIXME: handle generic case */
516 assert( list_length( first ) == 1 );
517
518 module = bindmodule( list_front( first ) );
519 if ( module->class_module )
520 {
521 rule = bindrule( rulename, module );
522 real_rulename = object_copy( function_rulename( rule->procedure ) );
523 }
524 else
525 {
526 string buf[ 1 ];
527 string_new( buf );
528 string_append( buf, object_str( list_front( first ) ) );
529 string_push_back( buf, '.' );
530 string_append( buf, object_str( rulename ) );
531 real_rulename = object_new( buf->value );
532 string_free( buf );
533 rule = bindrule( real_rulename, frame->module );
534 }
535
536 frame_init( inner );
537
538 inner->prev = frame;
539 inner->prev_user = frame->module->user_module ? frame : frame->prev_user;
540 inner->module = frame->module; /* This gets fixed up in evaluate_rule(), below. */
541
542 for( i = 0; i < n_args; ++i )

Callers 1

function_runFunction · 0.85

Calls 15

stack_popFunction · 0.85
backtrace_lineFunction · 0.85
out_printfFunction · 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
object_strFunction · 0.85

Tested by

no test coverage detected