Commit graph

17939 commits

Author SHA1 Message Date
Nick Johnson
a437430294 Notification: Give a unique internal ID
This will allow us to later query the notifications from a connection
and safely update it without exposing it to any other applications, as
it is session based.
2021-03-22 12:46:16 +01:00
Nick Johnson
7351c77a42 LibGUI+Notification: Use lifetime connection
In order to allow notifications to be updated, we will create a persistent connection for the lifetime of the notification.
2021-03-22 12:46:16 +01:00
Luke
dddaa529b2 LibWeb: Advertise that we support the deflate content encoding 2021-03-22 12:45:34 +01:00
Luke
6cad2aba5e LibHTTP: Add support for the deflate content encoding 2021-03-22 12:45:34 +01:00
Andreas Kling
0255c8d976 Only apply auto-naming of function expressions based on syntax
The auto naming of function expressions is a purely syntactic
decision, so shouldn't be decided based on the dynamic type of
an assignment. This moves the decision making into the parser.

One icky hack is that we add a field to FunctionExpression to
indicate whether we can autoname. The real solution is to actually
generate a CompoundExpression node so that the parser can make
the correct decision, however this would have a potentially
significant run time cost.

This does not correct the behaviour for class expressions.

Patch from Anonymous.
2021-03-22 12:44:07 +01:00
Andreas Kling
7241ff3967 LibJS: *Actually* check for negative zero in JS::Value(double)
As @nico pointed out, 0.0 == -0.0 in C++, even though they are not
bitwise identical. Use the same trick as Value::is_negative_zero() to
really check for it.

This allows JS::Value(0.0) to correctly become an Int32-backed 0 value.
2021-03-22 08:06:47 +01:00
AnotherTest
9b68f91c0b Spreadsheet: Add an export wizard, and support for custom CSV exports
Fixes #4269.
2021-03-22 07:43:58 +01:00
AnotherTest
bba3a7a2cb Spreadsheet: Ignore empty cells when calculating data bounds
There's no reason to use extra rows/columns to represent empty cells
when exporting.
2021-03-22 07:43:58 +01:00
AnotherTest
8bd138cbbe Spreadsheet/XSV: Make the writer respect QuoteAll
Also make the header container type generic, and name an enum.
2021-03-22 07:43:58 +01:00
AnotherTest
3c151b3de6 Spreadsheet: Add an import wizard, and add support for custom CSV files
Fixes the import half of #4269.
2021-03-22 07:43:58 +01:00
AnotherTest
3bbcde9192 Spreadsheet/XSV: Add at() accessors
These are just aliases for operator[].
Also make the headers() getter return a vector of empty strings when the
csv file has no explicit headers.
2021-03-22 07:43:58 +01:00
AnotherTest
39f3f3be94 LibGUI: Allow ItemListModel to have 2D items
This makes it possible to use it as a model for e.g. TableViews.
2021-03-22 07:43:58 +01:00
AnotherTest
6eeb8225f8 LibGUI: Add a few missing classes to the forwarding header 2021-03-22 07:43:58 +01:00
AnotherTest
714ce4741d LibGUI: Allow a wizard page to return null as its next page 2021-03-22 07:43:58 +01:00
AnotherTest
b072cb725f LibGUI: Allow constructing a string Variant from StringView 2021-03-22 07:43:58 +01:00
AnotherTest
c1d67d6b17 Spreadsheet: Don't assume that the 'cells' field is an object
It might be missing, or not be an object.
Fixes #4821.
2021-03-22 07:43:58 +01:00
AnotherTest
9f8d518e82 Spreadsheet: Only append new columns/rows every 50ms
Fixes #5550.
2021-03-22 07:43:58 +01:00
Brendan Coles
7191098356 UserspaceEmulator: Add support for SC_abort syscall 2021-03-22 07:43:44 +01:00
Yuval Tasher
d2b7500c65 LibGUI: remove empty TODO. 2021-03-22 07:43:26 +01:00
Andreas Kling
14d598fe7f LibJS: Don't try to store negative zero as an Int32 JS::Value 2021-03-21 21:40:10 +01:00
Andreas Kling
6870349599 LibJS: Flatten Value::to_numeric()
The basic idea here is to inline to_primitive() to get rid of the
function call overhead.
2021-03-21 21:39:39 +01:00
Andreas Kling
00965e3dad LibJS: Add fast path for add() with two numeric JS::Values 2021-03-21 21:39:39 +01:00
Andreas Kling
37cd1a95fc LibJS: Only call GlobalObject::vm() once in add() 2021-03-21 21:39:39 +01:00
Andreas Kling
c8382c32e9 LibJS: Split Value::Type::Number into Int32 and Double
We now store 32-bit integers as 32-bit integers directly which avoids
having to convert them from doubles when they're only used as 32-bit
integers anyway. :^)

This patch feels a bit incomplete and there's a lot of opportunities
to take advantage of this information. We'll have to find and exploit
them eventually.
2021-03-21 21:39:39 +01:00
Andreas Kling
630d83be8f LibJS: Always inline some tiny Interpreter getters 2021-03-21 21:39:39 +01:00
Andreas Kling
e0abfcb27d LibJS: Don't track executing AST nodes in a Vector
Instead just link together the InterpreterNodeScopes in a linked list.
This was surprisingly hot on CanvasCycle.
2021-03-21 21:39:39 +01:00
Andreas Kling
46e61d208b LibJS: Avoid unnecessary FlyString(String) churn in Reference ctors 2021-03-21 21:39:39 +01:00
Andreas Kling
1fb50d823d LibJS: Always inline Cell::vm() and Cell::heap() 2021-03-21 21:39:39 +01:00
Andreas Kling
dc8817638e LibJS: Only update anonymous function names when necessary
Previously we would generate function names for anonymous functions
on every AssignmentExpression, even if we weren't assigning a function.

