Commit Graph

1908 Commits

Author SHA1 Message Date
Allan Odgaard
4f0ac84e65 Checkin release notes v2.0-alpha.9471 2013-08-24 01:21:33 +02:00
Allan Odgaard
15a15e8c15 Remove prototype for unimplemented member function 2013-08-24 01:19:29 +02:00
Allan Odgaard
bbe14f0a0b Add mutex for bundles::item_t::plist
This is (once again) only for the concurrent tests, although we probably do want to use the bundles API from more threads in the future.
2013-08-24 01:19:29 +02:00
Allan Odgaard
374f8a2248 Make oak::callbacks_t somewhat thread safe
If we only add, remove, and signal callbacks, the data type is now thread safe. This is mainly for the purpose of the concurrent tests.
2013-08-24 01:19:29 +02:00
Allan Odgaard
9f99fe92b6 Don’t access invalid iterator when creating delta plists 2013-08-24 01:19:29 +02:00
Allan Odgaard
c5ecf8f6c6 Handle *.c++ files in gen_build
We already handle these when mapping extension to file type.
2013-08-24 01:19:29 +02:00
Allan Odgaard
97c7a01fe1 Ensure grammar is retained during parsing
Since parsing is done in a separate thread, and it works with pointers, we need to ensure that the grammar is retained for at least as long as the thread lives.
2013-08-24 01:19:29 +02:00
Allan Odgaard
6889ba9ba7 Log errors from each call in swap_and_unlink 2013-08-23 23:21:16 +02:00
David Howden
1faaf77d99 Stop Find window showing an NSSavePanel on ⌘S 2013-08-23 23:21:16 +02:00
Allan Odgaard
2022fab80c Commands with input set to none would not have stdin closed
This meant if such command would read from its stdin, it would hang.

Fixes #1081
2013-08-21 22:51:40 +02:00
Allan Odgaard
b5b029407d Checkin release notes v2.0-alpha.9467 2013-08-21 22:20:43 +02:00
Allan Odgaard
802ea1fc7a Treat most errors from exchangedata() as “not supported”
It seems to be a general trend with network file systems to return wrong errors when they do not support a certain feature (like extended attributes and atomic swap).
2013-08-21 22:20:43 +02:00
Allan Odgaard
c8802cc534 Support keys with dots in delta property lists functions 2013-08-21 13:44:47 +02:00
Allan Odgaard
e36133ec7a Update plist delta code 2013-08-21 13:44:17 +02:00
Allan Odgaard
6d1c334785 Add ability to close HTML output window on ⌃⌥⌘H 2013-08-21 13:44:17 +02:00
Allan Odgaard
32f4cedece Bring HTML output window to front on ⌃⌥⌘H when not already key
Previously it would hide if already visible regardless of being the key window or not.
2013-08-21 13:44:17 +02:00
Allan Odgaard
cab42a83c5 Use injection patterns from “group rules”
For example if one grammar includes another, the included grammar works as a group rule and previously had its injections ignored.
2013-08-20 18:43:18 +02:00
Allan Odgaard
5752aa2dd7 Make it explicit, if a match is from a rule’s end pattern 2013-08-20 18:43:18 +02:00
Allan Odgaard
c7be71b41d Code shuffle 2013-08-20 18:43:18 +02:00
Allan Odgaard
4f2feb4a0f Add more info about clang 3.2 setup 2013-08-20 18:43:17 +02:00
Allan Odgaard
35efecd4d8 Avoid using std::shared_ptr in parser
We can safely work with pointers since grammar_t now retain all rules involved in parsing the document.
2013-08-20 18:43:17 +02:00
Allan Odgaard
cf2637a69b Make injection grammars part of grammar_t 2013-08-19 23:36:01 +02:00
Allan Odgaard
aef742b142 Refactor grammar_t implementation 2013-08-19 23:36:00 +02:00
Allan Odgaard
b0fc120e7e Parser no longer need to handle include of ‘$base’ 2013-08-19 23:36:00 +02:00
Allan Odgaard
2db287f128 Refactor grammar setup
A grammar_t instance now deep-copies potential grammars it includes and each call to parse_grammar() returns a new unique instance.

The latter allows mutating the grammar (by the parser) and the former ensures that grammars are not left with expired pointers (to other grammars) when bundle items are updated.
2013-08-19 23:36:00 +02:00
Allan Odgaard
adc0a0a4a7 Code style changes 2013-08-19 23:36:00 +02:00
Allan Odgaard
8df374fdb3 Instantiate bool version of plist::get<T> 2013-08-19 23:36:00 +02:00
Allan Odgaard
8c1dd5fc06 Don’t use GCD for regexp matching
Using GCD actually makes the code slower — it might have to do with locking overhead from std::shared_ptr and onig_region_new/region_free.

