howar6hill
d8df9c510c
AK: Improve the API of StringBuilder
2020-03-08 17:08:18 +01:00
Liav A
0433c0780d
AK: Use default constructor of Optional if an unset bit is not found
2020-03-08 14:13:30 +01:00
Liav A
4479e874da
Kernel: Ensure RTL8139NetworkAdapter uses virtual memory correctly
2020-03-08 14:13:30 +01:00
Liav A
9dbc273675
Kernel: Ensure E1000NetworkAdapter uses virtual memory correctly
2020-03-08 14:13:30 +01:00
Liav A
d6e122fd3a
Kernel: Allow contiguous allocations in physical memory
...
For that, we have a new type of VMObject, called
ContiguousVMObject, that is responsible for allocating contiguous
physical pages.
2020-03-08 14:13:30 +01:00
Ben Wiederhake
b066586355
Kernel: Fix race in waitid
...
This is similar to 28e1da344d
and 4dd4dd2f3c
.
The crux is that wait verifies that the outvalue (siginfo* infop)
is writable *before* waiting, and writes to it *after* waiting.
In the meantime, a concurrent thread can make the output region
unwritable, e.g. by deallocating it.
2020-03-08 14:12:12 +01:00
Ben Wiederhake
d8cd4e4902
Kernel: Fix race in select
...
This is similar to 28e1da344d
and 4dd4dd2f3c
.
The crux is that select verifies that the filedescriptor sets
are writable *before* blocking, and writes to them *after* blocking.
In the meantime, a concurrent thread can make the output buffer
unwritable, e.g. by deallocating it.
2020-03-08 14:12:12 +01:00
Ben Wiederhake
36ba0a35ee
Travis: Cache toolchain
...
This should give a significant boost to Travis speeds, because most of the
compile time is spent building the toolchain over and over again.
However, the toolchain (or libc or libm) changes only rarely,
so most rebuilds can skip this step.
The hashing has been put into a separate file to keep it
as decoupled as possible from BuiltIt.sh.
2020-03-08 14:09:08 +01:00
Ben Wiederhake
0edae63cc0
Kernel: Fix inconsistent inclusion style
...
This also makes it easier to automatically parse the dependency tree.
Thankfully, this is the only place where a change was necessary.
2020-03-08 14:09:08 +01:00
howar6hill
e72fb8f594
LibC: Fix a bug involving miscalculating week counts of last year
2020-03-08 13:56:01 +01:00
howar6hill
df40847c52
LibC: Reimplement asctime() in terms of strftime()
2020-03-08 13:56:01 +01:00
Andreas Kling
32f15f3c45
AK: Remove unused InlineLRUCache template
...
This was not used by anyone. If we ever need it, we can bring it back.
2020-03-08 13:13:34 +01:00
Andreas Kling
900f51ccd0
AK: Move memory stuff (fast memcpy, etc) to a separate header
...
Move the "fast memcpy" stuff out of StdLibExtras.h and into Memory.h.
This will break a ton of things that were relying on StdLibExtras.h
to include a bunch of other headers. Fix will follow immediately after.
This makes it possible to include StdLibExtras.h from Types.h, which is
the main point of this exercise.
2020-03-08 13:06:51 +01:00
Andreas Kling
fa9fba6901
Kernel: Add missing #includes now that <AK/StdLibExtras.h> is smaller
2020-03-08 13:06:51 +01:00
Andreas Kling
37fc6c117c
Userspace: Add missing #includes now that AK/StdLibExtras.h is smaller
2020-03-08 13:06:51 +01:00
Andreas Kling
35d88f536c
AK: Use __builtin_memset() and such to reduce header dependencies
...
We can use __builtin_memset() without including <string.h>.
This is pretty neat, as it will allow us to reduce the header deps
of AK templates a bit, if applied consistently.
Note that this is an enabling change for an upcoming #include removal.
2020-03-08 13:06:51 +01:00
Andreas Kling
b1058b33fb
AK: Add global FlatPtr typedef. It's u32 or u64, based on sizeof(void*)
...
Use this instead of uintptr_t throughout the codebase. This makes it
possible to pass a FlatPtr to something that has u32 and u64 overloads.
2020-03-08 13:06:51 +01:00
Andreas Kling
b98d8ad5b0
AK: Add a Conditional<condition, TrueType, FalseType> template
...
This allows you to select a type based on a compile-time condition.
2020-03-08 13:06:51 +01:00
howar6hill
10e0d4a196
LibCore: Add format option for DateTime::to_string() ( #1358 )
2020-03-08 11:35:26 +01:00
0xtechnobabble
b6307beb6e
LibJS: Implement if statements
...
If statements execute a certain action or an alternative one depending
on whether the tested condition is true or false, this commit helps
establish basic control flow capabilities in the AST.
2020-03-08 11:15:07 +01:00
0xtechnobabble
a96bf2c22e
LibJS: Implement logical expressions
...
Logical expressions are expressions which can return either true or
false according to a provided condition.
2020-03-08 11:15:07 +01:00
0xtechnobabble
4e62dcd6e6
LibJS: Add typed comparison operator
...
The `===` operator allows us to compare two values while taking their
type into consideration.
2020-03-08 11:15:07 +01:00
0xtechnobabble
3fb0ff102c
LibJS: Allow the dumping of literals that aren't numbers
2020-03-08 11:15:07 +01:00
Tibor Nagy
0d17e3bfa6
LibGUI: Fix null-termination of TextDocumentLine
2020-03-08 10:31:48 +01:00
Andreas Kling
0c7058aaa0
LibJS: Include the operator in BinaryExpression dumps
2020-03-07 23:17:07 +01:00
Andreas Kling
1611071ac7
LibJS: Flesh out JS::Value a little bit more
2020-03-07 23:17:07 +01:00
Andreas Kling
d52130836e
LibJS: Simplify LogStream::operator<<(JS::Value) and move to .cpp file
2020-03-07 23:17:07 +01:00
Elisée Maurer
cbe0053a97
LibJS: Fix string representation for value of type undefined
2020-03-07 23:15:36 +01:00
Andreas Kling
f5476be702
LibJS: Start building a JavaScript engine for SerenityOS :^)
...
I always tell people to start building things by working on the thing
that seems the most interesting right now. The most interesting thing
here was an AST + simple interpreter, so that's where we start!
There is no lexer or parser yet, we build an AST directly and then
execute it in the interpreter, producing a return value.
This seems like the start of something interesting. :^)
2020-03-07 19:42:11 +01:00
Andreas Kling
f2f16e1c24
IPv4: Keep IPv4 socket locked during receive operations
...
We unlock/relock around blocking, but outside of that we now keep the
socket locked.
This fixes an intermittent ASSERT(m_can_read) failure.
2020-03-07 11:27:55 +01:00
Andreas Kling
7a9cb2dfca
LibWeb: Cache the <body background> style image value
...
This way we don't refetch the background image every time style is
recomputed (e.g when hovering different elements.)
2020-03-07 11:17:18 +01:00
Andreas Kling
8f25dbf394
Shell: Fix silly stack overflow in 'cd' builtin
...
Let's write in C++ and we won't have as many C problems. :^)
2020-03-07 11:02:11 +01:00
Andreas Kling
830a57c6b2
LibWeb: Rename directory LibHTML => LibWeb
...
Let's rename this to LibWeb since it aims to provide more parts of the
web platform than just HTML. :^)
2020-03-07 10:32:51 +01:00
Andreas Kling
7a6c4a72d5
LibWeb: Move everything into the Web namespace
2020-03-07 10:27:02 +01:00
Shannon Booth
6a3b12664a
LibGUI: Move Icon and FontDatabase into the GUI namespace
...
We also clean up some old references to the old G prefixed GUI classes
This also fixes a potential bug with using: C_OBJECT_ABSTRACT(GAbstractButton)
instead of C_OBJECT_ABSTRACT(AbstractButton)
2020-03-07 01:33:53 +01:00
Shannon Booth
57f1c919df
LibCore: Remove all remaining C prefix references
...
LibCore's GZip is also moved into the Core namespace with this change.
2020-03-07 01:33:53 +01:00
Andreas Kling
4a271430f8
Shell: Set up the PWD environment variable early
...
This ensures that PWD is set when running "sh -c something"
2020-03-07 00:25:30 +01:00
Shannon Booth
d7cfe61fe4
Userland: Use ArgsParser in crash
2020-03-06 22:46:17 +01:00
Liav A
f3f8b88d8f
Kernel: Fix syntax error in FIFO_DEBUG
2020-03-06 22:29:24 +01:00
Tibor Nagy
30152b6c88
Kernel: Fix syntax errors in PS2MOUSE_DEBUG
...
Found with Cppcheck.
2020-03-06 22:20:53 +01:00
rhin123
72ef3e529a
TerminalWidget: Implement ALT selection
...
When holding ALT & selecting text, the terminal now forms a rectangle
selection similar to other terminal behaviors.
2020-03-06 20:20:02 +01:00
howar6hill
4ba206b7e5
LibC: Fix a indentation problem in time.cpp
2020-03-06 20:15:07 +01:00
Liav A
a6c53cadc8
Meta: Claim copyright on PCI
files
2020-03-06 16:03:58 +01:00
Liav A
9991a36d1a
CPU: Prevent leakage of virtual addresses to kernel log
2020-03-06 15:57:19 +01:00
Liav A
5cbde297ec
Meta: Claim copyright on ACPI
files
2020-03-06 15:56:51 +01:00
Andreas Kling
c6693f9b3a
Kernel: Simplify a bunch of dbg() and klog() calls
...
LogStream can handle VirtualAddress and PhysicalAddress directly.
2020-03-06 15:00:44 +01:00
Andreas Kling
b866582d98
AK: Fix all the warnings in the AK tests
2020-03-06 11:22:23 +01:00
Andreas Kling
75a6b27f73
Ext2FS: Remove unused allocate_block()
...
We only use allocate_blocks() now. If you want a single block, you can
just call allocate_blocks() with a count of 1.
2020-03-06 11:22:23 +01:00
Liav A
259ead5d7a
Userland: Replace lsinterrupts with lsirq
...
Also, lsirq will return more useful data than lsinterrupts did
2020-03-06 11:19:51 +01:00
Liav A
e2889e665f
Kernel: Shorten the model name of i8529 PIC class
2020-03-06 11:19:51 +01:00