Commit graph

25423 commits

Author SHA1 Message Date
Andreas Kling 46215a8183 Kernel: Add Processor::pause() and use it to give the CPU a rest
On x86, the "pause" instruction is a "spin loop hint".
2021-08-09 11:46:30 +02:00
Andreas Kling b7129c57df Kernel: Only get register dump when we have a trap
Co-authored-by: Tom <tomut@yahoo.com>
2021-08-09 11:46:30 +02:00
Andreas Kling cebdb0b575 Kernel: Fix logic typo in ConsoleManagement::is_initialized()
Regressed in 2ff3c54153.
2021-08-09 11:46:30 +02:00
Mandar Kulkarni aaf232f903 Tests: Add test for String::bijective_base_from() 2021-08-09 14:14:07 +04:30
Mandar Kulkarni b0ff91ff09 Spreadsheet: Make convert_from_string() return Optional<size_t>
Earlier, we were using 0 value for characters not found in "map".

We should return failure for invalid inputs.
So, I have changed the return type of function to Optional<size_t>.

Also changed caller to handle Optional return.
2021-08-09 14:14:07 +04:30
Mandar Kulkarni 2c44f2dc3c Spreadsheet: Fix column index string to number conversion
Fixed convert_from_string() function to return correct output.
The value of a number is equal to sum of each digit multiplied by it's
positional weight.
2021-08-09 14:14:07 +04:30
Idan Horowitz 151c940827 CI: Remove leftover ccache step and fix a broken link in the clang build 2021-08-09 09:03:31 +02:00
Marcus Nilsson b1b6a6d6e8 PixelPaint: Let Tools have different cursors
This adds support for the Tools in PixelPaint to use different cursors
within ImageEditor. For now most of them get the crosshair cursor since
it's the most fitting, but in the future we will want to add custom
cursors.
2021-08-09 00:57:44 +02:00
Daniel Bertalan 657fbc1e6c Toolchain: Remove static LLVM libraries
We link against these dynamically anyways, so having them around is not
useful. Removing them frees precious storage space on CI.
2021-08-08 23:54:00 +02:00
Daniel Bertalan d3595477d8 Toolchain: Build libLLVM as a dynamic library
This library is used by virtually all executables in the Clang
toolchain. By default, it is linked statically, which leads to huge
file sizes and us running out of artifact storage disk space on CI.
2021-08-08 23:54:00 +02:00
Brian Gianforcaro 8e93815846 Kernel: Fix panic loop when encountering an unknown boot_mode
The kernel panic handler now parses the kernels boot_mode to decide how
to handle the panic. So the previous logic could end up in an panic loop
until we blew out the kernel stack.

Instead only validate the kernel's boot mode once per boot, after
initializing the kernel command line.
2021-08-08 23:11:50 +02:00
Linus Groh 312946059b LibJS+Spreadsheet: Use js_string(VM&, ...) overload more 2021-08-08 21:32:58 +01:00
Idan Horowitz bac3c2cf6d CI: Split off clang toolchain builds from normal CI and schedule them
Clang builds will no longer be apart of the automated CI for every Push/
Pull Request, and will instead be ran at 00:00 UTC every day, with the
results posted to the discord #clang-toolchain channel.
2021-08-08 22:31:35 +02:00
Linus Groh 97010d4903 LibJS: Implement Intl[@@toStringTag] 2021-08-08 20:14:59 +01:00
Linus Groh 44a8b55c50 LibJS: Add preparation for Intl constructors and prototypes
Add a JS_ENUMERATE_INTL_OBJECTS macro and use it to generate:

- Forward declarations
- CommonPropertyNames class name members
- Constructor and prototype GlobalObject members, getters, visitors,
  and initialize_constructor() calls
2021-08-08 20:14:59 +01:00
Linus Groh a37dcf8ca7 LibJS: Add the Intl namespace object :^)
This is the start of implementing ECMA-402 in LibJS, better known as the
ECMAScript Internationalization API.

Much like Temporal this gets its own subdirectory (Runtime/Intl/) as
well as a new C++ namespace (JS::Intl) so we don't have to prefix all
the files and classes with "Intl".

