Changes in / [72b0573:56b53b2]
- Files:
-
- 107 added
- 109 deleted
- 15 edited
-
doc/bibliography/pl.bib (modified) (7 diffs)
-
doc/theses/aaron_moss/comp_II/.gitignore (added)
-
doc/theses/aaron_moss/comp_II/Efficient Type Resolution in Cforall.pptx (added)
-
doc/theses/aaron_moss/comp_II/Makefile (added)
-
doc/theses/aaron_moss/comp_II/comp_II.tex (added)
-
doc/theses/aaron_moss/comp_II/conversion_dag.eps (added)
-
doc/theses/aaron_moss/comp_II/conversion_dag.odg (added)
-
doc/theses/aaron_moss/comp_II/conversion_dag.png (added)
-
doc/theses/aaron_moss/comp_II/resolution_dag.eps (added)
-
doc/theses/aaron_moss/comp_II/resolution_dag.odg (added)
-
doc/theses/aaron_moss/comp_II/resolution_dag.png (added)
-
doc/theses/aaron_moss/comp_II/resolution_dag2.odg (added)
-
doc/theses/aaron_moss/comp_II/resolution_dag2.png (added)
-
doc/theses/aaron_moss/phd/.gitignore (added)
-
doc/theses/aaron_moss/phd/Makefile (added)
-
doc/theses/aaron_moss/phd/aaron-thesis.bib (added)
-
doc/theses/aaron_moss/phd/background.tex (added)
-
doc/theses/aaron_moss/phd/conclusion.tex (added)
-
doc/theses/aaron_moss/phd/frontpgs.tex (added)
-
doc/theses/aaron_moss/phd/generic-types.tex (added)
-
doc/theses/aaron_moss/phd/introduction.tex (added)
-
doc/theses/aaron_moss/phd/macros.tex (added)
-
doc/theses/aaron_moss/phd/resolution-heuristics.tex (added)
-
doc/theses/aaron_moss/phd/thesis.tex (added)
-
doc/theses/aaron_moss/phd/type-environment.tex (added)
-
doc/theses/aaron_moss_PhD/comp_II/.gitignore (deleted)
-
doc/theses/aaron_moss_PhD/comp_II/Efficient Type Resolution in Cforall.pptx (deleted)
-
doc/theses/aaron_moss_PhD/comp_II/Makefile (deleted)
-
doc/theses/aaron_moss_PhD/comp_II/comp_II.tex (deleted)
-
doc/theses/aaron_moss_PhD/comp_II/conversion_dag.eps (deleted)
-
doc/theses/aaron_moss_PhD/comp_II/conversion_dag.odg (deleted)
-
doc/theses/aaron_moss_PhD/comp_II/conversion_dag.png (deleted)
-
doc/theses/aaron_moss_PhD/comp_II/resolution_dag.eps (deleted)
-
doc/theses/aaron_moss_PhD/comp_II/resolution_dag.odg (deleted)
-
doc/theses/aaron_moss_PhD/comp_II/resolution_dag.png (deleted)
-
doc/theses/aaron_moss_PhD/comp_II/resolution_dag2.odg (deleted)
-
doc/theses/aaron_moss_PhD/comp_II/resolution_dag2.png (deleted)
-
doc/theses/aaron_moss_PhD/phd/.gitignore (deleted)
-
doc/theses/aaron_moss_PhD/phd/Makefile (deleted)
-
doc/theses/aaron_moss_PhD/phd/background.tex (deleted)
-
doc/theses/aaron_moss_PhD/phd/cfa-macros.tex (deleted)
-
doc/theses/aaron_moss_PhD/phd/conclusion.tex (deleted)
-
doc/theses/aaron_moss_PhD/phd/frontpgs.tex (deleted)
-
doc/theses/aaron_moss_PhD/phd/generic-types.tex (deleted)
-
doc/theses/aaron_moss_PhD/phd/introduction.tex (deleted)
-
doc/theses/aaron_moss_PhD/phd/macros.tex (deleted)
-
doc/theses/aaron_moss_PhD/phd/resolution-heuristics.tex (deleted)
-
doc/theses/aaron_moss_PhD/phd/thesis.tex (deleted)
-
doc/theses/aaron_moss_PhD/phd/type-environment.tex (deleted)
-
doc/theses/rob_schluntz/.gitignore (added)
-
doc/theses/rob_schluntz/Makefile (added)
-
doc/theses/rob_schluntz/cfa-format.tex (added)
-
doc/theses/rob_schluntz/conclusions.tex (added)
-
doc/theses/rob_schluntz/ctordtor.tex (added)
-
doc/theses/rob_schluntz/examples/conclusions/dtor.c (added)
-
doc/theses/rob_schluntz/examples/conclusions/except.c (added)
-
doc/theses/rob_schluntz/examples/conclusions/except.cc (added)
-
doc/theses/rob_schluntz/examples/ctor/array_ctor.c (added)
-
doc/theses/rob_schluntz/examples/ctor/copy_ctor.c (added)
-
doc/theses/rob_schluntz/examples/ctor/cv_ctor.c (added)
-
doc/theses/rob_schluntz/examples/ctor/enum_ctor.c (added)
-
doc/theses/rob_schluntz/examples/ctor/expr_ctor.c (added)
-
doc/theses/rob_schluntz/examples/ctor/global_ctor.c (added)
-
doc/theses/rob_schluntz/examples/ctor/hide_ctor.c (added)
-
doc/theses/rob_schluntz/examples/ctor/member.c (added)
-
doc/theses/rob_schluntz/examples/ctor/placement_ctor.c (added)
-
doc/theses/rob_schluntz/examples/ctor/return_dtor.c (added)
-
doc/theses/rob_schluntz/examples/ctor/static_ctor.c (added)
-
doc/theses/rob_schluntz/examples/ctor/union_ctor.c (added)
-
doc/theses/rob_schluntz/examples/intro/FileOutputStream.java (added)
-
doc/theses/rob_schluntz/examples/intro/compound_lit.c (added)
-
doc/theses/rob_schluntz/examples/intro/designation.c (added)
-
doc/theses/rob_schluntz/examples/intro/ignore.c (added)
-
doc/theses/rob_schluntz/examples/intro/ires.java (added)
-
doc/theses/rob_schluntz/examples/intro/res.java (added)
-
doc/theses/rob_schluntz/examples/intro/res1.java (added)
-
doc/theses/rob_schluntz/examples/intro/res2.java (added)
-
doc/theses/rob_schluntz/examples/intro/res3.java (added)
-
doc/theses/rob_schluntz/examples/intro/tuple.cc (added)
-
doc/theses/rob_schluntz/examples/intro/variadic.java (added)
-
doc/theses/rob_schluntz/examples/malloc.cc (added)
-
doc/theses/rob_schluntz/examples/nested.c (added)
-
doc/theses/rob_schluntz/examples/poly.c (added)
-
doc/theses/rob_schluntz/examples/scope_guard.h (added)
-
doc/theses/rob_schluntz/examples/test_scoped_guard.c (added)
-
doc/theses/rob_schluntz/examples/tuples/assign.c (added)
-
doc/theses/rob_schluntz/examples/tuples/cast.c (added)
-
doc/theses/rob_schluntz/examples/tuples/ctor.c (added)
-
doc/theses/rob_schluntz/examples/tuples/mrv.c (added)
-
doc/theses/rob_schluntz/examples/tuples/mrv_1.c (added)
-
doc/theses/rob_schluntz/examples/tuples/mrv_2.c (added)
-
doc/theses/rob_schluntz/examples/tuples/mrv_3.c (added)
-
doc/theses/rob_schluntz/examples/tuples/named.c (added)
-
doc/theses/rob_schluntz/examples/variadic/new.c (added)
-
doc/theses/rob_schluntz/examples/variadic/print.c (added)
-
doc/theses/rob_schluntz/examples/variadic/sum1.c (added)
-
doc/theses/rob_schluntz/examples/variadic/sum2.c (added)
-
doc/theses/rob_schluntz/intro.tex (added)
-
doc/theses/rob_schluntz/thesis-frontpgs.tex (added)
-
doc/theses/rob_schluntz/thesis.bib (added)
-
doc/theses/rob_schluntz/thesis.tex (added)
-
doc/theses/rob_schluntz/tuples.tex (added)
-
doc/theses/rob_schluntz/variadic.tex (added)
-
doc/theses/rob_schluntz_MMath/.gitignore (deleted)
-
doc/theses/rob_schluntz_MMath/Makefile (deleted)
-
doc/theses/rob_schluntz_MMath/cfa-format.tex (deleted)
-
doc/theses/rob_schluntz_MMath/conclusions.tex (deleted)
-
doc/theses/rob_schluntz_MMath/ctordtor.tex (deleted)
-
doc/theses/rob_schluntz_MMath/examples/conclusions/dtor.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/conclusions/except.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/conclusions/except.cc (deleted)
-
doc/theses/rob_schluntz_MMath/examples/ctor/array_ctor.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/ctor/copy_ctor.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/ctor/cv_ctor.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/ctor/enum_ctor.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/ctor/expr_ctor.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/ctor/global_ctor.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/ctor/hide_ctor.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/ctor/member.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/ctor/placement_ctor.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/ctor/return_dtor.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/ctor/static_ctor.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/ctor/union_ctor.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/intro/FileOutputStream.java (deleted)
-
doc/theses/rob_schluntz_MMath/examples/intro/compound_lit.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/intro/designation.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/intro/ignore.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/intro/ires.java (deleted)
-
doc/theses/rob_schluntz_MMath/examples/intro/res.java (deleted)
-
doc/theses/rob_schluntz_MMath/examples/intro/res1.java (deleted)
-
doc/theses/rob_schluntz_MMath/examples/intro/res2.java (deleted)
-
doc/theses/rob_schluntz_MMath/examples/intro/res3.java (deleted)
-
doc/theses/rob_schluntz_MMath/examples/intro/tuple.cc (deleted)
-
doc/theses/rob_schluntz_MMath/examples/intro/variadic.java (deleted)
-
doc/theses/rob_schluntz_MMath/examples/malloc.cc (deleted)
-
doc/theses/rob_schluntz_MMath/examples/nested.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/poly.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/scope_guard.h (deleted)
-
doc/theses/rob_schluntz_MMath/examples/test_scoped_guard.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/tuples/assign.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/tuples/cast.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/tuples/ctor.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/tuples/mrv.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/tuples/mrv_1.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/tuples/mrv_2.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/tuples/mrv_3.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/tuples/named.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/variadic/new.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/variadic/print.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/variadic/sum1.c (deleted)
-
doc/theses/rob_schluntz_MMath/examples/variadic/sum2.c (deleted)
-
doc/theses/rob_schluntz_MMath/intro.tex (deleted)
-
doc/theses/rob_schluntz_MMath/thesis-frontpgs.tex (deleted)
-
doc/theses/rob_schluntz_MMath/thesis.bib (deleted)
-
doc/theses/rob_schluntz_MMath/thesis.tex (deleted)
-
doc/theses/rob_schluntz_MMath/tuples.tex (deleted)
-
doc/theses/rob_schluntz_MMath/variadic.tex (deleted)
-
doc/theses/thierry_delisle/.gitignore (added)
-
doc/theses/thierry_delisle/Makefile (added)
-
doc/theses/thierry_delisle/annex/glossary.tex (added)
-
doc/theses/thierry_delisle/annex/local.bib (added)
-
doc/theses/thierry_delisle/figures/dependency.fig (added)
-
doc/theses/thierry_delisle/figures/ext_monitor.fig (added)
-
doc/theses/thierry_delisle/figures/int_monitor.fig (added)
-
doc/theses/thierry_delisle/figures/monitor.fig (added)
-
doc/theses/thierry_delisle/figures/monitor_structs.fig (added)
-
doc/theses/thierry_delisle/figures/system.fig (added)
-
doc/theses/thierry_delisle/notes/cor-thread-traits.c (added)
-
doc/theses/thierry_delisle/notes/lit-review.md (added)
-
doc/theses/thierry_delisle/notes/notes.md (added)
-
doc/theses/thierry_delisle/style/cfa-format.tex (added)
-
doc/theses/thierry_delisle/style/style.tex (added)
-
doc/theses/thierry_delisle/text/basics.tex (added)
-
doc/theses/thierry_delisle/text/cforall.tex (added)
-
doc/theses/thierry_delisle/text/concurrency.tex (added)
-
doc/theses/thierry_delisle/text/frontpgs.tex (added)
-
doc/theses/thierry_delisle/text/future.tex (added)
-
doc/theses/thierry_delisle/text/internals.tex (added)
-
doc/theses/thierry_delisle/text/intro.tex (added)
-
doc/theses/thierry_delisle/text/parallelism.tex (added)
-
doc/theses/thierry_delisle/text/results.tex (added)
-
doc/theses/thierry_delisle/text/together.tex (added)
-
doc/theses/thierry_delisle/thePlan.md (added)
-
doc/theses/thierry_delisle/thesis.tex (added)
-
doc/theses/thierry_delisle/version (added)
-
doc/theses/thierry_delisle/version.sh (added)
-
doc/theses/thierry_delisle_MMath/.gitignore (deleted)
-
doc/theses/thierry_delisle_MMath/Makefile (deleted)
-
doc/theses/thierry_delisle_MMath/annex/glossary.tex (deleted)
-
doc/theses/thierry_delisle_MMath/annex/local.bib (deleted)
-
doc/theses/thierry_delisle_MMath/figures/dependency.fig (deleted)
-
doc/theses/thierry_delisle_MMath/figures/ext_monitor.fig (deleted)
-
doc/theses/thierry_delisle_MMath/figures/int_monitor.fig (deleted)
-
doc/theses/thierry_delisle_MMath/figures/monitor.fig (deleted)
-
doc/theses/thierry_delisle_MMath/figures/monitor_structs.fig (deleted)
-
doc/theses/thierry_delisle_MMath/figures/system.fig (deleted)
-
doc/theses/thierry_delisle_MMath/notes/cor-thread-traits.c (deleted)
-
doc/theses/thierry_delisle_MMath/notes/lit-review.md (deleted)
-
doc/theses/thierry_delisle_MMath/notes/notes.md (deleted)
-
doc/theses/thierry_delisle_MMath/style/cfa-format.tex (deleted)
-
doc/theses/thierry_delisle_MMath/style/style.tex (deleted)
-
doc/theses/thierry_delisle_MMath/text/basics.tex (deleted)
-
doc/theses/thierry_delisle_MMath/text/cforall.tex (deleted)
-
doc/theses/thierry_delisle_MMath/text/concurrency.tex (deleted)
-
doc/theses/thierry_delisle_MMath/text/frontpgs.tex (deleted)
-
doc/theses/thierry_delisle_MMath/text/future.tex (deleted)
-
doc/theses/thierry_delisle_MMath/text/internals.tex (deleted)
-
doc/theses/thierry_delisle_MMath/text/intro.tex (deleted)
-
doc/theses/thierry_delisle_MMath/text/parallelism.tex (deleted)
-
doc/theses/thierry_delisle_MMath/text/results.tex (deleted)
-
doc/theses/thierry_delisle_MMath/text/together.tex (deleted)
-
doc/theses/thierry_delisle_MMath/thePlan.md (deleted)
-
doc/theses/thierry_delisle_MMath/thesis.tex (deleted)
-
doc/theses/thierry_delisle_MMath/version (deleted)
-
doc/theses/thierry_delisle_MMath/version.sh (deleted)
-
doc/user/user.tex (modified) (10 diffs)
-
driver/as.cc (modified) (2 diffs)
-
driver/cc1.cc (modified) (15 diffs)
-
driver/cfa.cc (modified) (7 diffs)
-
libcfa/configure (modified) (1 diff)
-
libcfa/src/heap.cfa (modified) (3 diffs)
-
src/CodeTools/ResolvProtoDump.cc (deleted)
-
src/CodeTools/ResolvProtoDump.h (deleted)
-
src/CodeTools/module.mk (modified) (1 diff)
-
src/CompilationState.cc (modified) (1 diff)
-
src/CompilationState.h (modified) (1 diff)
-
src/Makefile.in (modified) (4 diffs)
-
src/Parser/LinkageSpec.cc (modified) (2 diffs)
-
src/Parser/LinkageSpec.h (modified) (2 diffs)
-
src/SymTab/Validate.cc (modified) (2 diffs)
-
src/main.cc (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
doc/bibliography/pl.bib
r72b0573 r56b53b2 939 939 title = {\textsf{C}$\mathbf{\forall}$ : Adding Modern Programming Language Features to C}, 940 940 year = 2018, 941 month = aug,942 941 journal = spe, 943 note = { http://dx.doi.org/10.1002/spe.2624},942 note = {Accepted, to appear}, 944 943 } 945 944 … … 963 962 comment = { 964 963 The evidence given is thin. 965 }, 964 } 966 965 } 967 966 … … 1581 1580 1582 1581 @mastersthesis{Delisle18, 1583 author = {Thierry Delisle },1582 author = {Thierry Delisle }, 1584 1583 title = {Concurrency in \textsf{C}$\mathbf{\forall}$}, 1585 1584 school = {School of Computer Science, University of Waterloo}, … … 1828 1827 key = {Peter Buhr}, 1829 1828 title = {CS343}, 1830 year = 201 8,1829 year = 2017, 1831 1830 howpublished= {\href{https://www.student.cs.uwaterloo.ca/~cs343}{https://\-www.student.cs.uwaterloo.ca/\-~cs343}}, 1832 1831 } … … 3363 3362 author = {Peter Buhr and David Dice and Wim H. Hesselink}, 3364 3363 journal = ccpe, 3365 volume = 30,3366 number = 18,3364 volumeopt = 30, 3365 numberopt = 4, 3367 3366 year = 2018, 3368 month = sep,3367 month = may, 3369 3368 publisher = {John Wiley \& Sons}, 3370 3369 note = {\url{https://doi-org.proxy.lib.uwaterloo.ca/10.1002/cpe.4475}} … … 3850 3849 keywords = {concurrency, critical section}, 3851 3850 contributer = {pabuhr@plg}, 3852 author = {Dominic Duggan and G ordonV. Cormack and John Ophel},3851 author = {Dominic Duggan and G. V. Cormack and John Ophel}, 3853 3852 title = {Kinded Type Inference for Parametric Overloading}, 3854 3853 journal = acta, … … 5856 5855 keywords = {Cyclone, existential types, polymorphism, type variables}, 5857 5856 contributer = {a3moss@plg}, 5858 author = {D anGrossman},5857 author = {D. Grossman}, 5859 5858 title = {Quantified Types in an Imperative Language}, 5860 5859 journal = toplas, -
doc/user/user.tex
r72b0573 r56b53b2 11 11 %% Created On : Wed Apr 6 14:53:29 2016 12 12 %% Last Modified By : Peter A. Buhr 13 %% Last Modified On : Fri Aug 31 07:54:50201814 %% Update Count : 33 9613 %% Last Modified On : Thu Jul 26 17:29:05 2018 14 %% Update Count : 3366 15 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 16 … … 210 210 Even with all its problems, C continues to be popular because it allows writing software at virtually any level in a computer system without restriction. 211 211 For system programming, where direct access to hardware, storage management, and real-time issues are a requirement, C is usually the only language of choice. 212 The TIOBE index~\cite{TIOBE} for July 2018 ranks the top five most \emph{popular} programming languages as\Index*{Java} 16\%, C 14\%, \Index*[C++]{\CC{}} 7.5\%, Python 6\%, Visual Basic 4\% = 47.5\%, where the next 50 languages are less than 4\% each, with a long tail.212 The TIOBE index~\cite{TIOBE} for July 2018 ranks the top 5 most \emph{popular} programming languages as: \Index*{Java} 16\%, C 14\%, \Index*[C++]{\CC{}} 7.5\%, Python 6\%, Visual Basic 4\% = 47.5\%, where the next 50 languages are less than 4\% each, with a long tail. 213 213 The top 3 rankings over the past 30 years are: 214 214 \begin{center} … … 351 351 The 2011 C standard plus GNU extensions. 352 352 \item 353 \Indexc[deletekeywords=inline]{-fgnu89-inline}\index{compilation option!-fgnu89-inline@{\lstinline[deletekeywords=inline] $-fgnu89-inline$}}353 \Indexc[deletekeywords=inline]{-fgnu89-inline}\index{compilation option!-fgnu89-inline@{\lstinline[deletekeywords=inline]@-fgnu89-inline@}} 354 354 Use the traditional GNU semantics for inline routines in C11 mode, which allows inline routines in header files. 355 355 \end{description} … … 455 455 #endif 456 456 457 ®#include_next <bfdlink.h> §\C{// must have internal check for multiple expansion}§457 ®#include_next <bfdlink.h> §\C{// must have internal check for multiple expansion}§ 458 458 ® 459 459 #if defined( with ) && defined( __CFA_BFD_H__ ) §\C{// reset only if set}§ … … 504 504 505 505 C, \CC, and Java (and many other programming languages) have no exponentiation operator\index{exponentiation!operator}\index{operator!exponentiation}, \ie $x^y$, and instead use a routine, like \Indexc{pow}, to perform the exponentiation operation. 506 \CFA extends the basic operators with the exponentiation operator ©?\?©\index{?\\?@ ©?\?©} and ©?\=?©\index{?\\=?@©\=?©}, as in, ©x \ y© and ©x \= y©, which means $x^y$ and $x \leftarrow x^y$.506 \CFA extends the basic operators with the exponentiation operator ©?\?©\index{?\\?@\lstinline@?\?@} and ©?\=?©\index{?\\=?@\lstinline@?\=?@}, as in, ©x \ y© and ©x \= y©, which means $x^y$ and $x \leftarrow x^y$. 507 507 The priority of the exponentiation operator is between the cast and multiplicative operators, so that ©w * (int)x \ (int)y * z© is parenthesized as ©((w * (((int)x) \ ((int)y))) * z)©. 508 508 … … 516 516 256 64 -64 0.015625 -0.015625 18.3791736799526 0.264715-1.1922i 517 517 \end{cfa} 518 Parenthesis are necessary for complex constants or the expression is parsed as ©1.0f+®(®2.0fi \ 3.0f®)®+2.0fi©.518 Parenthesis are necessary for the complex constants or the expression is parsed as ©1.0f+(2.0fi \ 3.0f)+2.0fi©. 519 519 The exponentiation operator is available for all the basic types, but for user-defined types, only the integral-computation versions are available. 520 520 For returning an integral value, the user type ©T© must define multiplication, ©*©, and one, ©1©; … … 527 527 528 528 529 %\subsection{\texorpdfstring{\protect\lstinline@if@/\protect\lstinline@while@ Statement}{if Statement}} 530 \subsection{\texorpdfstring{\LstKeywordStyle{if}/\LstKeywordStyle{while} Statement}{if/while Statement}} 531 532 The ©if©/©while© expression allows declarations, similar to ©for© declaration expression. 533 (Does not make sense for ©do©-©while©.) 534 \begin{cfa} 535 if ( ®int x = f()® ) ... §\C{// x != 0}§ 536 if ( ®int x = f(), y = g()® ) ... §\C{// x != 0 \&\& y != 0}§ 537 if ( ®int x = f(), y = g(); x < y® ) ... §\C{// relational expression}§ 538 if ( ®struct S { int i; } x = { f() }; x.i < 4® ) §\C{// relational expression}§ 539 540 while ( ®int x = f()® ) ... §\C{// x != 0}§ 541 while ( ®int x = f(), y = g()® ) ... §\C{// x != 0 \&\& y != 0}§ 542 while ( ®int x = f(), y = g(); x < y® ) ... §\C{// relational expression}§ 543 while ( ®struct S { int i; } x = { f() }; x.i < 4® ) ... §\C{// relational expression}§ 544 \end{cfa} 545 Unless a relational expression is specified, each variable is compared not equal to 0, which is the standard semantics for the ©if©/©while© expression, and the results are combined using the logical ©&&© operator.\footnote{\CC only provides a single declaration always compared not equal to 0.} 529 %\subsection{\texorpdfstring{\protect\lstinline@if@ Statement}{if Statement}} 530 \subsection{\texorpdfstring{\LstKeywordStyle{if} Statement}{if Statement}} 531 532 The ©if© expression allows declarations, similar to ©for© declaration expression: 533 \begin{cfa} 534 if ( int x = f() ) ... §\C{// x != 0}§ 535 if ( int x = f(), y = g() ) ... §\C{// x != 0 \&\& y != 0}§ 536 if ( int x = f(), y = g(); ®x < y® ) ... §\C{// relational expression}§ 537 \end{cfa} 538 Unless a relational expression is specified, each variable is compared not equal to 0, which is the standard semantics for the ©if© expression, and the results are combined using the logical ©&&© operator.\footnote{\CC only provides a single declaration always compared not equal to 0.} 546 539 The scope of the declaration(s) is local to the @if@ statement but exist within both the ``then'' and ``else'' clauses. 547 548 549 %\subsection{\texorpdfstring{\protect\lstinline@for@ Statement}{for Statement}}550 \subsection{\texorpdfstring{\LstKeywordStyle{for} Statement}{for Statement}}551 552 The ©for©/©while©/©do-while© loop-control allows empty or simplified ranges.553 An empty conditional implies ©1©.554 The up-to range ©~©\index{~@©~©} means exclusive range [M,N);555 the up-to range ©~=©\index{~=@©~=©} means inclusive range [M,N].556 The down-to range ©-~©\index{-~@©-~©} means exclusive range [N,M);557 the down-to range ©-~=©\index{-~=@©-~=©} means inclusive range [N,M].558 ©0© is the implicit start value;559 ©1© is the implicit increment value for an up-to range and ©-1© for an implicit down-to range.560 The loop index is polymorphic in the type of the start value or comparison value when start is implicitly ©0©.561 \begin{cquote}562 \begin{tabular}{@{}ll|l@{}}563 \multicolumn{2}{c|}{for control} & \multicolumn{1}{c}{output} \\564 \hline565 \begin{cfa}566 while ®()® { sout | "empty"; break; }567 do { sout | "empty"; break; } while ®()®;568 for ®()® { sout | "empty"; break; }569 for ( ®0® ) { sout | "A"; }570 for ( ®1® ) { sout | "A"; }571 for ( ®10® ) { sout | "A"; }572 for ( ®1 ~= 10 ~ 2® ) { sout | "B"; }573 for ( ®10 -~= 1 ~ -2® ) { sout | "C"; }574 for ( ®0.5 ~ 5.5® ) { sout | "D"; }575 for ( ®5.5 -~ 0.5® ) { sout | "E"; }576 for ( ®i; 10® ) { sout | i; }577 for ( ®i; 1 ~= 10 ~ 2® ) { sout | i; }578 for ( ®i; 10 -~= 1 ~ -2® ) { sout | i; }579 for ( ®i; 0.5 ~ 5.5® ) { sout | i; }580 for ( ®i; 5.5 -~ 0.5® ) { sout | i; }581 for ( ®ui; 2u ~= 10u ~ 2u® ) { sout | ui; }582 for ( ®ui; 10u -~= 2u ~ -2u® ) { sout | ui; }583 int start = 3, comp = 10, inc = 2;584 for ( ®i; start ~ comp ~ inc + 1® ) { sout | i; }585 \end{cfa}586 &587 \begin{cfa}588 sout | endl;589 sout | endl;590 sout | endl;591 sout | endl;592 sout | endl;593 sout | endl;594 sout | endl;595 sout | endl;596 sout | endl;597 sout | endl;598 sout | endl;599 sout | endl;600 sout | endl;601 sout | endl;602 sout | endl;603 sout | endl;604 sout | endl;605 606 sout | endl;607 \end{cfa}608 &609 \begin{cfa}610 empty611 empty612 empty613 614 A615 A A A A A A A A A A616 B B B B B617 C C C C C618 D D D D D619 E E E E E620 0 1 2 3 4 5 6 7 8 9621 1 3 5 7 9622 10 8 6 4 2623 0.5 1.5 2.5 3.5 4.5624 5.5 4.5 3.5 2.5 1.5625 2 4 6 8 10626 10 8 6 4 2627 628 3 6 9629 \end{cfa}630 \end{tabular}631 \end{cquote}632 540 633 541 … … 892 800 893 801 894 % for () => for ( ;; )895 % for ( 10 - t ) => for ( typeof(10 - t) ? = 0 ; ? < 10 - t; ? += 1 ) // using 0 and 1896 % for ( i ; 10 - t ) => for ( typeof(10 - t) i = 0 ; i < 10 - t; i += 1 ) // using 0 and 1897 % for ( T i ; 10 - t ) => for ( T i = 0 ; i < 10 - t; i += 1 ) // using 0 and 1898 % for ( 3~9 ) => for ( int ? = 3 ; ? < 9; ? += 1 ) // using 1899 % for ( i ; 3~9 ) => for ( int i = 3 ; i < 9; i += 1 ) // using 1900 % for ( T i ; 3~9 ) => for ( T i = 3 ; i < 9; i += 1 ) // using 1901 902 903 802 %\subsection{\texorpdfstring{Labelled \protect\lstinline@continue@ / \protect\lstinline@break@}{Labelled continue / break}} 904 803 \subsection{\texorpdfstring{Labelled \LstKeywordStyle{continue} / \LstKeywordStyle{break} Statement}{Labelled continue / break Statement}} … … 906 805 While C provides ©continue© and ©break© statements for altering control flow, both are restricted to one level of nesting for a particular control structure. 907 806 Unfortunately, this restriction forces programmers to use \Indexc{goto} to achieve the equivalent control-flow for more than one level of nesting. 908 To prevent having to switch to the ©goto©, \CFA extends the \Indexc{continue}\index{continue@ ©continue©!labelled}\index{labelled!continue@©continue©} and \Indexc{break}\index{break@©break©!labelled}\index{labelled!break@©break©} with a target label to support static multi-level exit\index{multi-level exit}\index{static multi-level exit}~\cite{Buhr85}, as in Java.807 To prevent having to switch to the ©goto©, \CFA extends the \Indexc{continue}\index{continue@\lstinline@continue@!labelled}\index{labelled!continue@©continue©} and \Indexc{break}\index{break@\lstinline@break@!labelled}\index{labelled!break@©break©} with a target label to support static multi-level exit\index{multi-level exit}\index{static multi-level exit}~\cite{Buhr85}, as in Java. 909 808 For both ©continue© and ©break©, the target label must be directly associated with a ©for©, ©while© or ©do© statement; 910 809 for ©break©, the target label can also be associated with a ©switch©, ©if© or compound (©{}©) statement. … … 991 890 \end{figure} 992 891 993 Both labelled ©continue© and ©break© are a ©goto©\index{goto@ ©goto©!restricted} restricted in the following ways:892 Both labelled ©continue© and ©break© are a ©goto©\index{goto@\lstinline@goto@!restricted} restricted in the following ways: 994 893 \begin{itemize} 995 894 \item -
driver/as.cc
r72b0573 r56b53b2 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // as.c -- map assembler file, scan for debug information. If found, expand file by one character and insert Cforall 8 // language code on the N line from the start of the debug information. 7 // as.c -- 9 8 // 10 9 // Author : Peter A. Buhr 11 10 // Created On : Wed Aug 1 10:49:42 2018 12 11 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Sat Sep 8 08:40:16201814 // Update Count : 9 712 // Last Modified On : Wed Aug 22 17:30:24 2018 13 // Update Count : 93 15 14 // 16 15 … … 44 43 off_t size = mystat.st_size; 45 44 46 if ( size ) { // cannot map 0 sized file 47 char * start = (char *)mmap( NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0 ); 48 if ( start == (void *)-1 ) { perror( "mmap" ); exit( EXIT_FAILURE ); }; 45 char * start = (char *)mmap( NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0 ); 46 if ( start == (void *)-1 ) { perror( "mmap" ); exit( EXIT_FAILURE ); }; 49 47 50 if ( char * cursor = strstr( start, ".Ldebug_info0:" ) ) { // debug information ?51 // Expand file by one byte to hold 2 character Cforall language code.52 if ( ftruncate( fd, size + 1 ) ) { perror( "ftruncate" ); exit( EXIT_FAILURE ); };48 if ( char * cursor = strstr( start, ".Ldebug_info0:" ) ) { // debug information ? 49 // Expand file by one byte to hold 2 character Cforall language code. 50 if ( ftruncate( fd, size + 1 ) ) { perror( "ftruncate" ); exit( EXIT_FAILURE ); }; 53 51 54 for ( int i = 0; i < 8; i += 1 ) {// move N (magic) lines forward55 cursor = strstr( cursor, "\n" ) + 1;56 } // for52 for ( int i = 0; i < 8; i += 1 ) { // move N (magic) lines forward 53 cursor = strstr( cursor, "\n" ) + 1; 54 } // for 57 55 58 cursor -= 2;// backup over "c\n" language value59 if ( *(cursor - 1) != 'x' ) { fprintf( stderr, "invalid C language code\n" ); exit( EXIT_FAILURE ); };56 cursor -= 2; // backup over "c\n" language value 57 if ( *(cursor - 1) != 'x' ) { fprintf( stderr, "invalid C language code\n" ); exit( EXIT_FAILURE ); }; 60 58 61 memmove( cursor + 2, cursor + 1, start + size - cursor - 1 ); // move remaining text 1 character right59 memmove( cursor + 2, cursor + 1, start + size - cursor - 1 ); // move remaining text 1 character right 62 60 63 *(cursor) = '2';// replace C language value with CFA64 *(cursor + 1) = '5';65 } // if61 *(cursor) = '2'; // replace C language value with CFA 62 *(cursor + 1) = '5'; 63 } // if 66 64 67 if ( munmap( start, size ) ) { perror( "munmap" ); exit( EXIT_FAILURE ); }; // update on disk 68 } // if 65 if ( munmap( start, size ) ) { perror( "munmap" ); exit( EXIT_FAILURE ); }; // update on disk 69 66 70 67 argv[0] = "as"; -
driver/cc1.cc
r72b0573 r56b53b2 10 10 // Created On : Fri Aug 26 14:23:51 2005 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Sep 3 16:57:05201813 // Update Count : 12 512 // Last Modified On : Thu Aug 23 09:48:40 2018 13 // Update Count : 122 14 14 // 15 15 … … 32 32 string compiler_name( CFA_BACKEND_CC ); // path/name of C compiler 33 33 34 string D__GCC_X__( "-D__GCC_X__=" ); 34 35 string D__GCC_BPREFIX__( "-D__GCC_BPREFIX__=" ); 35 36 string D__CFA_FLAGPREFIX__( "-D__CFA_FLAG__=" ); … … 45 46 enum { NumSuffixes = 2 }; 46 47 const string suffixes[NumSuffixes] = { "cfa", "hfa", }; 48 47 49 48 50 void suffix( string arg, const char * args[], int & nargs ) { … … 114 116 void Stage1( const int argc, const char * const argv[] ) { 115 117 int code; 118 int i; 116 119 117 120 string arg; … … 136 139 cerr << "Stage1" << endl; 137 140 #endif // __DEBUG_H__ 141 142 // process all the arguments 143 138 144 checkEnv( args, nargs ); // arguments passed via environment variables 139 #ifdef __DEBUG_H__ 140 for ( int i = 1; i < argc; i += 1 ) { 145 146 for ( i = 1; i < argc; i += 1 ) { 147 #ifdef __DEBUG_H__ 141 148 cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl; 142 } // for 143 #endif // __DEBUG_H__ 144 145 // process all the arguments 146 147 for ( int i = 1; i < argc; i += 1 ) { 149 #endif // __DEBUG_H__ 148 150 arg = argv[i]; 151 #ifdef __DEBUG_H__ 152 cerr << "arg:\"" << arg << "\"" << endl; 153 #endif // __DEBUG_H__ 149 154 if ( prefix( arg, "-" ) ) { 150 155 // strip g++ flags that are inappropriate or cause duplicates in subsequent passes … … 180 185 ncargs += 1; 181 186 i += 1; // and the argument 187 // } else if ( prefix( arg, D__GCC_X__ ) ) { 188 // args[nargs] = "-x"; 189 // nargs += 1; 190 // args[nargs] = ( *new string( arg.substr( D__GCC_X__.size() ) ) ).c_str(); // pass the flag along 191 // nargs += 1; 192 // } else if ( arg == "-D" && prefix( argv[i + 1], D__GCC_X__.substr(2) ) ) { 193 // args[nargs] = "-x"; 194 // nargs += 1; 195 // args[nargs] = ( *new string( string( argv[i + 1] ).substr( D__GCC_X__.size() - 2 ) ) ).c_str(); // pass the flag along 196 // nargs += 1; 197 // i += 1; // and the argument 182 198 } else if ( prefix( arg, D__GCC_BPREFIX__ ) ) { 183 199 bprefix = arg.substr( D__GCC_BPREFIX__.size() ); … … 235 251 #ifdef __DEBUG_H__ 236 252 cerr << "args:"; 237 for ( i nt i= 1; i < nargs; i += 1 ) {253 for ( i = 1; i < nargs; i += 1 ) { 238 254 cerr << " " << args[i]; 239 255 } // for … … 266 282 #ifdef __DEBUG_H__ 267 283 cerr << "nargs: " << nargs << endl; 268 for ( i nt i= 0; args[i] != NULL; i += 1 ) {284 for ( i = 0; args[i] != NULL; i += 1 ) { 269 285 cerr << args[i] << " "; 270 286 } // for … … 308 324 #ifdef __DEBUG_H__ 309 325 cerr << "cpp nargs: " << nargs << endl; 310 for ( i nt i= 0; args[i] != NULL; i += 1 ) {326 for ( i = 0; args[i] != NULL; i += 1 ) { 311 327 cerr << args[i] << " "; 312 328 } // for … … 361 377 #ifdef __DEBUG_H__ 362 378 cerr << "cfa-cpp ncargs: " << o_name << " " << CFA_flag << " " << ncargs << endl; 363 for ( i nt i= 0; cargs[i] != NULL; i += 1 ) {379 for ( i = 0; cargs[i] != NULL; i += 1 ) { 364 380 cerr << cargs[i] << " "; 365 381 } // for … … 391 407 392 408 void Stage2( const int argc, const char * const * argv ) { 409 int i; 410 393 411 string arg; 394 412 … … 401 419 cerr << "Stage2" << endl; 402 420 #endif // __DEBUG_H__ 421 422 // process all the arguments 423 403 424 checkEnv( args, nargs ); // arguments passed via environment variables 404 #ifdef __DEBUG_H__ 405 for ( int i = 1; i < argc; i += 1 ) { 425 426 for ( i = 1; i < argc; i += 1 ) { 427 #ifdef __DEBUG_H__ 406 428 cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl; 407 } // for 408 #endif // __DEBUG_H__ 409 410 // process all the arguments 411 412 for ( int i = 1; i < argc; i += 1 ) { 429 #endif // __DEBUG_H__ 413 430 arg = argv[i]; 431 #ifdef __DEBUG_H__ 432 cerr << "arg:\"" << arg << "\"" << endl; 433 #endif // __DEBUG_H__ 414 434 if ( prefix( arg, "-" ) ) { 415 435 // strip inappropriate flags … … 456 476 #ifdef __DEBUG_H__ 457 477 cerr << "args:"; 458 for ( i nt i= 1; i < nargs; i += 1 ) {478 for ( i = 1; i < nargs; i += 1 ) { 459 479 cerr << " " << args[i]; 460 480 } // for … … 472 492 #ifdef __DEBUG_H__ 473 493 cerr << "stage2 nargs: " << nargs << endl; 474 for ( i nt i= 0; args[i] != NULL; i += 1 ) {494 for ( i = 0; args[i] != NULL; i += 1 ) { 475 495 cerr << args[i] << " "; 476 496 } // for … … 486 506 int main( const int argc, const char * const argv[], __attribute__((unused)) const char * const env[] ) { 487 507 #ifdef __DEBUG_H__ 488 for ( int i nt i= 0; env[i] != NULL; i += 1 ) {508 for ( int i = 0; env[i] != NULL; i += 1 ) { 489 509 cerr << env[i] << endl; 490 510 } // for -
driver/cfa.cc
r72b0573 r56b53b2 10 10 // Created On : Tue Aug 20 13:44:49 2002 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Sep 3 16:47:59201813 // Update Count : 27 512 // Last Modified On : Thu Aug 23 15:41:55 2018 13 // Update Count : 270 14 14 // 15 15 … … 43 43 const string suffixes[NumSuffixes] = { "cfa", "hfa", }; 44 44 45 boolsuffix( string arg, const char * args[], int & nargs ) {45 void suffix( string arg, const char * args[], int & nargs ) { 46 46 //std::cerr << arg << std::endl; 47 47 size_t dot = arg.find_last_of( "." ); 48 48 //std::cerr << dot << " " << (dot != string::npos ? arg.substr( dot + 1 ) : "fred" ) << std::endl; 49 if ( dot == string::npos ) return false;49 if ( dot == string::npos ) return; 50 50 string sx = arg.substr( dot + 1 ); 51 51 for ( int i = 0; i < NumSuffixes; i += 1 ) { … … 55 55 args[nargs] = "c"; 56 56 nargs += 1; 57 return true;57 return; 58 58 } // if 59 59 } // for 60 return false;61 60 } // suffix 62 61 … … 129 128 #ifdef __DEBUG_H__ 130 129 cerr << "CFA:" << endl; 130 #endif // __DEBUG_H__ 131 132 // process command-line arguments 133 131 134 for ( int i = 1; i < argc; i += 1 ) { 132 cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl; 133 } // for 134 #endif // __DEBUG_H__ 135 136 // process command-line arguments 137 138 for ( int i = 1; i < argc; i += 1 ) { 135 #ifdef __DEBUG_H__ 136 cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl; 137 #endif // __DEBUG_H__ 139 138 arg = argv[i]; // convert to string value 139 #ifdef __DEBUG_H__ 140 cerr << "arg:\"" << arg << "\"" << endl; 141 #endif // __DEBUG_H__ 140 142 if ( prefix( arg, "-" ) ) { 141 143 // pass through arguments … … 200 202 args[nargs] = argv[i]; // pass the argument along 201 203 nargs += 1; 204 } else if ( arg == "-x" ) { 205 xflag = true; 206 args[nargs] = argv[i]; // pass the argument along 207 nargs += 1; 208 i += 1; // advance to argument 209 args[nargs] = argv[i]; // pass the argument along 210 nargs += 1; 211 // args[nargs] = ( *new string( string("-D__GCC_X__=") + argv[i] ) ).c_str(); // add the argument for -x 212 // nargs += 1; 213 } else if ( prefix( arg, "-x" ) ) { 214 xflag = true; 215 args[nargs] = argv[i]; // pass the argument along 216 nargs += 1; 217 // args[nargs] = ( *new string( string("-D__GCC_X__=") + arg.substr(2) ) ).c_str(); // add the argument for -x 218 // nargs += 1; 202 219 } else if ( arg == "-w" ) { 203 220 args[nargs] = argv[i]; // pass the argument along … … 281 298 } // if 282 299 } else { 283 bool cfa = suffix( arg, args, nargs ); // check suffix 284 args[nargs] = argv[i]; // concatenate file 300 bool opt = false; 301 if ( ! xflag ) { 302 suffix( arg, args, nargs ); // check suffix 303 // args[nargs] = ( *new string( string("-D__GCC_X__=c") ) ).c_str(); // add the argument for -x 304 // nargs += 1; 305 opt = true; 306 } // if 307 // concatenate other arguments 308 args[nargs] = argv[i]; 285 309 nargs += 1; 286 if ( cfa) {310 if ( opt ) { 287 311 args[nargs] = "-x"; 288 312 nargs += 1; 289 313 args[nargs] = "none"; 290 314 nargs += 1; 315 // args[nargs] = ( *new string( string("-D__GCC_X__=none") ) ).c_str(); // add the argument for -x 316 // nargs += 1; 291 317 } // if 292 318 nonoptarg = true; … … 294 320 } // if 295 321 } // for 296 297 args[nargs] = "-x"; // turn off language298 nargs += 1;299 args[nargs] = "none";300 nargs += 1;301 322 302 323 #ifdef __x86_64__ -
libcfa/configure
r72b0573 r56b53b2 1959 1959 1960 1960 1961 1962 1961 am__api_version='1.15' 1963 1962 -
libcfa/src/heap.cfa
r72b0573 r56b53b2 10 10 // Created On : Tue Dec 19 21:58:35 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Sep 6 09:01:30201813 // Update Count : 51 312 // Last Modified On : Thu Aug 23 06:11:44 2018 13 // Update Count : 511 14 14 // 15 15 … … 329 329 #endif // __CFA_DEBUG__ 330 330 331 //assert( heapManager.heapBegin != 0 ); 332 //heapManager{}; 333 if ( heapManager.heapBegin == 0 ) heapManager{}; 331 assert( heapManager.heapBegin == 0 ); // always perform check, done once 332 heapManager{}; 334 333 } // memory_startup 335 334 … … 701 700 702 701 static inline void * mallocNoStats( size_t size ) { // necessary for malloc statistics 703 //assert( heapManager.heapBegin != 0 ); 704 if ( unlikely( heapManager.heapBegin == 0 ) ) heapManager{}; // called before memory_startup ? 702 assert( heapManager.heapBegin != 0 ); 705 703 void * area = doMalloc( size ); 706 704 if ( unlikely( area == 0 ) ) errno = ENOMEM; // POSIX -
src/CodeTools/module.mk
r72b0573 r56b53b2 16 16 17 17 SRC += CodeTools/DeclStats.cc \ 18 CodeTools/ResolvProtoDump.cc \19 18 CodeTools/TrackLoc.cc -
src/CompilationState.cc
r72b0573 r56b53b2 30 30 parsep = false, 31 31 resolvep = false, 32 resolvprotop = false,33 32 symtabp = false, 34 33 treep = false, -
src/CompilationState.h
r72b0573 r56b53b2 31 31 parsep, 32 32 resolvep, 33 resolvprotop,34 33 symtabp, 35 34 treep, -
src/Makefile.in
r72b0573 r56b53b2 220 220 CodeGen/FixNames.$(OBJEXT) CodeGen/FixMain.$(OBJEXT) \ 221 221 CodeGen/OperatorTable.$(OBJEXT) CodeTools/DeclStats.$(OBJEXT) \ 222 CodeTools/ResolvProtoDump.$(OBJEXT) \223 222 CodeTools/TrackLoc.$(OBJEXT) Concurrency/Keywords.$(OBJEXT) \ 224 223 Concurrency/Waitfor.$(OBJEXT) Common/SemanticError.$(OBJEXT) \ … … 520 519 CodeGen/FixNames.cc CodeGen/FixMain.cc \ 521 520 CodeGen/OperatorTable.cc CodeTools/DeclStats.cc \ 522 CodeTools/ResolvProtoDump.cc CodeTools/TrackLoc.cc \ 523 Concurrency/Keywords.cc Concurrency/Waitfor.cc \ 524 Common/SemanticError.cc Common/UniqueName.cc \ 525 Common/DebugMalloc.cc Common/Assert.cc Common/Heap.cc \ 526 Common/Eval.cc ControlStruct/LabelGenerator.cc \ 521 CodeTools/TrackLoc.cc Concurrency/Keywords.cc \ 522 Concurrency/Waitfor.cc Common/SemanticError.cc \ 523 Common/UniqueName.cc Common/DebugMalloc.cc Common/Assert.cc \ 524 Common/Heap.cc Common/Eval.cc ControlStruct/LabelGenerator.cc \ 527 525 ControlStruct/LabelFixer.cc ControlStruct/MLEMutator.cc \ 528 526 ControlStruct/Mutate.cc ControlStruct/ForExprMutator.cc \ … … 1001 999 CodeTools/DeclStats.$(OBJEXT): CodeTools/$(am__dirstamp) \ 1002 1000 CodeTools/$(DEPDIR)/$(am__dirstamp) 1003 CodeTools/ResolvProtoDump.$(OBJEXT): CodeTools/$(am__dirstamp) \1004 CodeTools/$(DEPDIR)/$(am__dirstamp)1005 1001 CodeTools/TrackLoc.$(OBJEXT): CodeTools/$(am__dirstamp) \ 1006 1002 CodeTools/$(DEPDIR)/$(am__dirstamp) … … 1105 1101 @AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/OperatorTable.Po@am__quote@ 1106 1102 @AMDEP_TRUE@@am__include@ @am__quote@CodeTools/$(DEPDIR)/DeclStats.Po@am__quote@ 1107 @AMDEP_TRUE@@am__include@ @am__quote@CodeTools/$(DEPDIR)/ResolvProtoDump.Po@am__quote@1108 1103 @AMDEP_TRUE@@am__include@ @am__quote@CodeTools/$(DEPDIR)/TrackLoc.Po@am__quote@ 1109 1104 @AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/Assert.Po@am__quote@ -
src/Parser/LinkageSpec.cc
r72b0573 r56b53b2 10 10 // Created On : Sat May 16 13:22:09 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Thr Spt 12 15:59:00 201813 // Update Count : 2 612 // Last Modified On : Fri Jul 7 11:11:00 2017 13 // Update Count : 25 14 14 // 15 15 … … 23 23 24 24 namespace LinkageSpec { 25 26 Spec linkageCheck( CodeLocation location, const string * spec ) { 27 assert( spec ); 28 unique_ptr<const string> guard( spec ); // allocated by lexer 29 if ( *spec == "\"Cforall\"" ) { 30 return Cforall; 31 } else if ( *spec == "\"C\"" ) { 32 return C; 33 } else if ( *spec == "\"BuiltinC\"" ) { 34 return BuiltinC; 35 } else { 36 SemanticError( location, "Invalid linkage specifier " + *spec ); 37 } // if 38 } 25 39 26 40 Spec linkageUpdate( CodeLocation location, Spec old_spec, const string * cmd ) { -
src/Parser/LinkageSpec.h
r72b0573 r56b53b2 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 13:24:28 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Thr Spt 13 15:59:00201813 // Update Count : 1 711 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jul 2 07:46:49 2018 13 // Update Count : 16 14 14 // 15 15 … … 41 41 42 42 43 Spec linkageCheck( CodeLocation location, const std::string * ); 44 // Returns the Spec with the given name (limited to C, Cforall & BuiltinC) 43 45 Spec linkageUpdate( CodeLocation location, Spec old_spec, const std::string * cmd ); 44 46 /* If cmd = "C" returns a Spec that is old_spec with is_mangled = false -
src/SymTab/Validate.cc
r72b0573 r56b53b2 403 403 assert( aggr ); // TODO: need to handle forward declarations 404 404 for ( Declaration * member : aggr->members ) { 405 if ( TypeInstType * inst = dynamic_cast< TypeInstType * >( child ) ) { 405 if ( StructInstType * inst = dynamic_cast< StructInstType * >( child ) ) { 406 if ( StructDecl * aggr = dynamic_cast< StructDecl * >( member ) ) { 407 if ( aggr->name == inst->name ) { 408 // TODO: is this case, and other non-TypeInstType cases, necessary? 409 return new StructInstType( qualType->get_qualifiers(), aggr ); 410 } 411 } 412 } else if ( UnionInstType * inst = dynamic_cast< UnionInstType * >( child ) ) { 413 if ( UnionDecl * aggr = dynamic_cast< UnionDecl * > ( member ) ) { 414 if ( aggr->name == inst->name ) { 415 return new UnionInstType( qualType->get_qualifiers(), aggr ); 416 } 417 } 418 } else if ( EnumInstType * inst = dynamic_cast< EnumInstType * >( child ) ) { 419 if ( EnumDecl * aggr = dynamic_cast< EnumDecl * > ( member ) ) { 420 if ( aggr->name == inst->name ) { 421 return new EnumInstType( qualType->get_qualifiers(), aggr ); 422 } 423 } 424 } else if ( TypeInstType * inst = dynamic_cast< TypeInstType * >( child ) ) { 406 425 // name on the right is a typedef 407 426 if ( NamedTypeDecl * aggr = dynamic_cast< NamedTypeDecl * > ( member ) ) { … … 410 429 Type * ret = aggr->base->clone(); 411 430 ret->get_qualifiers() = qualType->get_qualifiers(); 412 TypeSubstitution sub = parent->genericSubstitution();413 sub.apply(ret);414 431 return ret; 415 432 } -
src/main.cc
r72b0573 r56b53b2 34 34 #include "CodeGen/Generate.h" // for generate 35 35 #include "CodeTools/DeclStats.h" // for printDeclStats 36 #include "CodeTools/ResolvProtoDump.h" // for dumpAsResolvProto37 36 #include "CodeTools/TrackLoc.h" // for fillLocations 38 37 #include "Common/CompilerError.h" // for CompilerError … … 272 271 CodeTools::fillLocations( translationUnit ); 273 272 274 if ( resolvprotop ) {275 CodeTools::dumpAsResolvProto( translationUnit );276 return 0;277 }278 279 273 PASS( "resolve", ResolvExpr::resolve( translationUnit ) ); 280 274 if ( exprp ) { … … 382 376 383 377 void parse_cmdline( int argc, char * argv[], const char *& filename ) { 384 enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Linemarks, Nolinemarks, Nopreamble, Parse, PreludeDir, Prototypes, Resolver, ResolvProto,Symbol, Tree, TupleExpansion, Validate, };378 enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Linemarks, Nolinemarks, Nopreamble, Parse, PreludeDir, Prototypes, Resolver, Symbol, Tree, TupleExpansion, Validate, }; 385 379 386 380 static struct option long_opts[] = { … … 401 395 { "no-prototypes", no_argument, 0, Prototypes }, 402 396 { "resolver", no_argument, 0, Resolver }, 403 { "resolv-proto", no_argument, 0, ResolvProto },404 397 { "symbol", no_argument, 0, Symbol }, 405 398 { "tree", no_argument, 0, Tree }, … … 414 407 bool Wsuppress = false, Werror = false; 415 408 int c; 416 while ( (c = getopt_long( argc, argv, "abBcCdefgGlLmnNpqr RstTvwW:yzZD:F:", long_opts, &long_index )) != -1 ) {409 while ( (c = getopt_long( argc, argv, "abBcCdefgGlLmnNpqrstTvwW:yzZD:F:", long_opts, &long_index )) != -1 ) { 417 410 switch ( c ) { 418 411 case Ast: … … 486 479 case 'r': // print resolver steps 487 480 resolvep = true; 488 break;489 case 'R': // dump resolv-proto instance490 resolvprotop = true;491 481 break; 492 482 case Symbol:
Note:
See TracChangeset
for help on using the changeset viewer.