mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-23 07:59:37 +00:00
neaten
This commit is contained in:
parent
1e294a2d43
commit
987b682293
2 changed files with 3 additions and 2 deletions
|
|
@ -76,12 +76,14 @@ local_stack_frame_t* local_stack_frame_enter(local_stack_frame_t* pframe);
|
|||
void local_stack_frame_exit(local_stack_frame_t* pframe);
|
||||
void local_stack_frame_throw_type_mismatch(local_stack_frame_entry_t* pentry, mv_t* pval);
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
static inline mv_t* local_stack_frame_get(local_stack_frame_t* pframe, int vardef_frame_relative_index) {
|
||||
LOCAL_STACK_TRACE(printf("LOCAL STACK FRAME %p GET %d\n", pframe, vardef_frame_relative_index));
|
||||
LOCAL_STACK_BOUNDS_CHECK(pframe, "GET", FALSE, vardef_frame_relative_index);
|
||||
return &pframe->pvars[vardef_frame_relative_index].mlrval;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
static inline void local_stack_frame_define(local_stack_frame_t* pframe, char* variable_name,
|
||||
int vardef_frame_relative_index, int type_mask, mv_t val)
|
||||
{
|
||||
|
|
@ -100,6 +102,7 @@ static inline void local_stack_frame_define(local_stack_frame_t* pframe, char* v
|
|||
pentry->mlrval = val;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
static inline void local_stack_frame_assign(local_stack_frame_t* pframe, int vardef_frame_relative_index, mv_t val) {
|
||||
LOCAL_STACK_TRACE(printf("LOCAL STACK FRAME %p SET %d\n", pframe, vardef_frame_relative_index));
|
||||
LOCAL_STACK_BOUNDS_CHECK(pframe, "ASSIGN", TRUE, vardef_frame_relative_index);
|
||||
|
|
|
|||
|
|
@ -402,10 +402,8 @@ static void pass_1_for_node(mlr_dsl_ast_node_t* pnode, stkalc_subframe_group_t*
|
|||
static void pass_1_for_local_definition(mlr_dsl_ast_node_t* pnode, stkalc_subframe_group_t* pframe_group,
|
||||
int* pmax_subframe_depth, int trace)
|
||||
{
|
||||
// xxx node-type assert
|
||||
mlr_dsl_ast_node_t* pnamenode = pnode->pchildren->phead->pvvalue;
|
||||
|
||||
// xxx node-type assert
|
||||
mlr_dsl_ast_node_t* pvaluenode = pnode->pchildren->phead->pnext->pvvalue;
|
||||
pass_1_for_node(pvaluenode, pframe_group, pmax_subframe_depth, trace);
|
||||
// Do the LHS after the RHS, in case 'local nonesuch = nonesuch'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue