Age | Commit message (Collapse) | Author |
|
These functions allow conversion to-and-from big-endian buffers
This commit also adds a ""_bigint operator for easy bigint use
|
|
- Add missing 'explicit' to the constructor
- Remove unneeded 'AK::' in AK::Vector
- Avoid copying 'words' in constructor
|
|
|
|
A regression test was added to the suite.
This commit also generally simplifies the subtraction method.
|
|
The division operation returns both the quotient and the remainder.
|
|
Also added documentation for the runtime complexity of some operations.
|
|
There was a bug when dealing with a carry when the addition
result for the current word was UINT32_MAX.
This commit also adds a regression test for the bug.
|
|
|
|
UnsignedBigInteger stores an unsigned ainteger of arbitrary length.
A big integer is represented as a vector of word. Each
word is an unsigned int.
|
|
There is quite a bit of avoidable duplication, however, I could not get
the compiler to be happy about SHA2<Size> (see FIXMEs)
|
|
|
|
|
|
|
|
|
|
Also adds a test program to userland
|
|
This commit fixes the following misbehaviour:
```
> <- search prompt moves here
>
> ^R^L <- actual prompt stays here
```
|
|
A ConsoleMessage is a struct cointaining:
* AK::String text; represents the text of the message sent
to the console.
* ConsoleMessageKind kind; represents the kind of JS `console` function
from which the message was sent.
Now, Javascript `console` functions only send a ConsoleMessage to the
Interpreter's Console instead of printing text directly to stdout.
The Console then stores the recived ConsoleMessage in
Console::m_messages; the Console does not print to stdout by default.
You can set Console::on_new_message to a void(ConsoleMessage&); this
function will get call everytime a new message is added to the Console's
messages and can be used, for example, to print ConsoleMessages to
stdout or to color the output based on the kind of ConsoleMessage.
In this patch, I also:
* Re-implement all the previously implemented functions in the
JavaScript ConsoleObject, as wrappers around Console functions
that add new message to the Console.
* Implement console.clear() like so:
- m_messages get cleared;
- a new_message with kind set ConsoleMessageKind::Clear gets added
to m_messages, its text is an empty AK::String;
* Give credit to linusg in Console.cpp since I used his
console.trace() algorithm in Console::trace().
I think that having this abstration will help us in the implementation
of a browser console or a JS debugger. We could also add more MetaData
to ConsoleMessage, e.g. Object IDs of the arguments passed to console
functions in order to make hyperlinks, Timestamps, ecc.; which could be
interesting to see.
This will also help in implementing a `/bin/js` option to make, for
example, return a ConsoleMessageWrapper to console functions instead of
undefined. This will be useful to make tests for functions like
console.count() and console.countClear(). :^)
|
|
Also implement ConsoleObject::count_clear() as a wrapper for
Console::count_clear()
|
|
The goal is to start factoring out core ConsoleObject functionality and
to make ConsoleObject only a JS wrapper around Console.
|
|
If a window has child windows when it's destroyed, WindowServer will
now automatically tear down all of its children as well.
This is communicated to the client program through a vector of window
ID's included with the response to WindowServer::DestroyWindow.
This does feel a little bit awkward, but managing it on the client side
also seems a bit awkward.
|
|
This is much better than the hack we had of making them Tooltip windows
since frameless windows end up at the right layer in the window stack
automatically, and always get yanked above the parent window simply by
being child windows.
|
|
This allows you to create windows with no title bar or window frame.
|
|
Nobody was using this flag, so let's stop maintaining it. It's easy to
add it back if we ever want the behavior.
|
|
If a window has another window in its Core::Object ancestor chain,
we now communicate that relationship to WindowServer so that it can
act with awareness of parent/child windows.
|
|
When dealing with png data that has less than 8 bits per pixel, round
up to the next byte when allocating per row buffers and streamers. This
fixes decoding odd sized PNGs with less than 8 bits per pixel.
Also added a test page with some odd sized palleted PNGs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This was incorrect, it's only writable.
|
|
|
|
Like Object::has_own_property() but going down the prototype chain.
|
|
|
|
|
|
I chose to also make it print "<counter_name>: 0\n" when a counter gets
reset, similarly to how firefox behaves.
|
|
|
|
|
|
|
|
|
|
This fixes the issue where the editor would only scroll up one command
and then 'search' for it
|
|
It's tedious to write (and look at) [[gnu::always_inline]] etc. :^)
|
|
|
|
Let's output *something* instead of crashing on a failed assertion.
|
|
Also, rewrite the macro to expand to an if statement instead of
a weird ternary operator with a (void)0 banch.
|
|
Clang complains about this; with the change the next commit is going
to make to ASSERT() internals, GCC is going to start to complain as well.
|
|
|
|
Fixes #1854.
|
|
In TabWidgets with the "uniform tabs" mode on, we will now scale tabs
between a minimum and maximum size, distributing the available space.
Partially addresses #1971.
|