Commit Graph

6456 Commits

Author SHA1 Message Date
Linus Groh
a216ea4c8d LibCrypto: Add missing implementation of SBI::divided_by(USBI) 2021-07-09 13:20:51 +01:00
Linus Groh
3014e529be LibJS: Tweak error message in the NumberToBigInt abstract operation
This is no longer specific to the BigInt() constructor, so it shouldn't
be mentioning an 'argument' that we might not have.
2021-07-09 13:20:51 +01:00
Linus Groh
9f2dd89446 LibJS/Tests: Add tests for Date.prototype.toTemporalInstant() 2021-07-09 13:20:51 +01:00
Andreas Kling
e5a1e535cc LibC: Re-run clang-format on malloc.cpp 2021-07-09 14:14:22 +02:00
Andreas Kling
19cb5ed97a LibC: Simplify locking in malloc
- Use a simple pthread_mutex_t instead of bringing in headers from
  LibThreading just to get a mutex.

- Use a normal mutex instead of a recursive one.

- Remove redundant locking in realloc().
2021-07-09 13:47:32 +02:00
Andreas Kling
b8a204c5b9 LibThreading: Rename Lock => Mutex 2021-07-09 11:15:50 +02:00
Andreas Kling
ce5d2b4f16 LibThreading: Remove unused "Lockable" class 2021-07-09 11:15:50 +02:00
Luke
1da06f9dfd LibJS: Add %TypedArray%.prototype.map 2021-07-09 10:15:45 +01:00
Luke
bc6f619344 LibJS: Add TypedArraySpeciesCreate and %TypedArray%.prototype.filter
I'm not too happy with how I get the default constructor in
typed_array_species_create, but it works for now.
2021-07-09 10:15:45 +01:00
Luke
53bc3f8e3b LibJS: Move typed_array_create to TypedArray.{h,cpp}
This is to make it accessible from TypedArrayPrototype, for use with
typed_array_species_create.
2021-07-09 10:15:45 +01:00
Aziz Berkay Yesilyurt
9b4729dd40 Userland: Add ability to capture rectangular region in shot
A click and drag selectable, transparent, fullscreen window is
displayed with the command line argument -r for screenshots.
2021-07-09 13:33:46 +04:30
Aziz Berkay Yesilyurt
dc833e49b0 WindowServer: Paint background when a fullscreen window is transparent
The windows in the background are ignored when the window is fullscreen.
However, we still would like to see the background if that window is
transparent.
2021-07-09 13:33:17 +04:30
Aziz Berkay Yesilyurt
6f594b36f5 LibGUI: Verify m_window_id is not-zero in set_maximized
Window::set_maximized requires non-zero window id to be a valid call,
i.e. calling Window::show beforehand. A verify statement before the
server call can help developers by hinting correct usage.
2021-07-09 13:32:30 +04:30
Ali Mohammad Pur
0459a111b2 Revert "Userland: Add ability to screenshot rectangular region in shot (#8515)"
This reverts commit 1c06d77262.
This was squashed by mistake, the rebased version will follow.
2021-07-09 13:27:56 +04:30
Aziz Berkay Yesilyurt
1c06d77262
Userland: Add ability to screenshot rectangular region in shot (#8515)
* LibGUI: Verify m_window_id is not-zero in set_maximized

Window::set_maximized requires non-zero window id to be a valid call,
i.e. calling Window::show beforehand. A verify statement before the
server call can help developers by hinting correct usage.

* LibGUI: Paint background when the fullscreen window is transparent

The windows in the background are ignored when the window is fullscreen.
However, we still would like to see the background if that window is
transparent.

* Userland: Add ability to capture rectangular region in shot

A click and drag selectable, transparent, fullscreen window is
displayed with the command line argument -r for screenshots.
2021-07-09 13:11:24 +04:30
Aziz Berkay Yesilyurt
ec389adaa6 ImageViewer: Use real path for the image path
By using the real path for the image, ImageViewer can iterate over the
images in the same directory. Before, this was not possible when
ImageViewer opened from Terminal with a path argument.
2021-07-09 10:22:26 +02:00
Aziz Berkay Yesilyurt
f62f53f723 ImageViewer: Use LexicalPath to grab current_dir 2021-07-09 10:22:26 +02:00
Aziz Berkay Yesilyurt
dd476c35cb ImageViewer: Don't resize the window after the first image is displayed 2021-07-09 10:22:26 +02:00
Linus Groh
6531485251 LibJS/Tests: Add tests for Temporal.Instant() constructor 2021-07-08 23:08:27 +01:00
Linus Groh
117323f2d9 LibJS: Implement Temporal.Instant.prototype.epochNanoseconds 2021-07-08 23:08:27 +01:00
Linus Groh
b5d0cdc97e LibJS: Implement Temporal.Instant.prototype.epochMicroseconds 2021-07-08 23:08:27 +01:00
Linus Groh
b157ab3f12 LibJS: Implement Temporal.Instant.prototype.epochMilliseconds 2021-07-08 23:08:27 +01:00
Linus Groh
5010e01223 LibJS: Implement Temporal.Instant.prototype.epochSeconds 2021-07-08 23:08:27 +01:00
Linus Groh
dad336c944 LibJS: Implement Temporal.Instant.prototype[@@toStringTag] 2021-07-08 23:08:27 +01:00
Linus Groh
439b35dc7d LibJS/Tests: Add tests for Temporal.TimeZone() constructor 2021-07-08 23:08:27 +01:00
Linus Groh
51c581f604 LibJS: Implement Temporal.TimeZone.prototype.id 2021-07-08 23:08:27 +01:00
Linus Groh
7f0fe352e2 LibJS: Implement Temporal.TimeZone.prototype.toJSON() 2021-07-08 23:08:27 +01:00
Linus Groh
8d00504ff2 LibJS: Implement Temporal.TimeZone.prototype.toString() 2021-07-08 23:08:27 +01:00
Linus Groh
2e968700aa LibJS: Implement Temporal.TimeZone.prototype[@@toStringTag] 2021-07-08 23:08:27 +01:00
Andrea Martinelli
ab1caad1e9 Taskbar: Make clicks at the edges and corners work as expected
This makes it easy for the user to just throw the mouse at the corner
of the screen and obtain the desired outcome (eg. opening the start
menu), without having to precisely position the cursor over one of the
buttons.
2021-07-08 22:45:40 +02:00
networkException
dac7b25b8a WindowServer: Add missing minimize check to highlighted window callback
This patch adds a missing minimize check for highligted windows in
WindowStack::for_each_visible_window_of_type_from_front_to_back().
Minimized windows should not be treated as visible in this context.

Previously, iterating through each visible Window when recomputing
occlusions in the Compositor would cause a crash if a highlighted
Window is also minimized at the same time. As the WindowSwitcher
currently highligts Windows even when they are minimized, opening
it while any Window is minimized would cause WindowServer to crash.
2021-07-08 22:31:21 +02:00
Marcus Nilsson
791a018c99 PixelPaint: Add method to merge visible layers
This adds a function that merges all visible layers to one, ignoring the
invisible.
2021-07-08 20:16:26 +02:00
Marcus Nilsson
0900e31fe0 PixelPaint: Scroll into view when reordering layers
Make LayerListWidget scroll into view when reordering layers.
2021-07-08 20:16:26 +02:00
Marcus Nilsson
618bb2d33e PixelPaint: Make brush draw on mousedown
This makes the brush tool start drawing a point before the user moves
the mouse, like in Photoshop and Gimp. The number of iterations of
draw_point makes for roughly 4 clicks to full opacity.
2021-07-08 20:16:26 +02:00
Marcus Nilsson
9be08e33ea PixelPaint: Add method to flatten image layers
This adds Image::flatten_all_layers() that allows the user to flatten
all the visible layers into one.
2021-07-08 20:16:26 +02:00
networkException
76a18e1172 WindowServer: Remove rect behind window icon in WindowSwitcher
This patch removes the background behind window icons
in the WindowSwitcher which looked like it was being
rendered incorrectly (without alpha) previously.
2021-07-08 20:15:23 +02:00
pancake
390d3e9fbe
LibVT: Ignore DECSTBM with invalid values (#8559)
Co-authored-by: pancake <pancake@nopcode.org>
2021-07-08 22:41:55 +04:30
Idan Horowitz
241f9f21d4 LibJS: Add %TypedArray%.prototype.reduceRight 2021-07-08 16:30:09 +01:00
Idan Horowitz
2356382938 LibJS: Add %TypedArray%.prototype.reduce 2021-07-08 16:30:09 +01:00
Idan Horowitz
f0abcde00c LibJS: Add %TypedArray%.prototype.lastIndexOf 2021-07-08 16:30:09 +01:00
Idan Horowitz
6343bfa9d7 LibJS: Add %TypedArray%.prototype.indexOf 2021-07-08 16:30:09 +01:00
Idan Horowitz
da49a7a9f8 LibJS: Add %TypedArray%.prototype.includes 2021-07-08 16:30:09 +01:00
Idan Horowitz
3b9886949f LibJS: Add %TypedArray%.prototype.fill 2021-07-08 16:30:09 +01:00
Idan Horowitz
a9de3b1d8f LibJS: Add missing a TypedArray excessive length limit check
These checks already existed for the 3 other TypedArray construction
methods. (This commit also fixes an incorrect type in one of them)
2021-07-08 16:30:09 +01:00
Luke
c7a839bb24 LibJS: Add %TypedArray%.prototype.copyWithin
This fixes 44 test262 cases.
2021-07-08 15:12:52 +01:00
Jan de Visser
23ad4bcdf7 Utilities: Teach sql utility to use the SQLClient class
This allows the utility to connect to databases and submit SQL
statements.
2021-07-08 17:55:59 +04:30
Jan de Visser
a034774e3a LibSQL+SQLServer: Build SQLServer system service
This patch introduces the SQLServer system server. This service is
supposed to be the only process/application talking to database storage.
This makes things like locking and caching more reliable, easier to
implement, and more efficient.

In LibSQL we added a client component that does the ugly IPC nitty-
gritty for you. All that's needed is setting a number of event handler
lambdas and you can connect to databases and execute statements on them.

Applications that wish to use this SQLClient class obviously need to
link LibSQL and LibIPC.
2021-07-08 17:55:59 +04:30
Jan de Visser
1037d6b0eb LibSQL: Invent statement execution machinery and CREATE SCHEMA statement
This patch introduces the ability execute parsed SQL statements. The
abstract AST Statement node now has a virtual 'execute' method. This
method takes a Database object as parameter and returns a SQLResult
object.

Also introduced here is the CREATE SCHEMA statement. Tables live in a
schema, and if no schema is present in a table reference the 'default'
schema is implied. This schema is created if it doesn't yet exist when
a Database object is created.

Finally, as a proof of concept, the CREATE SCHEMA and CREATE TABLE
statements received an 'execute' implementation. The CREATE TABLE
method is not able to create tables created from SQL queries yet.
2021-07-08 17:55:59 +04:30
Jan de Visser
30691549fd LibSQL: Move Order and Nulls enums from SQL::AST to SQL namespace
The Order enum is used in the Meta component of LibSQL. Using this enum
meant having to include the monster AST/AST.h include file. Furthermore,
they are sort of basic and therefore can live in the general SQL
namespace. Moved to LibSQL/Type.h.

Also introduced a new class, SQLResult, which is needed in future
patches.
2021-07-08 17:55:59 +04:30
Andrea Martinelli
5397845a41 WindowServer: Add a new IPC to set the cursor position 2021-07-08 14:15:07 +02:00
pancake
86a4d0694f FileManager: Add Open in Terminal on folder context menu 2021-07-08 16:15:55 +04:30
Tom
ad5d9d648b Kernel: Use PAE to allow accessing all physical memory beyond 4GB
We already use PAE for the NX bit, but this changes the PhysicalAddress
structure to be able to hold 64 bit physical addresses. This allows us
to use all the available physical memory.
2021-07-08 11:43:34 +02:00
Daniel Bertalan
5208bc05ce LibC: Don't include fenv.h from float.h
This fixes a build issue where `compiler-rt` tried to declare its own
version of the `FE_*` macros, and included `float.h` in order to get the
constants. `compiler-rt` tried to declare these as an enum, and failed
with a syntax error when the constant's literal values were substituted.
2021-07-08 10:11:00 +02:00
Daniel Bertalan
6f6b1b3ea1 ChessEngine: Don't call non-constexpr sqrt in a constexpr intiializer
GCC likely has a builtin intrinsic that evaluates the operation at
compile-time, even if the `LibM` is not declared as constexpr. Clang,
however, does not like it, and it failed to compile this code.
2021-07-08 10:11:00 +02:00
Daniel Bertalan
44b6f402ae Utilities/run-tests: Don't use using enum
`using enum` statements will only be supported by the upcoming Clang 13
compiler, so the current code can't be built with the almost-ready Clang
toolchain yet.
2021-07-08 10:11:00 +02:00
Daniel Bertalan
3bdefb4623 UserspaceEmulator: Use long double in FABS
`fpu_get` returns a long double and `fpu_set` expects a long double as
its parameter, and the X87 FPU uses long doubles as its internal
storage, meaning the `FABS` operates on them. This means the correct
intrinsic function for implementing it is `__builtin_fabsl`.
2021-07-08 10:11:00 +02:00
Daniel Bertalan
a36c37db47 LibIPC: Remove unnecessary template<>
This fixes a Clang warning.
2021-07-08 10:11:00 +02:00
Daniel Bertalan
2db4709c0c Everywhere: Add braces to aggregate initializers
This fixes a couple of warnings emitted by Clang.
2021-07-08 10:11:00 +02:00
Daniel Bertalan
98260c5862 LibC+Utilities: Add gnu::format attributes
Without these attributes present on these custom formatting functions,
Clang would warn use about nonliteral format strings. As an added bonus,
we now get type checking on these.
2021-07-08 10:11:00 +02:00
Daniel Bertalan
e8e628de57 Everywhere: Add Clang pragmas
We use these to prevent UB from being optimized away in `/bin/crash` and
to make the compiler not warn about the many implicit floating point
type promotions in LibM.
2021-07-08 10:11:00 +02:00
Daniel Bertalan
98a9a1d7f9 Everywhere: Add break after the last case label before default
We already do this in most places, so the style should be consistent.
Also, Clang does not like it, as this could cause an unexpected compile
error if some statements are added to the default label or a new label
is added above it.
2021-07-08 10:11:00 +02:00
Daniel Bertalan
b0208ce433 Everywhere: Forward declare structs as structs
While structs being forward declared as classes is not strictly an
issue, Clang complains as this is not portable code, since some ABIs
treat classes declared as `class` and `struct` differently.

It's easier to fix these than to reason about explicitly disabling
another warning.
2021-07-08 10:11:00 +02:00
Daniel Bertalan
e32692ea68 Shell: Use correct printf format string for size_t 2021-07-08 10:11:00 +02:00
Daniel Bertalan
714bd011e1 Everywhere: Use the correct literal suffixes
When performing arithmetic with long doubles/floats, we want to avoid
floating point promotion and narrowing.
2021-07-08 10:11:00 +02:00
Daniel Bertalan
b76ad3db90 IPCCompiler+WindowServer: Fix deleted function warning
It might be the case that we are passing non-movable/non-copyable things
through IPC. In this case, Clang will emit a warning as it can't
generate the requested default move/copy ctor for the IPC message.

To fix this, we use a `#pragma` to make the compiler silently ignore our
request.

The same was the case with the three-way comparison in `Screen`. Since
we don't use the three-way comparison operator anywhere else in our
codebase, we simply use the `==` operator instead.
2021-07-08 10:11:00 +02:00
Daniel Bertalan
f14a4994b0 Everywhere: Don't promote float to double where not needed
The `float => double => float` round trip seen in a couple of places
might pessimize the code. Even if it's truncated to an int in the end,
it's weird not to use the functions with the `f` suffixes when working
with single precision floats.
2021-07-08 10:11:00 +02:00
Daniel Bertalan
01a0aa6e0b HackStudio: Do not check NonnullRefPtr for null value 2021-07-08 10:11:00 +02:00
Daniel Bertalan
c6fafd3e90 AK+Userland: Add generic AK::abs() function and use it
Previously, in LibGFX's `Point` class, calculated distances were passed
to the integer `abs` function, even if the stored type was a float. This
caused the value to unexpectedly be truncated. Luckily, this API was not
used with floating point types, but that can change in the future, so
why not fix it now :^)

Since we are in C++, we can use function overloading to make things
easy, and to automatically use the right version.

This is even better than the LibC/LibM functions, as using a bit of
hackery, they are able to be constant-evaluated. They use compiler
intrinsics, so they do not depend on external code and the compiler can
emit the most optimized code by default.

Since we aren't using the C++ standard library's trick of importing
everything into the `AK` namespace, this `abs` function cannot be
exported to the global namespace, as the names would clash.
2021-07-08 10:11:00 +02:00
Daniel Bertalan
a2e0291172 WindowServer: Don't use old GNU-style designator
Since we use C++20, we can move to the new standardized designated
initializer syntax.
2021-07-08 10:11:00 +02:00
Daniel Bertalan
ca06fd658d Everywhere: Remove unused local variables and lambda captures 2021-07-08 10:11:00 +02:00
Daniel Bertalan
5f7f063919 Everywhere: Mark debug-only functions [[maybe_unused]]
These functions are only used from within `dbgln_if` calls, so in
certain build configurations, they go unused. Similarly to variables, we
now signal to the compiler that we understand that these are not always
in use.
2021-07-08 10:11:00 +02:00
Andrew January
5598f63d0f WindowServer: Make descending into submenu make the submenu current
This fixes a bug with menu keyboard navigation. If you pressed the right
arrow to enter a submenu, then the left arrow to exit the submenu, then
right and left again it would leave no menu item selected.

Because descending into the submenu wasn't making it the current menu,
when you press the left arrow it couldn't find the "current menu" in the
stack, so didn't know what menu to pop back to.

It was an accident that it worked the first time you navigated into the
menu. Selecting the parent item also opened the submenu, and opening
an already open menu sets it as the current menu. After closing the
submenu with the left arrow, it is no longer already open, so it wasn't
getting set as the current menu.
2021-07-08 09:13:24 +02:00
Idan Horowitz
eeb4c1eec9 LibJS: Reorder and add missing name & length properties to Built-ins
The specification dicatates that each built-in will have a length and
name property. (defined in that order)
2021-07-08 01:45:15 +01:00
Linus Groh
7e4b0681e1 LibJS: Implement Date.prototype.toTemporalInstant() 2021-07-08 01:25:49 +01:00
Linus Groh
cc64efac44 LibJS: Split out NumberToBigInt from the BigInt constructor
This is supposed to be its own AO, but since it was only used in one
place, we inlined it. Now that it's also being used in the Temporal
proposal (Date.prototype.toTemporalInstant() specifically), it makes
sense to have it as a standalone function.
A small difference is that we now construct the SignedBigInteger without
casting to i32 but instead take the (known to be integral) double and
cast it to i64. Not perfect, but slightly better.
Also clean up the BigInt constructor a bit while we're here and sprinkle
some spec comments.
2021-07-08 01:25:49 +01:00
Linus Groh
3e8574a9a8 LibCrypto: Add missing implementation of SBI::multiplied_by(USBI)
This only had a declaration and was creating linker errors when used.
Easily fixed!
2021-07-08 01:25:49 +01:00
Andreas Kling
f48e581eac WindowServer: When "flash flush" enabled, flash transparent rects green 2021-07-08 01:22:21 +02:00
Andreas Kling
32654b340a LibCore: Remove overly informal language in ArgsParser error message 2021-07-08 01:17:06 +02:00
Andreas Kling
432ab47053 WindowServer: Allow partial repaints in window frame & menubars
Before this change, invalidating any rect in a WindowFrame would cause
the entire window (including frame & drop shadow) to get invalidated,
leading to copious amounts of overdraw when mousing over menubars,
titlebars, and window buttons.

We now simply allow the partial frame invalidations through to the
window's dirty rects collection and the compositor takes care of it.
2021-07-08 01:17:06 +02:00
Andrew January
cad62230f6 WindowServer: Close submenus when hovering over separators
ec6debb changed item_index_at to return -1 when hovering over a
separator. The intent was to not send the separator to clients for
MenuItemEntered.

However, this had the unintented consequence of not closing the submenu
when you hover over a separator. Submenus ignore when the item index is
-1 in order to leave the menu open when you move the mouse outside. This
ends up leaving the submenu open without the highlight to show what menu
item the submenu belongs to.

A slightly less severe consequence is that pressing the up or down arrow
key in such a situation would now go the top or bottom of the menu
rather than the item above or below the separator.

We now push the special casing of separators into set_hovered_index so
that the rest of the code behaves as it did before ec6debb.
2021-07-08 01:17:02 +02:00
Timothy Flynn
35a2ba8ed8 LibJS: Implement RegExp.prototype [ @@search ]
String.prototype.search is already implemented, but relies on the well-
known Symbol.search, which was not implemented.
2021-07-08 00:01:20 +01:00
Timothy Flynn
aaf5339fae LibJS: Do not downcast from Object to RegExpObject unless needed
Several test262 tests rely on creating phony RegExp objects that do not
have the internal slots used to test for a valid RegExp object. To allow
these tests to run (and because the spec doesn't require real RegExp
objects in these methods), do not attempt to downcast where it isn't
needed.
2021-07-08 00:01:20 +01:00
Timothy Flynn
ce2651a320 LibJS: Remove RegExp 'do_match' helper
This was previously used as a wrapper for Regex::match when that method
was invoked by multiple RegExp.prototype implementations. But now all
implementations go through the RegExpExec abstraction, so this helper
is not needed. Remove it to discourage its usage.

Also update a comment about using dynamic properties for lastIndex; this
is no longer a FIXME.
2021-07-08 00:01:20 +01:00
Timothy Flynn
2d0589f93c LibJS: Implement global RegExp.prototype.match
Also rename the 'rx' variable to 'regexp_object' to match other RegExp
methods.
2021-07-08 00:01:20 +01:00
Timothy Flynn
b6b5adb47d LibJS: Implement RegExp.prototype.match with RegExpExec abstraction 2021-07-08 00:01:20 +01:00
Timothy Flynn
ec898a3370 LibJS: Implement RegExp.prototype.replace with RegExpExec abstraction
Also rename the 'rx' variable to 'regexp_object' to match other RegExp
methods.
2021-07-08 00:01:20 +01:00
Timothy Flynn
6c53475143 LibJS: Implement RegExp.prototype.test with RegExpExec abstraction 2021-07-08 00:01:20 +01:00
Timothy Flynn
a90d5cb622 LibJS: Extract RegExp.prototype.exec to RegExpExec and RegExpBuiltinExec
The RegExp specification dictates that the internal implementation of
RegExp.prototype.exec must go through the RegExpBuiltinExec abstraction.

Note there is currently no functional difference in this commit. However
this now allows other RegExp.prototype methods to use RegExpExec rather
than calling RegExp.prototype.exec. Then, if JavaScript in the wild has
overwritten exec, RegExpExec has some protections to defer to
RegExpBuiltinExec.
2021-07-08 00:01:20 +01:00
Hendi
0dc4e722e6 LibJS: Make FunctionExpression more spec-compliant 2021-07-07 23:31:51 +01:00
Aziz Berkay Yesilyurt
0da1353c80 Userland: Keep ImageViewer window size the same while zooming in
ImageViewer window kept growing while zooming in, which causes out of
memory error and crashes the application. Now, only the image content
is rescaled and the window size is preserved.

We also open the display window as the same size as the image, which may
cause a similar issue for very large image files. This is prevented by
limiting the maximum window size to be the screen size.
2021-07-08 00:21:31 +02:00
Andreas Kling
c0e20252da LibGUI: Don't repaint disabled scrollbars when mousing over them 2021-07-07 23:57:21 +02:00
Andreas Kling
b027466f41 WindowServer+wsctl: Add a simple utility for toggling "flash flush"
You can now put the WindowServer into "flash flush" mode by doing:

$ wsctl -f 1

To disable it, somewhat obviously:

$ wsctl -f 0
2021-07-07 22:56:46 +02:00
Andreas Kling
6032b2cb2b WindowServer: When "flash flush" is enabled, stretch flash to 10 ms
Previously, this mode would flash flush/repaint rects in yellow for
however it long it took for the compositor to replace the yellow with
the final image instead.

Now we usleep() for 10 ms when flashing, so you get a chance to see
the yellow. This immediately makes "flash flush" mode super useful. :^)
2021-07-07 22:56:46 +02:00
Idan Horowitz
795786387b LibJS: Remove the NativeProperty mechanism from LibJS
These were an ad-hoc way to implement special behaviour when reading or
writing to specific object properties. Because these were effectively
replaced by the abillity to override the internal methods of Object,
they are no longer needed.
2021-07-07 21:47:22 +01:00
Idan Horowitz
306d59276a LibJS: Stop using a native property for RegExp's lastIndex property
This is not a functional change, the exposed (incorrect) behaviour is
the same as it was before, this simply removes the last user of
NativeProperties, allowing us to remove them completely from LibJS.
2021-07-07 21:47:22 +01:00
Daniel Bertalan
64b1740913 LibELF: Fix syscall regions for .text segments with a non-zero offset
Previously, we assumed that the `.text` segment was loaded at vaddr 0 in
all dynamic libraries, so we used the dynamic object's base address with
`msyscall`. This did not work with the LLVM toolchain, as it likes to
shuffle these segments around.

This now also handles the case when there are multiple text segments for
some reason correctly.
2021-07-07 22:26:53 +02:00
davidot
ae8c4618b7 LibJS: Use as_object instead of as_array in flatten_into_array
Since is_array does not guarantee that it is<Array> we must use
as_object here.
2021-07-07 21:24:26 +01:00
davidot
4846c4a94e LibJS: Fix types and small spec discrepancy in ArrayPrototype::fill 2021-07-07 21:24:26 +01:00
davidot
6c47b77998 LibJS: Fix types and small spec discrepancy in ArrayPrototype::splice 2021-07-07 21:24:26 +01:00
davidot
7a41c758c0 LibJS: Fix types and small spec discrepancy in ArrayPrototype::includes 2021-07-07 21:24:26 +01:00