Worth trying again once use of std::shared_ptr has been removed from the parser, and oniguruma regions are preallocated.
2013-08-18 20:36:24 +02:00
Allan Odgaard
d94a4b6484 Update build instructions
TextMate now require Cap’n proto and (to build Cap’n Proto) a clang newer than what comes with Xcode 4.x.
2013-08-18 17:29:30 +02:00
Allan Odgaard
8402f713cf Do not rewrite regexps during parsing
Previously we had to test if the patterns contained \A, \G, or \z, and if so, rewrite those anchors based on wether or not the current line/match position could match them.
2013-08-18 17:29:30 +02:00
Allan Odgaard
1e27f6bf47 Add ONIG_OPTION_NOTGPOS 2013-08-18 17:29:30 +02:00
Allan Odgaard
c5a7d32056 Add disabled test for k-takata/Onigmo#22 2013-08-18 17:29:30 +02:00
Allan Odgaard
37a40c9c04 Update Onigmo submodule 2013-08-18 17:29:30 +02:00
Allan Odgaard
e9fb8aa9ae Add constructor to ranked_match_t 2013-08-18 17:29:29 +02:00
Allan Odgaard
bffe0facff Change cancel button key equivalent: ⌘. → ⎋
The new key will still allow canceling the dialog using ⌘.
2013-08-18 17:29:29 +02:00
Allan Odgaard
2bd7b877e6 Tag rules in grammar with wether or not they have been seen
This is instead of keeping a std::set with rule identifiers. Keeping the information in the grammar is a lot faster (about 25%) as we can update the status in O(1) without any memory allocation.

The downside is that the grammar is now being mutated by the parser. This is currently safe because only a single thread is used for parsing. When we switch to allowing multiple threads to perform parsing, we should make a copy of the grammar for each instance.

Another downside is that we only tag rules that have begin/match patterns, so rules that are wrappers for a set of rules, or rules that are including another rule, are never rejected, even if already visited, but the target rules they resolve to will be, though if an include (indirectly) include itself, we will no longer break such cycle (though it is clearly a bug in the grammar, if this happens, and we could preprocess the grammar to catch it).
2013-08-18 17:29:29 +02:00
Allan Odgaard
ee43777c3a Use GCD to perform concurrent rule matching 2013-08-18 17:29:29 +02:00
Allan Odgaard
3ae9bfe7b8 Collect active rules before performing any matching 2013-08-18 17:29:29 +02:00
Allan Odgaard
4677a91fff Factor out resolving of included rules 2013-08-18 17:29:29 +02:00
Allan Odgaard
019c911e9a Use tree structure icon for ragel, protobuf, and cap’n proto 2013-08-18 17:29:29 +02:00
Allan Odgaard
5c02b4ff5c Use cap’n proto for bundle index
This makes loading time roughly twice as fast, although some of the speed gain is because we no longer need to convert CFPropertyListRef → plist::any_t.
2013-08-18 17:29:29 +02:00
Allan Odgaard
4080e1dc96 Add support for serialization of cache_t with cap’n proto
See http://kentonv.github.io/capnproto/install.html for how to install.
2013-08-18 17:14:23 +02:00
Allan Odgaard
8a2ad5ed20 Add support for capnp files (build system) 2013-08-16 22:40:09 +02:00
Allan Odgaard
09511a9092 Introduce single function for mapping extension to language 2013-08-16 22:40:09 +02:00
Allan Odgaard
5d5399ecd9 Add member data accessor for cache_t’s content filter function 2013-08-16 22:40:09 +02:00
Allan Odgaard
4edca13ca1 Add assertion for grammar construction 2013-08-16 22:40:09 +02:00
Allan Odgaard
6a4fe2fb3c Add date parsing to plist::parse_ascii 2013-08-16 22:40:09 +02:00
Allan Odgaard
bf1e92b865 Do not use global constructors for fixtures 2013-08-16 22:40:08 +02:00
Allan Odgaard
2c55141e47 Support setup functions for tests
Previously this had to be done via global constructor functions but it would seem the execution of these may happen before initialization of global data.
2013-08-16 22:40:08 +02:00
Allan Odgaard
e0ad0ba510 Use dispatch_time_t instead of std::chrono::time_point
Building with clang 3.2 (binary distribution) results in “illegal instruction” when adding 3 seconds to the steady clock, so I just replaced the code.

The reason the code was using std::chrono was to be able to provide better debug output, as dispatch_time_t is an abstracted time representation (according to the documentation).
2013-08-16 22:40:08 +02:00