Commit 50000f57 authored by malenov's avatar malenov
Browse files

do not penalize fcn calls by default (introduced macro WMOPS_DISABLE_FCN_CALL_PENALIZATION)

parent b6df1ca0
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@
#define ENH_U_32_BIT_OPERATOR
#define COMPLEX_OPERATOR
#define CONTROL_CODE_OPS    /* enable control code operators such as LT_16, GT_16, ... */
#define WMOPS_DISABLE_FCN_CALL_PENALIZATION /* do not count the complexity of function calls */

#ifdef WMOPS
enum instructions
@@ -351,7 +352,11 @@ extern int cntr_push_pop;
#define LOOP_( x )     OP_COUNT_( _LOOP, ( x )  )
#define INDIRECT_( x ) OP_COUNT_( _INDIRECT, ( x )  )
#define PTR_INIT_( x ) OP_COUNT_( _PTR_INIT, ( x )  )
#ifdef WMOPS_DISABLE_FCN_CALL_PENALIZATION
#define FUNC_( x )     ( x )
#else
#define FUNC_( x )     ( OP_COUNT_( _MOVE, ( x )  ), OP_COUNT_( _FUNC, 1 ) )
#endif
#define MISC_( x )     ABS_( x )

/* Math Operations */