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

Function sequence_transform

src/engine/modules/sequence.cpp:56–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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