Commit graph

810 commits

Author SHA1 Message Date
Valtteri Koskivuori f2c02077ba Userland: Remove a few gratuitous IPC namespace qualifiers
Spotted this while trying to search for specific IPC encode/decode
implementations. Now they are all the same, so searching is easier.
2022-04-03 15:18:20 +01:00
kleines Filmröllchen 7e34b88ed4 LibGUI: Fully support TabWidget in GML
TabWidgets couldn't be used in GML properly, as the GML creation
routines didn't actually call the necessary functions in the TabWidget
to get a new tab added. This commit fixes that by making the name of the
tab a normal property, the previously introduced "title", which can be
trivially set from GML. Therefore, try_add_widget() loses an argument
(while try_add_tab doesn't, because it newly constructs the widget).
This allows us to get rid of the silly "fixing my widget tree after the
fact" code in Help and will make it super easy to use TabWidget in
future GML. :^)
2022-04-03 12:21:05 +02:00
Hendiadyoin1 2377344a89 UserspaceEmulator: Implement the SSE extension
This almost fully implements the SSE extension, similar to the x87 and
MMX extensions, using a separate class "SoftVPU".

Currently missing are all shadow and exception checks, as well as the
denormals-are-zero and flush-to-zero flags.
Also missing are some integer-SIMD functions.
2022-04-02 18:37:38 +02:00
Hendiadyoin1 1d2ad9cf61 UserspaceEmulator: Don't mark SoftFPU::mmx_get/set as ALWAYS_INLINE
These are exposed by SoftCPU, and this attribute would cause these not
to create any symbols to link against.
2022-04-02 18:37:38 +02:00
Hendiadyoin1 b7a8cfdde9 LibX86: Correctly name CVTTSS2SI_r32_xmm2m32
This was previously erroneously called CVTTPS2PI_r32_xmm2m32, while
the mnemonic was correctly CVTTSS2SI.
2022-04-02 18:37:38 +02:00
Idan Horowitz 086969277e Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Itamar 9cd27d1e15 LanguageServers/Cpp: Add SemanticType::PreprocessorMacro
This adds a new semantic token type, PreprocessorMacro.

Calls to preprocessor macros will now be highlighted when semantic
highlighting is enabled in Hack Studio.
2022-03-31 19:10:15 +02:00
Itamar 53c6c36fba LibGUI: Add AutocompleteProvider::TokenInfo::type_to_string() 2022-03-31 19:10:15 +02:00
Itamar 1ec3847acd HackStudio: Hide FindWidget on escape key press 2022-03-30 11:26:26 -04:00
Itamar d9d299f884 HackStudio: Add FindWidget
The find widget appears on Ctrl+F.

It uses the GUI::TextEditor search API to search for text, which also
takes care of highlighting the search results.
2022-03-29 17:45:36 +02:00
Brian Gianforcaro 4674577d80 Everywhere: Rename CommandResult stdout, stderr members to output, error
The names stdout / stderr are bound to conflict with existing
declarations when compiling against other LibC's. The build on OpenBSD
is broken for this reason at the moment.

Lets rename the members to more generic names to resolve the situation.
2022-03-27 16:41:39 -07:00
Simon Wanner e72f59cd23 Profiler: Render signposts behind histograms
Since signposts render along the full height they could hide CPU usage
spikes. This way that won't be an issue. :^)
2022-03-24 14:35:47 +01:00
Liav A b5ef900ccd Kernel: Don't assume paths of TTYs and pseudo terminals anymore
The obsolete ttyname and ptsname syscalls are removed.
LibC doesn't rely on these anymore, and it helps simplifying the Kernel
in many places, so it's an overall an improvement.

In addition to that, /proc/PID/tty node is removed too as it is not
needed anymore by userspace to get the attached TTY of a process, as
/dev/tty (which is already a character device) represents that as well.
2022-03-22 20:26:05 +01:00
Brian Gianforcaro 67fc81a65a Everywhere: Move cpp-tests under /home/anon/Tests 2022-03-20 22:20:59 +01:00
Itamar fc10bc3cb2 HackStudio: Search for libraries definitions in Userland/
Previously, the ProjectBuilder searched for serenity library definitions
under Userland/Libraries.

However, not all libraries are defined there. For example, LibShell is
under Userland/Shell.
2022-03-19 22:02:44 +01:00
Lenny Maiorani a0367aa43b DevTools+LibJS+LibWeb: Change class_name to use StringView
This helps make the overall codebase consistent. `class_name()` in
`Kernel` is always `StringView`, but not elsewhere.

Additionally, this results in the `strlen` (which needs to be done
when printing or other operations) always being computed at
compile-time.
2022-03-19 00:20:46 +00:00
Itamar 45788d030a HackStudio: Remove program name element in Core::command() calls
Core::command() takes care of inserting the program name as the first
element in argv, and so we shouldn't include the program name in the
argument vector we give it.