We were also setting names of anonymous functions in arrays, which is
apparently a SpiderMonkey specific behavior not supported by V8, JSC
or required by ECMA262. This patch removes that behavior.

This is a huge performance improvement on the CanvasCycle demo! :^)
2021-03-21 21:39:39 +01:00
Andreas Kling
f89c479358 profile: Add -a option as an alias for "-p -1" (all processes) 2021-03-21 16:02:11 +01:00
Andreas Kling
1603623772 LibJS: Move AST node stack from VM to Interpreter 2021-03-21 16:02:11 +01:00
Idan Horowitz
b3b8c01ebf LibCompress: Convert GzipDecompressor from recursive to iterative
This way a gzip compressed file that contains a large amount of small
blocks wont cause a stack overflow.
2021-03-21 15:46:35 +01:00
Linus Groh
00bbe76c94 MenuApplets: Remove unused .gitignore files
These are not needed since the switch to CMake and out-of-tree builds.
2021-03-21 15:11:48 +01:00
Liav A
6440beeffe Kernel/AHCI: Shift the call to reset() for the WorkQueue 2021-03-21 13:41:09 +01:00
Liav A
2ae9de77bb Kernel/AHCI: Reorder complete_current_request
Clear the m_current_request before signalling the end of request.
2021-03-21 13:41:09 +01:00
Liav A
cfc2f33dcb Kernel/AHCI: Add a boot argument to force AHCI to operate on IRQ 11
As a compromise, if the fimrware decided to set the IRQ line to be 7,
or something else we can't deal with, the user can simply force the code
to work with IRQ 11, with the boot argument "force_ahci_irq_11" being
set to "on".
2021-03-21 13:41:09 +01:00
Liav A
36a82188a8 Kernel/PCI: Allow to set the PCI IRQ line of a device
This will be used later by the AHCI code to set the IRQ line to be 11,
if hardware by mistake changed the value to be something we can't deal
with.
2021-03-21 13:41:09 +01:00
Liav A
6c03fdc1ef Kernel/AHCI: Don't set the PRDBC when accessing the device
This resulted in fatal error when trying to write to real hard drive
I tested, so we only set the counts in the scatter/gather list later.
2021-03-21 13:41:09 +01:00
Liav A
0b1fa97b30 Kernel/AHCI: Use interrupts for IO operations
Instead of polling if the device ended the operation, we can just use
interrupts for signalling about end of IO operation.
In similar way, we use interrupts during device detection.

Also, we use the new Work Queue mechanism introduced by @tomuta to allow
better performance and stability :)
2021-03-21 13:41:09 +01:00
Liav A
21bb7fd5c9 Kernel/AHCI: Add a method to get raw interrupt enable register 2021-03-21 13:41:09 +01:00
Tom
20cccda731 Kernel: Add simplistic work queues
We can't use deferred functions for anything that may require preemption,
such as copying from/to user or accessing the disk. For those purposes
we should use a work queue, which is essentially a kernel thread that
may be preempted or blocked.
2021-03-21 13:41:09 +01:00
Liav A
314f04b896 Kernel: Fix undefined behavior due to shifting out of bounds 2021-03-21 13:41:09 +01:00
Cesar Torres
b7d726e226 LibGUI: Fix crash when getting text of selected line after a line delete 2021-03-21 11:45:22 +01:00
Andreas Kling
d0664ce6c9 LibJS: Don't punish large arrays with generic indexed property storage
This patch rethinks the way indexed property storage works:

Instead of having a cut-off point at 200 elements where we always move
to generic property storage, we now allow arrays to stay in simple mode
as long as we don't create a gap/hole larger than 200 elements.

We also simplify generic storage to only have a hash map (for now)
instead of juggling both a vector and a hash map. This is mostly fine
since the vast majority of arrays get to stay simple now.

This is a huge speedup on anything that uses basic JS arrays with more
than 200 elements in them. :^)
2021-03-21 11:37:10 +01:00
Itamar
dee0c46c9b HackStudio: Display warning when opening binary files
We now detect and display a warning when we can't render the text of an
opened file.

Closes #5062.
2021-03-21 09:46:21 +01:00
Itamar
3cc7b00e24 LibGUI: Allow TextDocument::set_text to fail 2021-03-21 09:46:21 +01:00
Brendan Coles
f8c603fe7e LibELF: DynamicObject: set for_each_symbol/for_each_dynamic_entry public 2021-03-21 09:40:30 +01:00
Oleg
d0e7d45b85
LibGfx: Don't use target's alpha if it doesn't have one (#5888) 2021-03-21 09:40:14 +01:00
aabajyan
8560108717 LibWeb: Add support to view JSON.
Extremely small change, all I did is check for application/json,
mime type and parsed it as text.
2021-03-21 09:37:51 +01:00
Luke
31f7296934 LibWeb: Add legacy Image factory function 2021-03-21 09:37:25 +01:00