Max Brunsfeld
74d154c706
Use CLOCK_MONOTONIC on platforms that support it
...
This way, timeouts will apply even if the current process
is starved for CPU.
2019-03-21 14:13:42 -07:00
Max Brunsfeld
2fd9ffa8e5
Add --cancel flag to parse command to allow command-line testing
2019-03-21 10:56:32 -07:00
Max Brunsfeld
3340168097
Fix backwards logic for cancellation flag
2019-03-20 17:02:07 -07:00
Max Brunsfeld
0ae304f582
Lib: Rework the API for cancelling a parse
...
Also, use beta on CI until atomic::AtomicU32 lands in stable.
2019-03-18 09:51:21 -07:00
Jacob Mitchell
c8d040ca26
Use 1-indexed rows in CLI and log output ( resolves #287 )
2019-03-14 22:21:19 -07:00
Max Brunsfeld
1aaad66a03
Merge pull request #301 from tree-sitter/clock-based-timeouts
...
Replace operation limit API with a clock-based timeout API
2019-03-14 16:50:44 -07:00
Max Brunsfeld
23dfde067e
Get disabled debugging code compiling again
...
Fixes #303
2019-03-14 16:50:10 -07:00
Max Brunsfeld
59fd8528d4
Avoid division rounding errors w/ clock counts
2019-03-14 15:53:45 -07:00
Max Brunsfeld
006a931ab8
Tests: Prevent array reallocations during ts_stack_print_dot_graph
...
When debugging a test with 'script/test -D', the DOT-graph generation
code was sometimes causing reallocations that were not captured by the
allocation tracker, because we explicitly disable allocation-tracking
for that method in order to reduce noise when debugging memory leaks.
By growing the relevant array *prior* to turning off allocation
tracking, we can ensure that it is not reallocated within that function,
avoiding false positive memory leak errors.
Fixes #302
2019-03-14 13:59:12 -07:00
Max Brunsfeld
88e3907cc0
Use QueryPerformanceFrequency as clock on windows
2019-03-14 13:42:31 -07:00
Max Brunsfeld
430f8874ea
Lib: reduce frequency of clock calls during parsing
2019-03-14 11:52:25 -07:00
Max Brunsfeld
cddb3e416d
Replace operation limit API with a clock-based timeout API
2019-03-14 11:13:38 -07:00
Joshua Warner
6f71b8840b
Fix warning about undefined snprintf
2019-03-08 21:22:13 -08:00
Max Brunsfeld
a85ed086cc
Define UTF8PROC_STATIC macro in the source
...
This way, there's one less flag you have to pass when building the
library on windows.
2019-02-06 10:42:29 -08:00
Max Brunsfeld
b925f6e136
Avoid using fall-through in get_changed_ranges
...
Also, clean up the that function a bit and add a few comments.
2019-02-06 10:24:15 -08:00
Vicent Marti
9a951c859d
lib: Fix importing fdopen in parser.c
2019-02-06 10:10:38 +01:00
Vicent Marti
02bc9b5829
lib: Silence explicit fallthrough warning in GCC
2019-02-06 10:10:18 +01:00
Max Brunsfeld
d192eda9cf
Remove stray word 'runtime' from comment
2019-01-30 21:43:44 -08:00
Max Brunsfeld
213ccfd3a4
Update trees' metadata bits when setting symbol back to word token
2019-01-29 15:30:13 -08:00
Max Brunsfeld
233d616ebf
Add random mutation tests
2019-01-25 12:05:21 -08:00
Max Brunsfeld
196339aaa9
Assert no memory leaks by stubbing malloc/free in the test suite
2019-01-21 14:22:35 -08:00
Max Brunsfeld
0f2347b318
Just call the C lib 'the library' everywhere, don't call it a 'runtime'
2019-01-10 15:22:39 -08:00
Max Brunsfeld
98807d2053
Add debug and debug-graph flags to parse and test commands
2019-01-08 21:03:51 -08:00
Max Brunsfeld
dd416b0955
Update include paths to not reference 'runtime' directory
2019-01-04 17:33:34 -08:00
Max Brunsfeld
47607cecf4
Reorganize repo, add rust CLI and binding code,
2019-01-04 17:31:49 -08:00