Changeset 455a7d5 for libcfa


Ignore:
Timestamp:
Aug 9, 2018, 6:35:02 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
ea5b7d6
Parents:
fb975a50 (diff), 0c827019 (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' into jenkins-sandbox

Location:
libcfa
Files:
15 added
120 moved

Legend:

Unmodified
Added
Removed
  • libcfa/prelude/Makefile.am

    rfb975a50 r455a7d5  
    2121cfalibdir = ${CFA_LIBDIR}
    2222cfalib_DATA = gcc-builtins.cf builtins.cf extras.cf prelude.cf bootloader.c
    23 noinst_DATA = ../libcfa/libcfa-prelude.c
     23noinst_DATA = ../src/prelude.c
    2424
    25 CC = ${abs_top_builddir}/src/driver/cfa
     25CC = @CFACC@
     26AM_CFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
     27AM_CFAFLAGS = @CONFIG_CFAFLAGS@
    2628
    2729$(DEPDIR) :
     
    3335# create extra forward types/declarations to reduce inclusion of library files
    3436extras.cf : ${srcdir}/extras.regx ${srcdir}/extras.c
    35         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f ${srcdir}/extras.regx > extras.cf
     37        ${AM_V_GEN}gcc ${AM_CFLAGS} -E ${srcdir}/extras.c | grep -f ${srcdir}/extras.regx > extras.cf
    3638
    3739# create forward declarations for gcc builtins
    3840gcc-builtins.cf : gcc-builtins.c ${srcdir}/prototypes.sed
    39         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -I${srcdir} -E -P $< | sed -r -f ${srcdir}/prototypes.sed > $@
     41        ${AM_V_GEN}gcc -I${srcdir} -E -P $< | sed -r -f ${srcdir}/prototypes.sed > $@
    4042
    4143gcc-builtins.c : ${srcdir}/builtins.def ${srcdir}/prototypes.awk ${srcdir}/sync-builtins.cf ${srcdir}/prototypes.c
    42         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -I${srcdir} -E ${srcdir}/prototypes.c | awk -f ${srcdir}/prototypes.awk > $@
     44        ${AM_V_GEN}gcc -I${srcdir} -E ${srcdir}/prototypes.c | awk -f ${srcdir}/prototypes.awk > $@
    4345
    4446prelude.cf : prelude-gen.cc
    45         ${AM_V_GEN}${CXX} ${AM_CXXFLAGS} ${CXXFLAGS} ${<} -o prelude-gen -Wall -Wextra -O2 -g -std=c++14
     47        ${AM_V_GEN}${CXX} ${AM_CXXFLAGS} ${CXXFLAGS} ${AM_CFLAGS} ${<} -o prelude-gen -Wall -Wextra -O2 -g -std=c++14
    4648        @./prelude-gen > $@
    4749        @rm ./prelude-gen
     
    5355# create forward declarations for cfa builtins
    5456builtins.cf : builtins.c ${CC}
    55         ${AM_V_GEN}${CC} -E -P ${<} -o ${@} -MD -MP -MF $(DEPDIR)/builtins.Po
     57        ${AM_V_GEN}gcc ${AM_CFLAGS} -E -P ${<} -o ${@} -MD -MP -MF $(DEPDIR)/builtins.Po
    5658        ${AM_V_at}sed -i 's/builtins.o/builtins.cf/g' $(DEPDIR)/builtins.Po
    5759
    5860include $(DEPDIR)/builtins.Po
    5961
    60 ../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp
    61         ${AM_V_GEN}${abs_top_builddir}/src/driver/cfa-cpp -l prelude.cf $@  # use src/cfa-cpp as not in lib until after install
     62../src/prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@
     63        ${AM_V_GEN}@CFACPP@ --prelude-dir=${builddir} -l prelude.cf $@  # use src/cfa-cpp as not in lib until after install
    6264
    63 bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp
    64         ${AM_V_GEN}${abs_top_builddir}/src/driver/cfa-cpp -tpm ${srcdir}/bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
     65bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@
     66        ${AM_V_GEN}@CFACPP@ --prelude-dir=${builddir} -tpm ${srcdir}/bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
    6567
    6668maintainer-clean-local :
    6769        rm -rf $(DEPDIR)
    6870
    69 MAINTAINERCLEANFILES = gcc-builtins.c gcc-builtins.cf builtins.cf extras.cf bootloader.c prelude.cf ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
     71MOSTLYCLEANFILES = bootloader.c builtins.cf extras.cf gcc-builtins.c gcc-builtins.cf prelude.cf
     72MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
  • libcfa/prelude/Makefile.in

    rfb975a50 r455a7d5  
    9090PRE_UNINSTALL = :
    9191POST_UNINSTALL = :
    92 build_triplet = @build@
    93 host_triplet = @host@
    94 subdir = src/prelude
     92subdir = prelude
    9593ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    96 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
     94am__aclocal_m4_deps = $(top_srcdir)/../automake/cfa.m4 \
     95        $(top_srcdir)/configure.ac
    9796am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
    9897        $(ACLOCAL_M4)
    9998DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
    10099mkinstalldirs = $(install_sh) -d
    101 CONFIG_HEADER = $(top_builddir)/config.h
    102100CONFIG_CLEAN_FILES =
    103101CONFIG_CLEAN_VPATH_FILES =
     
    154152DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    155153ACLOCAL = @ACLOCAL@
    156 ALLOCA = @ALLOCA@
    157154AMTAR = @AMTAR@
    158155AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
     156ARCHITECTURE = @ARCHITECTURE@
     157ARCH_FLAGS = @ARCH_FLAGS@
    159158AUTOCONF = @AUTOCONF@
    160159AUTOHEADER = @AUTOHEADER@
    161160AUTOMAKE = @AUTOMAKE@
    162161AWK = @AWK@
    163 BACKEND_CC = @BACKEND_CC@
    164 CC = ${abs_top_builddir}/src/driver/cfa
     162CC = @CFACC@
    165163CCAS = @CCAS@
    166164CCASDEPMODE = @CCASDEPMODE@
    167165CCASFLAGS = @CCASFLAGS@
    168166CCDEPMODE = @CCDEPMODE@
    169 CFA_BACKEND_CC = @CFA_BACKEND_CC@
     167CFACC = @CFACC@
     168CFACPP = @CFACPP@
    170169CFA_BINDIR = @CFA_BINDIR@
    171 CFA_FLAGS = @CFA_FLAGS@
    172170CFA_INCDIR = @CFA_INCDIR@
    173171CFA_LIBDIR = @CFA_LIBDIR@
     
    175173CFA_PREFIX = @CFA_PREFIX@
    176174CFLAGS = @CFLAGS@
    177 CPP = @CPP@
     175CONFIGURATION = @CONFIGURATION@
     176CONFIG_CFAFLAGS = @CONFIG_CFAFLAGS@
     177CONFIG_CFLAGS = @CONFIG_CFLAGS@
    178178CPPFLAGS = @CPPFLAGS@
    179179CXX = @CXX@
     
    183183DEFS = @DEFS@
    184184DEPDIR = @DEPDIR@
     185DRIVER_DIR = @DRIVER_DIR@
    185186ECHO_C = @ECHO_C@
    186187ECHO_N = @ECHO_N@
    187188ECHO_T = @ECHO_T@
    188 EGREP = @EGREP@
    189189EXEEXT = @EXEEXT@
    190 GREP = @GREP@
    191190INSTALL = @INSTALL@
    192191INSTALL_DATA = @INSTALL_DATA@
     
    195194INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    196195LDFLAGS = @LDFLAGS@
    197 LEX = @LEX@
    198 LEXLIB = @LEXLIB@
    199 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
    200196LIBOBJS = @LIBOBJS@
    201197LIBS = @LIBS@
    202198LTLIBOBJS = @LTLIBOBJS@
    203 MACHINE_TYPE = @MACHINE_TYPE@
    204199MAKEINFO = @MAKEINFO@
    205200MKDIR_P = @MKDIR_P@
     
    218213STRIP = @STRIP@
    219214VERSION = @VERSION@
    220 YACC = @YACC@
    221 YFLAGS = @YFLAGS@
    222215abs_builddir = @abs_builddir@
    223216abs_srcdir = @abs_srcdir@
     
    232225am__untar = @am__untar@
    233226bindir = @bindir@
    234 build = @build@
    235227build_alias = @build_alias@
    236 build_cpu = @build_cpu@
    237 build_os = @build_os@
    238 build_vendor = @build_vendor@
    239228builddir = @builddir@
    240229datadir = @datadir@
     
    243232dvidir = @dvidir@
    244233exec_prefix = @exec_prefix@
    245 host = @host@
    246234host_alias = @host_alias@
    247 host_cpu = @host_cpu@
    248 host_os = @host_os@
    249 host_vendor = @host_vendor@
    250235htmldir = @htmldir@
    251236includedir = @includedir@
     
    279264cfalibdir = ${CFA_LIBDIR}
    280265cfalib_DATA = gcc-builtins.cf builtins.cf extras.cf prelude.cf bootloader.c
    281 noinst_DATA = ../libcfa/libcfa-prelude.c
    282 MAINTAINERCLEANFILES = gcc-builtins.c gcc-builtins.cf builtins.cf extras.cf bootloader.c prelude.cf ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
     266noinst_DATA = ../src/prelude.c
     267AM_CFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
     268AM_CFAFLAGS = @CONFIG_CFAFLAGS@
     269MOSTLYCLEANFILES = bootloader.c builtins.cf extras.cf gcc-builtins.c gcc-builtins.cf prelude.cf
     270MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
    283271all: all-am
    284272
     
    293281          esac; \
    294282        done; \
    295         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/prelude/Makefile'; \
     283        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign prelude/Makefile'; \
    296284        $(am__cd) $(top_srcdir) && \
    297           $(AUTOMAKE) --foreign src/prelude/Makefile
     285          $(AUTOMAKE) --foreign prelude/Makefile
    298286Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
    299287        @case '$?' in \
     
    398386        fi
    399387mostlyclean-generic:
     388        -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
    400389
    401390clean-generic:
     
    501490# create extra forward types/declarations to reduce inclusion of library files
    502491extras.cf : ${srcdir}/extras.regx ${srcdir}/extras.c
    503         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f ${srcdir}/extras.regx > extras.cf
     492        ${AM_V_GEN}gcc ${AM_CFLAGS} -E ${srcdir}/extras.c | grep -f ${srcdir}/extras.regx > extras.cf
    504493
    505494# create forward declarations for gcc builtins
    506495gcc-builtins.cf : gcc-builtins.c ${srcdir}/prototypes.sed
    507         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -I${srcdir} -E -P $< | sed -r -f ${srcdir}/prototypes.sed > $@
     496        ${AM_V_GEN}gcc -I${srcdir} -E -P $< | sed -r -f ${srcdir}/prototypes.sed > $@
    508497
    509498gcc-builtins.c : ${srcdir}/builtins.def ${srcdir}/prototypes.awk ${srcdir}/sync-builtins.cf ${srcdir}/prototypes.c
    510         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -I${srcdir} -E ${srcdir}/prototypes.c | awk -f ${srcdir}/prototypes.awk > $@
     499        ${AM_V_GEN}gcc -I${srcdir} -E ${srcdir}/prototypes.c | awk -f ${srcdir}/prototypes.awk > $@
    511500
    512501prelude.cf : prelude-gen.cc
    513         ${AM_V_GEN}${CXX} ${AM_CXXFLAGS} ${CXXFLAGS} ${<} -o prelude-gen -Wall -Wextra -O2 -g -std=c++14
     502        ${AM_V_GEN}${CXX} ${AM_CXXFLAGS} ${CXXFLAGS} ${AM_CFLAGS} ${<} -o prelude-gen -Wall -Wextra -O2 -g -std=c++14
    514503        @./prelude-gen > $@
    515504        @rm ./prelude-gen
     
    521510# create forward declarations for cfa builtins
    522511builtins.cf : builtins.c ${CC}
    523         ${AM_V_GEN}${CC} -E -P ${<} -o ${@} -MD -MP -MF $(DEPDIR)/builtins.Po
     512        ${AM_V_GEN}gcc ${AM_CFLAGS} -E -P ${<} -o ${@} -MD -MP -MF $(DEPDIR)/builtins.Po
    524513        ${AM_V_at}sed -i 's/builtins.o/builtins.cf/g' $(DEPDIR)/builtins.Po
    525514
    526515include $(DEPDIR)/builtins.Po
    527516
    528 ../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp
    529         ${AM_V_GEN}${abs_top_builddir}/src/driver/cfa-cpp -l prelude.cf $@  # use src/cfa-cpp as not in lib until after install
    530 
    531 bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp
    532         ${AM_V_GEN}${abs_top_builddir}/src/driver/cfa-cpp -tpm ${srcdir}/bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
     517../src/prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@
     518        ${AM_V_GEN}@CFACPP@ --prelude-dir=${builddir} -l prelude.cf $@  # use src/cfa-cpp as not in lib until after install
     519
     520bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@
     521        ${AM_V_GEN}@CFACPP@ --prelude-dir=${builddir} -tpm ${srcdir}/bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
    533522
    534523maintainer-clean-local :
  • libcfa/prelude/builtins.c

    rfb975a50 r455a7d5  
    1010// Created On       : Fri Jul 21 16:21:03 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb  8 12:47:59 2018
    13 // Update Count     : 19
     12// Last Modified On : Sun Aug  5 21:40:38 2018
     13// Update Count     : 20
    1414//
    1515
     
    1818typedef unsigned long long __cfaabi_abi_exception_type_t;
    1919
    20 #include "../libcfa/virtual.h"
    21 #include "../libcfa/exception.h"
     20#include "../src/virtual.h"
     21#include "../src/exception.h"
    2222
    2323void exit( int status, const char fmt[], ... ) __attribute__ (( format(printf, 2, 3), __nothrow__, __leaf__, __noreturn__ ));
    24 void abort ( const char fmt[], ... ) __attribute__ (( format(printf, 1, 2), __nothrow__, __leaf__, __noreturn__ ));
     24void abort( const char fmt[], ... ) __attribute__ (( format(printf, 1, 2), __nothrow__, __leaf__, __noreturn__ ));
    2525
    2626// increment/decrement unification
  • libcfa/src/Makefile.in

    rfb975a50 r455a7d5  
    1717######################## -*- Mode: Makefile-Automake -*- ######################
    1818###############################################################################
     19
    1920
    2021VPATH = @srcdir@
     
    9091PRE_UNINSTALL = :
    9192POST_UNINSTALL = :
    92 build_triplet = @build@
    93 host_triplet = @host@
    94 noinst_PROGRAMS = fstream_test$(EXEEXT) vector_test$(EXEEXT) \
    95         avl_test$(EXEEXT) Bench$(EXEEXT)
    96 subdir = src/examples
     93subdir = src
    9794ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    98 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
     95am__aclocal_m4_deps = $(top_srcdir)/../automake/cfa.m4 \
     96        $(top_srcdir)/configure.ac
    9997am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
    10098        $(ACLOCAL_M4)
    101 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
     99DIST_COMMON = $(srcdir)/Makefile.am $(nobase_cfa_include_HEADERS) \
     100        $(am__DIST_COMMON)
    102101mkinstalldirs = $(install_sh) -d
    103 CONFIG_HEADER = $(top_builddir)/config.h
    104102CONFIG_CLEAN_FILES =
    105103CONFIG_CLEAN_VPATH_FILES =
    106 PROGRAMS = $(noinst_PROGRAMS)
    107 Bench_SOURCES = Bench.c
    108 Bench_OBJECTS = Bench.$(OBJEXT)
    109 Bench_LDADD = $(LDADD)
     104am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
     105am__vpath_adj = case $$p in \
     106    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
     107    *) f=$$p;; \
     108  esac;
     109am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
     110am__install_max = 40
     111am__nobase_strip_setup = \
     112  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
     113am__nobase_strip = \
     114  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
     115am__nobase_list = $(am__nobase_strip_setup); \
     116  for p in $$list; do echo "$$p $$p"; done | \
     117  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
     118  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
     119    if (++n[$$2] == $(am__install_max)) \
     120      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
     121    END { for (dir in files) print dir, files[dir] }'
     122am__base_list = \
     123  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
     124  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
     125am__uninstall_files_from_dir = { \
     126  test -z "$$files" \
     127    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
     128    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
     129         $(am__cd) "$$dir" && rm -f $$files; }; \
     130  }
     131am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cfa_includedir)"
     132LIBRARIES = $(lib_LIBRARIES)
     133AR = ar
     134AM_V_AR = $(am__v_AR_@AM_V@)
     135am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
     136am__v_AR_0 = @echo "  AR      " $@;
     137am__v_AR_1 =
     138libcfa_a_AR = $(AR) $(ARFLAGS)
     139libcfa_a_LIBADD =
    110140am__dirstamp = $(am__leading_dot)dirstamp
    111 am_avl_test_OBJECTS = avltree/avl_test.$(OBJEXT) \
    112         avltree/avl0.$(OBJEXT) avltree/avl1.$(OBJEXT) \
    113         avltree/avl2.$(OBJEXT) avltree/avl3.$(OBJEXT) \
    114         avltree/avl4.$(OBJEXT) avltree/avl-private.$(OBJEXT)
    115 avl_test_OBJECTS = $(am_avl_test_OBJECTS)
    116 avl_test_LDADD = $(LDADD)
    117 am_fstream_test_OBJECTS = fstream_test.$(OBJEXT)
    118 fstream_test_OBJECTS = $(am_fstream_test_OBJECTS)
    119 fstream_test_LDADD = $(LDADD)
    120 am_vector_test_OBJECTS = vector_int.$(OBJEXT) array.$(OBJEXT) \
    121         vector_test.$(OBJEXT)
    122 vector_test_OBJECTS = $(am_vector_test_OBJECTS)
    123 vector_test_LDADD = $(LDADD)
     141am__objects_1 = fstream.$(OBJEXT) iostream.$(OBJEXT) \
     142        iterator.$(OBJEXT) limits.$(OBJEXT) rational.$(OBJEXT) \
     143        time.$(OBJEXT) stdlib.$(OBJEXT) common.$(OBJEXT) \
     144        containers/maybe.$(OBJEXT) containers/pair.$(OBJEXT) \
     145        containers/result.$(OBJEXT) containers/vector.$(OBJEXT) \
     146        concurrency/coroutine.$(OBJEXT) concurrency/thread.$(OBJEXT) \
     147        concurrency/kernel.$(OBJEXT) concurrency/monitor.$(OBJEXT) \
     148        concurrency/mutex.$(OBJEXT)
     149am__objects_2 = prelude.$(OBJEXT) startup.$(OBJEXT) \
     150        interpose.$(OBJEXT) bits/debug.$(OBJEXT) assert.$(OBJEXT) \
     151        exception.$(OBJEXT) virtual.$(OBJEXT) heap.$(OBJEXT) \
     152        $(am__objects_1) \
     153        concurrency/CtxSwitch-@ARCHITECTURE@.$(OBJEXT) \
     154        concurrency/alarm.$(OBJEXT) concurrency/invoke.$(OBJEXT) \
     155        concurrency/preemption.$(OBJEXT)
     156am_libcfa_a_OBJECTS = $(am__objects_2)
     157libcfa_a_OBJECTS = $(am_libcfa_a_OBJECTS)
    124158AM_V_P = $(am__v_P_@AM_V@)
    125159am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
     
    134168am__v_at_0 = @
    135169am__v_at_1 =
    136 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
    137 depcomp = $(SHELL) $(top_srcdir)/automake/depcomp
     170DEFAULT_INCLUDES = -I.@am__isrc@
     171depcomp = $(SHELL) $(top_srcdir)/./automake/depcomp
    138172am__depfiles_maybe = depfiles
    139173am__mv = mv -f
     174CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
     175        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
     176AM_V_CPPAS = $(am__v_CPPAS_@AM_V@)
     177am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@)
     178am__v_CPPAS_0 = @echo "  CPPAS   " $@;
     179am__v_CPPAS_1 =
    140180COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
    141181        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
     
    150190am__v_CCLD_0 = @echo "  CCLD    " $@;
    151191am__v_CCLD_1 =
    152 SOURCES = Bench.c $(avl_test_SOURCES) $(fstream_test_SOURCES) \
    153         $(vector_test_SOURCES)
    154 DIST_SOURCES = Bench.c $(avl_test_SOURCES) $(fstream_test_SOURCES) \
    155         $(vector_test_SOURCES)
     192SOURCES = $(libcfa_a_SOURCES)
     193DIST_SOURCES = $(libcfa_a_SOURCES)
    156194am__can_run_installinfo = \
    157195  case $$AM_UPDATE_INFO_DIR in \
     
    159197    *) (install-info --version) >/dev/null 2>&1;; \
    160198  esac
     199HEADERS = $(nobase_cfa_include_HEADERS)
    161200am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
    162201# Read a list of newline-separated strings from the standard input,
     
    178217ETAGS = etags
    179218CTAGS = ctags
    180 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/automake/depcomp
     219am__DIST_COMMON = $(srcdir)/../../src/cfa.make $(srcdir)/Makefile.in \
     220        $(top_srcdir)/./automake/depcomp
    181221DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    182222ACLOCAL = @ACLOCAL@
    183 ALLOCA = @ALLOCA@
    184223AMTAR = @AMTAR@
    185224AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
     225ARCHITECTURE = @ARCHITECTURE@
     226ARCH_FLAGS = @ARCH_FLAGS@
    186227AUTOCONF = @AUTOCONF@
    187228AUTOHEADER = @AUTOHEADER@
    188229AUTOMAKE = @AUTOMAKE@
    189230AWK = @AWK@
    190 BACKEND_CC = @BACKEND_CC@
    191 CC = @CFA_BINDIR@/@CFA_NAME@
     231CC = @CC@
    192232CCAS = @CCAS@
    193233CCASDEPMODE = @CCASDEPMODE@
    194234CCASFLAGS = @CCASFLAGS@
    195235CCDEPMODE = @CCDEPMODE@
    196 CFA_BACKEND_CC = @CFA_BACKEND_CC@
     236CFACC = @CFACC@
     237CFACPP = @CFACPP@
    197238CFA_BINDIR = @CFA_BINDIR@
    198 CFA_FLAGS = @CFA_FLAGS@
    199239CFA_INCDIR = @CFA_INCDIR@
    200240CFA_LIBDIR = @CFA_LIBDIR@
    201241CFA_NAME = @CFA_NAME@
    202242CFA_PREFIX = @CFA_PREFIX@
    203 
    204 # applies to both programs
    205 CFLAGS =
    206 CPP = @CPP@
     243CFLAGS = @CFLAGS@
     244CONFIGURATION = @CONFIGURATION@
     245CONFIG_CFAFLAGS = @CONFIG_CFAFLAGS@
     246CONFIG_CFLAGS = @CONFIG_CFLAGS@
    207247CPPFLAGS = @CPPFLAGS@
    208248CXX = @CXX@
     
    212252DEFS = @DEFS@
    213253DEPDIR = @DEPDIR@
     254DRIVER_DIR = @DRIVER_DIR@
    214255ECHO_C = @ECHO_C@
    215256ECHO_N = @ECHO_N@
    216257ECHO_T = @ECHO_T@
    217 EGREP = @EGREP@
    218258EXEEXT = @EXEEXT@
    219 GREP = @GREP@
    220259INSTALL = @INSTALL@
    221260INSTALL_DATA = @INSTALL_DATA@
     
    224263INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    225264LDFLAGS = @LDFLAGS@
    226 LEX = @LEX@
    227 LEXLIB = @LEXLIB@
    228 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
    229265LIBOBJS = @LIBOBJS@
    230266LIBS = @LIBS@
    231267LTLIBOBJS = @LTLIBOBJS@
    232 MACHINE_TYPE = @MACHINE_TYPE@
    233268MAKEINFO = @MAKEINFO@
    234269MKDIR_P = @MKDIR_P@
     
    247282STRIP = @STRIP@
    248283VERSION = @VERSION@
    249 YACC = @YACC@
    250 YFLAGS = @YFLAGS@
    251284abs_builddir = @abs_builddir@
    252285abs_srcdir = @abs_srcdir@
     
    261294am__untar = @am__untar@
    262295bindir = @bindir@
    263 build = @build@
    264296build_alias = @build_alias@
    265 build_cpu = @build_cpu@
    266 build_os = @build_os@
    267 build_vendor = @build_vendor@
    268297builddir = @builddir@
    269298datadir = @datadir@
     
    272301dvidir = @dvidir@
    273302exec_prefix = @exec_prefix@
    274 host = @host@
    275303host_alias = @host_alias@
    276 host_cpu = @host_cpu@
    277 host_os = @host_os@
    278 host_vendor = @host_vendor@
    279304htmldir = @htmldir@
    280305includedir = @includedir@
    281306infodir = @infodir@
    282307install_sh = @install_sh@
    283 libdir = @libdir@
     308libdir = ${CFA_LIBDIR}
    284309libexecdir = @libexecdir@
    285310localedir = @localedir@
     
    301326top_builddir = @top_builddir@
    302327top_srcdir = @top_srcdir@
    303 AM_CFLAGS = -g -Wall -Wno-unused-function -O2
    304 fstream_test_SOURCES = fstream_test.c
    305 vector_test_SOURCES = vector_int.c array.c vector_test.c
    306 avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c
     328
     329# create object files in directory with source files
     330AUTOMAKE_OPTIONS = subdir-objects
     331ARFLAGS = cr
     332CFACOMPILE = $(CFACC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(CFAFLAGS) $(AM_CFLAGS) $(CFLAGS)
     333AM_V_CFA = $(am__v_CFA_@AM_V@)
     334am__v_CFA_ = $(am__v_CFA_@AM_DEFAULT_V@)
     335am__v_CFA_0 = @echo "  CFA     " $@;
     336am__v_CFA_1 =
     337lib_LIBRARIES = libcfa.a
     338
     339# AM_CFLAGS for all cfa source
     340# AM_CFAFLAGS for only cfa source
     341# use -no-include-stdhdr to prevent rebuild cycles
     342# The built sources must not depend on the installed headers
     343AM_CFAFLAGS = -quiet -in-tree -imacros prelude.c -I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@
     344AM_CFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
     345AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
     346
     347#----------------------------------------------------------------------------------------------------------------
     348
     349# not all platforms support concurrency, add option do disable it
     350headers = fstream.hfa iostream.hfa iterator.hfa limits.hfa \
     351        rational.hfa time.hfa stdlib.hfa common.hfa \
     352        containers/maybe.hfa containers/pair.hfa containers/result.hfa \
     353        containers/vector.hfa concurrency/coroutine.hfa \
     354        concurrency/thread.hfa concurrency/kernel.hfa \
     355        concurrency/monitor.hfa concurrency/mutex.hfa
     356libobjs = ${headers:.hfa=.o}
     357
     358# not all platforms support concurrency, add option do disable it
     359libsrc = prelude.c startup.cfa interpose.cfa bits/debug.cfa assert.cfa \
     360        exception.c virtual.c heap.cfa ${headers:.hfa=.cfa} \
     361        concurrency/CtxSwitch-@ARCHITECTURE@.S concurrency/alarm.cfa \
     362        concurrency/invoke.c concurrency/preemption.cfa
     363libcfa_a_SOURCES = ${libsrc}
     364stdhdr = ${shell find ${srcdir}/stdhdr -type f -printf "%p "}
     365cfa_includedir = $(CFA_INCDIR)
     366nobase_cfa_include_HEADERS = \
     367        ${headers}             \
     368        ${stdhdr}              \
     369        math.hfa               \
     370        gmp.hfa                \
     371        time_t.hfa             \
     372        bits/align.hfa         \
     373        bits/containers.hfa    \
     374        bits/defs.hfa          \
     375        bits/debug.hfa         \
     376        bits/locks.hfa         \
     377        concurrency/invoke.h
     378
     379MOSTLYCLEANFILES = prelude.c
    307380all: all-am
    308381
    309382.SUFFIXES:
    310 .SUFFIXES: .c .o .obj
    311 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(am__configure_deps)
     383.SUFFIXES: .S .c .cfa .o .obj
     384$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/../../src/cfa.make $(am__configure_deps)
    312385        @for dep in $?; do \
    313386          case '$(am__configure_deps)' in \
     
    318391          esac; \
    319392        done; \
    320         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/examples/Makefile'; \
     393        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
    321394        $(am__cd) $(top_srcdir) && \
    322           $(AUTOMAKE) --foreign src/examples/Makefile
     395          $(AUTOMAKE) --foreign src/Makefile
    323396Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
    324397        @case '$?' in \
     
    329402            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
    330403        esac;
     404$(srcdir)/../../src/cfa.make $(am__empty):
    331405
    332406$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     
    338412        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
    339413$(am__aclocal_m4_deps):
    340 
    341 clean-noinstPROGRAMS:
    342         -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
    343 avltree/$(am__dirstamp):
    344         @$(MKDIR_P) avltree
    345         @: > avltree/$(am__dirstamp)
    346 avltree/$(DEPDIR)/$(am__dirstamp):
    347         @$(MKDIR_P) avltree/$(DEPDIR)
    348         @: > avltree/$(DEPDIR)/$(am__dirstamp)
    349 avltree/avl_test.$(OBJEXT): avltree/$(am__dirstamp) \
    350         avltree/$(DEPDIR)/$(am__dirstamp)
    351 avltree/avl0.$(OBJEXT): avltree/$(am__dirstamp) \
    352         avltree/$(DEPDIR)/$(am__dirstamp)
    353 avltree/avl1.$(OBJEXT): avltree/$(am__dirstamp) \
    354         avltree/$(DEPDIR)/$(am__dirstamp)
    355 avltree/avl2.$(OBJEXT): avltree/$(am__dirstamp) \
    356         avltree/$(DEPDIR)/$(am__dirstamp)
    357 avltree/avl3.$(OBJEXT): avltree/$(am__dirstamp) \
    358         avltree/$(DEPDIR)/$(am__dirstamp)
    359 avltree/avl4.$(OBJEXT): avltree/$(am__dirstamp) \
    360         avltree/$(DEPDIR)/$(am__dirstamp)
    361 avltree/avl-private.$(OBJEXT): avltree/$(am__dirstamp) \
    362         avltree/$(DEPDIR)/$(am__dirstamp)
    363 
    364 avl_test$(EXEEXT): $(avl_test_OBJECTS) $(avl_test_DEPENDENCIES) $(EXTRA_avl_test_DEPENDENCIES)
    365         @rm -f avl_test$(EXEEXT)
    366         $(AM_V_CCLD)$(LINK) $(avl_test_OBJECTS) $(avl_test_LDADD) $(LIBS)
    367 
    368 fstream_test$(EXEEXT): $(fstream_test_OBJECTS) $(fstream_test_DEPENDENCIES) $(EXTRA_fstream_test_DEPENDENCIES)
    369         @rm -f fstream_test$(EXEEXT)
    370         $(AM_V_CCLD)$(LINK) $(fstream_test_OBJECTS) $(fstream_test_LDADD) $(LIBS)
    371 
    372 vector_test$(EXEEXT): $(vector_test_OBJECTS) $(vector_test_DEPENDENCIES) $(EXTRA_vector_test_DEPENDENCIES)
    373         @rm -f vector_test$(EXEEXT)
    374         $(AM_V_CCLD)$(LINK) $(vector_test_OBJECTS) $(vector_test_LDADD) $(LIBS)
     414install-libLIBRARIES: $(lib_LIBRARIES)
     415        @$(NORMAL_INSTALL)
     416        @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
     417        list2=; for p in $$list; do \
     418          if test -f $$p; then \
     419            list2="$$list2 $$p"; \
     420          else :; fi; \
     421        done; \
     422        test -z "$$list2" || { \
     423          echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
     424          $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
     425          echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \
     426          $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; }
     427        @$(POST_INSTALL)
     428        @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
     429        for p in $$list; do \
     430          if test -f $$p; then \
     431            $(am__strip_dir) \
     432            echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \
     433            ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \
     434          else :; fi; \
     435        done
     436
     437uninstall-libLIBRARIES:
     438        @$(NORMAL_UNINSTALL)
     439        @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
     440        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
     441        dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir)
     442
     443clean-libLIBRARIES:
     444        -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
     445bits/$(am__dirstamp):
     446        @$(MKDIR_P) bits
     447        @: > bits/$(am__dirstamp)
     448bits/$(DEPDIR)/$(am__dirstamp):
     449        @$(MKDIR_P) bits/$(DEPDIR)
     450        @: > bits/$(DEPDIR)/$(am__dirstamp)
     451bits/debug.$(OBJEXT): bits/$(am__dirstamp) \
     452        bits/$(DEPDIR)/$(am__dirstamp)
     453containers/$(am__dirstamp):
     454        @$(MKDIR_P) containers
     455        @: > containers/$(am__dirstamp)
     456containers/$(DEPDIR)/$(am__dirstamp):
     457        @$(MKDIR_P) containers/$(DEPDIR)
     458        @: > containers/$(DEPDIR)/$(am__dirstamp)
     459containers/maybe.$(OBJEXT): containers/$(am__dirstamp) \
     460        containers/$(DEPDIR)/$(am__dirstamp)
     461containers/pair.$(OBJEXT): containers/$(am__dirstamp) \
     462        containers/$(DEPDIR)/$(am__dirstamp)
     463containers/result.$(OBJEXT): containers/$(am__dirstamp) \
     464        containers/$(DEPDIR)/$(am__dirstamp)
     465containers/vector.$(OBJEXT): containers/$(am__dirstamp) \
     466        containers/$(DEPDIR)/$(am__dirstamp)
     467concurrency/$(am__dirstamp):
     468        @$(MKDIR_P) concurrency
     469        @: > concurrency/$(am__dirstamp)
     470concurrency/$(DEPDIR)/$(am__dirstamp):
     471        @$(MKDIR_P) concurrency/$(DEPDIR)
     472        @: > concurrency/$(DEPDIR)/$(am__dirstamp)
     473concurrency/coroutine.$(OBJEXT): concurrency/$(am__dirstamp) \
     474        concurrency/$(DEPDIR)/$(am__dirstamp)
     475concurrency/thread.$(OBJEXT): concurrency/$(am__dirstamp) \
     476        concurrency/$(DEPDIR)/$(am__dirstamp)
     477concurrency/kernel.$(OBJEXT): concurrency/$(am__dirstamp) \
     478        concurrency/$(DEPDIR)/$(am__dirstamp)
     479concurrency/monitor.$(OBJEXT): concurrency/$(am__dirstamp) \
     480        concurrency/$(DEPDIR)/$(am__dirstamp)
     481concurrency/mutex.$(OBJEXT): concurrency/$(am__dirstamp) \
     482        concurrency/$(DEPDIR)/$(am__dirstamp)
     483concurrency/CtxSwitch-@ARCHITECTURE@.$(OBJEXT):  \
     484        concurrency/$(am__dirstamp) \
     485        concurrency/$(DEPDIR)/$(am__dirstamp)
     486concurrency/alarm.$(OBJEXT): concurrency/$(am__dirstamp) \
     487        concurrency/$(DEPDIR)/$(am__dirstamp)
     488concurrency/invoke.$(OBJEXT): concurrency/$(am__dirstamp) \
     489        concurrency/$(DEPDIR)/$(am__dirstamp)
     490concurrency/preemption.$(OBJEXT): concurrency/$(am__dirstamp) \
     491        concurrency/$(DEPDIR)/$(am__dirstamp)
     492
     493libcfa.a: $(libcfa_a_OBJECTS) $(libcfa_a_DEPENDENCIES) $(EXTRA_libcfa_a_DEPENDENCIES)
     494        $(AM_V_at)-rm -f libcfa.a
     495        $(AM_V_AR)$(libcfa_a_AR) libcfa.a $(libcfa_a_OBJECTS) $(libcfa_a_LIBADD)
     496        $(AM_V_at)$(RANLIB) libcfa.a
    375497
    376498mostlyclean-compile:
    377499        -rm -f *.$(OBJEXT)
    378         -rm -f avltree/*.$(OBJEXT)
     500        -rm -f bits/*.$(OBJEXT)
     501        -rm -f concurrency/*.$(OBJEXT)
     502        -rm -f containers/*.$(OBJEXT)
    379503
    380504distclean-compile:
    381505        -rm -f *.tab.c
    382506
    383 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Bench.Po@am__quote@
    384 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@
    385 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstream_test.Po@am__quote@
    386 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector_int.Po@am__quote@
    387 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector_test.Po@am__quote@
    388 @AMDEP_TRUE@@am__include@ @am__quote@avltree/$(DEPDIR)/avl-private.Po@am__quote@
    389 @AMDEP_TRUE@@am__include@ @am__quote@avltree/$(DEPDIR)/avl0.Po@am__quote@
    390 @AMDEP_TRUE@@am__include@ @am__quote@avltree/$(DEPDIR)/avl1.Po@am__quote@
    391 @AMDEP_TRUE@@am__include@ @am__quote@avltree/$(DEPDIR)/avl2.Po@am__quote@
    392 @AMDEP_TRUE@@am__include@ @am__quote@avltree/$(DEPDIR)/avl3.Po@am__quote@
    393 @AMDEP_TRUE@@am__include@ @am__quote@avltree/$(DEPDIR)/avl4.Po@am__quote@
    394 @AMDEP_TRUE@@am__include@ @am__quote@avltree/$(DEPDIR)/avl_test.Po@am__quote@
     507@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exception.Po@am__quote@
     508@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude.Po@am__quote@
     509@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virtual.Po@am__quote@
     510@AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/CtxSwitch-@ARCHITECTURE@.Po@am__quote@
     511@AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/invoke.Po@am__quote@
     512
     513.S.o:
     514@am__fastdepCCAS_TRUE@  $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
     515@am__fastdepCCAS_TRUE@  $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
     516@am__fastdepCCAS_TRUE@  $(am__mv) $$depbase.Tpo $$depbase.Po
     517@AMDEP_TRUE@@am__fastdepCCAS_FALSE@     $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
     518@AMDEP_TRUE@@am__fastdepCCAS_FALSE@     DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     519@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $<
     520
     521.S.obj:
     522@am__fastdepCCAS_TRUE@  $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
     523@am__fastdepCCAS_TRUE@  $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
     524@am__fastdepCCAS_TRUE@  $(am__mv) $$depbase.Tpo $$depbase.Po
     525@AMDEP_TRUE@@am__fastdepCCAS_FALSE@     $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
     526@AMDEP_TRUE@@am__fastdepCCAS_FALSE@     DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     527@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
    395528
    396529.c.o:
     
    409542@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    410543@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
     544install-nobase_cfa_includeHEADERS: $(nobase_cfa_include_HEADERS)
     545        @$(NORMAL_INSTALL)
     546        @list='$(nobase_cfa_include_HEADERS)'; test -n "$(cfa_includedir)" || list=; \
     547        if test -n "$$list"; then \
     548          echo " $(MKDIR_P) '$(DESTDIR)$(cfa_includedir)'"; \
     549          $(MKDIR_P) "$(DESTDIR)$(cfa_includedir)" || exit 1; \
     550        fi; \
     551        $(am__nobase_list) | while read dir files; do \
     552          xfiles=; for file in $$files; do \
     553            if test -f "$$file"; then xfiles="$$xfiles $$file"; \
     554            else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
     555          test -z "$$xfiles" || { \
     556            test "x$$dir" = x. || { \
     557              echo " $(MKDIR_P) '$(DESTDIR)$(cfa_includedir)/$$dir'"; \
     558              $(MKDIR_P) "$(DESTDIR)$(cfa_includedir)/$$dir"; }; \
     559            echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(cfa_includedir)/$$dir'"; \
     560            $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(cfa_includedir)/$$dir" || exit $$?; }; \
     561        done
     562
     563uninstall-nobase_cfa_includeHEADERS:
     564        @$(NORMAL_UNINSTALL)
     565        @list='$(nobase_cfa_include_HEADERS)'; test -n "$(cfa_includedir)" || list=; \
     566        $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
     567        dir='$(DESTDIR)$(cfa_includedir)'; $(am__uninstall_files_from_dir)
    411568
    412569ID: $(am__tagged_files)
     
    494651check-am: all-am
    495652check: check-am
    496 all-am: Makefile $(PROGRAMS)
     653all-am: Makefile $(LIBRARIES) $(HEADERS)
    497654installdirs:
     655        for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cfa_includedir)"; do \
     656          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
     657        done
    498658install: install-am
    499659install-exec: install-exec-am
     
    516676        fi
    517677mostlyclean-generic:
     678        -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
    518679
    519680clean-generic:
     
    522683        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
    523684        -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
    524         -rm -f avltree/$(DEPDIR)/$(am__dirstamp)
    525         -rm -f avltree/$(am__dirstamp)
     685        -rm -f bits/$(DEPDIR)/$(am__dirstamp)
     686        -rm -f bits/$(am__dirstamp)
     687        -rm -f concurrency/$(DEPDIR)/$(am__dirstamp)
     688        -rm -f concurrency/$(am__dirstamp)
     689        -rm -f containers/$(DEPDIR)/$(am__dirstamp)
     690        -rm -f containers/$(am__dirstamp)
    526691
    527692maintainer-clean-generic:
     
    530695clean: clean-am
    531696
    532 clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am
     697clean-am: clean-generic clean-libLIBRARIES mostlyclean-am
    533698
    534699distclean: distclean-am
    535         -rm -rf ./$(DEPDIR) avltree/$(DEPDIR)
     700        -rm -rf ./$(DEPDIR) concurrency/$(DEPDIR)
    536701        -rm -f Makefile
    537702distclean-am: clean-am distclean-compile distclean-generic \
     
    550715info-am:
    551716
    552 install-data-am:
     717install-data-am: install-nobase_cfa_includeHEADERS
    553718
    554719install-dvi: install-dvi-am
     
    556721install-dvi-am:
    557722
    558 install-exec-am:
     723install-exec-am: install-libLIBRARIES
    559724
    560725install-html: install-html-am
     
    579744
    580745maintainer-clean: maintainer-clean-am
    581         -rm -rf ./$(DEPDIR) avltree/$(DEPDIR)
     746        -rm -rf ./$(DEPDIR) concurrency/$(DEPDIR)
    582747        -rm -f Makefile
    583 maintainer-clean-am: distclean-am maintainer-clean-generic
     748maintainer-clean-am: distclean-am maintainer-clean-generic \
     749        maintainer-clean-local
    584750
    585751mostlyclean: mostlyclean-am
     
    595761ps-am:
    596762
    597 uninstall-am:
     763uninstall-am: uninstall-libLIBRARIES \
     764        uninstall-nobase_cfa_includeHEADERS
    598765
    599766.MAKE: install-am install-strip
    600767
    601768.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
    602         clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
     769        clean-libLIBRARIES cscopelist-am ctags ctags-am distclean \
    603770        distclean-compile distclean-generic distclean-tags distdir dvi \
    604771        dvi-am html html-am info info-am install install-am \
    605772        install-data install-data-am install-dvi install-dvi-am \
    606773        install-exec install-exec-am install-html install-html-am \
    607         install-info install-info-am install-man install-pdf \
    608         install-pdf-am install-ps install-ps-am install-strip \
    609         installcheck installcheck-am installdirs maintainer-clean \
    610         maintainer-clean-generic mostlyclean mostlyclean-compile \
    611         mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
    612         uninstall-am
     774        install-info install-info-am install-libLIBRARIES install-man \
     775        install-nobase_cfa_includeHEADERS install-pdf install-pdf-am \
     776        install-ps install-ps-am install-strip installcheck \
     777        installcheck-am installdirs maintainer-clean \
     778        maintainer-clean-generic maintainer-clean-local mostlyclean \
     779        mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
     780        tags tags-am uninstall uninstall-am uninstall-libLIBRARIES \
     781        uninstall-nobase_cfa_includeHEADERS
    613782
    614783.PRECIOUS: Makefile
    615784
    616785
    617 Bench : Bench.c
    618         @for ccflags in "-debug" "-nodebug"; do \
    619                 echo ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt Bench.c;\
    620                 ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt Bench.c;\
    621                 ./a.out ; \
    622         done ; \
    623         rm -f ./a.out ;
     786.cfa.o: $(CFACC) $(CFACPP)
     787        $(AM_V_CFA)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
     788        $(CFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
     789        $(am__mv) $$depbase.Tpo $$depbase.Po
     790
     791#----------------------------------------------------------------------------------------------------------------
     792# add dependency to cfa-cpp so all libraries are rebuilt with new translator
     793${libobjs} : ${cfalib_DATA}
     794
     795#----------------------------------------------------------------------------------------------------------------
     796maintainer-clean-local:
     797        -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR}
    624798
    625799# Tell versions [3.59,3.63) of GNU make to not export all variables.
  • libcfa/src/assert.cfa

    rfb975a50 r455a7d5  
    1717#include <stdarg.h>                                                             // varargs
    1818#include <stdio.h>                                                              // fprintf
    19 #include "bits/debug.h"
     19#include "bits/debug.hfa"
    2020
    2121extern "C" {
  • libcfa/src/bits/algorithm.hfa

    rfb975a50 r455a7d5  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // bits/algorithms.h -- Builtins for exception handling.
     7// bits/algorithms.hfa -- Builtins for exception handling.
    88//
    99// Author           : Thierry Delisle
  • libcfa/src/bits/align.hfa

    rfb975a50 r455a7d5  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // align.h --
     7// align.hfa --
    88//
    99// Author           : Thierry Delisle
  • libcfa/src/bits/containers.hfa

    rfb975a50 r455a7d5  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // bits/containers.h -- Intrusive generic containers.h
     7// bits/containers.hfa -- Intrusive generic containers.hfa
    88//
    99// Author           : Thierry Delisle
     
    1515#pragma once
    1616
    17 #include "bits/align.h"
    18 #include "bits/defs.h"
     17#include "bits/align.hfa"
     18#include "bits/defs.hfa"
    1919
    2020//-----------------------------------------------------------------------------
  • libcfa/src/bits/debug.hfa

    rfb975a50 r455a7d5  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // debug.h --
     7// debug.hfa --
    88//
    99// Author           : Thierry Delisle
  • libcfa/src/bits/defs.hfa

    rfb975a50 r455a7d5  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // defs.h --
     7// defs.hfa --
    88//
    99// Author           : Thierry Delisle
  • libcfa/src/bits/locks.hfa

    rfb975a50 r455a7d5  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // bits/locks.h -- Fast internal locks.
     7// bits/locks.hfa -- Fast internal locks.
    88//
    99// Author           : Thierry Delisle
     
    1616#pragma once
    1717
    18 #include "bits/debug.h"
    19 #include "bits/defs.h"
     18#include "bits/debug.hfa"
     19#include "bits/defs.hfa"
    2020#include <assert.h>
    2121
     
    6464                extern void disable_interrupts();
    6565                extern void enable_interrupts_noPoll();
     66
     67                #ifdef __CFA_DEBUG__
     68                        void __cfaabi_dbg_record(__spinlock_t & this, const char * prev_name);
     69                #else
     70                        #define __cfaabi_dbg_record(x, y)
     71                #endif
    6672        }
    6773
     
    7177                this.lock = 0;
    7278        }
    73 
    74 
    75         #ifdef __CFA_DEBUG__
    76                 void __cfaabi_dbg_record(__spinlock_t & this, const char * prev_name);
    77         #else
    78                 #define __cfaabi_dbg_record(x, y)
    79         #endif
    8079
    8180        // Lock the spinlock, return false if already acquired
  • libcfa/src/bits/signal.hfa

    rfb975a50 r455a7d5  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // bits/signal.h -- Helper functions and defines to use signals
     7// bits/signal.hfa -- Helper functions and defines to use signals
    88//
    99// Author           : Thierry Delisle
     
    1616#pragma once
    1717
    18 #include "bits/debug.h"
    19 #include "bits/defs.h"
     18#include "bits/debug.hfa"
     19#include "bits/defs.hfa"
    2020
    2121extern "C" {
  • libcfa/src/clock.hfa

    rfb975a50 r455a7d5  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // clock -- 
    8 // 
     6//
     7// clock --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Thu Apr 12 14:36:06 2018
     
    1212// Last Modified On : Mon Jul  2 21:40:01 2018
    1313// Update Count     : 7
    14 // 
     14//
    1515
    16 #include <time>
     16#include <time.hfa>
    1717
    1818
  • libcfa/src/common.cfa

    rfb975a50 r455a7d5  
    1 //                               -*- Mode: C -*- 
    2 // 
     1//                               -*- Mode: C -*-
     2//
    33// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
    44//
    55// The contents of this file are covered under the licence agreement in the
    66// file "LICENCE" distributed with Cforall.
    7 // 
    8 // common.c -- 
    9 // 
     7//
     8// common.c --
     9//
    1010// Author           : Peter A. Buhr
    1111// Created On       : Thu Jul 12 08:02:29 2018
     
    1313// Last Modified On : Thu Jul 12 08:38:47 2018
    1414// Update Count     : 3
    15 // 
     15//
    1616
    17 #include "common"
     17#include "common.hfa"
    1818#include <stdlib.h>                                     // div_t, *div
    1919
  • libcfa/src/concurrency/alarm.cfa

    rfb975a50 r455a7d5  
    2222}
    2323
    24 #include "alarm.h"
    25 #include "kernel_private.h"
    26 #include "preemption.h"
     24#include "alarm.hfa"
     25#include "kernel_private.hfa"
     26#include "preemption.hfa"
    2727
    2828//=============================================================================================
  • libcfa/src/concurrency/alarm.hfa

    rfb975a50 r455a7d5  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // alarm.h --
     7// alarm.hfa --
    88//
    99// Author           : Thierry Delisle
     
    2121#include <assert.h>
    2222
    23 #include "time"
     23#include "time.hfa"
    2424
    2525struct thread_desc;
  • libcfa/src/concurrency/coroutine.cfa

    rfb975a50 r455a7d5  
    1414//
    1515
    16 #include "coroutine"
     16#include "coroutine.hfa"
    1717
    1818extern "C" {
     
    2525}
    2626
    27 #include "kernel_private.h"
     27#include "kernel_private.hfa"
    2828
    2929#define __CFA_INVOKE_PRIVATE__
  • libcfa/src/concurrency/invoke.h

    rfb975a50 r455a7d5  
    1414//
    1515
    16 #include "bits/containers.h"
    17 #include "bits/defs.h"
    18 #include "bits/locks.h"
     16#include "bits/containers.hfa"
     17#include "bits/defs.hfa"
     18#include "bits/locks.hfa"
    1919
    2020#ifdef __cforall
  • libcfa/src/concurrency/kernel.cfa

    rfb975a50 r455a7d5  
    2727
    2828//CFA Includes
    29 #include "time"
    30 #include "kernel_private.h"
    31 #include "preemption.h"
    32 #include "startup.h"
     29#include "time.hfa"
     30#include "kernel_private.hfa"
     31#include "preemption.hfa"
     32#include "startup.hfa"
    3333
    3434//Private includes
     
    833833// Debug
    834834__cfaabi_dbg_debug_do(
    835         void __cfaabi_dbg_record(__spinlock_t & this, const char * prev_name) {
    836                 this.prev_name = prev_name;
    837                 this.prev_thrd = kernelTLS.this_thread;
     835        extern "C" {
     836                void __cfaabi_dbg_record(__spinlock_t & this, const char * prev_name) {
     837                        this.prev_name = prev_name;
     838                        this.prev_thrd = kernelTLS.this_thread;
     839                }
    838840        }
    839841)
  • libcfa/src/concurrency/kernel.hfa

    rfb975a50 r455a7d5  
    1919
    2020#include "invoke.h"
    21 #include "time_t.h"
     21#include "time_t.hfa"
    2222
    2323extern "C" {
  • libcfa/src/concurrency/kernel_private.hfa

    rfb975a50 r455a7d5  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // kernel_private.h --
     7// kernel_private.hfa --
    88//
    99// Author           : Thierry Delisle
     
    1616#pragma once
    1717
    18 #include "kernel"
    19 #include "thread"
     18#include "kernel.hfa"
     19#include "thread.hfa"
    2020
    21 #include "alarm.h"
     21#include "alarm.hfa"
    2222
    2323
  • libcfa/src/concurrency/monitor.cfa

    rfb975a50 r455a7d5  
    1414//
    1515
    16 #include "monitor"
    17 
    18 #include <stdlib>
     16#include "monitor.hfa"
     17
     18#include <stdlib.hfa>
    1919#include <inttypes.h>
    2020
    21 #include "kernel_private.h"
    22 
    23 #include "bits/algorithms.h"
     21#include "kernel_private.hfa"
     22
     23#include "bits/algorithm.hfa"
    2424
    2525//-----------------------------------------------------------------------------
  • libcfa/src/concurrency/monitor.hfa

    rfb975a50 r455a7d5  
    2020#include <assert.h>
    2121#include "invoke.h"
    22 #include "stdlib"
     22#include "stdlib.hfa"
    2323
    2424trait is_monitor(dtype T) {
  • libcfa/src/concurrency/mutex.cfa

    rfb975a50 r455a7d5  
    1616//
    1717
    18 #include "mutex"
     18#include "mutex.hfa"
    1919
    20 #include "kernel_private.h"
     20#include "kernel_private.hfa"
    2121
    2222//-----------------------------------------------------------------------------
  • libcfa/src/concurrency/mutex.hfa

    rfb975a50 r455a7d5  
    2020#include <stdbool.h>
    2121
    22 #include "bits/algorithms.h"
    23 #include "bits/locks.h"
     22#include "bits/algorithm.hfa"
     23#include "bits/locks.hfa"
    2424
    2525#include "invoke.h"
    26 #include "time_t.h"
     26#include "time_t.hfa"
    2727
    2828//-----------------------------------------------------------------------------
  • libcfa/src/concurrency/preemption.cfa

    rfb975a50 r455a7d5  
    1414//
    1515
    16 #include "preemption.h"
     16#include "preemption.hfa"
    1717#include <assert.h>
    1818
     
    2424}
    2525
    26 #include "bits/signal.h"
     26#include "bits/signal.hfa"
    2727
    2828#if !defined(__CFA_DEFAULT_PREEMPTION__)
  • libcfa/src/concurrency/preemption.hfa

    rfb975a50 r455a7d5  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // preemption.h --
     7// preemption.hfa --
    88//
    99// Author           : Thierry Delisle
     
    1616#pragma once
    1717
    18 #include "alarm.h"
    19 #include "kernel_private.h"
     18#include "alarm.hfa"
     19#include "kernel_private.hfa"
    2020
    2121void kernel_start_preemption();
  • libcfa/src/concurrency/thread.cfa

    rfb975a50 r455a7d5  
    1414//
    1515
    16 #include "thread"
     16#include "thread.hfa"
    1717
    18 #include "kernel_private.h"
     18#include "kernel_private.hfa"
    1919
    2020#define __CFA_INVOKE_PRIVATE__
  • libcfa/src/concurrency/thread.hfa

    rfb975a50 r455a7d5  
    1919#include "invoke.h"
    2020
    21 #include "coroutine"
    22 #include "kernel"
    23 #include "monitor"
     21#include "coroutine.hfa"
     22#include "kernel.hfa"
     23#include "monitor.hfa"
    2424
    2525//-----------------------------------------------------------------------------
  • libcfa/src/containers/maybe.cfa

    rfb975a50 r455a7d5  
    1414//
    1515
    16 #include <containers/maybe>
     16#include <containers/maybe.hfa>
    1717#include <assert.h>
    1818
  • libcfa/src/containers/pair.cfa

    rfb975a50 r455a7d5  
    1111//
    1212
    13 #include <containers/pair>
     13#include <containers/pair.hfa>
    1414
    15 forall(otype R, otype S 
     15forall(otype R, otype S
    1616        | { int ?==?(R, R); int ?<?(R, R); int ?<?(S, S); })
    1717int ?<?(pair(R, S) p, pair(R, S) q) {
     
    1919}
    2020
    21 forall(otype R, otype S 
     21forall(otype R, otype S
    2222        | { int ?==?(R, R); int ?<?(R, R); int ?<=?(S, S); })
    2323int ?<=?(pair(R, S) p, pair(R, S) q) {
     
    3535}
    3636
    37 forall(otype R, otype S 
     37forall(otype R, otype S
    3838        | { int ?==?(R, R); int ?>?(R, R); int ?>?(S, S); })
    3939int ?>?(pair(R, S) p, pair(R, S) q) {
     
    4141}
    4242
    43 forall(otype R, otype S 
     43forall(otype R, otype S
    4444        | { int ?==?(R, R); int ?>?(R, R); int ?>=?(S, S); })
    4545int ?>=?(pair(R, S) p, pair(R, S) q) {
  • libcfa/src/containers/result.cfa

    rfb975a50 r455a7d5  
    1414//
    1515
    16 #include <containers/result>
     16#include <containers/result.hfa>
    1717#include <assert.h>
    1818
  • libcfa/src/containers/vector.cfa

    rfb975a50 r455a7d5  
    1414//
    1515
    16 #include <containers/vector>
     16#include <containers/vector.hfa>
    1717
    18 #include <stdlib>
     18#include <stdlib.hfa>
    1919
    2020forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
  • libcfa/src/exception.c

    rfb975a50 r455a7d5  
    2323#include <stdio.h>
    2424#include <unwind.h>
    25 #include <bits/debug.h>
     25#include <bits/debug.hfa>
    2626
    2727// FIX ME: temporary hack to keep ARM build working
  • libcfa/src/fstream.cfa

    rfb975a50 r455a7d5  
    1414//
    1515
    16 #include "fstream"
     16#include "fstream.hfa"
    1717
    1818#include <stdio.h>                                                                              // vfprintf, vfscanf
  • libcfa/src/fstream.hfa

    rfb975a50 r455a7d5  
    1616#pragma once
    1717
    18 #include "iostream"
     18#include "iostream.hfa"
    1919
    2020enum { sepSize = 16 };
  • libcfa/src/gmp.hfa

    rfb975a50 r455a7d5  
    1919
    2020#include <gmp.h>                                                                                // GNU multi-precise integers
    21 #include <fstream>                                                                              // sout
     21#include <fstream.hfa>                                                                          // sout
    2222
    2323struct Int { mpz_t mpz; };                                                              // wrap GMP implementation
  • libcfa/src/heap.cfa

    rfb975a50 r455a7d5  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // heap.c -- 
    8 // 
     6//
     7// heap.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Tue Dec 19 21:58:35 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul 26 22:28:23 2018
    13 // Update Count     : 449
    14 // 
     12// Last Modified On : Tue Jul 31 18:08:50 2018
     13// Update Count     : 470
     14//
    1515
    1616#include <unistd.h>                                                                             // sbrk, sysconf
     
    2222} // extern "C"
    2323
    24 #include "bits/align.h"                                                                 // libPow2
    25 #include "bits/defs.h"                                                                  // likely, unlikely
    26 #include "bits/locks.h"                                                                 // __spinlock_t
    27 #include "startup.h"                                                                    // STARTUP_PRIORITY_MEMORY
    28 #include "stdlib"                                                                               // bsearchl
     24#include "bits/align.hfa"                                                                       // libPow2
     25#include "bits/defs.hfa"                                                                        // likely, unlikely
     26#include "bits/locks.hfa"                                                                       // __spinlock_t
     27#include "startup.hfa"                                                                  // STARTUP_PRIORITY_MEMORY
     28#include "stdlib.hfa"                                                                           // bsearchl
    2929#include "malloc.h"
    3030
     
    9494
    9595
    96 // static _Bool prtHeapTerm = false;
    97 
    98 // inline _Bool prtHeapTerm() {
    99 //      return prtHeapTerm;
    100 // } // prtHeapTerm
    101 
    102 // _Bool prtHeapTermOn() {
    103 //      _Bool temp = traceHeap;
    104 //      traceHeap = true;
     96static _Bool checkFree = false;
     97
     98inline _Bool checkFree() {
     99        return checkFree;
     100} // checkFree
     101
     102_Bool checkFreeOn() {
     103        _Bool temp = checkFree;
     104        checkFree = true;
     105        return temp;
     106} // checkFreeOn
     107
     108_Bool checkFreeOff() {
     109        _Bool temp = checkFree;
     110        checkFree = false;
     111        return temp;
     112} // checkFreeOff
     113
     114
     115// static _Bool traceHeapTerm = false;
     116
     117// inline _Bool traceHeapTerm() {
     118//      return traceHeapTerm;
     119// } // traceHeapTerm
     120
     121// _Bool traceHeapTermOn() {
     122//      _Bool temp = traceHeapTerm;
     123//      traceHeapTerm = true;
    105124//      return temp;
    106 // } // prtHeapTermOn
    107 
    108 // _Bool prtHeapTermOff() {
    109 //      _Bool temp = traceHeap;
    110 //      traceHeap = false;
     125// } // traceHeapTermOn
     126
     127// _Bool traceHeapTermOff() {
     128//      _Bool temp = traceHeapTerm;
     129//      traceHeapTerm = false;
    111130//      return temp;
    112 // } // prtHeapTermOff
     131// } // traceHeapTermOff
    113132
    114133
     
    139158} // extern "C"
    140159#endif // __CFA_DEBUG__
    141 
    142 
    143 // statically allocated variables => zero filled.
    144 
    145 static size_t pageSize;                                                                 // architecture pagesize
    146 static size_t heapExpand;                                                               // sbrk advance
    147 static size_t mmapStart;                                                                // cross over point for mmap
    148 static unsigned int maxBucketsUsed;                                             // maximum number of buckets in use
    149 static unsigned int bucketSizes[NoBucketSizes] = {              // different bucket sizes
    150     16, 32, 48, 64,
    151     80, 96, 112, 128, 144, 160, 192, 224,
    152     256, 320, 384, 448, 512, 640, 768, 896,
    153     1024, 1536, 2048, 2560, 3072, 3584, 4096, 6144,
    154     8192, 9216, 10240, 11264, 12288, 13312, 14336, 15360,
    155     16384, 18432, 20480, 22528, 24576, 26624, 28672, 30720,
    156     32768, 36864, 40960, 45056, 49152, 53248, 57344, 61440,
    157     65536, 73728, 81920, 90112, 98304, 106496, 114688, 122880,
    158     131072, 147456, 163840, 180224, 196608, 212992, 229376, 245760,
    159     262144, 294912, 327680, 360448, 393216, 425984, 458752, 491520,
    160     524288, 655360, 786432, 917504, 1048576, 1179648, 1310720, 1441792,
    161     1572864, 1703936, 1835008, 1966080, 2097152, 2621440, 3145728, 3670016,
    162     4194304
    163 };
    164 #ifdef FASTLOOKUP
    165 static unsigned char lookup[LookupSizes];                               // O(1) lookup for small sizes
    166 #endif // FASTLOOKUP
    167 static int mmapFd = -1;                                                                 // fake or actual fd for anonymous file
    168160
    169161
     
    240232}; // HeapManager
    241233
     234static inline size_t getKey( const HeapManager.FreeHeader & freeheader ) { return freeheader.blockSize; }
     235// statically allocated variables => zero filled.
     236
     237
     238static size_t pageSize;                                                                 // architecture pagesize
     239static size_t heapExpand;                                                               // sbrk advance
     240static size_t mmapStart;                                                                // cross over point for mmap
     241static unsigned int maxBucketsUsed;                                             // maximum number of buckets in use
     242
     243// Powers of 2 are common allocation sizes, so make powers of 2 generate the minimum required size.
     244static unsigned int bucketSizes[NoBucketSizes] @= {             // different bucket sizes
     245    16, 32, 48, 64,
     246    64 + sizeof(HeapManager.Storage), 96, 112, 128, 128 + sizeof(HeapManager.Storage), 160, 192, 224,
     247    256 + sizeof(HeapManager.Storage), 320, 384, 448, 512 + sizeof(HeapManager.Storage), 640, 768, 896,
     248    1_024 + sizeof(HeapManager.Storage), 1_536, 2_048 + sizeof(HeapManager.Storage), 2_560, 3_072, 3_584, 4_096 + sizeof(HeapManager.Storage), 6_144,
     249    8_192 + sizeof(HeapManager.Storage), 9_216, 10_240, 11_264, 12_288, 13_312, 14_336, 15_360,
     250    16_384 + sizeof(HeapManager.Storage), 18_432, 20_480, 22_528, 24_576, 26_624, 28_672, 30_720,
     251    32_768 + sizeof(HeapManager.Storage), 36_864, 40_960, 45_056, 49_152, 53_248, 57_344, 61_440,
     252    65_536 + sizeof(HeapManager.Storage), 73_728, 81_920, 90_112, 98_304, 106_496, 114_688, 122_880,
     253    131_072 + sizeof(HeapManager.Storage), 147_456, 163_840, 180_224, 196_608, 212_992, 229_376, 245_760,
     254    262_144 + sizeof(HeapManager.Storage), 294_912, 327_680, 360_448, 393_216, 425_984, 458_752, 491_520,
     255    524_288 + sizeof(HeapManager.Storage), 655_360, 786_432, 917_504, 1_048_576 + sizeof(HeapManager.Storage), 1_179_648, 1_310_720, 1_441_792,
     256    1_572_864, 1_703_936, 1_835_008, 1_966_080, 2_097_152 + sizeof(HeapManager.Storage), 2_621_440, 3_145_728, 3_670_016,
     257    4_194_304 + sizeof(HeapManager.Storage)
     258};
     259#ifdef FASTLOOKUP
     260static unsigned char lookup[LookupSizes];                               // O(1) lookup for small sizes
     261#endif // FASTLOOKUP
     262static int mmapFd = -1;                                                                 // fake or actual fd for anonymous file
     263
     264
     265#ifdef __CFA_DEBUG__
     266static _Bool heapBoot = 0;                                                              // detect recursion during boot
     267#endif // __CFA_DEBUG__
     268static HeapManager heapManager __attribute__(( aligned (128) )) @= {}; // size of cache line to prevent false sharing
     269
    242270
    243271static inline _Bool setMmapStart( size_t value ) {
     
    255283static void ?{}( HeapManager & manager ) with ( manager ) {
    256284    pageSize = sysconf( _SC_PAGESIZE );
    257    
     285
    258286    for ( unsigned int i = 0; i < NoBucketSizes; i += 1 ) { // initialize the free lists
    259287                freeLists[i].blockSize = bucketSizes[i];
     
    281309static void ^?{}( HeapManager & ) {
    282310        #ifdef __STATISTICS__
    283         // if ( prtHeapTerm() ) {
     311        // if ( traceHeapTerm() ) {
    284312        //      printStats();
    285         //      checkFree( heapManager, true );
     313        //      if ( checkfree() ) checkFree( heapManager, true );
    286314        // } // if
    287315        #endif // __STATISTICS__
    288316} // ~HeapManager
    289317
    290 
    291 #ifdef __CFA_DEBUG__
    292 static _Bool heapBoot = 0;                                                              // detect recursion during boot
    293 #endif // __CFA_DEBUG__
    294 static HeapManager heapManager __attribute__(( aligned (128) )) @= {}; // size of cache line to prevent false sharing
    295318
    296319static void memory_startup( void ) __attribute__(( constructor( STARTUP_PRIORITY_MEMORY ) ));
     
    312335        ^heapManager{};
    313336} // memory_shutdown
    314 
    315 static inline size_t getKey( const HeapManager.FreeHeader & freeheader ) { return freeheader.blockSize; }
    316337
    317338
     
    342363static void printStats() {
    343364    char helpText[512];
    344     int len = snprintf( helpText, 512,
    345                                                 "\nHeap statistics:\n"
    346                                                 "  malloc: calls %u / storage %llu\n"
    347                                                 "  calloc: calls %u / storage %llu\n"
    348                                                 "  memalign: calls %u / storage %llu\n"
    349                                                 "  cmemalign: calls %u / storage %llu\n"
    350                                                 "  realloc: calls %u / storage %llu\n"
    351                                                 "  free: calls %u / storage %llu\n"
    352                                                 "  mmap: calls %u / storage %llu\n"
    353                                                 "  munmap: calls %u / storage %llu\n"
    354                                                 "  sbrk: calls %u / storage %llu\n",
    355                                                 malloc_calls, malloc_storage,
    356                                                 calloc_calls, calloc_storage,
    357                                                 memalign_calls, memalign_storage,
    358                                                 cmemalign_calls, cmemalign_storage,
    359                                                 realloc_calls, realloc_storage,
    360                                                 free_calls, free_storage,
    361                                                 mmap_calls, mmap_storage,
    362                                                 munmap_calls, munmap_storage,
    363                                                 sbrk_calls, sbrk_storage
     365        __cfaabi_dbg_bits_print_buffer( helpText, 512,
     366                        "\nHeap statistics:\n"
     367                        "  malloc: calls %u / storage %llu\n"
     368                        "  calloc: calls %u / storage %llu\n"
     369                        "  memalign: calls %u / storage %llu\n"
     370                        "  cmemalign: calls %u / storage %llu\n"
     371                        "  realloc: calls %u / storage %llu\n"
     372                        "  free: calls %u / storage %llu\n"
     373                        "  mmap: calls %u / storage %llu\n"
     374                        "  munmap: calls %u / storage %llu\n"
     375                        "  sbrk: calls %u / storage %llu\n",
     376                        malloc_calls, malloc_storage,
     377                        calloc_calls, calloc_storage,
     378                        memalign_calls, memalign_storage,
     379                        cmemalign_calls, cmemalign_storage,
     380                        realloc_calls, realloc_storage,
     381                        free_calls, free_storage,
     382                        mmap_calls, mmap_storage,
     383                        munmap_calls, munmap_storage,
     384                        sbrk_calls, sbrk_storage
    364385                );
    365     write( statfd, helpText, len );
    366386} // printStats
    367387
     
    637657
    638658
    639 size_t checkFree( HeapManager & manager, _Bool prt ) with ( manager ) {
     659size_t checkFree( HeapManager & manager ) with ( manager ) {
    640660    size_t total = 0;
    641661        #ifdef __STATISTICS__
    642662    __cfaabi_dbg_bits_acquire();
    643     if ( prt ) __cfaabi_dbg_bits_print_nolock( "\nBin lists (bin size : free blocks on list)\n" );
     663    __cfaabi_dbg_bits_print_nolock( "\nBin lists (bin size : free blocks on list)\n" );
    644664        #endif // __STATISTICS__
    645665    for ( unsigned int i = 0; i < maxBucketsUsed; i += 1 ) {
     
    659679            } // for
    660680                #ifdef __STATISTICS__
    661             if ( prt ) __cfaabi_dbg_bits_print_nolock( "%7zu, %-7u  ", size, N );
     681            __cfaabi_dbg_bits_print_nolock( "%7zu, %-7u  ", size, N );
    662682            if ( (i + 1) % 8 == 0 ) __cfaabi_dbg_bits_print_nolock( "\n" );
    663683                #endif // __STATISTICS__
    664684        } // for
    665685        #ifdef __STATISTICS__
    666         if ( prt ) __cfaabi_dbg_bits_print_nolock( "\ntotal free blocks:%zu\n", total );
     686        __cfaabi_dbg_bits_print_nolock( "\ntotal free blocks:%zu\n", total );
    667687        __cfaabi_dbg_bits_release();
    668688        #endif // __STATISTICS__
     
    740760                _Bool mapped __attribute__(( unused )) = headers( "calloc", area, header, freeElem, asize, alignment );
    741761                #ifndef __CFA_DEBUG__
    742                 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 
     762                // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero.
    743763                if ( ! mapped )
    744764                #endif // __CFA_DEBUG__
     
    763783                _Bool mapped __attribute__(( unused )) = headers( "cmemalign", area, header, freeElem, asize, alignment );
    764784                #ifndef __CFA_DEBUG__
    765                 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 
     785                // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero.
    766786                if ( ! mapped )
    767787                #endif // __CFA_DEBUG__
     
    808828                        _Bool mapped __attribute__(( unused )) = headers( "realloc", area, header, freeElem, asize, alignment );
    809829                        #ifndef __CFA_DEBUG__
    810                         // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 
     830                        // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero.
    811831                        if ( ! mapped )
    812832                        #endif // __CFA_DEBUG__
     
    922942                #ifdef __STATISTICS__
    923943                printStats();
    924                 checkFree( heapManager, true );
     944                if ( checkFree() ) checkFree( heapManager );
    925945                #endif // __STATISTICS__
    926946    } // malloc_stats
  • libcfa/src/interpose.cfa

    rfb975a50 r455a7d5  
    2525}
    2626
    27 #include "bits/debug.h"
    28 #include "bits/defs.h"
    29 #include "bits/signal.h"                                                                // sigHandler_?
    30 #include "startup.h"                                                                    // STARTUP_PRIORITY_CORE
     27#include "bits/debug.hfa"
     28#include "bits/defs.hfa"
     29#include "bits/signal.hfa"                                                              // sigHandler_?
     30#include "startup.hfa"                                                                  // STARTUP_PRIORITY_CORE
    3131
    3232//=============================================================================================
  • libcfa/src/iostream.cfa

    rfb975a50 r455a7d5  
    1414//
    1515
    16 #include "iostream"
     16#include "iostream.hfa"
    1717
    1818extern "C" {
  • libcfa/src/iostream.hfa

    rfb975a50 r455a7d5  
    1616#pragma once
    1717
    18 #include "iterator"
     18#include "iterator.hfa"
    1919
    2020trait ostream( dtype ostype ) {
     
    164164
    165165
    166 #include <time_t.h>                                                                             // Duration (constructors) / Time (constructors)
     166#include <time_t.hfa>                                                                           // Duration (constructors) / Time (constructors)
    167167
    168168forall( dtype ostype | ostream( ostype ) ) ostype & ?|?( ostype & os, Duration dur );
  • libcfa/src/iterator.cfa

    rfb975a50 r455a7d5  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // iterator.c -- 
     7// iterator.c --
    88//
    99// Author           : Richard C. Bilson
     
    1414//
    1515
    16 #include "iterator"
     16#include "iterator.hfa"
    1717
    1818forall( otype iterator_type, otype elt_type | iterator( iterator_type, elt_type ) )
  • libcfa/src/limits.cfa

    rfb975a50 r455a7d5  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // limits.c -- 
    8 // 
     6//
     7// limits.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Wed Apr  6 18:06:52 2016
     
    1212// Last Modified On : Thu Mar  1 16:22:51 2018
    1313// Update Count     : 74
    14 // 
     14//
    1515
    1616#include <limits.h>
     
    1919#include <math.h>
    2020#include <complex.h>
    21 #include "limits"
     21#include "limits.hfa"
    2222
    2323// Integral Constants
  • libcfa/src/math.hfa

    rfb975a50 r455a7d5  
    350350//---------------------------------------
    351351
    352 #include "common"
     352#include "common.hfa"
    353353
    354354//---------------------------------------
  • libcfa/src/rational.cfa

    rfb975a50 r455a7d5  
    1414//
    1515
    16 #include "rational"
    17 #include "fstream"
    18 #include "stdlib"
     16#include "rational.hfa"
     17#include "fstream.hfa"
     18#include "stdlib.hfa"
    1919
    2020forall( otype RationalImpl | arithmetic( RationalImpl ) ) {
  • libcfa/src/rational.hfa

    rfb975a50 r455a7d5  
    1818#pragma once
    1919
    20 #include "iostream"
     20#include "iostream.hfa"
    2121
    2222trait scalar( otype T ) {
  • libcfa/src/startup.cfa

    rfb975a50 r455a7d5  
    1414//
    1515
    16 #include "startup.h"
     16#include "startup.hfa"
    1717#include <unistd.h>
    1818
     
    4040
    4141struct __spinlock_t;
    42 void __cfaabi_dbg_record(struct __spinlock_t & this, const char * prev_name) __attribute__(( weak )) {}
     42extern "C" {
     43        void __cfaabi_dbg_record(struct __spinlock_t & this, const char * prev_name) __attribute__(( weak )) {}
     44}
    4345
    4446// Local Variables: //
  • libcfa/src/startup.hfa

    rfb975a50 r455a7d5  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // startup.h --
     7// startup.hfa --
    88//
    99// Author           : Thierry Delisle
  • libcfa/src/stdhdr/malloc.h

    rfb975a50 r455a7d5  
    1010// Created On       : Thu Jul 20 15:58:16 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jul 23 18:20:32 2018
    13 // Update Count     : 8
     12// Last Modified On : Tue Jul 31 10:01:10 2018
     13// Update Count     : 9
    1414//
    1515
     
    1717size_t default_mmap_start();                                                    // CFA extras
    1818size_t default_heap_expansion();
     19
     20_Bool traceHeap();
     21_Bool traceHeapOn();
     22_Bool traceHeapOff();
     23
     24_Bool traceHeapTerm();
     25_Bool traceHeapTermOn();
     26_Bool traceHeapTermOff();
     27
     28_Bool checkFree();
     29_Bool checkFreeOn();
     30_Bool checkFreeOff();
     31
    1932extern "C" {
    2033size_t malloc_alignment( void * );
  • libcfa/src/stdlib.cfa

    rfb975a50 r455a7d5  
    1414//
    1515
    16 #include "stdlib"
     16#include "stdlib.hfa"
    1717
    1818//---------------------------------------
  • libcfa/src/stdlib.hfa

    rfb975a50 r455a7d5  
    251251//---------------------------------------
    252252
    253 #include "common"
     253#include "common.hfa"
    254254
    255255// Local Variables: //
  • libcfa/src/time.cfa

    rfb975a50 r455a7d5  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // time.c -- 
    8 // 
     6//
     7// time.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Tue Mar 27 13:33:14 2018
     
    1212// Last Modified On : Sun May  6 22:26:00 2018
    1313// Update Count     : 37
    14 // 
     14//
    1515
    16 #include "time"
    17 #include "iostream"
     16#include "time.hfa"
     17#include "iostream.hfa"
    1818#include <stdio.h>                                                                              // snprintf
    1919#include <assert.h>
  • libcfa/src/time.hfa

    rfb975a50 r455a7d5  
    2323#include <sys/time.h>                                                                   // timeval
    2424}
    25 #include <time_t.h>                                                                             // Duration/Time types
     25#include <time_t.hfa>                                                                           // Duration/Time types
    2626
    2727enum { TIMEGRAN = 1_000_000_000LL };                                    // nanosecond granularity, except for timeval
  • libcfa/src/time_t.hfa

    rfb975a50 r455a7d5  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // time_t.h --
    8 // 
     6//
     7// time_t.hfa --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Tue Apr 10 14:42:03 2018
     
    1212// Last Modified On : Fri Apr 13 07:51:47 2018
    1313// Update Count     : 6
    14 // 
     14//
    1515
    1616#pragma once
Note: See TracChangeset for help on using the changeset viewer.