- Timestamp:
- Aug 9, 2018, 6:35:02 PM (7 years ago)
- 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. - Location:
- libcfa
- Files:
-
- 15 added
- 120 moved
Legend:
- Unmodified
- Added
- Removed
-
libcfa/prelude/Makefile.am
rfb975a50 r455a7d5 21 21 cfalibdir = ${CFA_LIBDIR} 22 22 cfalib_DATA = gcc-builtins.cf builtins.cf extras.cf prelude.cf bootloader.c 23 noinst_DATA = ../ libcfa/libcfa-prelude.c23 noinst_DATA = ../src/prelude.c 24 24 25 CC = ${abs_top_builddir}/src/driver/cfa 25 CC = @CFACC@ 26 AM_CFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@ 27 AM_CFAFLAGS = @CONFIG_CFAFLAGS@ 26 28 27 29 $(DEPDIR) : … … 33 35 # create extra forward types/declarations to reduce inclusion of library files 34 36 extras.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.cf37 ${AM_V_GEN}gcc ${AM_CFLAGS} -E ${srcdir}/extras.c | grep -f ${srcdir}/extras.regx > extras.cf 36 38 37 39 # create forward declarations for gcc builtins 38 40 gcc-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 > $@ 40 42 41 43 gcc-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 > $@ 43 45 44 46 prelude.cf : prelude-gen.cc 45 ${AM_V_GEN}${CXX} ${AM_CXXFLAGS} ${CXXFLAGS} ${ <} -o prelude-gen -Wall -Wextra -O2 -g -std=c++1447 ${AM_V_GEN}${CXX} ${AM_CXXFLAGS} ${CXXFLAGS} ${AM_CFLAGS} ${<} -o prelude-gen -Wall -Wextra -O2 -g -std=c++14 46 48 @./prelude-gen > $@ 47 49 @rm ./prelude-gen … … 53 55 # create forward declarations for cfa builtins 54 56 builtins.cf : builtins.c ${CC} 55 ${AM_V_GEN} ${CC} -E -P ${<} -o ${@} -MD -MP -MF $(DEPDIR)/builtins.Po57 ${AM_V_GEN}gcc ${AM_CFLAGS} -E -P ${<} -o ${@} -MD -MP -MF $(DEPDIR)/builtins.Po 56 58 ${AM_V_at}sed -i 's/builtins.o/builtins.cf/g' $(DEPDIR)/builtins.Po 57 59 58 60 include $(DEPDIR)/builtins.Po 59 61 60 ../ libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp61 ${AM_V_GEN} ${abs_top_builddir}/src/driver/cfa-cpp-l prelude.cf $@ # use src/cfa-cpp as not in lib until after install62 ../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 62 64 63 bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp64 ${AM_V_GEN} ${abs_top_builddir}/src/driver/cfa-cpp-tpm ${srcdir}/bootloader.cf $@ # use src/cfa-cpp as not in lib until after install65 bootloader.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 65 67 66 68 maintainer-clean-local : 67 69 rm -rf $(DEPDIR) 68 70 69 MAINTAINERCLEANFILES = gcc-builtins.c gcc-builtins.cf builtins.cf extras.cf bootloader.c prelude.cf ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}} 71 MOSTLYCLEANFILES = bootloader.c builtins.cf extras.cf gcc-builtins.c gcc-builtins.cf prelude.cf 72 MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}} -
libcfa/prelude/Makefile.in
rfb975a50 r455a7d5 90 90 PRE_UNINSTALL = : 91 91 POST_UNINSTALL = : 92 build_triplet = @build@ 93 host_triplet = @host@ 94 subdir = src/prelude 92 subdir = prelude 95 93 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 96 am__aclocal_m4_deps = $(top_srcdir)/configure.ac 94 am__aclocal_m4_deps = $(top_srcdir)/../automake/cfa.m4 \ 95 $(top_srcdir)/configure.ac 97 96 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 98 97 $(ACLOCAL_M4) 99 98 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 100 99 mkinstalldirs = $(install_sh) -d 101 CONFIG_HEADER = $(top_builddir)/config.h102 100 CONFIG_CLEAN_FILES = 103 101 CONFIG_CLEAN_VPATH_FILES = … … 154 152 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 155 153 ACLOCAL = @ACLOCAL@ 156 ALLOCA = @ALLOCA@157 154 AMTAR = @AMTAR@ 158 155 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 156 ARCHITECTURE = @ARCHITECTURE@ 157 ARCH_FLAGS = @ARCH_FLAGS@ 159 158 AUTOCONF = @AUTOCONF@ 160 159 AUTOHEADER = @AUTOHEADER@ 161 160 AUTOMAKE = @AUTOMAKE@ 162 161 AWK = @AWK@ 163 BACKEND_CC = @BACKEND_CC@ 164 CC = ${abs_top_builddir}/src/driver/cfa 162 CC = @CFACC@ 165 163 CCAS = @CCAS@ 166 164 CCASDEPMODE = @CCASDEPMODE@ 167 165 CCASFLAGS = @CCASFLAGS@ 168 166 CCDEPMODE = @CCDEPMODE@ 169 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 167 CFACC = @CFACC@ 168 CFACPP = @CFACPP@ 170 169 CFA_BINDIR = @CFA_BINDIR@ 171 CFA_FLAGS = @CFA_FLAGS@172 170 CFA_INCDIR = @CFA_INCDIR@ 173 171 CFA_LIBDIR = @CFA_LIBDIR@ … … 175 173 CFA_PREFIX = @CFA_PREFIX@ 176 174 CFLAGS = @CFLAGS@ 177 CPP = @CPP@ 175 CONFIGURATION = @CONFIGURATION@ 176 CONFIG_CFAFLAGS = @CONFIG_CFAFLAGS@ 177 CONFIG_CFLAGS = @CONFIG_CFLAGS@ 178 178 CPPFLAGS = @CPPFLAGS@ 179 179 CXX = @CXX@ … … 183 183 DEFS = @DEFS@ 184 184 DEPDIR = @DEPDIR@ 185 DRIVER_DIR = @DRIVER_DIR@ 185 186 ECHO_C = @ECHO_C@ 186 187 ECHO_N = @ECHO_N@ 187 188 ECHO_T = @ECHO_T@ 188 EGREP = @EGREP@189 189 EXEEXT = @EXEEXT@ 190 GREP = @GREP@191 190 INSTALL = @INSTALL@ 192 191 INSTALL_DATA = @INSTALL_DATA@ … … 195 194 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 196 195 LDFLAGS = @LDFLAGS@ 197 LEX = @LEX@198 LEXLIB = @LEXLIB@199 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@200 196 LIBOBJS = @LIBOBJS@ 201 197 LIBS = @LIBS@ 202 198 LTLIBOBJS = @LTLIBOBJS@ 203 MACHINE_TYPE = @MACHINE_TYPE@204 199 MAKEINFO = @MAKEINFO@ 205 200 MKDIR_P = @MKDIR_P@ … … 218 213 STRIP = @STRIP@ 219 214 VERSION = @VERSION@ 220 YACC = @YACC@221 YFLAGS = @YFLAGS@222 215 abs_builddir = @abs_builddir@ 223 216 abs_srcdir = @abs_srcdir@ … … 232 225 am__untar = @am__untar@ 233 226 bindir = @bindir@ 234 build = @build@235 227 build_alias = @build_alias@ 236 build_cpu = @build_cpu@237 build_os = @build_os@238 build_vendor = @build_vendor@239 228 builddir = @builddir@ 240 229 datadir = @datadir@ … … 243 232 dvidir = @dvidir@ 244 233 exec_prefix = @exec_prefix@ 245 host = @host@246 234 host_alias = @host_alias@ 247 host_cpu = @host_cpu@248 host_os = @host_os@249 host_vendor = @host_vendor@250 235 htmldir = @htmldir@ 251 236 includedir = @includedir@ … … 279 264 cfalibdir = ${CFA_LIBDIR} 280 265 cfalib_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}} 266 noinst_DATA = ../src/prelude.c 267 AM_CFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@ 268 AM_CFAFLAGS = @CONFIG_CFAFLAGS@ 269 MOSTLYCLEANFILES = bootloader.c builtins.cf extras.cf gcc-builtins.c gcc-builtins.cf prelude.cf 270 MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}} 283 271 all: all-am 284 272 … … 293 281 esac; \ 294 282 done; \ 295 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/prelude/Makefile'; \283 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign prelude/Makefile'; \ 296 284 $(am__cd) $(top_srcdir) && \ 297 $(AUTOMAKE) --foreign src/prelude/Makefile285 $(AUTOMAKE) --foreign prelude/Makefile 298 286 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 299 287 @case '$?' in \ … … 398 386 fi 399 387 mostlyclean-generic: 388 -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) 400 389 401 390 clean-generic: … … 501 490 # create extra forward types/declarations to reduce inclusion of library files 502 491 extras.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.cf492 ${AM_V_GEN}gcc ${AM_CFLAGS} -E ${srcdir}/extras.c | grep -f ${srcdir}/extras.regx > extras.cf 504 493 505 494 # create forward declarations for gcc builtins 506 495 gcc-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 > $@ 508 497 509 498 gcc-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 > $@ 511 500 512 501 prelude.cf : prelude-gen.cc 513 ${AM_V_GEN}${CXX} ${AM_CXXFLAGS} ${CXXFLAGS} ${ <} -o prelude-gen -Wall -Wextra -O2 -g -std=c++14502 ${AM_V_GEN}${CXX} ${AM_CXXFLAGS} ${CXXFLAGS} ${AM_CFLAGS} ${<} -o prelude-gen -Wall -Wextra -O2 -g -std=c++14 514 503 @./prelude-gen > $@ 515 504 @rm ./prelude-gen … … 521 510 # create forward declarations for cfa builtins 522 511 builtins.cf : builtins.c ${CC} 523 ${AM_V_GEN} ${CC} -E -P ${<} -o ${@} -MD -MP -MF $(DEPDIR)/builtins.Po512 ${AM_V_GEN}gcc ${AM_CFLAGS} -E -P ${<} -o ${@} -MD -MP -MF $(DEPDIR)/builtins.Po 524 513 ${AM_V_at}sed -i 's/builtins.o/builtins.cf/g' $(DEPDIR)/builtins.Po 525 514 526 515 include $(DEPDIR)/builtins.Po 527 516 528 ../ libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp529 ${AM_V_GEN} ${abs_top_builddir}/src/driver/cfa-cpp-l prelude.cf $@ # use src/cfa-cpp as not in lib until after install530 531 bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp532 ${AM_V_GEN} ${abs_top_builddir}/src/driver/cfa-cpp-tpm ${srcdir}/bootloader.cf $@ # use src/cfa-cpp as not in lib until after install517 ../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 520 bootloader.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 533 522 534 523 maintainer-clean-local : -
libcfa/prelude/builtins.c
rfb975a50 r455a7d5 10 10 // Created On : Fri Jul 21 16:21:03 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 8 12:47:59201813 // Update Count : 1912 // Last Modified On : Sun Aug 5 21:40:38 2018 13 // Update Count : 20 14 14 // 15 15 … … 18 18 typedef unsigned long long __cfaabi_abi_exception_type_t; 19 19 20 #include "../ libcfa/virtual.h"21 #include "../ libcfa/exception.h"20 #include "../src/virtual.h" 21 #include "../src/exception.h" 22 22 23 23 void exit( int status, const char fmt[], ... ) __attribute__ (( format(printf, 2, 3), __nothrow__, __leaf__, __noreturn__ )); 24 void abort 24 void abort( const char fmt[], ... ) __attribute__ (( format(printf, 1, 2), __nothrow__, __leaf__, __noreturn__ )); 25 25 26 26 // increment/decrement unification -
libcfa/src/Makefile.in
rfb975a50 r455a7d5 17 17 ######################## -*- Mode: Makefile-Automake -*- ###################### 18 18 ############################################################################### 19 19 20 20 21 VPATH = @srcdir@ … … 90 91 PRE_UNINSTALL = : 91 92 POST_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 93 subdir = src 97 94 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 98 am__aclocal_m4_deps = $(top_srcdir)/configure.ac 95 am__aclocal_m4_deps = $(top_srcdir)/../automake/cfa.m4 \ 96 $(top_srcdir)/configure.ac 99 97 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 100 98 $(ACLOCAL_M4) 101 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 99 DIST_COMMON = $(srcdir)/Makefile.am $(nobase_cfa_include_HEADERS) \ 100 $(am__DIST_COMMON) 102 101 mkinstalldirs = $(install_sh) -d 103 CONFIG_HEADER = $(top_builddir)/config.h104 102 CONFIG_CLEAN_FILES = 105 103 CONFIG_CLEAN_VPATH_FILES = 106 PROGRAMS = $(noinst_PROGRAMS) 107 Bench_SOURCES = Bench.c 108 Bench_OBJECTS = Bench.$(OBJEXT) 109 Bench_LDADD = $(LDADD) 104 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; 105 am__vpath_adj = case $$p in \ 106 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ 107 *) f=$$p;; \ 108 esac; 109 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; 110 am__install_max = 40 111 am__nobase_strip_setup = \ 112 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` 113 am__nobase_strip = \ 114 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" 115 am__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] }' 122 am__base_list = \ 123 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ 124 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' 125 am__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 } 131 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cfa_includedir)" 132 LIBRARIES = $(lib_LIBRARIES) 133 AR = ar 134 AM_V_AR = $(am__v_AR_@AM_V@) 135 am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) 136 am__v_AR_0 = @echo " AR " $@; 137 am__v_AR_1 = 138 libcfa_a_AR = $(AR) $(ARFLAGS) 139 libcfa_a_LIBADD = 110 140 am__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) 141 am__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) 149 am__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) 156 am_libcfa_a_OBJECTS = $(am__objects_2) 157 libcfa_a_OBJECTS = $(am_libcfa_a_OBJECTS) 124 158 AM_V_P = $(am__v_P_@AM_V@) 125 159 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) … … 134 168 am__v_at_0 = @ 135 169 am__v_at_1 = 136 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)137 depcomp = $(SHELL) $(top_srcdir)/ automake/depcomp170 DEFAULT_INCLUDES = -I.@am__isrc@ 171 depcomp = $(SHELL) $(top_srcdir)/./automake/depcomp 138 172 am__depfiles_maybe = depfiles 139 173 am__mv = mv -f 174 CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 175 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) 176 AM_V_CPPAS = $(am__v_CPPAS_@AM_V@) 177 am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@) 178 am__v_CPPAS_0 = @echo " CPPAS " $@; 179 am__v_CPPAS_1 = 140 180 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 141 181 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) … … 150 190 am__v_CCLD_0 = @echo " CCLD " $@; 151 191 am__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) 192 SOURCES = $(libcfa_a_SOURCES) 193 DIST_SOURCES = $(libcfa_a_SOURCES) 156 194 am__can_run_installinfo = \ 157 195 case $$AM_UPDATE_INFO_DIR in \ … … 159 197 *) (install-info --version) >/dev/null 2>&1;; \ 160 198 esac 199 HEADERS = $(nobase_cfa_include_HEADERS) 161 200 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) 162 201 # Read a list of newline-separated strings from the standard input, … … 178 217 ETAGS = etags 179 218 CTAGS = ctags 180 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/automake/depcomp 219 am__DIST_COMMON = $(srcdir)/../../src/cfa.make $(srcdir)/Makefile.in \ 220 $(top_srcdir)/./automake/depcomp 181 221 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 182 222 ACLOCAL = @ACLOCAL@ 183 ALLOCA = @ALLOCA@184 223 AMTAR = @AMTAR@ 185 224 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 225 ARCHITECTURE = @ARCHITECTURE@ 226 ARCH_FLAGS = @ARCH_FLAGS@ 186 227 AUTOCONF = @AUTOCONF@ 187 228 AUTOHEADER = @AUTOHEADER@ 188 229 AUTOMAKE = @AUTOMAKE@ 189 230 AWK = @AWK@ 190 BACKEND_CC = @BACKEND_CC@ 191 CC = @CFA_BINDIR@/@CFA_NAME@ 231 CC = @CC@ 192 232 CCAS = @CCAS@ 193 233 CCASDEPMODE = @CCASDEPMODE@ 194 234 CCASFLAGS = @CCASFLAGS@ 195 235 CCDEPMODE = @CCDEPMODE@ 196 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 236 CFACC = @CFACC@ 237 CFACPP = @CFACPP@ 197 238 CFA_BINDIR = @CFA_BINDIR@ 198 CFA_FLAGS = @CFA_FLAGS@199 239 CFA_INCDIR = @CFA_INCDIR@ 200 240 CFA_LIBDIR = @CFA_LIBDIR@ 201 241 CFA_NAME = @CFA_NAME@ 202 242 CFA_PREFIX = @CFA_PREFIX@ 203 204 # applies to both programs 205 C FLAGS =206 C PP = @CPP@243 CFLAGS = @CFLAGS@ 244 CONFIGURATION = @CONFIGURATION@ 245 CONFIG_CFAFLAGS = @CONFIG_CFAFLAGS@ 246 CONFIG_CFLAGS = @CONFIG_CFLAGS@ 207 247 CPPFLAGS = @CPPFLAGS@ 208 248 CXX = @CXX@ … … 212 252 DEFS = @DEFS@ 213 253 DEPDIR = @DEPDIR@ 254 DRIVER_DIR = @DRIVER_DIR@ 214 255 ECHO_C = @ECHO_C@ 215 256 ECHO_N = @ECHO_N@ 216 257 ECHO_T = @ECHO_T@ 217 EGREP = @EGREP@218 258 EXEEXT = @EXEEXT@ 219 GREP = @GREP@220 259 INSTALL = @INSTALL@ 221 260 INSTALL_DATA = @INSTALL_DATA@ … … 224 263 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 225 264 LDFLAGS = @LDFLAGS@ 226 LEX = @LEX@227 LEXLIB = @LEXLIB@228 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@229 265 LIBOBJS = @LIBOBJS@ 230 266 LIBS = @LIBS@ 231 267 LTLIBOBJS = @LTLIBOBJS@ 232 MACHINE_TYPE = @MACHINE_TYPE@233 268 MAKEINFO = @MAKEINFO@ 234 269 MKDIR_P = @MKDIR_P@ … … 247 282 STRIP = @STRIP@ 248 283 VERSION = @VERSION@ 249 YACC = @YACC@250 YFLAGS = @YFLAGS@251 284 abs_builddir = @abs_builddir@ 252 285 abs_srcdir = @abs_srcdir@ … … 261 294 am__untar = @am__untar@ 262 295 bindir = @bindir@ 263 build = @build@264 296 build_alias = @build_alias@ 265 build_cpu = @build_cpu@266 build_os = @build_os@267 build_vendor = @build_vendor@268 297 builddir = @builddir@ 269 298 datadir = @datadir@ … … 272 301 dvidir = @dvidir@ 273 302 exec_prefix = @exec_prefix@ 274 host = @host@275 303 host_alias = @host_alias@ 276 host_cpu = @host_cpu@277 host_os = @host_os@278 host_vendor = @host_vendor@279 304 htmldir = @htmldir@ 280 305 includedir = @includedir@ 281 306 infodir = @infodir@ 282 307 install_sh = @install_sh@ 283 libdir = @libdir@308 libdir = ${CFA_LIBDIR} 284 309 libexecdir = @libexecdir@ 285 310 localedir = @localedir@ … … 301 326 top_builddir = @top_builddir@ 302 327 top_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 330 AUTOMAKE_OPTIONS = subdir-objects 331 ARFLAGS = cr 332 CFACOMPILE = $(CFACC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(CFAFLAGS) $(AM_CFLAGS) $(CFLAGS) 333 AM_V_CFA = $(am__v_CFA_@AM_V@) 334 am__v_CFA_ = $(am__v_CFA_@AM_DEFAULT_V@) 335 am__v_CFA_0 = @echo " CFA " $@; 336 am__v_CFA_1 = 337 lib_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 343 AM_CFAFLAGS = -quiet -in-tree -imacros prelude.c -I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@ 344 AM_CFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@ 345 AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@ 346 347 #---------------------------------------------------------------------------------------------------------------- 348 349 # not all platforms support concurrency, add option do disable it 350 headers = 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 356 libobjs = ${headers:.hfa=.o} 357 358 # not all platforms support concurrency, add option do disable it 359 libsrc = 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 363 libcfa_a_SOURCES = ${libsrc} 364 stdhdr = ${shell find ${srcdir}/stdhdr -type f -printf "%p "} 365 cfa_includedir = $(CFA_INCDIR) 366 nobase_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 379 MOSTLYCLEANFILES = prelude.c 307 380 all: all-am 308 381 309 382 .SUFFIXES: 310 .SUFFIXES: . c.o .obj311 $(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) 312 385 @for dep in $?; do \ 313 386 case '$(am__configure_deps)' in \ … … 318 391 esac; \ 319 392 done; \ 320 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/ examples/Makefile'; \393 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ 321 394 $(am__cd) $(top_srcdir) && \ 322 $(AUTOMAKE) --foreign src/ examples/Makefile395 $(AUTOMAKE) --foreign src/Makefile 323 396 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 324 397 @case '$?' in \ … … 329 402 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 330 403 esac; 404 $(srcdir)/../../src/cfa.make $(am__empty): 331 405 332 406 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) … … 338 412 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 339 413 $(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) 414 install-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 437 uninstall-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 443 clean-libLIBRARIES: 444 -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) 445 bits/$(am__dirstamp): 446 @$(MKDIR_P) bits 447 @: > bits/$(am__dirstamp) 448 bits/$(DEPDIR)/$(am__dirstamp): 449 @$(MKDIR_P) bits/$(DEPDIR) 450 @: > bits/$(DEPDIR)/$(am__dirstamp) 451 bits/debug.$(OBJEXT): bits/$(am__dirstamp) \ 452 bits/$(DEPDIR)/$(am__dirstamp) 453 containers/$(am__dirstamp): 454 @$(MKDIR_P) containers 455 @: > containers/$(am__dirstamp) 456 containers/$(DEPDIR)/$(am__dirstamp): 457 @$(MKDIR_P) containers/$(DEPDIR) 458 @: > containers/$(DEPDIR)/$(am__dirstamp) 459 containers/maybe.$(OBJEXT): containers/$(am__dirstamp) \ 460 containers/$(DEPDIR)/$(am__dirstamp) 461 containers/pair.$(OBJEXT): containers/$(am__dirstamp) \ 462 containers/$(DEPDIR)/$(am__dirstamp) 463 containers/result.$(OBJEXT): containers/$(am__dirstamp) \ 464 containers/$(DEPDIR)/$(am__dirstamp) 465 containers/vector.$(OBJEXT): containers/$(am__dirstamp) \ 466 containers/$(DEPDIR)/$(am__dirstamp) 467 concurrency/$(am__dirstamp): 468 @$(MKDIR_P) concurrency 469 @: > concurrency/$(am__dirstamp) 470 concurrency/$(DEPDIR)/$(am__dirstamp): 471 @$(MKDIR_P) concurrency/$(DEPDIR) 472 @: > concurrency/$(DEPDIR)/$(am__dirstamp) 473 concurrency/coroutine.$(OBJEXT): concurrency/$(am__dirstamp) \ 474 concurrency/$(DEPDIR)/$(am__dirstamp) 475 concurrency/thread.$(OBJEXT): concurrency/$(am__dirstamp) \ 476 concurrency/$(DEPDIR)/$(am__dirstamp) 477 concurrency/kernel.$(OBJEXT): concurrency/$(am__dirstamp) \ 478 concurrency/$(DEPDIR)/$(am__dirstamp) 479 concurrency/monitor.$(OBJEXT): concurrency/$(am__dirstamp) \ 480 concurrency/$(DEPDIR)/$(am__dirstamp) 481 concurrency/mutex.$(OBJEXT): concurrency/$(am__dirstamp) \ 482 concurrency/$(DEPDIR)/$(am__dirstamp) 483 concurrency/CtxSwitch-@ARCHITECTURE@.$(OBJEXT): \ 484 concurrency/$(am__dirstamp) \ 485 concurrency/$(DEPDIR)/$(am__dirstamp) 486 concurrency/alarm.$(OBJEXT): concurrency/$(am__dirstamp) \ 487 concurrency/$(DEPDIR)/$(am__dirstamp) 488 concurrency/invoke.$(OBJEXT): concurrency/$(am__dirstamp) \ 489 concurrency/$(DEPDIR)/$(am__dirstamp) 490 concurrency/preemption.$(OBJEXT): concurrency/$(am__dirstamp) \ 491 concurrency/$(DEPDIR)/$(am__dirstamp) 492 493 libcfa.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 375 497 376 498 mostlyclean-compile: 377 499 -rm -f *.$(OBJEXT) 378 -rm -f avltree/*.$(OBJEXT) 500 -rm -f bits/*.$(OBJEXT) 501 -rm -f concurrency/*.$(OBJEXT) 502 -rm -f containers/*.$(OBJEXT) 379 503 380 504 distclean-compile: 381 505 -rm -f *.tab.c 382 506 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) '$<'` 395 528 396 529 .c.o: … … 409 542 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 410 543 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 544 install-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 563 uninstall-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) 411 568 412 569 ID: $(am__tagged_files) … … 494 651 check-am: all-am 495 652 check: check-am 496 all-am: Makefile $( PROGRAMS)653 all-am: Makefile $(LIBRARIES) $(HEADERS) 497 654 installdirs: 655 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cfa_includedir)"; do \ 656 test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 657 done 498 658 install: install-am 499 659 install-exec: install-exec-am … … 516 676 fi 517 677 mostlyclean-generic: 678 -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) 518 679 519 680 clean-generic: … … 522 683 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 523 684 -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) 526 691 527 692 maintainer-clean-generic: … … 530 695 clean: clean-am 531 696 532 clean-am: clean-generic clean- noinstPROGRAMS mostlyclean-am697 clean-am: clean-generic clean-libLIBRARIES mostlyclean-am 533 698 534 699 distclean: distclean-am 535 -rm -rf ./$(DEPDIR) avltree/$(DEPDIR)700 -rm -rf ./$(DEPDIR) concurrency/$(DEPDIR) 536 701 -rm -f Makefile 537 702 distclean-am: clean-am distclean-compile distclean-generic \ … … 550 715 info-am: 551 716 552 install-data-am: 717 install-data-am: install-nobase_cfa_includeHEADERS 553 718 554 719 install-dvi: install-dvi-am … … 556 721 install-dvi-am: 557 722 558 install-exec-am: 723 install-exec-am: install-libLIBRARIES 559 724 560 725 install-html: install-html-am … … 579 744 580 745 maintainer-clean: maintainer-clean-am 581 -rm -rf ./$(DEPDIR) avltree/$(DEPDIR)746 -rm -rf ./$(DEPDIR) concurrency/$(DEPDIR) 582 747 -rm -f Makefile 583 maintainer-clean-am: distclean-am maintainer-clean-generic 748 maintainer-clean-am: distclean-am maintainer-clean-generic \ 749 maintainer-clean-local 584 750 585 751 mostlyclean: mostlyclean-am … … 595 761 ps-am: 596 762 597 uninstall-am: 763 uninstall-am: uninstall-libLIBRARIES \ 764 uninstall-nobase_cfa_includeHEADERS 598 765 599 766 .MAKE: install-am install-strip 600 767 601 768 .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 \ 603 770 distclean-compile distclean-generic distclean-tags distdir dvi \ 604 771 dvi-am html html-am info info-am install install-am \ 605 772 install-data install-data-am install-dvi install-dvi-am \ 606 773 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 613 782 614 783 .PRECIOUS: Makefile 615 784 616 785 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 #---------------------------------------------------------------------------------------------------------------- 796 maintainer-clean-local: 797 -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR} 624 798 625 799 # Tell versions [3.59,3.63) of GNU make to not export all variables. -
libcfa/src/assert.cfa
rfb975a50 r455a7d5 17 17 #include <stdarg.h> // varargs 18 18 #include <stdio.h> // fprintf 19 #include "bits/debug.h "19 #include "bits/debug.hfa" 20 20 21 21 extern "C" { -
libcfa/src/bits/algorithm.hfa
rfb975a50 r455a7d5 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // bits/algorithms.h -- Builtins for exception handling.7 // bits/algorithms.hfa -- Builtins for exception handling. 8 8 // 9 9 // Author : Thierry Delisle -
libcfa/src/bits/align.hfa
rfb975a50 r455a7d5 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // align.h --7 // align.hfa -- 8 8 // 9 9 // Author : Thierry Delisle -
libcfa/src/bits/containers.hfa
rfb975a50 r455a7d5 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // bits/containers.h -- Intrusive generic containers.h7 // bits/containers.hfa -- Intrusive generic containers.hfa 8 8 // 9 9 // Author : Thierry Delisle … … 15 15 #pragma once 16 16 17 #include "bits/align.h "18 #include "bits/defs.h "17 #include "bits/align.hfa" 18 #include "bits/defs.hfa" 19 19 20 20 //----------------------------------------------------------------------------- -
libcfa/src/bits/debug.hfa
rfb975a50 r455a7d5 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // debug.h --7 // debug.hfa -- 8 8 // 9 9 // Author : Thierry Delisle -
libcfa/src/bits/defs.hfa
rfb975a50 r455a7d5 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // defs.h --7 // defs.hfa -- 8 8 // 9 9 // Author : Thierry Delisle -
libcfa/src/bits/locks.hfa
rfb975a50 r455a7d5 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // bits/locks.h -- Fast internal locks.7 // bits/locks.hfa -- Fast internal locks. 8 8 // 9 9 // Author : Thierry Delisle … … 16 16 #pragma once 17 17 18 #include "bits/debug.h "19 #include "bits/defs.h "18 #include "bits/debug.hfa" 19 #include "bits/defs.hfa" 20 20 #include <assert.h> 21 21 … … 64 64 extern void disable_interrupts(); 65 65 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 66 72 } 67 73 … … 71 77 this.lock = 0; 72 78 } 73 74 75 #ifdef __CFA_DEBUG__76 void __cfaabi_dbg_record(__spinlock_t & this, const char * prev_name);77 #else78 #define __cfaabi_dbg_record(x, y)79 #endif80 79 81 80 // Lock the spinlock, return false if already acquired -
libcfa/src/bits/signal.hfa
rfb975a50 r455a7d5 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // bits/signal.h -- Helper functions and defines to use signals7 // bits/signal.hfa -- Helper functions and defines to use signals 8 8 // 9 9 // Author : Thierry Delisle … … 16 16 #pragma once 17 17 18 #include "bits/debug.h "19 #include "bits/defs.h "18 #include "bits/debug.hfa" 19 #include "bits/defs.hfa" 20 20 21 21 extern "C" { -
libcfa/src/clock.hfa
rfb975a50 r455a7d5 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // clock -- 8 // 6 // 7 // clock -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Thu Apr 12 14:36:06 2018 … … 12 12 // Last Modified On : Mon Jul 2 21:40:01 2018 13 13 // Update Count : 7 14 // 14 // 15 15 16 #include <time >16 #include <time.hfa> 17 17 18 18 -
libcfa/src/common.cfa
rfb975a50 r455a7d5 1 // -*- Mode: C -*- 2 // 1 // -*- Mode: C -*- 2 // 3 3 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 4 4 // 5 5 // The contents of this file are covered under the licence agreement in the 6 6 // file "LICENCE" distributed with Cforall. 7 // 8 // common.c -- 9 // 7 // 8 // common.c -- 9 // 10 10 // Author : Peter A. Buhr 11 11 // Created On : Thu Jul 12 08:02:29 2018 … … 13 13 // Last Modified On : Thu Jul 12 08:38:47 2018 14 14 // Update Count : 3 15 // 15 // 16 16 17 #include "common "17 #include "common.hfa" 18 18 #include <stdlib.h> // div_t, *div 19 19 -
libcfa/src/concurrency/alarm.cfa
rfb975a50 r455a7d5 22 22 } 23 23 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" 27 27 28 28 //============================================================================================= -
libcfa/src/concurrency/alarm.hfa
rfb975a50 r455a7d5 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // alarm.h --7 // alarm.hfa -- 8 8 // 9 9 // Author : Thierry Delisle … … 21 21 #include <assert.h> 22 22 23 #include "time "23 #include "time.hfa" 24 24 25 25 struct thread_desc; -
libcfa/src/concurrency/coroutine.cfa
rfb975a50 r455a7d5 14 14 // 15 15 16 #include "coroutine "16 #include "coroutine.hfa" 17 17 18 18 extern "C" { … … 25 25 } 26 26 27 #include "kernel_private.h "27 #include "kernel_private.hfa" 28 28 29 29 #define __CFA_INVOKE_PRIVATE__ -
libcfa/src/concurrency/invoke.h
rfb975a50 r455a7d5 14 14 // 15 15 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" 19 19 20 20 #ifdef __cforall -
libcfa/src/concurrency/kernel.cfa
rfb975a50 r455a7d5 27 27 28 28 //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" 33 33 34 34 //Private includes … … 833 833 // Debug 834 834 __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 } 838 840 } 839 841 ) -
libcfa/src/concurrency/kernel.hfa
rfb975a50 r455a7d5 19 19 20 20 #include "invoke.h" 21 #include "time_t.h "21 #include "time_t.hfa" 22 22 23 23 extern "C" { -
libcfa/src/concurrency/kernel_private.hfa
rfb975a50 r455a7d5 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // kernel_private.h --7 // kernel_private.hfa -- 8 8 // 9 9 // Author : Thierry Delisle … … 16 16 #pragma once 17 17 18 #include "kernel "19 #include "thread "18 #include "kernel.hfa" 19 #include "thread.hfa" 20 20 21 #include "alarm.h "21 #include "alarm.hfa" 22 22 23 23 -
libcfa/src/concurrency/monitor.cfa
rfb975a50 r455a7d5 14 14 // 15 15 16 #include "monitor "17 18 #include <stdlib >16 #include "monitor.hfa" 17 18 #include <stdlib.hfa> 19 19 #include <inttypes.h> 20 20 21 #include "kernel_private.h "22 23 #include "bits/algorithm s.h"21 #include "kernel_private.hfa" 22 23 #include "bits/algorithm.hfa" 24 24 25 25 //----------------------------------------------------------------------------- -
libcfa/src/concurrency/monitor.hfa
rfb975a50 r455a7d5 20 20 #include <assert.h> 21 21 #include "invoke.h" 22 #include "stdlib "22 #include "stdlib.hfa" 23 23 24 24 trait is_monitor(dtype T) { -
libcfa/src/concurrency/mutex.cfa
rfb975a50 r455a7d5 16 16 // 17 17 18 #include "mutex "18 #include "mutex.hfa" 19 19 20 #include "kernel_private.h "20 #include "kernel_private.hfa" 21 21 22 22 //----------------------------------------------------------------------------- -
libcfa/src/concurrency/mutex.hfa
rfb975a50 r455a7d5 20 20 #include <stdbool.h> 21 21 22 #include "bits/algorithm s.h"23 #include "bits/locks.h "22 #include "bits/algorithm.hfa" 23 #include "bits/locks.hfa" 24 24 25 25 #include "invoke.h" 26 #include "time_t.h "26 #include "time_t.hfa" 27 27 28 28 //----------------------------------------------------------------------------- -
libcfa/src/concurrency/preemption.cfa
rfb975a50 r455a7d5 14 14 // 15 15 16 #include "preemption.h "16 #include "preemption.hfa" 17 17 #include <assert.h> 18 18 … … 24 24 } 25 25 26 #include "bits/signal.h "26 #include "bits/signal.hfa" 27 27 28 28 #if !defined(__CFA_DEFAULT_PREEMPTION__) -
libcfa/src/concurrency/preemption.hfa
rfb975a50 r455a7d5 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // preemption.h --7 // preemption.hfa -- 8 8 // 9 9 // Author : Thierry Delisle … … 16 16 #pragma once 17 17 18 #include "alarm.h "19 #include "kernel_private.h "18 #include "alarm.hfa" 19 #include "kernel_private.hfa" 20 20 21 21 void kernel_start_preemption(); -
libcfa/src/concurrency/thread.cfa
rfb975a50 r455a7d5 14 14 // 15 15 16 #include "thread "16 #include "thread.hfa" 17 17 18 #include "kernel_private.h "18 #include "kernel_private.hfa" 19 19 20 20 #define __CFA_INVOKE_PRIVATE__ -
libcfa/src/concurrency/thread.hfa
rfb975a50 r455a7d5 19 19 #include "invoke.h" 20 20 21 #include "coroutine "22 #include "kernel "23 #include "monitor "21 #include "coroutine.hfa" 22 #include "kernel.hfa" 23 #include "monitor.hfa" 24 24 25 25 //----------------------------------------------------------------------------- -
libcfa/src/containers/maybe.cfa
rfb975a50 r455a7d5 14 14 // 15 15 16 #include <containers/maybe >16 #include <containers/maybe.hfa> 17 17 #include <assert.h> 18 18 -
libcfa/src/containers/pair.cfa
rfb975a50 r455a7d5 11 11 // 12 12 13 #include <containers/pair >13 #include <containers/pair.hfa> 14 14 15 forall(otype R, otype S 15 forall(otype R, otype S 16 16 | { int ?==?(R, R); int ?<?(R, R); int ?<?(S, S); }) 17 17 int ?<?(pair(R, S) p, pair(R, S) q) { … … 19 19 } 20 20 21 forall(otype R, otype S 21 forall(otype R, otype S 22 22 | { int ?==?(R, R); int ?<?(R, R); int ?<=?(S, S); }) 23 23 int ?<=?(pair(R, S) p, pair(R, S) q) { … … 35 35 } 36 36 37 forall(otype R, otype S 37 forall(otype R, otype S 38 38 | { int ?==?(R, R); int ?>?(R, R); int ?>?(S, S); }) 39 39 int ?>?(pair(R, S) p, pair(R, S) q) { … … 41 41 } 42 42 43 forall(otype R, otype S 43 forall(otype R, otype S 44 44 | { int ?==?(R, R); int ?>?(R, R); int ?>=?(S, S); }) 45 45 int ?>=?(pair(R, S) p, pair(R, S) q) { -
libcfa/src/containers/result.cfa
rfb975a50 r455a7d5 14 14 // 15 15 16 #include <containers/result >16 #include <containers/result.hfa> 17 17 #include <assert.h> 18 18 -
libcfa/src/containers/vector.cfa
rfb975a50 r455a7d5 14 14 // 15 15 16 #include <containers/vector >16 #include <containers/vector.hfa> 17 17 18 #include <stdlib >18 #include <stdlib.hfa> 19 19 20 20 forall(otype T, otype allocator_t | allocator_c(T, allocator_t)) -
libcfa/src/exception.c
rfb975a50 r455a7d5 23 23 #include <stdio.h> 24 24 #include <unwind.h> 25 #include <bits/debug.h >25 #include <bits/debug.hfa> 26 26 27 27 // FIX ME: temporary hack to keep ARM build working -
libcfa/src/fstream.cfa
rfb975a50 r455a7d5 14 14 // 15 15 16 #include "fstream "16 #include "fstream.hfa" 17 17 18 18 #include <stdio.h> // vfprintf, vfscanf -
libcfa/src/fstream.hfa
rfb975a50 r455a7d5 16 16 #pragma once 17 17 18 #include "iostream "18 #include "iostream.hfa" 19 19 20 20 enum { sepSize = 16 }; -
libcfa/src/gmp.hfa
rfb975a50 r455a7d5 19 19 20 20 #include <gmp.h> // GNU multi-precise integers 21 #include <fstream > // sout21 #include <fstream.hfa> // sout 22 22 23 23 struct Int { mpz_t mpz; }; // wrap GMP implementation -
libcfa/src/heap.cfa
rfb975a50 r455a7d5 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // heap.c -- 8 // 6 // 7 // heap.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Tue Dec 19 21:58:35 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Jul 26 22:28:23201813 // Update Count : 4 4914 // 12 // Last Modified On : Tue Jul 31 18:08:50 2018 13 // Update Count : 470 14 // 15 15 16 16 #include <unistd.h> // sbrk, sysconf … … 22 22 } // extern "C" 23 23 24 #include "bits/align.h " // libPow225 #include "bits/defs.h " // likely, unlikely26 #include "bits/locks.h " // __spinlock_t27 #include "startup.h " // STARTUP_PRIORITY_MEMORY28 #include "stdlib " // bsearchl24 #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 29 29 #include "malloc.h" 30 30 … … 94 94 95 95 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; 96 static _Bool checkFree = false; 97 98 inline _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; 105 124 // return temp; 106 // } // prtHeapTermOn107 108 // _Bool prtHeapTermOff() {109 // _Bool temp = traceHeap ;110 // traceHeap = false;125 // } // traceHeapTermOn 126 127 // _Bool traceHeapTermOff() { 128 // _Bool temp = traceHeapTerm; 129 // traceHeapTerm = false; 111 130 // return temp; 112 // } // prtHeapTermOff131 // } // traceHeapTermOff 113 132 114 133 … … 139 158 } // extern "C" 140 159 #endif // __CFA_DEBUG__ 141 142 143 // statically allocated variables => zero filled.144 145 static size_t pageSize; // architecture pagesize146 static size_t heapExpand; // sbrk advance147 static size_t mmapStart; // cross over point for mmap148 static unsigned int maxBucketsUsed; // maximum number of buckets in use149 static unsigned int bucketSizes[NoBucketSizes] = { // different bucket sizes150 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 4194304163 };164 #ifdef FASTLOOKUP165 static unsigned char lookup[LookupSizes]; // O(1) lookup for small sizes166 #endif // FASTLOOKUP167 static int mmapFd = -1; // fake or actual fd for anonymous file168 160 169 161 … … 240 232 }; // HeapManager 241 233 234 static inline size_t getKey( const HeapManager.FreeHeader & freeheader ) { return freeheader.blockSize; } 235 // statically allocated variables => zero filled. 236 237 238 static size_t pageSize; // architecture pagesize 239 static size_t heapExpand; // sbrk advance 240 static size_t mmapStart; // cross over point for mmap 241 static 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. 244 static 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 260 static unsigned char lookup[LookupSizes]; // O(1) lookup for small sizes 261 #endif // FASTLOOKUP 262 static int mmapFd = -1; // fake or actual fd for anonymous file 263 264 265 #ifdef __CFA_DEBUG__ 266 static _Bool heapBoot = 0; // detect recursion during boot 267 #endif // __CFA_DEBUG__ 268 static HeapManager heapManager __attribute__(( aligned (128) )) @= {}; // size of cache line to prevent false sharing 269 242 270 243 271 static inline _Bool setMmapStart( size_t value ) { … … 255 283 static void ?{}( HeapManager & manager ) with ( manager ) { 256 284 pageSize = sysconf( _SC_PAGESIZE ); 257 285 258 286 for ( unsigned int i = 0; i < NoBucketSizes; i += 1 ) { // initialize the free lists 259 287 freeLists[i].blockSize = bucketSizes[i]; … … 281 309 static void ^?{}( HeapManager & ) { 282 310 #ifdef __STATISTICS__ 283 // if ( prtHeapTerm() ) {311 // if ( traceHeapTerm() ) { 284 312 // printStats(); 285 // checkFree( heapManager, true );313 // if ( checkfree() ) checkFree( heapManager, true ); 286 314 // } // if 287 315 #endif // __STATISTICS__ 288 316 } // ~HeapManager 289 317 290 291 #ifdef __CFA_DEBUG__292 static _Bool heapBoot = 0; // detect recursion during boot293 #endif // __CFA_DEBUG__294 static HeapManager heapManager __attribute__(( aligned (128) )) @= {}; // size of cache line to prevent false sharing295 318 296 319 static void memory_startup( void ) __attribute__(( constructor( STARTUP_PRIORITY_MEMORY ) )); … … 312 335 ^heapManager{}; 313 336 } // memory_shutdown 314 315 static inline size_t getKey( const HeapManager.FreeHeader & freeheader ) { return freeheader.blockSize; }316 337 317 338 … … 342 363 static void printStats() { 343 364 char helpText[512]; 344 int len = snprintf( helpText, 512,345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 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 364 385 ); 365 write( statfd, helpText, len );366 386 } // printStats 367 387 … … 637 657 638 658 639 size_t checkFree( HeapManager & manager , _Bool prt) with ( manager ) {659 size_t checkFree( HeapManager & manager ) with ( manager ) { 640 660 size_t total = 0; 641 661 #ifdef __STATISTICS__ 642 662 __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" ); 644 664 #endif // __STATISTICS__ 645 665 for ( unsigned int i = 0; i < maxBucketsUsed; i += 1 ) { … … 659 679 } // for 660 680 #ifdef __STATISTICS__ 661 if ( prt )__cfaabi_dbg_bits_print_nolock( "%7zu, %-7u ", size, N );681 __cfaabi_dbg_bits_print_nolock( "%7zu, %-7u ", size, N ); 662 682 if ( (i + 1) % 8 == 0 ) __cfaabi_dbg_bits_print_nolock( "\n" ); 663 683 #endif // __STATISTICS__ 664 684 } // for 665 685 #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 ); 667 687 __cfaabi_dbg_bits_release(); 668 688 #endif // __STATISTICS__ … … 740 760 _Bool mapped __attribute__(( unused )) = headers( "calloc", area, header, freeElem, asize, alignment ); 741 761 #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. 743 763 if ( ! mapped ) 744 764 #endif // __CFA_DEBUG__ … … 763 783 _Bool mapped __attribute__(( unused )) = headers( "cmemalign", area, header, freeElem, asize, alignment ); 764 784 #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. 766 786 if ( ! mapped ) 767 787 #endif // __CFA_DEBUG__ … … 808 828 _Bool mapped __attribute__(( unused )) = headers( "realloc", area, header, freeElem, asize, alignment ); 809 829 #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. 811 831 if ( ! mapped ) 812 832 #endif // __CFA_DEBUG__ … … 922 942 #ifdef __STATISTICS__ 923 943 printStats(); 924 checkFree( heapManager, true);944 if ( checkFree() ) checkFree( heapManager ); 925 945 #endif // __STATISTICS__ 926 946 } // malloc_stats -
libcfa/src/interpose.cfa
rfb975a50 r455a7d5 25 25 } 26 26 27 #include "bits/debug.h "28 #include "bits/defs.h "29 #include "bits/signal.h " // sigHandler_?30 #include "startup.h " // STARTUP_PRIORITY_CORE27 #include "bits/debug.hfa" 28 #include "bits/defs.hfa" 29 #include "bits/signal.hfa" // sigHandler_? 30 #include "startup.hfa" // STARTUP_PRIORITY_CORE 31 31 32 32 //============================================================================================= -
libcfa/src/iostream.cfa
rfb975a50 r455a7d5 14 14 // 15 15 16 #include "iostream "16 #include "iostream.hfa" 17 17 18 18 extern "C" { -
libcfa/src/iostream.hfa
rfb975a50 r455a7d5 16 16 #pragma once 17 17 18 #include "iterator "18 #include "iterator.hfa" 19 19 20 20 trait ostream( dtype ostype ) { … … 164 164 165 165 166 #include <time_t.h > // Duration (constructors) / Time (constructors)166 #include <time_t.hfa> // Duration (constructors) / Time (constructors) 167 167 168 168 forall( dtype ostype | ostream( ostype ) ) ostype & ?|?( ostype & os, Duration dur ); -
libcfa/src/iterator.cfa
rfb975a50 r455a7d5 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // iterator.c -- 7 // iterator.c -- 8 8 // 9 9 // Author : Richard C. Bilson … … 14 14 // 15 15 16 #include "iterator "16 #include "iterator.hfa" 17 17 18 18 forall( otype iterator_type, otype elt_type | iterator( iterator_type, elt_type ) ) -
libcfa/src/limits.cfa
rfb975a50 r455a7d5 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // limits.c -- 8 // 6 // 7 // limits.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Wed Apr 6 18:06:52 2016 … … 12 12 // Last Modified On : Thu Mar 1 16:22:51 2018 13 13 // Update Count : 74 14 // 14 // 15 15 16 16 #include <limits.h> … … 19 19 #include <math.h> 20 20 #include <complex.h> 21 #include "limits "21 #include "limits.hfa" 22 22 23 23 // Integral Constants -
libcfa/src/math.hfa
rfb975a50 r455a7d5 350 350 //--------------------------------------- 351 351 352 #include "common "352 #include "common.hfa" 353 353 354 354 //--------------------------------------- -
libcfa/src/rational.cfa
rfb975a50 r455a7d5 14 14 // 15 15 16 #include "rational "17 #include "fstream "18 #include "stdlib "16 #include "rational.hfa" 17 #include "fstream.hfa" 18 #include "stdlib.hfa" 19 19 20 20 forall( otype RationalImpl | arithmetic( RationalImpl ) ) { -
libcfa/src/rational.hfa
rfb975a50 r455a7d5 18 18 #pragma once 19 19 20 #include "iostream "20 #include "iostream.hfa" 21 21 22 22 trait scalar( otype T ) { -
libcfa/src/startup.cfa
rfb975a50 r455a7d5 14 14 // 15 15 16 #include "startup.h "16 #include "startup.hfa" 17 17 #include <unistd.h> 18 18 … … 40 40 41 41 struct __spinlock_t; 42 void __cfaabi_dbg_record(struct __spinlock_t & this, const char * prev_name) __attribute__(( weak )) {} 42 extern "C" { 43 void __cfaabi_dbg_record(struct __spinlock_t & this, const char * prev_name) __attribute__(( weak )) {} 44 } 43 45 44 46 // Local Variables: // -
libcfa/src/startup.hfa
rfb975a50 r455a7d5 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // startup.h --7 // startup.hfa -- 8 8 // 9 9 // Author : Thierry Delisle -
libcfa/src/stdhdr/malloc.h
rfb975a50 r455a7d5 10 10 // Created On : Thu Jul 20 15:58:16 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jul 23 18:20:32201813 // Update Count : 812 // Last Modified On : Tue Jul 31 10:01:10 2018 13 // Update Count : 9 14 14 // 15 15 … … 17 17 size_t default_mmap_start(); // CFA extras 18 18 size_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 19 32 extern "C" { 20 33 size_t malloc_alignment( void * ); -
libcfa/src/stdlib.cfa
rfb975a50 r455a7d5 14 14 // 15 15 16 #include "stdlib "16 #include "stdlib.hfa" 17 17 18 18 //--------------------------------------- -
libcfa/src/stdlib.hfa
rfb975a50 r455a7d5 251 251 //--------------------------------------- 252 252 253 #include "common "253 #include "common.hfa" 254 254 255 255 // Local Variables: // -
libcfa/src/time.cfa
rfb975a50 r455a7d5 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // time.c -- 8 // 6 // 7 // time.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Tue Mar 27 13:33:14 2018 … … 12 12 // Last Modified On : Sun May 6 22:26:00 2018 13 13 // Update Count : 37 14 // 14 // 15 15 16 #include "time "17 #include "iostream "16 #include "time.hfa" 17 #include "iostream.hfa" 18 18 #include <stdio.h> // snprintf 19 19 #include <assert.h> -
libcfa/src/time.hfa
rfb975a50 r455a7d5 23 23 #include <sys/time.h> // timeval 24 24 } 25 #include <time_t.h > // Duration/Time types25 #include <time_t.hfa> // Duration/Time types 26 26 27 27 enum { TIMEGRAN = 1_000_000_000LL }; // nanosecond granularity, except for timeval -
libcfa/src/time_t.hfa
rfb975a50 r455a7d5 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // time_t.h --8 // 6 // 7 // time_t.hfa -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Tue Apr 10 14:42:03 2018 … … 12 12 // Last Modified On : Fri Apr 13 07:51:47 2018 13 13 // Update Count : 6 14 // 14 // 15 15 16 16 #pragma once
Note:
See TracChangeset
for help on using the changeset viewer.