The Shell's argument parsing logic tolerated the extra argument,
until 83609ad.

This fixes building serenity components in Hack Studio.
2022-03-17 12:32:59 +03:30
ry-sev 23643cf21b HackStudio: Move editors inside tab widgets
This will move the editors inside a tab widget and the user
will be able to add new editors as tabs as well as add new
tab widgets. The user will be able to easily switch between
editors as well as the tab widgets.
2022-03-16 14:36:46 +01:00
Hendiadyoin1 cd21e03225 AK+Everywhere: Add sincos and use it in some places
Calculating sin and cos at once is quite a bit cheaper than calculating
them individually.
x87 has even a dedicated instruction for it: `fsincos`.
2022-03-15 11:39:42 +01:00
Hendiadyoin1 47fe911196 UserspaceEmulator: Clear c0 on x87 constant load instructions 2022-03-15 11:39:42 +01:00
Hendiadyoin1 3f581c77d9 UserspaceEmulator: Make error checks in FYL2XP1 and FYL2X a bit closer
...to the manual

This removes the non complete NaN checks and fixes a bounds check in
FYL2X.
2022-03-15 11:39:42 +01:00
Hendiadyoin1 60cb5b8dfa UserspaceEmulator: Add more FIXMES to SoftFPU
This also includes an exception check for sqrt and two
pow(2,...) -> exp2(...) changes.
2022-03-15 11:39:42 +01:00
Lucas CHOLLET 6f29ccaa5a HackStudio: Remove Terminal widget when the bound shell process dies
This feature allows the terminal widget to be automatically closed when
typing `exit` inside the shell.
2022-03-14 23:43:36 +01:00
electrikmilk ad71008d6f HackStudio: Add more files to new file menu
Add Python, Java, C, PHP, Wasm, INI, JSON, and Markdown files to new
file menu.
2022-03-08 22:42:40 +01:00
electrikmilk cd4b732acd HackStudio: Add missing key triggers
Add key triggers that are missing, primarily from the 'New..' menu.
2022-03-08 22:42:40 +01:00
electrikmilk 7fe0e7b46b HackStudio: Move 'New' Menu to 'File'
Currently we have a 'Project' menu with a 'New' menu in it, this tries
to organize things by just having one 'New...' sub-menu in the 'File'
menu that creates new files, projects and directories.

To solve conflicts, move 'Semantic Highlighting' to the 'View' menu.

As a result of both of these changes, remove 'Project' menu.
2022-03-08 22:42:40 +01:00
Jakub Berkop d084f8d90a Profiler: Present read event info in tree structure
This commit adds "Filesystem Events" View to the Profiler. This tab
 will present combined information for recorded Filesystem events.
Currently only accumulated count and duration is presented.
Duration amount currently only shows events that took over 1ms,
which means that in most cases 0 is show.
2022-03-05 21:47:01 +01:00
Andreas Kling a6a8ba80fc LibGfx: Rename Color::from_rgba() => Color::from_argb()
This matches the rename of RGBA32 to ARGB32. It also makes more sense
when you see it used with 32-bit hexadecimal literals:

Before:
    Color::from_rgba(0xaarrggbb)

After:
    Color::from_argb(0xaarrggbb)
2022-03-04 23:40:21 +01:00
Ali Mohammad Pur a5d4824abe UserspaceEmulator: Pass signal information through to emulated process
With this, SA_SIGINFO is also fully (as much as the kernel, at least)
supported by UE.
2022-03-04 20:07:05 +01:00
Ali Mohammad Pur 1125cbe336 UserspaceEmulator: Update signal handlers to use the new stack layout
The kernel sets up the stack like this, so set it up the same way.
2022-03-04 20:07:05 +01:00
Ali Mohammad Pur baf7038919 UserspaceEmulator: Add a SoftMMU::read<T> function
...and implement SoftCPU::read_memory<T> with it.
This allows the MMU to read a typed object (using 1-byte reads), which
is significantly nicer to use than reading the struct fields manually.
2022-03-04 20:07:05 +01:00
Ali Mohammad Pur 70b53b44b2 UserspaceEmulator: Wrap the GPRs in ValueWithShadow
...instead of manually tracking their shadow data.
2022-03-04 20:07:05 +01:00
Ali Mohammad Pur f6e82a8e0a UserspaceEmulator: Make it possible to wrap PODs in ValueWithShadow
Instead of making it hold the shadow data as another `T`, make it hold
the data as a byte array, and allow it to read the byte array as `T`.
This makes it much easier to make a "read_typed" function in the MMU.
2022-03-04 20:07:05 +01:00
Ali Mohammad Pur e08cf8f554 UserspaceEmulator: Let SoftCPU.h include Emulator.h
...instead of Emulator.h including SoftCPU.h.
This will be used in a later commit to access into Emulator from a
template in SoftCPU.h.
2022-03-04 20:07:05 +01:00
Lucas CHOLLET 9a83d34543 HackStudio: Propagate error from TerminalWrapper
Use the ErrorOr pattern with the Core::System wrappers to propagate more
errors from the TerminalWrapper.