https://tc39.es/ecma402/
2021-08-08 20:14:59 +01:00
Linus Groh 7d8c182359 LibJS: Implement Temporal.PlainYearMonth.prototype.getISOFields() 2021-08-08 17:45:06 +01:00
Linus Groh 5a260fcad1 LibJS: Implement Temporal.PlainYearMonth.prototype.valueOf() 2021-08-08 17:45:06 +01:00
Linus Groh d9ed0f1f47 LibJS: Implement Temporal.PlainYearMonth.prototype.inLeapYear 2021-08-08 17:45:06 +01:00
Linus Groh 3592a748b6 LibJS: Implement Temporal.PlainYearMonth.prototype.monthsInYear 2021-08-08 17:45:06 +01:00
Linus Groh 703eb1f7b4 LibJS: Implement Temporal.PlainYearMonth.prototype.daysInMonth 2021-08-08 17:45:06 +01:00
Linus Groh 1f1d7144bf LibJS: Implement Temporal.PlainYearMonth.prototype.daysInYear 2021-08-08 17:45:06 +01:00
Linus Groh 5ec70792fd LibJS: Implement Temporal.PlainYearMonth.prototype.monthCode 2021-08-08 17:45:06 +01:00
Linus Groh 0edec6578b LibJS: Implement Temporal.PlainYearMonth.prototype.month 2021-08-08 17:45:06 +01:00
Linus Groh c947ba9ed9 LibJS: Implement Temporal.PlainYearMonth.prototype.year 2021-08-08 17:45:06 +01:00
Linus Groh 71eca69d7c LibJS: Implement Temporal.PlainYearMonth.prototype.calendar 2021-08-08 17:45:06 +01:00
Linus Groh d8e835d22f LibJS: Implement Temporal.PlainYearMonth.prototype[@@toStringTag] 2021-08-08 17:45:06 +01:00
Linus Groh 4d3af45efb LibJS: Handle PlainYearMonth in the Calendar.prototype getters 2021-08-08 17:45:06 +01:00
Linus Groh e2f016dc81 LibJS: Handle PlainYearMonth in ISO{Year,Month,MonthCode,Day} 2021-08-08 17:45:06 +01:00
Linus Groh 4ba5df7145 LibJS: Handle PlainYearMonth in GetTemporalCalendarWithISODefault 2021-08-08 17:45:06 +01:00
Linus Groh 2aec6653c4 LibJS: Handle PlainYearMonth in ToTemporalCalendar 2021-08-08 17:45:06 +01:00
Linus Groh 0a8edd5ce7 LibJS: Start implementing Temporal.PlainYearMonth
This commit adds the PlainYearMonth object itself, its constructor and
prototype (currently empty), and the CreateTemporalYearMonth and
ISOYearMonthWithinLimits abstract operations.
2021-08-08 17:45:06 +01:00
Linus Groh 5b12542d39 LibJS: Fix Vector<Value> => MarkedValueList in calendar_fields()
We need to ensure the temporary PrimitiveString cells don't get GC'd.
2021-08-08 17:45:06 +01:00
Linus Groh 53c44bea00 LibJS: Mark getters of more Temporal objects [[nodiscard]]
PlainDate, PlainTime, and PlainDateTime already do this. All the others
should as well.
2021-08-08 17:45:06 +01:00
Gunnar Beutner aabbfa78e2 DynamicLoader: Make sure we don't link against libgcc_s
This bug was reintroduced by the removal of -fbuilding-gcc.
2021-08-08 16:41:51 +02:00
Gunnar Beutner a29c18f969 Toolchain+Ports: Let -nostdlib make us not link against libgcc_s
For now this is not a mandatory toolchain rebuild.
2021-08-08 16:41:51 +02:00
sin-ack 07f5e12568 WidgetGallery: Change model update() functions to invalidate()
These functions reload the whole model contents and thus can be moved to
invalidate(), which saves us from the need to manually call update() on
them.
2021-08-08 14:45:23 +02:00
Andreas Kling 2be368e4c4 Kernel: Rename queue_runnable_thread() => enqueue_runnable_thread() 2021-08-08 14:24:55 +02:00
Andreas Kling 0910979dec Kernel: Remove unused Process::FileDescriptions::fd_flags() 2021-08-08 14:24:55 +02:00
Andreas Kling 9ccc77092d Kernel: Remove unused cruft from FileDescriptionAndFlags 2021-08-08 14:24:55 +02:00
Andreas Kling d959b5d9dd Kernel: Remove unused template variant of create_kernel_thread() 2021-08-08 14:24:55 +02:00
Andreas Kling db14092d8f Kernel: Remove unused Process::all_pids() 2021-08-08 14:24:54 +02:00
Andreas Kling 374972578d Kernel: Port the scheduler's time tracking to SpinLockProtectedValue 2021-08-08 14:24:54 +02:00
Andreas Kling a425f421ac Kernel: Port the scheduler's ready queues to SpinLockProtectedValue 2021-08-08 14:24:54 +02:00
Andreas Kling a1c82041a6 Kernel: Simplify the per-CPU SchedulerData struct 2021-08-08 14:24:54 +02:00
Andreas Kling 5712e46ddc Kernel: Remove unused "VGA font" memory region in GraphicsManagement 2021-08-08 14:24:54 +02:00
Andreas Kling 2c1788e2e4 FileOperation: Don't follow symlinks
Deleting a symlink via "FileOperation Delete" should not recursively
delete whatever the symlink is pointing to. Same basic idea applies to
the Copy and Move operations.
2021-08-08 14:24:54 +02:00
sin-ack 8c9c2f46c7 LibGUI: Implement granular updates for FileSystemModel
FileSystemModel will now react to specific events from Core::FileWatcher
in order to granularly update its data based on addition or removal of
files from the tree. Metadata changes are currently not handled, but in
the future they can be used to re-stat() a file to get its updated
statistics.
2021-08-08 14:13:37 +02:00
sin-ack e377b508b7 LibGUI: Prefix some private FileSystemModel::Node members with m_
This commit has no functional changes.
2021-08-08 14:13:37 +02:00
sin-ack 265e2832ef LibGUI: Resize the mapping rows during sort
SortingProxyModel always expected the source model to have the same
number of rows as long as it has not been invalidated. Now that we have
granular updates, this assumption is no longer true, and we need to
resize the source/proxy_rows vectors to the new size. This is safe since
the values in the vector are overwritten right afterwards.
2021-08-08 14:13:37 +02:00