| Age | Commit message (Collapse) | Author |
|
Returning an optional of the removed item is not very idiomatic and
we currently have no use case for this.
|
|
FifoWatcher::read_fifo() deletes the fifo watcher in
m_buffer.values().erase(fifo_watcher_id); // will delete this
which calls: HashMap::unordered_remove()
constexpr_swap(m_items[index], m_items.back());
destructor called here --> m_items.pop_back();
m_index.remove(hash, index);
So hash map invariants (of buffer.values()) are broken, when calling
~FifoWatcher which fires BufCloseFifo hooks. Things blow up if those
hooks access buffer.values() such as by accessing cached highlighters
to redraw the buffer. A shell call with a long sleep in the client
context seems to trigger this.
Fix this by destroying removed map items only at the end of
HashMap::remove(), when invariants are restored. Alternatively, we
could introduce a fifo_trash container; I haven't explored that.
|
|
|
|
|
|
Apparently GCC builds worked fine but Clang builds started failing the
"(hash == hash_value(item_key(item)))" assertion.
|
|
Avoid multiple computation of string hashes by making it possible
to pre-compute and pass hashes to interned strings and hash maps.
|
|
Since C++20 (a != b) get automatically rewritten as !(a == b) if
the != operator does not exist.
|
|
Add an iterator based remove to HashMap as that was missing. Make
KeymapManager responsible for throwing on unmap an executing mapping.
|
|
Instead of storing regexes in each regions, move them to the core
highlighter in a hash map so that shared regexes between different
regions are only applied once per update instead of once per region
Also change iteration logic to apply all regex together to each
changed lines to improve memory locality on big buffers.
For the big_markdown.md file described in #4685 this reduces
initial display time from 3.55s to 2.41s on my machine.
|
|
|
|
We do not seem to have any uses for this remaining, and this is
better opt-in with MultiHashMap
|
|
Introduce some concepts for enum and flags handling, goodbye and
thanks for all the fish std::enable_if.
|
|
|
|
|
|
|
|
|
|
Fixes #1652
|
|
This hash map is now fully constexpr, and ends up stored in the read
only data segment instead of being recomputed at each startup.
|
|
This reverts commit b58f72315cbf7ee8921659dd129fd2f6a221bcfc.
Unfortunately gcc-5.1 handling of variable template partial
specializations is bugged.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|