summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-08-13Shell: Make caller specify the string parsing end conditionsin-ack
Heredocs have a different parse end condition than double-quoted strings. parse_doublequoted_string_inner would assume that a string would always end in a double quote, so let's generalize it to parse_string_inner and have it take a StringEndCondition enum which specifies how the string terminates.
2021-08-12Shell: Remove dbgln related to process group IDssin-ack
This is insignificant debugging information and will print out during runs with Lagom.
2021-08-12SystemServer: Generalize chown_all_framebuffer_devices functionLiav A
Instead of neatly searching for all framebuffer device nodes and changing ownership of them, let's generalize this function so we can apply the same pattern on tty nodes.
2021-08-12Meta: Enable `nonnull-compare` warningsDaniel Bertalan
Previously, this was disabled because GCC flagged seemingly correct and well-defined code. This was however not the case because GCC implicitly marked some pointers non-null, even if we wanted to handle them ourselves, and deleted null checks on them. By re-introducing this warning, we will know if the compiler tries to discard our code again.
2021-08-12LibC+DynamicLoader: Prevent GCC from removing null checksDaniel Bertalan
GCC implements `fputc`, `fputs` and `fwrite` as builtin functions, whose `FILE*` argument is implicitly marked `__attribute__((nonnull))`. This causes our `VERIFY(stream)` statements to be removed. This does not happen with Clang, as they do not use the `nonnull` attribute in this way.
2021-08-12LibWeb: Remove pointless type castsDaniel Bertalan
In these cases, the parameters' static type matched the desired dynamic type, so these calls were discarded.
2021-08-12LibC: Don't delete null check in `gettimeofday`Daniel Bertalan
The `nonnull` attribute may delete null checks in the generated code, as per the [GCC documentation]: > The compiler may also perform optimizations based on the knowledge > that nonnul parameters cannot be null. This can currently not be > disabled other than by removing the nonnull attribute. Disassembling the function as compiled by GCC, we can see that there is no branch based on if `tv` is null. This means that `gettimeofday` would produce UB if passed a null parameter, even if we wanted to predictably return an error. Clang refuses to compile this due to a `pointer-bool-conversion` warning. In this commit, `settimeofday` is changed as well to match `gettimeofday`'s null argument handling. [GCC documentation]: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-nonnull-function-attribute
2021-08-12LibWasm: Move some Values and Vector<Value>s instead of copying themAli Mohammad Pur
2021-08-12LibWasm: Avoid calculating stack bounds on each wasm callAli Mohammad Pur
We only need to know the initial bounds, which we calculate by default when the interpreter is constructed. This cuts down on syscalls and makes wasm calls a lot cheaper.
2021-08-12LibWasm: Generate Value::type() on the fly instead of storing itAli Mohammad Pur
The variant member already contains enough information to give us the type when needed, so remove the type member and synthesize it when needed, this allows lots of optimisation opportunaties when copying and moving Values around.
2021-08-12Meta: Un-escape escaped strings when generating Wasm testsAli Mohammad Pur
2021-08-12LibWasm: Replace memory write macros with templated functionsAli Mohammad Pur
2021-08-12LibWasm: Make memory operation address calculation match the specAli Mohammad Pur
...or rather, match what the spec _means_ to say, not what it actually says.
2021-08-12LibWasm: Replace memory read macros with templated functionsAli Mohammad Pur
2021-08-12LibWasm: Replace the numeric operation macros with templated functionsAli Mohammad Pur
This should make debugging and profiling much better, at little to no runtime cost. Also moves off the operator definitions to a separate header, so it should also improve the editing experience quite a bit.
2021-08-12Meta: Don't roundtrip floats for i64/i32 hex literals in wasm testsAli Mohammad Pur
2021-08-12AK: Add a IsSpecializationOf<T, Template> type traitAli Mohammad Pur
2021-08-12AK: Don't zero Variant data in the move constructorAli Mohammad Pur
There's no reason to zero the data that will be immediately overwritten.
2021-08-12Kernel: Steer away from heap allocations for ProcFS process dataLiav A
Instead, use more static patterns to acquire that sort of data.
2021-08-12Kernel+LibC: Use 64 bit values for ino_tLiav A
Since the InodeIndex encapsulates a 64 bit value, it is correct to ensure that the Kernel is exposing the entire value and the LibC is aware of it. This commit requires an entire re-compile because it's essentially a change in the Kernel ABI, together with a corresponding change in LibC.
2021-08-12Kernel: Fail process creating earlier if can't create AddressSpaceLiav A
It makes more sense to fail the Process creation earlier if we can't create an AddressSpace for the new Process.
2021-08-12Kernel/Process: Move protected values to the end of the objectLiav A
The compiler can re-order the structure (class) members if that's necessary, so if we make Process to inherit from ProcFSExposedComponent, even if the declaration is to inherit first from ProcessBase, then from ProcFSExposedComponent and last from Weakable<Process>, the members of class ProcFSExposedComponent (including the Ref-counted parts) are the first members of the Process class. This problem made it impossible to safely use the current toggling method with the write-protection bit on the ProcessBase members, so instead of inheriting from it, we make its members the last ones in the Process class so we can safely locate and modify the corresponding page write protection bit of these values. We make sure that the Process class doesn't expand beyond 8192 bytes and the protected values are always aligned on a page boundary.
2021-08-123DFileViewer: Allow zooming via mouse wheelStephan Unverwerth
2021-08-123DFileViewer: Add magnification filters to texture menuStephan Unverwerth
2021-08-12LibGL: Implement GL_LINEAR texture filterStephan Unverwerth
2021-08-12Revert "HackStudio: Remove noop code when opening the project"Andreas Kling
This reverts commit 012fc3f92317b1f1c96a9829755593463d9630e1.
2021-08-123DFileViewer: Add texture menuStephan Unverwerth
This allows setting different texture wrap modes and setting different texture coordinate scale factors.
2021-08-12LibGL: Implement glTexParameter{i,f}Stephan Unverwerth
This currently only implements a subset of this function. Namely setting wrap, mag and min modes for the GL_TETXURE_2D target.
2021-08-12LibGL: Implement "mirrored repeat" wrap modeStephan Unverwerth
2021-08-12LibGL: Implement "clamp" wrap modeStephan Unverwerth
2021-08-12LibGL: Turn Sampler2D into an actual classStephan Unverwerth
This extracts the sampler functionality into its own class. Beginning with OpenGL 3 samplers are actual objects, separate from textures. It makes sense to do this already as it also cleans up code organization quite a bit.
2021-08-12Utilities: Add option to control when to use colored output for grepTheFightingCatfish
Fixes #9351.
2021-08-12Ports: Add cc symlink to gcc portJean-Baptiste Boric
2021-08-12Ports: Add awk symlink to mawk portJean-Baptiste Boric
2021-08-12Userland: Fix PATH environment variable orderingJean-Baptiste Boric
2021-08-12Base: Make /bin/Shell the login shell by defaultJean-Baptiste Boric
2021-08-12LibC: Add stub forwarders to LibRegex C APIJean-Baptiste Boric
The POSIX C regex functions are expected to live in the C standard library, but Serenity split off its regex library into LibRegex. Make a compromise by implementing stub forwarders for the C regex library that load libregex.so and call the real implementation. This is needed for ports that expect these C functions to be available inside the standard C library without introducing a strong coupling between LibC and LibDl or LibRegex. The non-standard Serenity C++ regex API still lives inside LibRegex as before.
2021-08-12HackStudio: Remove noop code when opening the projectKarol Kosek
28b1e66b51ec7b4552a12ac5ee37ecd6b96d4541 made that the m_all_editor_wrappers vector is cleared everytime a project path is changed (the m_project if check is just for the app launch -- the vector is empty there anyway), making the code never execute.
2021-08-12HackStudio: Show the 'Save as...' dialog when saving uncreated fileKarol Kosek
Previously when user wanted to save an uncreated file, the program would just quietly ignore the save request, without giving any message. This can be seen when creating a new editor in split view mode.
2021-08-12HackStudio: Add 'Save as...' actionKarol Kosek
Not adding it to the toolbar, because it has the same icon as a typical 'Save' action.
2021-08-12HackStudio: Show text editor after starting the applicationKarol Kosek
The user can now start typing text instead of creating a file first. This also enables drag-and-dropping a file as soon as the application starts.
2021-08-12LibELF+LibTest: Fix incorrect #ifdefGunnar Beutner
2021-08-12Meta: Properly quote some CMake variables in serenity_componentsin-ack
This probably isn't all of them, because I'm no CMake expert. :^) It does however allow "/bin/false" to build now.
2021-08-12Userland: Add partial support for complex specifications to trJean-Baptiste Boric
2021-08-12Userland: Add support for --delete flag as alias of -d to trJean-Baptiste Boric
2021-08-12Userland: Add support for -c/--complement flag to trJean-Baptiste Boric
2021-08-12Userland: Add support for multiple character translations to trJean-Baptiste Boric
2021-08-12AK: Add contains(char) method to StringJean-Baptiste Boric
2021-08-12Kernel: Don't record sys$perf_event() if profiling is not enabledAndreas Kling
If you want to record perf events, just enable profiling. This allows us to add random perf events to programs without littering the file system with perfcore files.
2021-08-12LibTest: Emit a profile signpost at the start of each testAndreas Kling
This makes it super easy to see which test is which when browsing a profile of the test runner. :^)