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

Function sequence_transform

src/engine/modules/sequence.c:57–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57LIST * sequence_transform( FRAME * frame, int flags )
58{
59 LIST * function = lol_get( frame->args, 0 );
60 LIST * sequence = lol_get( frame->args, 1 );
61 LIST * result = L0;
62 OBJECT * function_name = list_front( function );
63 LISTITER args_begin = list_next( list_begin( function ) ), args_end = list_end( function );
64 LISTITER iter = list_begin( sequence ), end = list_end( sequence );
65 RULE * rule = bindrule( function_name, frame->prev->module );
66
67 for ( ; iter != end; iter = list_next( iter ) )
68 {
69 FRAME inner[ 1 ];
70
71 frame_init( inner );
72 inner->prev = frame;
73 inner->prev_user = frame->prev_user;
74 inner->module = frame->prev->module;
75
76 lol_add( inner->args, list_push_back( list_copy_range( function, args_begin, args_end ), object_copy( list_item( iter ) ) ) );
77 result = list_append( result, evaluate_rule( rule, function_name, inner ) );
78
79 frame_free( inner );
80 }
81
82 return result;
83}
84
85void init_sequence()
86{

Callers

nothing calls this directly

Calls 12

lol_getFunction · 0.85
list_beginFunction · 0.85
list_endFunction · 0.85
bindruleFunction · 0.85
frame_initFunction · 0.85
lol_addFunction · 0.85
list_push_backFunction · 0.85
list_copy_rangeFunction · 0.85
object_copyFunction · 0.85
list_appendFunction · 0.85
evaluate_ruleFunction · 0.85
frame_freeFunction · 0.85

Tested by

no test coverage detected