Commit Graph

1882 Commits

Author SHA1 Message Date
Allan Odgaard
a0b63da2e3 Upload via scp instead of pushing to GitHub v2.0-alpha.9467+test 2013-08-18 17:29:40 +02:00
Allan Odgaard
422c2e0752 gtm: Do repeated parsing for timing 2013-08-18 17:29:30 +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
Allan Odgaard
67c3a92855 Add some const keywords 2013-08-16 22:40:08 +02:00
Allan Odgaard
0bcae7957e Minor speed improvement in creating bundle index 2013-08-16 22:40:08 +02:00
Allan Odgaard
9cbc98c8bd Add option to load TextMate’s bundle index (gtm) 2013-08-16 22:40:08 +02:00
Allan Odgaard
e8bbcaf76e Improve speed of loading (parsing) bundle index 2013-08-16 22:40:08 +02:00
Allan Odgaard
36c5dbba6b Make dictionary map function optional for cache_t::load 2013-08-16 22:40:07 +02:00
Allan Odgaard
7a12fd1c41 Don’t define global macros that are only used in QuickLook target 2013-08-16 22:40:07 +02:00
Allan Odgaard
7350192d51 DFA nodes themselves should not dispose children
A DFA node may be disposed as part of DFA construction (because the node is redundant) and here it would have “next” pointers setup, which it should not follow in its destructor, since those nodes could still be used.

Fixes #1086
v2.0-alpha.9465
2013-08-14 10:41:30 +02:00
Allan Odgaard
28594e0c18 Don’t pass NULL_STR to path::entries 2013-08-14 10:41:30 +02:00
Allan Odgaard
df42c5e638 When rescanning a non-existing bundle item path, rescan parent
For example when creating a new bundle (‘foo.tmBundle’) and then saving a new snippet in this bundle (‘bar.tmSnippet’) we may ask to rescan the ‘Snippets’ folder (in the bundle) before the bundle itself does a content (re)scan, which effectively makes the ‘Snippets’ rescan a no-op.

Should fix #1034
2013-08-14 10:41:30 +02:00
Allan Odgaard
9eeda712df Limit code duplication 2013-08-14 10:41:30 +02:00
Allan Odgaard
afd5dfb0c2 Checkin release notes v2.0-alpha.9463 2013-08-12 23:52:36 +02:00
Allan Odgaard
41b4f03712 Let gutter view observe frame changes from OakTextView
Previously it would only observe NSViewBoundsDidChange from the clip view containing the text view, and while it worked most of the time, it failed to see notifications when a text view was smaller than the clip view’s view port and grew, yet still staying smaller than the view port.
2013-08-12 23:49:00 +02:00
Allan Odgaard
5512d65ecf Remove some commented debug output blocks 2013-08-12 22:57:57 +02:00
Allan Odgaard
f7b9694e9f Fix linear destruction of DFA
This is a graph (not a tree) so we have to watch for cycles.
2013-08-12 22:57:57 +02:00
Allan Odgaard
22abe6d74f Disallow curl from using signals
If libcurl is built with the default DNS resolver then it will handle a timeout by using SIGALRM, though since we are using threads, and signals are not compatible with threads, this may have led to a crash in Curl_resolv_timeout (for users where a DNS lookup could take longer than the timeout, presumably 300 seconds).
2013-08-12 22:57:57 +02:00
Allan Odgaard
772143088a Rework code to avoid strange crash
I’m seeing a crash in ‘-[OakDocumentView dealloc]’ stating that “selectionString” is not being observed. This would indicate that a OakDocumentView instance is created that doesn’t go through the designated initializer, how that can happen is beyond me, but with the reshuffled code, if it happens, it should no longer cause a crash in dealloc.
2013-08-12 22:57:57 +02:00
Allan Odgaard
a68d206468 Add more info to crash reports 2013-08-12 22:57:56 +02:00
Allan Odgaard
a52165694c Move crash reporter info support to own framework
This is to avoid cyclic dependencies since it was previously in a somewhat high-level framework, so everything that framework depended on, could not augment crash reports.
2013-08-12 19:32:23 +02:00
Allan Odgaard
a74bfcc206 Remove some uses of foreach() 2013-08-12 19:32:23 +02:00
Allan Odgaard
b25f716f86 Remove rforeach macro 2013-08-12 19:32:23 +02:00
Allan Odgaard
12067e806a Don’t keep mutex locked when calling client code
The mutex was locked to ensure that the client object did not go away, but the client’s code may terminate the program which destroys the server_t instance and thereby the mutex itself, which would previously cause an assertion to trigger, since the mutex was locked during destruction.

In practice there is no issue with the mutex not being locked while accessing the client object, as “unregister_client” and “master_run” are both called from the main thread, except for tests, but here we do not unregister client objects before their requests have been handled.
2013-08-12 19:32:23 +02:00
Allan Odgaard
6cf679ee1f Checkin release notes v2.0-alpha.9461 2013-08-10 13:57:54 +02:00
Allan Odgaard
c080bd8f8b Add storage access info to crash reports 2013-08-10 13:43:59 +02:00
Allan Odgaard
f008c49dab Dispose tree structure bottom-up to limit stack usage
With really long search strings, the recursive disposal of nodes would blow the stack
2013-08-10 13:14:55 +02:00
Allan Odgaard
231f1f8160 Improve application specific data in crash log
This makes it easier to automatically extract and index.
2013-08-10 11:55:39 +02:00
Allan Odgaard
7fa1d96faa Fix crash when “close tabs” is sent to window with no tabs
It appears a window can hang around after its last tab has been closed. Such window receive notifications of items being deleted via the file browser, and will call the “close tabs” method in response to these, which does an out-of-range array access if no tabs exist.

The reason for why windows can hang around after last tab is closed has not yet been determined. It might be a retain cycle (bug) or a delayed release due to autorelease pools.

Fixes #1064
2013-08-10 11:41:40 +02:00