aboutsummaryrefslogtreecommitdiffhomepage
path: root/function.cpp
Commit message (Collapse)AuthorAge
* Tombstone only when explicitly removing a function.Gravatar Sanne Wouda2015-04-08
| | | | | | | | | Do not tombstone a function when it is evicted normally from the LRU cache. This broke changing `fish_function_path`, since that would evict all nodes, resulting in accidental tombstones, which caused autoloaded functions to never be reloaded. See #213.
* Small tweaks to clarify some codeGravatar ridiculousfish2015-04-06
| | | | | Adds a comment about a recursive lock, and changes an ==1 to >0 for improved clarity
* Revert 1349d12 and properly fix #213Gravatar Sanne Wouda2015-04-06
| | | | | | | | | | | As suggested by @ridiculousfish, when removing autoloaded functions, add them to a tombstones set. These functions will never be autoloaded again in the current shell, not even when the timestamp changes. Tested as per comment 1 of #1033. `~/.config/fish/functions/ls.fish` contains the function definition. `function -e ls` removes the redefined `ls` (and reverts back to the built-in command). `touch .../ls.fish` does not cause the function to be reloaded.
* Add new `functions` flag -V/--inherit-variableGravatar Kevin Ballard2014-10-02
| | | | | | | | | | --inherit-variable takes a variable name and snapshots its current value. When the function is executed, it will have a local variable with this value already defined. Printing the function source will include synthesized `set -l` lines for the values. This is primarily useful for functions that are created on the fly, such as in `psub`.
* Rework how screen size is trackedGravatar Kevin Ballard2014-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | The screen size is fetched after a SIGWINCH is delivered. The current implementation has two issues: * It calls ioctl() from the SIGWINCH signal handler, despite ioctl() not being a function that is known to be safe to call. * It's not thread-safe. Signals can be delivered on arbitrary threads, so we don't know if it's actually safe to be modifying the cached winsize in response to a signal. It's also plausible that the winsize may be requested from a background thread. To solve the first issue, we twiddle a volatile boolean flag in the signal handler and defer the ioctl() call until we actually request the screen size. To solve the second issue, we introduce a pthread rwlock around the cached winsize. A rwlock is used because it can be expected that there are likely to be far more window size reads than window size writes. If we were using C++11 we could probably get away with atomics, but since we don't have that (or boost), a rwlock should suffice. Fixes #1613.
* Fix line number reporting in new parserGravatar ridiculousfish2014-03-20
|
* Revert "Merge pull request #1317 from pullreq/cpp"Gravatar ridiculousfish2014-02-28
| | | | | | | This reverts commit 74135c0600d5dcc40d396d0e7293c17b8d4bdaa7, reversing changes made to 6d749789ce240a3e6f1447777db63fd8e7525560. See discussion in #1317
* Fixes .c -> .cpp in comments. For doxygen.Gravatar Geoff Nixon2014-02-27
|
* Update style and formatting to conform to fish style guide.Gravatar ridiculousfish2014-01-15
|
* Hook up for statements, if statements, and function definition in newGravatar ridiculousfish2013-12-27
| | | | parser
* Merge branch 'master' into astGravatar ridiculousfish2013-12-20
|\ | | | | | | | | | | | | Conflicts: function.cpp parser.cpp parser.h
| * Refactor block_t storage in parser_t from a linked list to a vectorGravatar ridiculousfish2013-12-20
| |
* | Merge branch 'master' into astGravatar ridiculousfish2013-10-16
|\| | | | | | | | | Conflicts: parse_util.cpp
| * Fix #213. You can now remove autoloaded functions.Gravatar Konrad Borowski2013-10-12
| | | | | | | | Oddly enough, the code is here, but is internal function.
* | Beef up completion testsGravatar ridiculousfish2013-10-12
|/
* reference'ize event.cpp/hGravatar Jan Kanis2012-12-20
|
* Remove Python dependency from Makefile and Xcode buildGravatar ridiculousfish2012-12-08
| | | | https://github.com/fish-shell/fish-shell/issues/429
* Apply new indentation, brace, and whitespace styleGravatar ridiculousfish2012-11-18
|
* Remove trailing whitespaces and change tabs to spacesGravatar Łukasz Niemier2012-11-18
|
* Fix to restore an optimization from parse_util_get_line_from_offset in a ↵Gravatar ridiculousfish2012-08-04
| | | | more thread-safe way
* Renamed env_vars to env_vars_snapshot_tGravatar ridiculousfish2012-07-20
| | | | Cleanup of non-wcstring version of path_get_path
* Got function.h and function.cpp off of shared_ptr (hooray)Gravatar ridiculousfish2012-05-18
|
* More work towards getting function.h off of shared_ptrGravatar ridiculousfish2012-05-17
|
* Work towards getting function.h off of shared_ptrGravatar ridiculousfish2012-05-17
|
* Put fish on a diet. Tracked down the biggest memory hogs and fixed them. ↵Gravatar ridiculousfish2012-03-03
| | | | Total allocations down by a factor of 3 or so, live allocations a few KB.
* Changed iterators from iter++ to ++iterGravatar ridiculousfish2012-03-01
| | | | Large set of changes to history to ensure that histories from other sessions don't "bleed" into the current session
* Modified functions in function.h/.cpp to use wcstring instead wchar_t*, ↵Gravatar Siteshwar Vashisht2012-02-19
| | | | other files also modified to use wcstring.
* Fix for removing too many event handlers (that's why "Goodbye" never got ↵Gravatar ridiculousfish2012-02-17
| | | | printed")
* Removed some al_list functionsGravatar ridiculousfish2012-02-10
|
* Final removal of halloc. It's like Christmas Morning.Gravatar ridiculousfish2012-02-09
|
* Removed some more hallocGravatar ridiculousfish2012-02-09
|
* Fixed named_arguments to be wcstring_list_t instead of al_listGravatar ridiculousfish2012-02-08
|
* Get event_t off of halloc (!)Gravatar ridiculousfish2012-02-08
|
* Excised some more halloc and array_list_tGravatar ridiculousfish2012-02-08
|
* LRU work to load functions off of the main thread.Gravatar ridiculousfish2012-01-28
| | | | We'll have to reevaluate this after we fix function autocomplete
* Have to remember to evict nodes from our LRU cacheGravatar ridiculousfish2012-01-25
|
* Implemented LRU cache for autoloading.Gravatar ridiculousfish2012-01-25
|
* Migrated function.cpp to use the new function_get() call. Lots of nice short ↵Gravatar ridiculousfish2012-01-23
| | | | code now.
* Migrate function.cpp to scoped_lock and shared_ptrGravatar ridiculousfish2012-01-23
|
* Move autoloading from a map of path names to a real object autoload_t.Gravatar ridiculousfish2012-01-23
| | | | | Moved the various things we can autoload into static objects. Next step is to make them thread safe.
* Get some basic function signatures right for new instanced parserGravatar ridiculousfish2012-01-16
|
* Redesign new environment variables to use env_var_t instead of wcstringGravatar Peter Ammon2012-01-14
| | | | Migrate uses of empty() to missing() to distinguish between empty variable and unset variable
* Migrate function.cpp to STL types.Gravatar ridiculousfish2012-01-13
|
* Removed multiple delcartions of path_list from autoload_names() in fuction.cppGravatar Siteshwar Vashisht2012-01-14
|
* Merge branch 'Use_env_get_string' into CPlusPlusGravatar Siteshwar Vashisht2012-01-14
|\ | | | | | | | | Conflicts: function.cpp
| * Modified function.cpp to use env_get_string().Gravatar Siteshwar Vashisht2012-01-12
| |
* | Additional migration to STL data structuresGravatar ridiculousfish2012-01-10
|/
* Incorporate Siteshwar's patch for building on LinuxGravatar ridiculousfish2012-01-05
|
* Fixed a build failureGravatar ridiculousfish2011-12-26
| | | | Added a thread assertion to function.cpp
* Some changes to migrate towards C++ and a multithreaded modelGravatar ridiculousfish2011-12-26
|