summaryrefslogtreecommitdiff
path: root/AK
AgeCommit message (Collapse)Author
2020-01-07AK: Add assertions to FixedArray::operator[]Andreas Kling
Let's catch ourselves if we ever index out of bounds into one of these.
2020-01-07AK: Add dirname() to FileSystemPathConrad Pankoff
2020-01-06AK: Fix test compile warningsShannon Booth
These warnings are pretty harmless, but warnings nonetheless.
2020-01-06AK+Demos+Libraries: Remove executable permissions from {.cpp,.h} filesShannon Booth
2020-01-05LibCore: IDAllocator should never vend ID 0Andreas Kling
This was tripping up CObject which interprets timer ID 0 as "no timer". Once we got ID 0 assigned, it was impossible to turn it off and it would fire on every event loop iteration, causing CPU churn.
2020-01-05AK+LibCore: Add an IDAllocator and use to allocate timer idsShannon Booth
2020-01-05AK: Add a u64 Trait typeShannon Booth
This allows u64s to be used in HashMaps.
2020-01-04AK: Allow copying a Vector from a Vector with different inline capacityAndreas Kling
2020-01-02Build: HOST_CXX -> USE_HOST_CXXjoshua stein
Allow HOST_CXX to be passed to make which will be the actual host C++ compiler used, such as 'make HOST_CXX=clang++'.
2020-01-01Build: AK/Tests: use Makefile.commonjoshua stein
2020-01-01AK: Move the userspace SharedBuffer from LibC to AKAndreas Kling
This always felt out-of-place in LibC.
2020-01-01AK: Turn off demangler in userlandAndrew Kaster
For some reason, the default CXXFLAGS and such don't get us the __cxa_demangle symbol in userland.
2019-12-30AK: Use stack buffers in String::number() to avoid some malloc() callsAndreas Kling
2019-12-30AK: Add JsonObject::get_ptr() for copy-free lookupAndreas Kling
This variant of get() returns a const JsonValue* instead of a JsonValue and can be used when you want to peek into a JsonObject's member fields without making copies.
2019-12-29AK: Fix JSON parser crashing when encountering UTF-8Andreas Kling
The mechanism that caches the most recently seen string for each first character was indexing into the cache using a 'char' subscript. Oops!
2019-12-29AK: Add StringView::ends_with functionShannon Booth
2019-12-28AK: Unbreak Tests Makefile. Turns out this newline was effectful :^)Andreas Kling
2019-12-28Build: wrap make invocations with flock(1)joshua stein
Lock each directory before entering it so when using -j, the same dependency isn't built more than once at a time. This doesn't get full -j parallelism though, since one make child will be sitting idle waiting for flock to receive its lock and continue making (which should then do nothing since it will have been built already). Unfortunately there's not much that can be done to fix that since it can't proceed until its dependency is built by another make process.
2019-12-27AK: Fix unused parameter bug in SinglyLinkedList (#928)Valtteri Koskivuori
2019-12-27AK: Simplify const T& versions of append/insert in SinglyLinkedListConrad Pankoff
2019-12-27AK: Add insert_{before,after}(iterator, value) to SinglyLinkedListConrad Pankoff
2019-12-26AK: Add NeverDestroyed<T>, for things that should never be destroyedAndreas Kling
This template allows you to define static globals without having them destroyed on exit.
2019-12-22AK: Add Vector::remove_all_matching()Andreas Kling
2019-12-22AK: Add IntrusiveList::take_first()Andreas Kling
2019-12-22AK: InlineLinkedListIterator operator-> should return m_node directlyAndrew Kaster
Little typo here. Don't think many people use this iterator :)
2019-12-20Build: Get rid of the USERLAND defineAndreas Kling
Let's simplify things. There is now only KERNEL. To see if you're on Serenity, check if __serenity__ is defined.
2019-12-20Build: clean up build system, use one shared Makefilejoshua stein
Allow everything to be built from the top level directory with just 'make', cleaned with 'make clean', and installed with 'make install'. Also support these in any particular subdirectory. Specifying 'make VERBOSE=1' will print each ld/g++/etc. command as it runs. Kernel and early host tools (IPCCompiler, etc.) are built as object.host.o so that they don't conflict with other things built with the cross-compiler.
2019-12-19AK: Add Vector::find_first_index(const T&)Hüseyin ASLITÜRK
2019-12-18AK: Add String::equals_ignoring_case(StringView)Andreas Kling
2019-12-12JsonValue: Fix wrong return type of as_u32() and friendsAndreas Kling
2019-12-10AK: Teach URL::complete_url() how to resolve URL's starting with "/"Andreas Kling
2019-12-09AK: SinglyLinkedList::size_slow() should return size_tAndreas Kling
2019-12-09AK: Use size_t for the length of stringsAndreas Kling
Using int was a mistake. This patch changes String, StringImpl, StringView and StringBuilder to use size_t instead of int for lengths. Obviously a lot of code needs to change as a result of this.
2019-12-09AK: Handle LogStream operator<<(size_t)Andreas Kling
This has been an annoyingly missing feature for some time.
2019-12-05Shell: Cache PATH for faster tab completionWilliam McPherson
This patch reduces the O(n) tab completion to something like O(log(n)). The cache is just a sorted vector of strings and we binary search it to get a string matching our input, and then check the surrounding strings to see if we need to remove any characters. Also we no longer stat each file every time. Also added an #include in BinarySearch since it was using size_t. Oops. If `export` is called, we recache. Need to implement the `hash` builtin for when an executable has been added to a directory in PATH.
2019-12-05AK: Implement %n printf specifierSergey Bugaev
This is a special specifier that does not output anything to the stream, but saves the number of already output chars to the provided pointer. This is apparently used by GNU Nano.
2019-12-02AK: StringView::lines() should keep empty linesAndreas Kling
2019-12-02AK: Add DoublyLinkedList::prepend()Andreas Kling
Also make it possible to remove() with a value-type Iterator.
2019-12-02AK: Add a BinarySearch template implementationWilliam McPherson
binary_search takes a haystack, a size, a needle and a compare function. The compare function should return negative if a < b, positive if a > b and 0 if a == b. The "sane default" compare function is integral_compare which implements this with subtraction a - b. binary_search returns a pointer to a matching element, NOT necessarily the FIRST matching element. It returns a nullptr if the element was not found. This patch includes tests for binary_search.
2019-12-02LibMarkdown: Handle CRLF line endingsTommy Nguyen
Previously, MDDocument only split on Unix-style line endings. This adds a new function to StringView which handles LF, CR and CRLF.
2019-12-02AK: Allow BufferStream to serialize/deserialize floatsAndreas Kling
2019-11-29Kernel: Demangle kernel C++ symbols correctly againAndreas Kling
I broke this while implementing module linking. Also move the actual demangling work to AK, in AK::demangle(const char*)
2019-11-25AK: Add a query string component to URLAndreas Kling
It's missing query string parsing from new URLs, but you can set the query string programmatically, and it will be part of the URL when serialized through to_string().
2019-11-19LibHTML+AK: Move URL completion from Document to AK::URLAndreas Kling
Completing a relative URL based on a base URL seems like generally useful functionality.
2019-11-16AK: Atomic.h needs <stddef.h> for ptrdiff_tAndreas Kling
2019-11-15AK: Fix leak in WeakPtr(WeakPtr&&) and WeakPtr::operator=(WeakPtr&&)Andreas Kling
We were forgetting to adopt the WeakLink, causing a reference leak. This ended up costing us one allocation per exec(), with this stack: kmalloc_impl() Inode::set_vmo() InodeVMObject::create_with_inode() Process::do_exec() Process::exec() Process::sys$execve() This was a pain to track down, in the end I caught it by dumping out every live kmalloc pointer between runs and diffing the sets. Then it was just a matter of matching the pointer to a call stack and looking at what went wrong. :^)
2019-11-09HackStudio: Start fleshing out the GUI for a GUI designer :^)Andreas Kling
I'll be reconstructing parts of the VisualBuilder application here and then we can retire VisualBuilder entirely once all the functionality is available in HackStudio.
2019-11-07AK: Add Vector::take(index)Andreas Kling
This removes an item from the vector and returns it.
2019-11-07AK: Delete operator!() and operator bool() from the Nonnull pointersAndreas Kling
Since NonnullRefPtr and NonnullOwnPtr cannot be null, it is pointless to convert them to a bool, since it would always be true. This patch makes it an error to null-check one of these pointers.
2019-11-07AK: Add Vector::prepend(T&&)Andreas Kling