Commit Graph

14701 Commits (0c9277108b31de846081365ba446caa5e40845d1)
 

Author SHA1 Message Date
Wilfred Hughes 0c9277108b It's not actually a 2x perf win
It's more like a 15% reduction in instruction count, which is still
nice.
2024-05-10 16:28:16 +07:00
Wilfred Hughes edb839c803 Improve terminal width detection
Ensure the value is always non-zero, and consider $COLUMNS if
crossterm does not succeed.

Fixes #707
2024-05-10 16:26:48 +07:00
Wilfred Hughes 9d2574dbd1 Update assert_cmd dependency 2024-05-10 16:08:56 +07:00
Wilfred Hughes be95b31896 Tests do actually import predicates, so restore dependency with looser bounds 2024-05-10 16:02:21 +07:00
Wilfred Hughes f665c73fe0 Remove pin in dev dependencies that is no longer necessary 2024-05-10 15:57:14 +07:00
Wilfred Hughes 6a3b340d5f Prefer 'terminal' over 'display' terminology 2024-05-10 15:53:40 +07:00
Wilfred Hughes ec7a765453 Factor out a constant for the default terminal width 2024-05-10 15:50:56 +07:00
Wilfred Hughes 1954f15e0d Fix typo 2024-05-07 08:50:54 +07:00
Grégoire Paris 082abf65d1 Document how to disable difftastic temporarily
It can be useful if you want to obtain a diff in the standard format and
copy paste it to github, for instance.
2024-05-07 08:48:20 +07:00
Wilfred Hughes 0ceb00093a Move notes to wiki 2024-05-07 08:42:45 +07:00
Wilfred Hughes 03d1f9bf26 Lint against .to_string() on String 2024-05-07 08:39:07 +07:00
Wilfred Hughes 9474635076 Prefer .to_owned() on &str 2024-05-07 08:32:30 +07:00
Wilfred Hughes 33542a47d5 Update CMake highlights for latest grammar 2024-05-07 08:29:34 +07:00
Wilfred Hughes e23b9fc224 Update CMake parser 2024-04-28 23:53:12 +07:00
Wilfred Hughes 9207220a02 Merge commit '20ffd6d3b4da1acdbf2d08204b2130a5b2f7c4b3' 2024-04-28 23:51:13 +07:00
Wilfred Hughes ecaee577b2 Update Elm parser 2024-04-28 23:50:29 +07:00
Wilfred Hughes 1dd7bbebe8 Merge commit '09dbf221d7491dc8d8839616b27c21b9c025c457' 2024-04-28 23:48:30 +07:00
Wilfred Hughes ae77a9cdf7 Document C++ parser change 2024-04-28 23:43:58 +07:00
Wilfred Hughes a9be2fefa7 Remove awkard CRLF file from vendored parser 2024-04-28 23:43:26 +07:00
Wilfred Hughes 4dc541b261 Merge commit '72fd00128f1c38319670cbf4bcedbba0dc849d96' 2024-04-28 23:42:03 +07:00
Wilfred Hughes b4ff51f6ac Update URL to Lua parser 2024-04-28 23:34:12 +07:00
Wilfred Hughes 27fb722ac7 Merge commit '1aafaff4d26dac5a36dd3495be33e1c20161d761' 2024-04-28 23:31:25 +07:00
Wilfred Hughes 5c40cd0282 Prefer _1 and _2 naming for test files
This is less to type, and it's now alphabetical, so e.g.
sample_files/*.kt just works as a test argument.
2024-04-28 23:28:06 +07:00
Wilfred Hughes cce7b2ee1b Merge commit 'b466ffb4d7ce0a833754429ad8d3a02e950ed74c' 2024-04-28 23:00:00 +07:00
Wilfred Hughes a5b2587eaa Merge commit 'eb68645662a3f7bf7fdd4bcb9531585f54c8570e' 2024-04-28 22:54:18 +07:00
Wilfred Hughes c2df185d49 Update Lua parser
Closes #701
2024-04-28 22:36:23 +07:00
Wilfred Hughes 50d90f6736 Add 'vendored_parsers/tree-sitter-lua/' from commit 'a24dab177e58c9c6832f96b9a73102a0cfbced4a'
git-subtree-dir: vendored_parsers/tree-sitter-lua
git-subtree-mainline: 9e44712cda
git-subtree-split: a24dab177e
2024-04-28 22:06:22 +07:00
Wilfred Hughes 9e44712cda Remove old lua grammar 2024-04-28 22:06:00 +07:00
Wilfred Hughes 2e016566ac Update CSS parser 2024-04-28 21:45:25 +07:00
Wilfred Hughes 688aaa83f8 Merge commit '02b4ee757654b7d54fe35352fd8e53a8a4385d42' 2024-04-28 17:32:23 +07:00
Wilfred Hughes 38f148df1f Don't flatten error nodes
As of b9d44ae65f (released in 0.38), difftastic prefers a textual
diff if any parse errors are present. As a result, users have to
opt-in to allowing parse errors. We can now preserve structure to
produce diffs that are more granular, at the slight risk of changes
being missed if parsers discard tokens.

Fixes #703
2024-04-28 17:28:34 +07:00
Wilfred Hughes 7f5c11c075 cargo fmt 2024-04-28 16:40:00 +07:00
Wilfred Hughes 8655a9464e Fix unwanted duplicate node in existing vec
Broken in previous commit. This is now only a few percentage points
performance win, but it's still a net improvement.
2024-04-28 16:35:40 +07:00
Wilfred Hughes d15d593708 Move to smallvec for seen vertices
This is a surprisingly large perf win. On my Thinkpad:

typing_before/after.ml:
before: 3.038B instructions
after:  2.870B instructions

slow_before/after.rs:
before: 2.381B instructions
after:  1.260B instructions (!)
2024-04-28 16:16:47 +07:00
Wilfred Hughes 26e1ae40ef Fix clippy lints 2024-04-28 16:09:54 +07:00
Steinar H. Gunderson 302570591f Make Stack be allocated on the arena.
This fixes another memory leak, and also removes the need for
refcounting the Stack objects and the Node objects they point to.
2024-04-28 15:46:23 +07:00
Steinar H. Gunderson 4fb1478817 Fix memory leak in neighbours array.
Vertex is allocated on the arena, so it is never dropped;
then it cannot contain a Vec allocated on the regular heap
without leaking memory. Replace the Vec with a slice allocated
on the arena, which seems to fix most of the leaks. (Some may
remain; I haven't checked fully.) It should also be slightly
more memory-efficient.

It's not clear that we actually need the RefCell instead of
just putting Option directly into the structure, but I've
let it stay.

This issue was probably introduced in a71d6118cf.
2024-04-28 15:46:23 +07:00
Wilfred Hughes 7353a7926f Try enabling ARM macos on CI 2024-04-28 15:23:45 +07:00
Wilfred Hughes cafff7f128 Pin mac build to macos-12 2024-04-28 15:16:04 +07:00
Wilfred Hughes d2cdb96e00 Expand man page and add to changelog 2024-04-28 15:07:23 +07:00
ObserverOfTime b466ffb4d7 chore: fix crlf line endings 2024-04-28 04:25:52 +07:00
Wilfred Hughes cb63ca8830 Write a basic man page 2024-04-27 16:21:17 +07:00
Manuel 5ade0bbe9c readme: direct link to languages section 2024-04-25 07:23:49 +07:00
Amaan Qureshi 72fd00128f
0.22.0 2024-04-14 21:38:58 +07:00
Amaan Qureshi f3d2757f11 chore: generate 2024-04-14 16:03:44 +07:00
Amaan Qureshi f8efc57abe feat: support reference declarators in types 2024-04-14 16:03:44 +07:00
Amaan Qureshi 60d357fc70 feat: add optional attribute declarations after 'namespace' 2024-04-14 16:03:44 +07:00
Amaan Qureshi 1c3c93d727 feat: support pure virtual destructors 2024-04-14 16:03:44 +07:00
Amaan Qureshi aa79a170c6 fix: specifier and virtual do not strictly require each other 2024-04-14 16:03:44 +07:00
Amaan Qureshi f79b9d9859
fix(scanner): only call memcpy if `length` is greater than 0 2024-04-11 21:23:17 +07:00