Age | Commit message (Collapse) | Author |
|
Otherwise Lagom doesn't build on my host machine.
|
|
|
|
We're far more likely to be looking for a user region than otherwise, so
optimize for that case.
|
|
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.
|
|
I've written a large part of the new stdio, so I'm (partly) to blame for it now.
|
|
I accidentally broke this in the recent rewrite. This reinstantiates the
behavior implemented in https://github.com/SerenityOS/serenity/commit/65714685259d1ea4ba9d32bc41aee6fc8c56a645.
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
We eliminated the need to pre-build LibC for libstdc++ by eliminating
libstdc++ itself, so users need to create their own build directories
again.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
This is distintly different from Atomic<T*>, because we want to
atomically access a variable that the atomic object itself does not own.
|
|
It has nothing we need anymore :^)
|
|
This was missing before, we were getting it for free from libstdc++
|
|
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).
|
|
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.
|
|
Use string.h instead, since that's part of serenity :)
|
|
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. :^)
|
|
|
|
The new version uses buffering much more prominently, and hopefully performs
better. It also uses something resembling C++ rather than plain C.
|
|
The two-argument version doesn't need an extra template parameter.
|
|
We would want it to work with only stdio pledged.
|
|
This seems like a better compromise between throughput and latency, and
it doesn't _really_ affect the performance, so let's just compromise.
|
|
|
|
Technically the property descriptors for these should not have
"writable: true" but "get" and "set" instead - but we don't support that
yet.
|
|
|
|
|
|
This allows all the unicode processing to be internal to the line
editor.
|
|
This patchset drops the write notifier, and schedules writes only when
necessary.
As a result, the CPU utilisation no longer spikes to the skies :^)
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
Core::Object derived objects should always have private constructors
and use construct() for construction. This prevents accidentally
keeping them in non-reference-counting containers.
|
|
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.
|
|
|
|
|
|
|
|
|
|
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.
|
|
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.
|