"Fossies" - the Fresh Open Source Software Archive

Member "mlr-5.6.2/c/dsl/rxval_evaluators.h" (25 Aug 2019, 5260 Bytes) of package /linux/misc/mlr-5.6.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "rxval_evaluators.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 5.2.2_vs_5.3.0.

    1 // ================================================================
    2 // These evaluate right-hand-side extended values (rxvals) and return the same.
    3 //
    4 // For scalar (non-extended) right-hand side values, everything is ephemeral as
    5 // it propagates up through the concrete syntax tree: e.g. in '$c = $a . $b' the
    6 // $a and $b are copied out as ephemerals; in the concat function their
    7 // concatenation is computed and the ephemeral input arguments are freed; then
    8 // the result is stored in field $c.
    9 //
   10 // But for extended values (here) everything is copy-on-write:
   11 // expression-intermediate values are not always ephemeral.  This is due to the
   12 // size of the data involved. We can do dump or emit of a nested hashmap stored
   13 // in an oosvar or local without copying it; we can do mapdiff of two map-valued
   14 // variables while not modifying or copying either argument.
   15 //
   16 // The boxed_xval_t decorates mlhmmv_value_t (extended value) with an
   17 // is_ephemeral flag.  The mlhmmv_value_t in turn has a map or a scalar.
   18 // ================================================================
   19 
   20 #ifndef RXVAL_EVALUATORS_H
   21 #define RXVAL_EVALUATORS_H
   22 
   23 #include <stdio.h>
   24 #include "lib/mvfuncs.h"
   25 #include "containers/xvfuncs.h"
   26 #include "dsl/mlr_dsl_ast.h"
   27 #include "dsl/rval_evaluator.h"
   28 #include "dsl/rxval_evaluator.h"
   29 #include "dsl/function_manager.h"
   30 
   31 // ================================================================
   32 // rxval_expr_evaluators.c
   33 
   34 // ----------------------------------------------------------------
   35 // Topmost functions:
   36 
   37 rxval_evaluator_t* rxval_evaluator_alloc_from_ast(
   38     mlr_dsl_ast_node_t* past, fmgr_t* pfmgr, int type_inferencing, int context_flags);
   39 
   40 // Next level:
   41 rxval_evaluator_t* rxval_evaluator_alloc_from_map_literal(
   42     mlr_dsl_ast_node_t* past, fmgr_t* pfmgr, int type_inferencing, int context_flags);
   43 
   44 rxval_evaluator_t* rxval_evaluator_alloc_from_function_callsite(
   45     mlr_dsl_ast_node_t* past, fmgr_t* pfmgr, int type_inferencing, int context_flags);
   46 
   47 rxval_evaluator_t* rxval_evaluator_alloc_from_nonindexed_local_variable(
   48     mlr_dsl_ast_node_t* past, fmgr_t* pfmgr, int type_inferencing, int context_flags);
   49 
   50 rxval_evaluator_t* rxval_evaluator_alloc_from_indexed_local_variable(
   51     mlr_dsl_ast_node_t* past, fmgr_t* pfmgr, int type_inferencing, int context_flags);
   52 
   53 rxval_evaluator_t* rxval_evaluator_alloc_from_oosvar_keylist(
   54     mlr_dsl_ast_node_t* past, fmgr_t* pfmgr, int type_inferencing, int context_flags);
   55 
   56 rxval_evaluator_t* rxval_evaluator_alloc_from_full_oosvar(
   57     mlr_dsl_ast_node_t* past, fmgr_t* pfmgr, int type_inferencing, int context_flags);
   58 
   59 rxval_evaluator_t* rxval_evaluator_alloc_from_full_srec(
   60     mlr_dsl_ast_node_t* past, fmgr_t* pfmgr, int type_inferencing, int context_flags);
   61 
   62 rxval_evaluator_t* rxval_evaluator_alloc_wrapping_rval(
   63     mlr_dsl_ast_node_t* past, fmgr_t* pfmgr, int type_inferencing, int context_flags);
   64 
   65 // ================================================================
   66 // rxval_func_evaluators.c
   67 
   68 rxval_evaluator_t* rxval_evaluator_alloc_from_variadic_func(
   69     xv_variadic_func_t*  pfunc,
   70     sllv_t*              parg_nodes,
   71     fmgr_t*              pfmgr,
   72     int                  type_inferencing,
   73     int                  context_flags);
   74 
   75 rxval_evaluator_t* rxval_evaluator_alloc_from_x_x_func(
   76     xv_unary_func_t*    pfunc,
   77     mlr_dsl_ast_node_t* parg1_node,
   78     fmgr_t*             pfmgr,
   79     int                 type_inferencing,
   80     int                 context_flags);
   81 
   82 rxval_evaluator_t* rxval_evaluator_alloc_from_x_m_func(
   83     xv_unary_func_t*    pfunc,
   84     mlr_dsl_ast_node_t* parg1_node,
   85     fmgr_t*             pfmgr,
   86     int                 type_inferencing,
   87     int                 context_flags);
   88 
   89 rxval_evaluator_t* rxval_evaluator_alloc_from_x_mx_func(
   90     xv_binary_func_t*   pfunc,
   91     mlr_dsl_ast_node_t* parg1_node,
   92     mlr_dsl_ast_node_t* parg2_node,
   93     fmgr_t*             pfmgr,
   94     int                 type_inferencing,
   95     int                 context_flags);
   96 
   97 rxval_evaluator_t* rxval_evaluator_alloc_from_x_ms_func(
   98     xv_binary_func_t*   pfunc,
   99     mlr_dsl_ast_node_t* parg1_node,
  100     mlr_dsl_ast_node_t* parg2_node,
  101     fmgr_t*             pfmgr,
  102     int                 type_inferencing,
  103     int                 context_flags);
  104 
  105 rxval_evaluator_t* rxval_evaluator_alloc_from_x_ss_func(
  106     xv_binary_func_t*   pfunc,
  107     mlr_dsl_ast_node_t* parg1_node,
  108     mlr_dsl_ast_node_t* parg2_node,
  109     fmgr_t*             pfmgr,
  110     int                 type_inferencing,
  111     int                 context_flags);
  112 
  113 rxval_evaluator_t* rxval_evaluator_alloc_from_x_mss_func(
  114     xv_ternary_func_t*  pfunc,
  115     mlr_dsl_ast_node_t* parg1_node,
  116     mlr_dsl_ast_node_t* parg2_node,
  117     mlr_dsl_ast_node_t* parg3_node,
  118     fmgr_t*             pfmgr,
  119     int                 type_inferencing,
  120     int                 context_flags);
  121 
  122 rxval_evaluator_t* rxval_evaluator_alloc_from_x_sss_func(
  123     xv_ternary_func_t*  pfunc,
  124     mlr_dsl_ast_node_t* parg1_node,
  125     mlr_dsl_ast_node_t* parg2_node,
  126     mlr_dsl_ast_node_t* parg3_node,
  127     fmgr_t*             pfmgr,
  128     int                 type_inferencing,
  129     int                 context_flags);
  130 
  131 rxval_evaluator_t* rxval_evaluator_alloc_from_A_x_func(
  132     xv_unary_func_t*    pfunc,
  133     mlr_dsl_ast_node_t* parg1_node,
  134     fmgr_t*             pfmgr,
  135     int                 type_inferencing,
  136     int                 context_flags,
  137     char*               desc);
  138 
  139 #endif // RXVAL_EVALUATORS_H