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

Function function_call_member_rule

v2/engine/function.c:482–579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

function_runFunction · 0.85

Calls 15

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

Tested by

no test coverage detected