summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-03-05Add more location information to IRAlasdair
2021-02-25Remove accidental use of too-recent Option moduleBrian Campbell
Also drop a related bit of dead code
2021-02-25Add -infer_effects optionBrian Campbell
2021-02-24Fill out some missing cases in free variable calculationBrian Campbell
In particular, some of these affected the topological sorting.
2021-02-17Make sure :step_function appears in :commandsAlasdair
2021-02-17Check if an unbound identifier is bound as a function identifierAlasdair
Give a hint in the error message if this is the case
2021-01-05Fix some cases when monomorphising vectors containing variable-length bitvectorsAlasdair
2021-01-05Enum value feature request for AlexandreAlasdair
2021-01-05Don't allow type synonyms with the same name as existing typesAlasdair
2020-11-25Remove bogus pattern completeness warning on singleton enums and unionsBrian Campbell
2020-11-25Fix Lem output for single element enumBrian Campbell
2020-11-21Make coverage support look a little harder for location informationBrian Campbell
2020-11-20Add coverage output to short-circuiting operatorsBrian Campbell
2020-11-19Make mono rewrites be more careful to produce constant-sized typesBrian Campbell
While the backends will usually manage to find the constant size anyway, this ensures that implicit arguments will be filled in with the constant value too. (For example, this was affecting isla execution in one corner case because the slice_mask primitive didn't see that the size was constant.)
2020-11-18Fix coverage information in case branches that immediately returnBrian Campbell
2020-11-01Fix interpreter pattern matching bugAlasdair
2020-10-21Merge pull request #106 from jrtc27/latex-abbrevs-spacingAlasdair Armstrong
latex: Guard abbreviations with \@
2020-10-14Support C coverage when sail_exit is usedBrian Campbell
2020-10-07latex: Guard abbreviations with \@Jessica Clarke
Otherwise they will be typeset as if the end of a sentence, causing additional spacing after the '.' when not using \frenchspacing.
2020-10-01Add ast_defs to libsailAlasdair
2020-09-30Merge pull request #100 from arichardson/add-more-latex-tests-and-fix-escapingAlasdair Armstrong
Add more latex tests and fix underscore escaping
2020-09-29Include comments in AST typeAlasdair
2020-09-29Refactor: Change AST type from a union to a structAlasdair
2020-09-28LaTeX: Underscore-escape values in the \ifstrequal codeAlex Richardson
2020-09-28LaTeX: provide default implementations of the other saildoc commandsAlex Richardson
2020-09-28Refactor: Rename 'a defs to 'a astAlasdair
Change internal terminology so we more clearly distinguish between a list of definitions 'defs' and functions that take an entire abstract syntax trees 'ast'.
2020-09-28Move the ast defs wrapper into it's own fileAlasdair
This refactoring is intended to allow this type to have more than just a list of definitions in future.
2020-09-28Merge pull request #98 from arichardson/add-sectioning-commandsAlasdair Armstrong
Handle sectioning commands in saildoc LaTeX output
2020-09-28LaTeX: Add newline after itemize and enumerate environmentsAlex Richardson
2020-09-28Handle sectioning commands in saildoc LaTeX outputAlex Richardson
2020-09-27latex: Prefix label names with the specified -latex_prefixJessica Clarke
This ensures names shared between multiple projects don't collide if included in a common LaTeX document; cheri-architecture using both sail-cheri-mips and sail-cheri-riscv runs into this. Closes: #88
2020-09-27latex: Prepend opt_prefix inside latex_cat_idJessica Clarke
Now that the category is prepended in latex_cat_id, also prepend opt_prefix there instead to ensure no caller forgets to do so. No functional change intended, and verified by regenerating the LaTeX for sail-cheri-mips and sail-cheri-riscv.
2020-09-27latex: Refactor category name prefixingJessica Clarke
Rather than having the caller prefix latex and refcode strings with the category, push that down into common functions to both abstract away the details and avoid duplication. No functional change intended, and verified by regenerating the LaTeX for sail-cheri-mips and sail-cheri-riscv.
2020-09-27latex: Remove unused latex_label functionJessica Clarke
2020-09-25Saildoc: do not mangle links targets enclosed in <>Alex Richardson
This can be useful to reference things that aren't defined by sail.
2020-09-24Wrap saildoc LaTeX in \saildoclabelled macroJessica Clarke
This takes two arguments: the label name and the \saildocfoo macro use itself. This allows cunning definitions of \saildoclabelled and \saildocfoo to tease apart the various bits and reconstruct them in a different order without having to redefine \phantomsection and \label temporarily and hard-code knowledge of the implementation of these documentation commands. I intend to use these in cheri-architecture in combination with sail-cheri-riscv. Unlike the other macros, this is considered a bit more niche, so we include a default definition of it that expands to what was previously hard-coded. This also makes this a non-breaking change.
2020-09-24Merge pull request #93 from jrtc27/saildoc-improvementsAlasdair Armstrong
Saildoc improvements
2020-09-24Merge pull request #91 from julienfreche/remove_extra_staticAlasdair Armstrong
C codegen: remove an unnecessary declaration in the header file
2020-09-23Allow more access to parts of Env (needed by minisail)Mark Wassell
2020-09-21latex: Handle Ulp, Ol and Olp markdown constructsJessica Clarke
2020-09-21latex: Dump out S-Expr of any unhandled markdownJessica Clarke
Printing the text is only so helpful; the most important thing to know is what kind of element it actually is, which is lost when extracting the text. Instead, print the whole S-Expr.
2020-09-21Strip leading *'s from saildocJessica Clarke
We now parse /*! * Paragraph */ and /*! *Paragraph */ the same as /*! Paragraph */ since the first form is prettier, and similar to what Doxygen, Javadoc and other such tools allow. This can cause mild confusion, as if the start of a line in the final form happens to have a * then it will unexpectedly remove it, but this is a problem shared by those tools too and the intent is that everyone just use the first form and never need to worry about it.
2020-09-20Improve parsing of saildoc commentsJessica Clarke
These were only parsed for val specs and scattered clauses, but many other constructs can be meaningfully documented. Moreover, attaching the documentation to the SD_aux rather than the FCL_aux etc inside it is unhelpful since the latter is what the LaTeX backend sees. Instead, push the documentation down into the non-scattered entity within the SD_aux (i.e. the FCL_aux / Tu_aux / MCL_aux) when possible, only leaving it on the SD_aux when they are more like a val spec. This means that the saildoc for scattered function clauses is now emitted, without any changes needed to the LaTeX backend. Also support saildoc on a wider variety of non-scattered constructs, and slightly simplify aspects of the grammar whilst here.
2020-09-16C codegen: remove an unnecessary declaration in the header fileJulien Freche
2020-09-07Fix typo a mono_rewrites definitionBrian Campbell
- add tests for a couple of related rewrites - accept same range of constants for sign extension in the rewrite as for the zero extension version (to make the test simpler)
2020-09-02Consider case expressions in early return rewriteThomas Bauereiss
2020-08-27Ignore file start/end pragmas in spliceBrian Campbell
2020-08-27Perform truncation of hex literals for C backend (really for isla)Brian Campbell
For example, if a 129-bit capability is given as a 132-bit hex literal and truncated, this produces a 129-bit binary literal. In isla, this will keep all of the computation concrete because 129-bit concrete values are supported.
2020-08-25Add function sail_set_coverage_file to sail_coverage headerAlasdair
Can be set by C emulator to control where coverage information is written
2020-08-24Reformat tweaksAlasdair