LCOV - code coverage report
Current view: top level - monetdb5/optimizer - opt_reduce.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 6 6 100.0 %
Date: 2021-10-13 02:24:04 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /*
       2             :  * This Source Code Form is subject to the terms of the Mozilla Public
       3             :  * License, v. 2.0.  If a copy of the MPL was not distributed with this
       4             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       5             :  *
       6             :  * Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V.
       7             :  */
       8             : 
       9             : #include "monetdb_config.h"
      10             : #include "opt_reduce.h"
      11             : #include "mal_interpreter.h"
      12             : 
      13             : str
      14           3 : OPTreduceImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
      15             : {
      16             :         InstrPtr p=0;
      17             :         int actions = 0;
      18             :         str msg = MAL_SUCCEED;
      19             : 
      20             :         (void)cntxt;
      21             :         (void)stk;
      22             :         (void) p;
      23             : 
      24           3 :         actions = mb->vtop;
      25           3 :         trimMalVariables(mb,0);
      26           3 :         actions = actions - mb->vtop;
      27             : 
      28             :         /* Defense line against incorrect plans */
      29             :         /* plan is not changed */
      30             :         /* plan is not changed */
      31             :         //if( actions > 0){
      32             :                 //msg = chkTypes(cntxt->usermodule, mb, FALSE);
      33             :                 //if (!msg)
      34             :         //      msg = chkFlow(mb);
      35             :                 //if (!msg)
      36             :                 //      msg = chkDeclarations(mb);
      37             :         //}
      38             :         /* keep actions taken as a fake argument*/
      39           3 :         (void) pushInt(mb, pci, actions);
      40             : 
      41           3 :         return msg;
      42             : }

Generated by: LCOV version 1.14