* Fixes issue 668
The error message for default args was added to a Node that was then removed from the AST.
This fixes that and ensures the error is only reported once.
* Clangformat
* Update trieste again.
* Add a broken nesting example
* Add some comment examples
* Multi-line comments should be
RE2 `.` does not match newlines by default. This allows newlines inside multi-line comments.
* Initial TOC draft for the language specification.
* Added changes and comments from discussion.
---------
Co-authored-by: Matthew Parkinson <mattpark@microsoft.com>
* Reinstate old test suite
This is a simple output comparison based testsuite.
The previous version of this is on the `old-version` branch.
* Windows line endings fix.
* use typevar function
* lift lambda classes to the block, not the classbody
* use node to token comparison
* WIP, need to lift lambdas earlier
* change all dir::once passes to bottomup
* pick up trieste performance improvements
* move conditionals pass earlier
* detect bad default args early
* separate reference and typereference
* move the lambda pass earlier
* move autocreate and defaultargs earlier
* fix defaultargs param order
* remove symtab from Block
* discard std::equal result as a pairwise check
* capture param type before error is emitted
* move std into the top level of the source tree
* check typeargs on functions
* use Ident for function names even when they're Symbols
* use fully qualified names
* detect too many typeargs
* use lookup sets instead of vectors
* auto-insert
* memberconflict now finds defaultarg arity conflicts
* detect recursive inheritance
* code reuse, still needs type substitution
* diamond inheritance with a better error message
* type substitution in code reuse
* bug fixes
This commit removes almost everything from the repo. This is in
preparation for bringing in the new Trieste based frontend.
The commit is very aggressive in removing things, but old stuff
can be reinstated from the `old_version` branch.
The aim is to ensure everything in the repo is consistent, so we
will need to PR in any documentation and code.
* Fix region_rc to use correct method
* Fix bug in weak reference count
The existing implementation has a bug in promoting a weak reference
count to strong. This address this bug, and
documents the fix, and provides a proof of the properties using
starling.
* GC old code.
* Fix harness for deterministic epoch order
* Add collection of simple tests for debugging.
* Reduce reference count
* Remove a guard variable.
* Enable preventing pre-emption in systematic testing.
It can be useful to force a collection of operations to occur at a
sensitive point in an algorithm. This block systematic testing from
breaking them into smaller operations.
* Disable FPWB in SysTesting
In systematic testing, there is no need to perform
FlushProcessWriteBuffers. The program is executing sequentially
already, so this is not required.
* Fix bug in epoch mechanism
The logic was incorrectly determining if all the threads were in the
correct epoch.
The next commit will document this file.
* Make Asym lock return if it is the rentrant case.
* Add a few methods for checking the asym lock state
* Tidying and documentation of epoch mechanism
* Improve test coverage for noticeboard epoch usage
* Fixup changes to epoch mechanism
* Remove broken assert
* Increase frequency of epoch change
* White space
* Alter teardown to handle external threads.
* Fixup flushing.
* Fix atomic annotation
* Clangformat
* Minor
* CR with Sylvan
* Clangformat
* Improve rejoin protocol.
* Fix teardown leak.
* adding == and != comparison operators for cown_ptr and nullptr
* moving operator with member access inside struct
* adding nullptr assignment to cowns
* adding std to assignment operator
* Remove index as no longer needed.
* GC old code
* Optimise the multimessage body allocation
Prior to this commit the multimessage was composed of three allocations,
the body, the cowns array and the behaviour/closure to execute. This
commit merges the three structures into a single
allocation.
Fixes#552. Their was a sporadic memory leak only observed on Windows. This PR adds some logging that helped diganose the issue, and fixes the issue.
The poller cown is decrefed by the external source, however this decref can occur
after the runtime has executed the teardown, and thus is leads to a memory
leak.
This commit changes the order so the last thing the external event source does
is decrease the event source count, and thus the runtime cannot begin teardown
until the external thread has completed all its actions.
The variable `total_cowns` should be the length of the per-thread cown list.
This is not the case, this commit checks that this is the case, and correctly
updates it.
The `snmalloc::message` function calls `fsync` on `stderr`. With
Capsicum, this is an explicit permission and so tests that hit a code
path that did some logging (specifically, the curl test) in debug builds
during system call emulation would receive the second trap.
The first symptom of this is fixed by adding fsync permission to the
standard out / error file descriptors. With that change, all of the
tests pass but the underlying problem remains: the signal is delivered
*after* return from the first system call, at which point it does not
have a sensible `ucontext` and things break in exciting ways
(sufficiently exciting that a debugger can't tell you anything useful).
The root cause is addressed by adding `SA_NODEFER` when registering the
signal handler. This allows system calls that are used to emulate
other signal handlers to deliver their signals on top of the stack. If
a system call is used in emulating itself, this still goes horribly
wrong, but in a way that's much easier to debug.
At the same time, use the SIGCAP support that is in process of being
upstreamed to FreeBSD. This makes debugging Capsicum failures easier
because the debugger does not try to hide the signal from the
application whose correctness depends on handling it.
* Improved API for CPP
This introduces a namespace for the verona C++ api:
verona::cpp
It also fixes a couple of move/copy constructor/operators.
* Fix assert, now assignment operator is correct.