summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-20AK: Include Platform.h in RefCounted.h so we have ALWAYS_INLINEAndreas Kling
Otherwise Lagom doesn't build on my host machine.
2020-05-20Kernel: Validate access to whole regionsSergey Bugaev
2020-05-20Kernel: Look for a user region firstSergey Bugaev
We're far more likely to be looking for a user region than otherwise, so optimize for that case.
2020-05-20AK+Kernel: Help the compiler inline a bunch of trivial methodsSergey Bugaev
If these methods get inlined, the compiler is able to statically eliminate most of the assertions. Alas, it doesn't realize this, and believes inlining them to be too expensive. So give it a strong hint that it's not the case. This *decreases* the kernel binary size.
2020-05-20LibC: Claim some copyright for stdioSergey Bugaev
I've written a large part of the new stdio, so I'm (partly) to blame for it now.
2020-05-20LibC: Handle fgets(size = 0)Sergey Bugaev
I accidentally broke this in the recent rewrite. This reinstantiates the behavior implemented in https://github.com/SerenityOS/serenity/commit/65714685259d1ea4ba9d32bc41aee6fc8c56a645.
2020-05-20Base: Add MessageBox question iconHüseyin ASLITÜRK
2020-05-20Demos: WidgetGallery, Add MessageBox question icon optionHüseyin ASLITÜRK
2020-05-20LibGUI: Add MessageBox question iconHüseyin ASLITÜRK
2020-05-20LibLine: Unify completion hooks and adapt its usersAnotherTest
LibLine should ultimately not care about what a "token" means in the context of its user, so force the user to split the buffer itself. This also allows the users to pick up contextual clues as well, since they have to lex the line themselves. This commit pacthes Shell and the JS repl to better handle completions, so certain wrong behaviours are now corrected as well: - JS repl can now complete "Object . getOw<tab>" - Shell can now complete "echo | ca<tab>" and paths inside strings
2020-05-20LibGUI: Replace up and down arrows with emojiHüseyin ASLITÜRK
2020-05-20LibGUI: Update copyright character in about dialogHüseyin ASLITÜRK
2020-05-20Base: Add new characters to Katica and CsillaHüseyin ASLITÜRK
2020-05-20Meta: Restore instructions to create build directory for CMakeAndrew Kaster
We eliminated the need to pre-build LibC for libstdc++ by eliminating libstdc++ itself, so users need to create their own build directories again.
2020-05-20Toolchain: Don't pre-build LibC and LibM, nor pre-install their headersAndrew Kaster
We can do away with that shenanigans now that libstdc++ is gone. Also, simplify the toolchain dependency hash calculation to only depend on the toolchain build script(s) and the Patches files we use to modify the toolchain itself.
2020-05-20Build: Include headers from LibC, LibM, and LibPthread with -isystemAndrew Kaster
Make sure that userspace is always referencing "system" headers in a way that would build on target :). This means removing the explicit include_directories of Libraries/LibC in favor of having it export its headers as SYSTEM. Also remove a redundant include_directories of Libraries in the 'serenity build' part of the build script. It's already set at the top. This causes issues for the Kernel, and for crt0.o. These special cases are handled individually.
2020-05-20LibC: Implement Itanium C++ ABI for static variable guardsAndrew Kaster
This is __cxa_guard_acquire, __cxa_guard_release, and __cxa_guard_abort. We put these symbols in a 'fake' libstdc++ to trick gcc into thinking it has libstdc++. These symbols are necessary for C++ programs and not C programs, so, seems file. There's no way to tell gcc that, for example, the standard lib it should use is libc++ or libc. So, this is what we have for now. When threaded code enters a block that is trying to call the constructor for a block-scope static, the compiler will emit calls to these methods to handle the "call_once" nature of block-scope statics. The compiler creates a 64-bit guard variable, which it checks the first byte of to determine if the variable should be intialized or not. If the compiler-generated code reads that byte as a 0, it will call __cxa_guard_acquire to try and be the thread to call the constructor for the static variable. If the first byte is 1, it will assume that the variable's constructor was called, and go on to access it. __cxa_guard_acquire uses one of the 7 implementation defined bytes of the guard variable as an atomic 8 bit variable. To control a state machine that lets each entering thread know if they gained 'initialization rights', someone is working on the varaible, someone is working on the varaible and there's at least one thread waiting for it to be intialized, or if the variable was initialized and it's time to access it. We only store a 1 to the byte the compiler looks at in __cxa_guard_release, and use a futex to handle waiting.
2020-05-20AK: Don't demangle in serenity :(Andrew Kaster
In order to remove libstdc++ completely, we need to give up on their implementation of abi::__cxa_demangle. The demangler logic will actually have to be quite complex, and included in both the kernel and userspace. A definite fixme for the future, to parse the mangled names into real deal names.
2020-05-20AK: Add AtomicRef, for atomically accesing a reference to a varaibleAndrew Kaster
This is distintly different from Atomic<T*>, because we want to atomically access a variable that the atomic object itself does not own.
2020-05-20Kernel: Don't link against libstdc++Andrew Kaster
It has nothing we need anymore :^)
2020-05-20Kernel: Add implementation of operator new and delete to kmalloc.cppAndrew Kaster
This was missing before, we were getting it for free from libstdc++
2020-05-20AK+LibC: Move non-placement new/delete into LibCAndrew Kaster
This allows operator new and operator delete to be available to anyone that links -lc (everyone) rather than just people that include kmalloc.h (almost no one).
2020-05-20AK: Add InitializerList, an implementation of std::initializer_listAndrew Kaster
Use the AK version of std::initializer_list in AK::Vector, but only when in serenity. When building AK for a non-serenity target, the header <initializer_list> should be always available.
2020-05-20df: Don't include c++ standard <cstring>Andrew Kaster
Use string.h instead, since that's part of serenity :)
2020-05-20WindowServer: Remove WindowManager::invalidate(Window) API'sAndreas Kling
Instead, we now tell Windows to invalidate themselves. Window will then pass on the requests to Compositor. My basic idea here is that WindowManager should do window management, dealing with incoming events, moving, resizing, etc. Compositor should deal with painting the window stack in the right order with the least amount of effort. :^)
2020-05-20WindowServer: Move occlusion things from WindowManager to CompositorAndreas Kling
2020-05-20LibC: Rewrite stdioSergey Bugaev
The new version uses buffering much more prominently, and hopefully performs better. It also uses something resembling C++ rather than plain C.
2020-05-20AK: Fix Checked::multiplication_would_overflow() signatureSergey Bugaev
The two-argument version doesn't need an extra template parameter.
2020-05-20Kernel+LibC: Switch isatty() to use a fcntl()Sergey Bugaev
We would want it to work with only stdio pledged.
2020-05-20LibTLS: Flush some packets as soon as more packets are writtenAnotherTest
This seems like a better compromise between throughput and latency, and it doesn't _really_ affect the performance, so let's just compromise.
2020-05-20LibWeb: Make window.location.reload() enumerable onlyLinus Groh
2020-05-20LibWeb: Make window.location properties non-configurableLinus Groh
Technically the property descriptors for these should not have "writable: true" but "get" and "set" instead - but we don't support that yet.
2020-05-20LibWeb: Add leading "?" to window.location.search if not emptyLinus Groh
2020-05-20LibWeb: Add leading "#" to window.location.hash if not emptyLinus Groh
2020-05-19LibLine: Default to resolving Spans as byte offsetsAnotherTest
This allows all the unicode processing to be internal to the line editor.
2020-05-19LibTLS: Only try to flush data when neededAnotherTest
This patchset drops the write notifier, and schedules writes only when necessary. As a result, the CPU utilisation no longer spikes to the skies :^)
2020-05-19LibWeb: Fix duplicated public access modifier in StyleDeclarationLinus Groh
2020-05-19FileManager: Remove empty public access modifier from DesktopWidgetLinus Groh
2020-05-19WindowServer: Always send mouse events to the full-screen windowAndreas Kling
Full-screen mode is pleasantly exclusive, so we only need to send the incoming mouse events to the active full-screen window. This fixes an issue where clicking on the area normally covered by the menubar while in full-screen mode would not send mouse events to the full-screen window.
2020-05-19WindowServer: Ignore overlap when compositing full-screen windowsAndreas Kling
Normally we walk the window stack to see if a given dirty rect is covered by an opaque window. When the active window is full-screened, we can skip this check and just unconditionally paint the window. This fixes an issue where windows with higher inherent z-order (like the taskbar and menu windows) would get cursor ghosting in them while a normal window was full-screened. Fixes #2289.
2020-05-19LibGUI: Use dbg() instead of dbgprintf() in GUI::DialogAndreas Kling
2020-05-19LibGUI: Remove some ancient unused debug logging in AbstractButtonAndreas Kling
2020-05-19LibProtocol: Make Protocol::Client constructor privateAndreas Kling
Core::Object derived objects should always have private constructors and use construct() for construction. This prevents accidentally keeping them in non-reference-counting containers.
2020-05-19SystemMenu: Don't exit if the shutdown dialog is opened but cancelledAndreas Kling
Previously opening the shutdown dialog and cancelling out of it would cause SystemMenu to exit due to the exit-when-there-are-no-more-windows mechanism in GUI::Application. Fix this by opting out of it.
2020-05-19SystemMenu: Rename PowerDialog => ShutdownDialogAndreas Kling
2020-05-19Browser: Hide tab bar if there's only one tabLinus Groh
2020-05-19Browser: Support fullscreen viewLinus Groh
2020-05-19LibGUI: Add ability to hide GUI::TabWidget's tab barLinus Groh
2020-05-19LibLine: Handle <return>s in incomplete data correctlyAnotherTest
Previously, we would concatenate all the commands together: ``` > sleep 5 echo well echo hello echo friends > echo wellecho helloecho friends ``` Also renames some variables to be more descriptive.
2020-05-19Kernel: Tweak FileBackedFS API to avoid intermediary copiesSergey Bugaev
read_block() and write_block() now accept the count (how many bytes to read or write) and offset (where in the block to start; defaults to 0). Using these new APIs, we can avoid doing copies between intermediary buffers in a lot more cases. Hopefully this improves performance or something.