Ignore:
Timestamp:
Sep 14, 2020, 11:46:32 PM (5 years ago)
Author:
bird
Message:

kash: Use reference counting of parser output in threaded-mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/mknodes.sh

    r3449 r3458  
    7373echo
    7474
     75## @todo inconsistent indentation here.
    7576IFS=' '
    7677for struct in $struct_list; do
     
    7879        echo
    7980        echo "struct $struct {"
     81        echo "#ifdef KASH_SEPARATE_PARSER_ALLOCATOR"
     82        echo "  struct pstack_block *pblock;"
     83        echo "#endif"
    8084        field=0
    8185        while
     
    9498                * ) name=; shift 2; type="$*";;
    9599                esac
    96                 echo "      $type$name;"
     100                echo "  $type$name;"
    97101        done
    98102        echo "};"
     
    102106echo
    103107echo "union node {"
    104 echo "      int type;"
     108echo "#ifdef KASH_SEPARATE_PARSER_ALLOCATOR"
     109echo "# ifdef __GNUC__"
     110echo "  __extension__"
     111echo "# endif"
     112echo "  struct {"
     113echo "          struct pstack_block *pblock;"
     114echo "          int type;"
     115echo "  };"
     116echo "#else"
     117echo "  int type;"
     118echo "#endif"
    105119for struct in $struct_list; do
    106         echo "      struct $struct $struct;"
     120        echo "  struct $struct $struct;"
    107121done
    108122echo "};"
Note: See TracChangeset for help on using the changeset viewer.