Changeset 8ef9c5e7


Ignore:
Timestamp:
Mar 13, 2017, 2:14:50 PM (5 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
17df48e
Parents:
031a2c95 (diff), 68ac32e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Files:
3 added
14 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    r031a2c95 r8ef9c5e7  
    227227        switch( arch ) {
    228228                case 'x64':
    229                         return '--host=x86_64 CXXFLAGS="-m64" CFAFLAGS="-m64"'
     229                        return '--host=x86_64'
    230230                break
    231231                case 'x86':
    232                         return '--host=i386   CXXFLAGS="-m32" CFAFLAGS="-m32"'
     232                        return '--host=i386'
    233233                break
    234234                default :
  • configure

    r031a2c95 r8ef9c5e7  
    644644CXXFLAGS
    645645CXX
     646CFA_FLAGS
    646647MACHINE_TYPE
    647648host_os
     
    653654build_cpu
    654655build
    655 CFA_FLAGS
    656656CFA_LIBDIR
    657657CFA_BINDIR
     
    30053005
    30063006# Allow program name tansformation
    3007 # will fille program_transform_name with appropriate sed regex
    3008 
    3009 #autoconf escapes $ and \ since automake wiill un-escape them.
    3010 #Since we need to use the sed transform in autoconf we need to manualy un-escape these characters
    3011 name_transform=`echo ${program_transform_name} | sed 's/\\$\\$/\\$/g' | sed 's/\\\\\\\/\\\/g'`
    3012 cfa_name=`echo cfa | sed ${name_transform}`
    3013 cc1_name=`echo cc1 | sed ${name_transform}`
    3014 cpp_name=`echo cfa-cpp | sed ${name_transform}`
     3007# will fill program_transform_name with appropriate sed regex
     3008
    30153009
    30163010#Trasforming cc1 will break compilation
    3017 if ! test "${cc1_name}" = "cc1"; then
    3018     as_fn_error $? "Program transform must not modify cc1.
    3019                 --program-sufix and --program-prefix not supported.
    3020                 Use -program-transform-name='s/cfa$/[Desired name here]/' instead" "$LINENO" 5
    3021 fi
    3022 #We could support transforming cfa-cpp but since it is located in a unique subfolder we don't need to
    3023 if ! test "${cpp_name}" = "cfa-cpp"; then
    3024     as_fn_error $? "Program transform must not modify cfa-cpp.
    3025                 --program-sufix and --program-prefix not supported.
    3026                 Use -program-transform-name='s/cfa$/[Desired name here]/' instead" "$LINENO" 5
     3011if test "${program_transform_name}" = ""; then
     3012    as_fn_error $? "Program transform not supported.
     3013                Use --with-cfa-name='[Desired name here]' instead" "$LINENO" 5
    30273014fi
    30283015
     
    33153302
    33163303
    3317 
    3318 cat >>confdefs.h <<_ACEOF
    3319 #define CFA_FLAGS "${CFAFLAGS}"
    3320 _ACEOF
    3321 
    3322 CFA_FLAGS=${CFAFLAGS}
    3323 
    3324 
    33253304# Make sure we can run config.sub.
    33263305$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
     
    33953374
    33963375MACHINE_TYPE=$host_cpu
     3376
     3377
     3378if ! test "$host_cpu" = "$build_cpu"; then
     3379        case $host_cpu in
     3380                i386)
     3381                        CFLAGS+="-m32"
     3382                        CXXFLAGS+="-m32"
     3383                        CFAFLAGS+="-m32"
     3384                        LDFLAGS+="-m32"
     3385                        ;;
     3386                i686)
     3387                        CFLAGS+="-m32"
     3388                        CXXFLAGS+="-m32"
     3389                        CFAFLAGS+="-m32"
     3390                        LDFLAGS+="-m32"
     3391                        ;;
     3392                x86_64)
     3393                        CFLAGS+="-m64"
     3394                        CXXFLAGS+="-m64"
     3395                        CFAFLAGS+="-m64"
     3396                        LDFLAGS+="-m64"
     3397                        ;;
     3398        esac
     3399fi
     3400
     3401
     3402cat >>confdefs.h <<_ACEOF
     3403#define CFA_FLAGS "${CFAFLAGS}"
     3404_ACEOF
     3405
     3406CFA_FLAGS=${CFAFLAGS}
    33973407
    33983408
  • configure.ac

    r031a2c95 r8ef9c5e7  
    2323
    2424#Trasforming cc1 will break compilation
    25 if ! test "${program_transform_name}" = ""; then
     25if test "${program_transform_name}" = ""; then
    2626    AC_MSG_ERROR([Program transform not supported.
    2727                Use --with-cfa-name='[[Desired name here]]' instead])
     
    169169AC_SUBST(CFA_LIBDIR, ${cfa_libdir})
    170170
     171AC_CANONICAL_BUILD
     172AC_CANONICAL_HOST
     173AC_SUBST([MACHINE_TYPE],[$host_cpu])
     174
     175if ! test "$host_cpu" = "$build_cpu"; then
     176        case $host_cpu in
     177                i386)
     178                        CFLAGS+="-m32"
     179                        CXXFLAGS+="-m32"
     180                        CFAFLAGS+="-m32"
     181                        LDFLAGS+="-m32"
     182                        ;;
     183                i686)
     184                        CFLAGS+="-m32"
     185                        CXXFLAGS+="-m32"
     186                        CFAFLAGS+="-m32"
     187                        LDFLAGS+="-m32"
     188                        ;;
     189                x86_64)
     190                        CFLAGS+="-m64"
     191                        CXXFLAGS+="-m64"
     192                        CFAFLAGS+="-m64"
     193                        LDFLAGS+="-m64"
     194                        ;;
     195        esac
     196fi
     197
    171198AC_DEFINE_UNQUOTED(CFA_FLAGS, "${CFAFLAGS}", [compilation flags for cfa libraries and test programs.])
    172199AC_SUBST(CFA_FLAGS, ${CFAFLAGS})
    173 
    174 AC_CANONICAL_HOST
    175 AC_SUBST([MACHINE_TYPE],[$host_cpu])
    176200
    177201# Checks for programs.
  • src/Makefile.am

    r031a2c95 r8ef9c5e7  
    2727include CodeGen/module.mk
    2828include CodeTools/module.mk
     29include Concurrency/module.mk
    2930include Common/module.mk
    3031include ControlStruct/module.mk
  • src/Makefile.in

    r031a2c95 r8ef9c5e7  
    2424#SRC +=  ArgTweak/Rewriter.cc \
    2525#       ArgTweak/Mutate.cc
     26
     27######################### -*- Mode: Makefile-Gmake -*- ########################
     28###############################################################################
    2629
    2730######################### -*- Mode: Makefile-Gmake -*- ########################
     
    7679DIST_COMMON = $(srcdir)/CodeGen/module.mk \
    7780        $(srcdir)/CodeTools/module.mk $(srcdir)/Common/module.mk \
     81        $(srcdir)/Concurrency/module.mk \
    7882        $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk \
    7983        $(srcdir)/InitTweak/module.mk $(srcdir)/Makefile.am \
     
    104108        CodeGen/driver_cfa_cpp-OperatorTable.$(OBJEXT) \
    105109        CodeTools/driver_cfa_cpp-DeclStats.$(OBJEXT) \
     110        Concurrency/driver_cfa_cpp-Keywords.$(OBJEXT) \
    106111        Common/driver_cfa_cpp-SemanticError.$(OBJEXT) \
    107112        Common/driver_cfa_cpp-UniqueName.$(OBJEXT) \
     
    383388        CodeGen/FixNames.cc CodeGen/FixMain.cc \
    384389        CodeGen/OperatorTable.cc CodeTools/DeclStats.cc \
    385         Common/SemanticError.cc Common/UniqueName.cc \
    386         Common/DebugMalloc.cc Common/Assert.cc \
     390        Concurrency/Keywords.cc Common/SemanticError.cc \
     391        Common/UniqueName.cc Common/DebugMalloc.cc Common/Assert.cc \
    387392        ControlStruct/LabelGenerator.cc ControlStruct/LabelFixer.cc \
    388393        ControlStruct/MLEMutator.cc ControlStruct/Mutate.cc \
     
    447452.SUFFIXES:
    448453.SUFFIXES: .cc .ll .o .obj .yy
    449 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(am__configure_deps)
     454$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(am__configure_deps)
    450455        @for dep in $?; do \
    451456          case '$(am__configure_deps)' in \
     
    468473            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
    469474        esac;
    470 $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk:
     475$(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk:
    471476
    472477$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     
    541546CodeTools/driver_cfa_cpp-DeclStats.$(OBJEXT):  \
    542547        CodeTools/$(am__dirstamp) CodeTools/$(DEPDIR)/$(am__dirstamp)
     548Concurrency/$(am__dirstamp):
     549        @$(MKDIR_P) Concurrency
     550        @: > Concurrency/$(am__dirstamp)
     551Concurrency/$(DEPDIR)/$(am__dirstamp):
     552        @$(MKDIR_P) Concurrency/$(DEPDIR)
     553        @: > Concurrency/$(DEPDIR)/$(am__dirstamp)
     554Concurrency/driver_cfa_cpp-Keywords.$(OBJEXT):  \
     555        Concurrency/$(am__dirstamp) \
     556        Concurrency/$(DEPDIR)/$(am__dirstamp)
    543557Common/$(am__dirstamp):
    544558        @$(MKDIR_P) Common
     
    833847        -rm -f Common/driver_cfa_cpp-SemanticError.$(OBJEXT)
    834848        -rm -f Common/driver_cfa_cpp-UniqueName.$(OBJEXT)
     849        -rm -f Concurrency/driver_cfa_cpp-Keywords.$(OBJEXT)
    835850        -rm -f ControlStruct/driver_cfa_cpp-ForExprMutator.$(OBJEXT)
    836851        -rm -f ControlStruct/driver_cfa_cpp-LabelFixer.$(OBJEXT)
     
    943958@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-SemanticError.Po@am__quote@
    944959@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-UniqueName.Po@am__quote@
     960@AMDEP_TRUE@@am__include@ @am__quote@Concurrency/$(DEPDIR)/driver_cfa_cpp-Keywords.Po@am__quote@
    945961@AMDEP_TRUE@@am__include@ @am__quote@ControlStruct/$(DEPDIR)/driver_cfa_cpp-ForExprMutator.Po@am__quote@
    946962@AMDEP_TRUE@@am__include@ @am__quote@ControlStruct/$(DEPDIR)/driver_cfa_cpp-LabelFixer.Po@am__quote@
     
    11791195@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o CodeTools/driver_cfa_cpp-DeclStats.obj `if test -f 'CodeTools/DeclStats.cc'; then $(CYGPATH_W) 'CodeTools/DeclStats.cc'; else $(CYGPATH_W) '$(srcdir)/CodeTools/DeclStats.cc'; fi`
    11801196
     1197Concurrency/driver_cfa_cpp-Keywords.o: Concurrency/Keywords.cc
     1198@am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Concurrency/driver_cfa_cpp-Keywords.o -MD -MP -MF Concurrency/$(DEPDIR)/driver_cfa_cpp-Keywords.Tpo -c -o Concurrency/driver_cfa_cpp-Keywords.o `test -f 'Concurrency/Keywords.cc' || echo '$(srcdir)/'`Concurrency/Keywords.cc
     1199@am__fastdepCXX_TRUE@   $(AM_V_at)$(am__mv) Concurrency/$(DEPDIR)/driver_cfa_cpp-Keywords.Tpo Concurrency/$(DEPDIR)/driver_cfa_cpp-Keywords.Po
     1200@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(AM_V_CXX)source='Concurrency/Keywords.cc' object='Concurrency/driver_cfa_cpp-Keywords.o' libtool=no @AMDEPBACKSLASH@
     1201@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1202@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Concurrency/driver_cfa_cpp-Keywords.o `test -f 'Concurrency/Keywords.cc' || echo '$(srcdir)/'`Concurrency/Keywords.cc
     1203
     1204Concurrency/driver_cfa_cpp-Keywords.obj: Concurrency/Keywords.cc
     1205@am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Concurrency/driver_cfa_cpp-Keywords.obj -MD -MP -MF Concurrency/$(DEPDIR)/driver_cfa_cpp-Keywords.Tpo -c -o Concurrency/driver_cfa_cpp-Keywords.obj `if test -f 'Concurrency/Keywords.cc'; then $(CYGPATH_W) 'Concurrency/Keywords.cc'; else $(CYGPATH_W) '$(srcdir)/Concurrency/Keywords.cc'; fi`
     1206@am__fastdepCXX_TRUE@   $(AM_V_at)$(am__mv) Concurrency/$(DEPDIR)/driver_cfa_cpp-Keywords.Tpo Concurrency/$(DEPDIR)/driver_cfa_cpp-Keywords.Po
     1207@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(AM_V_CXX)source='Concurrency/Keywords.cc' object='Concurrency/driver_cfa_cpp-Keywords.obj' libtool=no @AMDEPBACKSLASH@
     1208@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1209@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Concurrency/driver_cfa_cpp-Keywords.obj `if test -f 'Concurrency/Keywords.cc'; then $(CYGPATH_W) 'Concurrency/Keywords.cc'; else $(CYGPATH_W) '$(srcdir)/Concurrency/Keywords.cc'; fi`
     1210
    11811211Common/driver_cfa_cpp-SemanticError.o: Common/SemanticError.cc
    11821212@am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Common/driver_cfa_cpp-SemanticError.o -MD -MP -MF Common/$(DEPDIR)/driver_cfa_cpp-SemanticError.Tpo -c -o Common/driver_cfa_cpp-SemanticError.o `test -f 'Common/SemanticError.cc' || echo '$(srcdir)/'`Common/SemanticError.cc
     
    26662696        -rm -f Common/$(DEPDIR)/$(am__dirstamp)
    26672697        -rm -f Common/$(am__dirstamp)
     2698        -rm -f Concurrency/$(DEPDIR)/$(am__dirstamp)
     2699        -rm -f Concurrency/$(am__dirstamp)
    26682700        -rm -f ControlStruct/$(DEPDIR)/$(am__dirstamp)
    26692701        -rm -f ControlStruct/$(am__dirstamp)
     
    26972729
    26982730distclean: distclean-am
    2699         -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR)
     2731        -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR)
    27002732        -rm -f Makefile
    27012733distclean-am: clean-am distclean-compile distclean-generic \
     
    27432775
    27442776maintainer-clean: maintainer-clean-am
    2745         -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR)
     2777        -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR)
    27462778        -rm -f Makefile
    27472779maintainer-clean-am: distclean-am maintainer-clean-generic
  • src/Parser/DeclarationNode.cc

    r031a2c95 r8ef9c5e7  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar  7 08:02:09 2017
    13 // Update Count     : 936
     12// Last Modified On : Tue Mar  7 17:28:56 2017
     13// Update Count     : 937
    1414//
    1515
     
    359359        DeclarationNode * newnode = new DeclarationNode;
    360360        newnode->type = new TypeData( TypeData::Pointer );
    361         return newnode->addQualifiers( qualifiers );
     361        if ( qualifiers ) {
     362                return newnode->addQualifiers( qualifiers );
     363        } else {
     364                return newnode;
     365        } // if
    362366} // DeclarationNode::newPointer
    363367
  • src/Parser/TypeData.h

    r031a2c95 r8ef9c5e7  
    1010// Created On       : Sat May 16 15:18:36 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar  7 08:03:53 2017
    13 // Update Count     : 173
     12// Last Modified On : Wed Mar  8 22:28:33 2017
     13// Update Count     : 174
    1414//
    1515
     
    7676        DeclarationNode::Length length = DeclarationNode::NoLength;
    7777        DeclarationNode::BuiltinType builtintype = DeclarationNode::NoBuiltinType;
     78
    7879        typedef std::bitset< DeclarationNode::NoTypeQualifier > TypeQualifiers;
    7980        TypeQualifiers typeQualifiers;
    8081        DeclarationNode * forall;
    8182
    82                 // Basic_t basic;
    83                 Aggregate_t aggregate;
    84                 AggInst_t aggInst;
    85                 Array_t array;
    86                 Enumeration_t enumeration;
    87                 // Variable_t variable;
    88                 Function_t function;
    89                 Symbolic_t symbolic;
    90                 DeclarationNode * tuple;
    91                 ExpressionNode * typeexpr;
    92                 // DeclarationNode::BuiltinType builtin;
     83        // Basic_t basic;
     84        Aggregate_t aggregate;
     85        AggInst_t aggInst;
     86        Array_t array;
     87        Enumeration_t enumeration;
     88        // Variable_t variable;
     89        Function_t function;
     90        Symbolic_t symbolic;
     91        DeclarationNode * tuple;
     92        ExpressionNode * typeexpr;
    9393
    9494        TypeData( Kind k = Unknown );
  • src/Parser/lex.ll

    r031a2c95 r8ef9c5e7  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Fri Mar  3 22:18:00 2017
    13  * Update Count     : 502
     12 * Last Modified On : Thu Mar  9 21:38:26 2017
     13 * Update Count     : 505
    1414 */
    1515
     
    202202__const__               { KEYWORD_RETURN(CONST); }                              // GCC
    203203continue                { KEYWORD_RETURN(CONTINUE); }
     204_Coroutine              { KEYWORD_RETURN(COROUTINE); }                  // CFA
    204205default                 { KEYWORD_RETURN(DEFAULT); }
    205206disable                 { KEYWORD_RETURN(DISABLE); }                    // CFA
     
    235236long                    { KEYWORD_RETURN(LONG); }
    236237lvalue                  { KEYWORD_RETURN(LVALUE); }                             // CFA
     238_Monitor                { KEYWORD_RETURN(MONITOR); }                    // CFA
    237239mutex                   { KEYWORD_RETURN(MUTEX); }                              // CFA
    238240_Noreturn               { KEYWORD_RETURN(NORETURN); }                   // C11
     
    254256struct                  { KEYWORD_RETURN(STRUCT); }
    255257switch                  { KEYWORD_RETURN(SWITCH); }
     258_Thread                 { KEYWORD_RETURN(THREAD); }                             // C11
    256259_Thread_local   { KEYWORD_RETURN(THREADLOCAL); }                // C11
    257260throw                   { KEYWORD_RETURN(THROW); }                              // CFA
  • src/Parser/parser.yy

    r031a2c95 r8ef9c5e7  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Mar  5 15:48:24 2017
    13 // Update Count     : 2227
     12// Last Modified On : Thu Mar  9 21:40:20 2017
     13// Update Count     : 2292
    1414//
    1515
     
    104104%token TYPEOF LABEL                                                                             // GCC
    105105%token ENUM STRUCT UNION
     106%token COROUTINE MONITOR THREAD                                                 // CFA
    106107%token OTYPE FTYPE DTYPE TTYPE TRAIT                                    // CFA
    107108%token SIZEOF OFFSETOF
     
    223224%type<decl> external_function_definition function_definition function_array function_declarator function_no_ptr function_ptr
    224225
    225 %type<decl> identifier_parameter_array identifier_parameter_declarator identifier_parameter_function
    226 %type<decl> identifier_parameter_ptr identifier_list
     226%type<decl> identifier_parameter_declarator identifier_parameter_ptr identifier_parameter_array identifier_parameter_function
     227%type<decl> identifier_list
    227228
    228229%type<decl> cfa_abstract_array cfa_abstract_declarator_no_tuple cfa_abstract_declarator_tuple
     
    270271%type<en> type_name_list
    271272
    272 %type<decl> type_qualifier type_qualifier_name type_qualifier_list type_qualifier_list_opt type_specifier type_specifier_nobody
     273%type<decl> type_qualifier type_qualifier_name type_qualifier_list_opt type_qualifier_list
     274%type<decl> type_specifier type_specifier_nobody
    273275
    274276%type<decl> variable_declarator variable_ptr variable_array variable_function
     
    16291631        | UNION
    16301632                { $$ = DeclarationNode::Union; }
     1633        | COROUTINE
     1634                { $$ = DeclarationNode::Struct; }
     1635        | MONITOR
     1636                { $$ = DeclarationNode::Struct; }
     1637        | THREAD
     1638                { $$ = DeclarationNode::Struct; }
    16311639        ;
    16321640
  • src/libcfa/concurrency/CtxSwitch-i386.S

    r031a2c95 r8ef9c5e7  
    5252        movl 4(%esp),%eax
    5353
     54        // Save floating & SSE control words on the stack.
     55
     56        sub    $8,%esp
     57        stmxcsr 0(%esp)         // 4 bytes
     58        fnstcw  4(%esp)         // 2 bytes
     59
    5460        // Save volatile registers on the stack.
    5561
     
    6975        // argument is now at 8 + 12 = 20(%esp)
    7076
    71         movl 20(%esp),%eax
     77        movl 28(%esp),%eax
    7278
    7379        // Load new context from the "to" area.
     
    8187        popl %edi
    8288        popl %ebx
     89
     90        // Load floating & SSE control words from the stack.
     91
     92        fldcw   4(%esp)
     93        ldmxcsr 0(%esp)
     94        add    $8,%esp
    8395
    8496        // Return to thread.
  • src/libcfa/concurrency/CtxSwitch-x86_64.S

    r031a2c95 r8ef9c5e7  
    4747CtxSwitch:
    4848
    49         // Save volatile registers on the stack.
     49        // Save floating & SSE control words on the stack.
    5050
    5151        subq   $8,%rsp
    5252        stmxcsr 0(%rsp)         // 4 bytes
    5353        fnstcw  4(%rsp)         // 2 bytes
     54
     55        // Save volatile registers on the stack.
     56
    5457        pushq %r15
    5558        pushq %r14
     
    7578        popq %r14
    7679        popq %r15
     80
     81        // Load floating & SSE control words from the stack.
     82
    7783        fldcw   4(%rsp)
    7884        ldmxcsr 0(%rsp)
    79         addq $8,%rsp
     85        addq   $8,%rsp
    8086
    8187        // Return to thread.
  • src/libcfa/concurrency/invoke.c

    r031a2c95 r8ef9c5e7  
    9191        struct FakeStack {
    9292            void *fixedRegisters[3];                    // fixed registers ebx, edi, esi (popped on 1st uSwitch, values unimportant)
    93             void *rturn;                                      // where to go on return from uSwitch
     93            uint32_t mxcr;                              // SSE Status and Control bits (control bits are preserved across function calls)
     94            uint16_t fcw;                               // X97 FPU control word (preserved across function calls)
     95            void *rturn;                                // where to go on return from uSwitch
    9496            void *dummyReturn;                          // fake return compiler would have pushed on call to uInvoke
    9597            void *argument[3];                          // for 16-byte ABI, 16-byte alignment starts here
     
    108110      struct FakeStack {
    109111            void *fixedRegisters[5];                    // fixed registers rbx, r12, r13, r14, r15
    110             uint32_t mxcr;                                  // SSE Status and Control bits (control bits are preserved across function calls)
    111             uint16_t fcw;                                   // X97 FPU control word (preserved across function calls)
    112             void *rturn;                                      // where to go on return from uSwitch
     112            uint32_t mxcr;                              // SSE Status and Control bits (control bits are preserved across function calls)
     113            uint16_t fcw;                               // X97 FPU control word (preserved across function calls)
     114            void *rturn;                                // where to go on return from uSwitch
    113115            void *dummyReturn;                          // NULL return address to provide proper alignment
    114116      };
  • src/libcfa/fstream

    r031a2c95 r8ef9c5e7  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Apr 28 08:08:04 2016
    13 // Update Count     : 88
     12// Last Modified On : Tue Mar  7 14:48:08 2017
     13// Update Count     : 91
    1414//
    1515
     
    2323        void *file;
    2424        _Bool sepDefault;
    25         int sepOnOff;                                                                           // FIX ME: type should be _Bool
     25        _Bool sepOnOff;
    2626        char separator[separateSize];
    2727}; // ofstream
     
    3232void sepReset( ofstream * );
    3333void sepReset( ofstream *, _Bool );
     34const char * sepGet( ofstream * );
    3435void sepSet( ofstream *, const char * );
    35 const char * sepGet( ofstream * );
    3636_Bool sepDisable( ofstream * );
    3737_Bool sepEnable( ofstream * );
     38
    3839int fail( ofstream * );
    3940int flush( ofstream * );
  • src/libcfa/fstream.c

    r031a2c95 r8ef9c5e7  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul 15 13:35:29 2016
    13 // Update Count     : 188
     12// Last Modified On : Tue Mar  7 14:48:09 2017
     13// Update Count     : 192
    1414//
    1515
     
    2121#include <stdarg.h>                                                                             // varargs
    2222#include <string.h>                                                                             // strlen
     23#include <stdbool.h>                                                                    // true/false
    2324#include <float.h>                                                                              // DBL_DIG, LDBL_DIG
    2425#include <complex.h>                                                                    // creal, cimag
     
    3233void sepReset( ofstream * os ) { os->sepOnOff = os->sepDefault; }
    3334void sepReset( ofstream * os, _Bool reset ) { os->sepDefault = reset; os->sepOnOff = os->sepDefault; }
     35const char * sepGet( ofstream * os ) { return &(os->separator[0]); }
     36
    3437void sepSet( ofstream * os, const char * s ) {
    3538        strncpy( &(os->separator[0]), s, separateSize - 1 );
    3639        os->separator[separateSize - 1] = '\0';
    3740} // sepSet
    38 const char * sepGet( ofstream * os ) { return &(os->separator[0]); }
     41
    3942_Bool sepDisable( ofstream *os ) {
    4043        _Bool temp = os->sepDefault;
    41         os->sepDefault = 0;
     44        os->sepDefault = false;
    4245        sepReset( os );
    4346        return temp;
    4447} // sepDisable
     48
    4549_Bool sepEnable( ofstream *os ) {
    4650        _Bool temp = os->sepDefault;
    47         os->sepDefault = 1;
     51        os->sepDefault = true;
    4852        sepReset( os );
    4953        return temp;
Note: See TracChangeset for help on using the changeset viewer.