The run_command method, when called with WaitForExit::Yes now returns an
error on command failure.
2022-03-02 18:08:05 +01:00
xSlendiX f0ac1bcaf8 HackStudio: Add icon to "Open Recent"
This commit adds the newly added "open-recent" icon to HackStudio.
2022-03-01 21:20:11 +00:00
Itamar 7fa7c7d63c LanguageServers/Cpp: Make find declaration of enums work 2022-02-27 21:42:05 +01:00
Itamar 4335bd453d LanguageServers/Cpp: Make find declaration for a declaration node work
The CppComprehensionEngine can now find the declaration of a
declaration node of type class/namespace/function.
2022-02-27 21:42:05 +01:00
Itamar fa384c8171 LanguageServers/Cpp: Make go to declaration of a namespace work
The CppComprehensionEngine can now find the declaration of a reference
to a namespace.
2022-02-27 21:42:05 +01:00
Andreas Kling fe67fe3791 LibWeb: Check for valid names in Document.createElement() & friends
We now validate that the provided tag names are valid XML tag names,
and otherwise throw an "invalid character" DOM exception.

2% progression on ACID3. :^)
2022-02-26 10:03:07 +01:00
Itamar 75ee77f8a1 HackStudio: Rename HackStudio::ServerConnection=>ConnectionToServer
Also renames ServerConnectionWrapper=>ConnectionToServerWrapper
and ServerConnectionInstances=>ConnectionToServerInstances

This was done with CLion's automatic rename feature.
2022-02-25 22:35:12 +01:00
Itamar d88da82e28 Userland: Rename IPC::ServerConnection=>IPC::ConnectionToServer
This was done with CLion's automatic rename feature.
2022-02-25 22:35:12 +01:00
Itamar 3a71748e5d Userland: Rename IPC ClientConnection => ConnectionFromClient
This was done with CLion's automatic rename feature and with:
find . -name ClientConnection.h
    | rename 's/ClientConnection\.h/ConnectionFromClient.h/'

find . -name ClientConnection.cpp
    | rename 's/ClientConnection\.cpp/ConnectionFromClient.cpp/'
2022-02-25 22:35:12 +01:00
thankyouverycool 29504ae5b6 HackStudio: Adjust heights for Locator and Find widgets
These were two pixels too small and, in Locator's case, blurring
the boundary with Statusbar.
2022-02-24 19:09:41 +01:00
thankyouverycool 77c4b20157 HackStudio: Segment the status bar and setup override text 2022-02-24 19:09:41 +01:00
Brian Gianforcaro 35b06ef1eb UserspaceEmulator: Fix syntax of generated profiles
While trying out `ue --profile` today, I received an invalid json
profile. After poking around at the file it looks like we never close
the `events: [..` array that we generate, and thus end up with an
invalid document.

The fix is straight forward, always emit the closing brace.
2022-02-24 16:12:19 +03:30
thankyouverycool 653f01616c LibGUI+Apps: Adjust Splitter spacings
Different thread highlights between widgets lead to different
visual weights between splitters, even when they have the same
width or height. This means some splitters look best at odd
sizes while others even. This sets the default spacing to the
most commonly used, depending on orientation, and adjusts
spacing for a few apps based on the new paint rect.

The most consistent look across apps requires some manual
tweaking occassionally. Knurlheads, use your discretion!
2022-02-23 18:56:22 +02:00
thankyouverycool fe864af0dc LibGUI+Apps: Prevent Splitter children from being unresizable
Splitters could be resized in such an order that all their remaining
children were fixed size, leading to unfillable gaps on resize events.

HackStudio and TextEditor already had logic to handle this edge case,
so this patch factors it into a general solution for all Splitters.
At least one widget is now guaranteed to be resizeable after a child
is removed.
2022-02-23 18:56:22 +02:00
Itamar cdfc530a99 LanguageServers/Cpp: Fix "complete_includes" language server test
Previously the target result was only a partial completion.
2022-02-23 00:48:44 +00:00
Itamar 7b42abccf2 LibCpp: Allow qualified names in AST Declaration nodes
Previously, the names of declarations where stored as a simple
StringView.

Because of that, we couldn't parse out-of-line function definitions,
which have qualified names.
For example, we couldn't parse the following snippet:

```
void MyClass::foo(){}
```

To fix this, we now store the name of a declaration with a
ASTNode::Name node, which represents a qualified named.
2022-02-23 00:48:44 +00:00