summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-182048: Minimize player score when selecting worst tileDmitrii Ubskii
Maximizing the board population still takes priority, but if there are tile generator "moves" that result in equivalent board population after a player move, the one with the lowest score is selected.
2021-05-182048: Evil AI logic: select new tile in the worst positionDmitrii Ubskii
Not very smart: the worst position is defined such that after the player's next move the fewest tiles remain empty.
2021-05-182048: Evil AI settings entryDmitrii Ubskii
2021-05-182048: Refactor tile sliding and score logic out of attempt_move()Dmitrii Ubskii
2021-05-18LibGfx: Add support for DDS imagesstelar7
2021-05-18WebServer: Fix jailbreaking of server via .. relative pathsDexesTTP
The recent patch to LexicalPath allowed relative paths like ../ to work in requests to WebServer. This wasn't too dangerous because of unveil, but let's still fix this :^)
2021-05-18Revert "LibC: Simplify malloc size classes"Andreas Kling
This reverts commit f91bcb8895cd6b76b2977ad0632fef521ba2f1d1.
2021-05-18Utilites: Make find respect lack of -L when iterating over directoriesGunnar Beutner
Previously find would follow symlinks when iterating over directories even though the -L argument was not specified.
2021-05-18AK: Make LexicalPath handle relative paths correctlyGunnar Beutner
Previously LexicalPath would consider "." and ".." as equivalent to "/". This is not true though.
2021-05-18BitmapView: Disable mutations of the underlying BitmapLenny Maiorani
Problem: - `BitmapView` permits changing the underlying `Bitmap`. This violates the idea of a "view" since views are simply overlays which can themselves change but do not change the underlying data. Solution: - Migrate all non-`const` member functions to Bitmap.
2021-05-18SystemMonitor: Don't try and show process window with nothing selected (#7221)Marcus Nilsson
When right-clicking with no selected row in the process list, SystemMonitor would still show a context menu. This disables the context menu if index is invalid and also disables Alt+Enter so that build_process_window() is never called with a PID of -1. Fixes #7167.
2021-05-18LibCompress: Discard GZip NAME & COMMENT optional stringsIdan Horowitz
We now discard these strings instead of copying them into a String which we immediately destruct. This should result in both a perf uplift and lower memory usage.
2021-05-18LibC: Use ptsname_r() instead of ptsname() in openpty() (#7231)Gunnar Beutner
This improves thread-safety because ptsname() is using a global buffer that is shared between threads.
2021-05-18LibWebSocket: Fixed occasional infinite loop with TLS socketsDexesTTP
This was caused by a double notifier on the TLS socket, which caused the TLS code to freak out about not being able to read properly. In addition, the existing loop inside of drain_read() has been replaced by code that actually works, and which includes new warnings when the drain method is called before initialization is done or after the websocket gets closed.
2021-05-18Utilities: Make the STATE column for top slightly largerGunnar Beutner
The STATE column was slightly too small to fit the states for NetworkTask and FinalizerTask.
2021-05-18LibC: Remove static from function local constexpr variableLenny Maiorani
Problem: - Function local `constexpr` variables do not need to be `static`. This consumes memory which is unnecessary and can prevent some optimizations. Solution: - Remove `static` keyword.
2021-05-18AK/PrintfImplementation: Change static constexpr array to function localLenny Maiorani
Problem: - Static variables take memory and can be subject to less optimization. - This static variable is only used in 1 place. Solution: - Move the variable into the function and make it non-static.
2021-05-18AK: Revert removal of StringBuilder::will_append optimizationGunnar Beutner
This was removed as part of the ByteBuffer changes but the allocation optimization is still necessary at least for non-SerenityOS targets where malloc_good_size() isn't supported or returns a small value and causes a whole bunch of unnecessary reallocations.
2021-05-18LibC: Simplify malloc size classesLenny Maiorani
Problem: - `size_classes` is a C-style array which makes it difficult to use in algorithms. - `all_of` algorithm is re-written for the specific implementation. Solution: - Change `size_classes` to be an `Array`. - Directly use the generic `all_of` algorithm instead of reimplementing.
2021-05-18SystemMonitor: Show UDP socketsbrapru
Creates a new TableView in the socket list for UDP information. Resolves #6980.
2021-05-17LibJS: Handle OOB access in GenericIndexedPropertyStorage::take_last()Linus Groh
We already do this for the SimpleIndexedPropertyStorage, so for indexed properties with GenericIndexedPropertyStorage this would previously crash. Since overwriting the array-like size with a larger value won't magically insert values at previously unset indices, we need to handle such an out of bounds access gracefully and just return an empty value. Fixes #7043.
2021-05-17LibJS: Make length_setter_generic_storage_threshold a global constantLinus Groh
This was a bit hard to find as a local variable - rename it to uppercase LENGTH_SETTER_GENERIC_STORAGE_THRESHOLD and move it to the top (next to SPARSE_ARRAY_HOLE_THRESHOLD) for good visibility.
2021-05-17AK: Sort all the debug macrosLinus Groh
2021-05-17WindowServer: Don't attempt to make WindowServer inspectableAndreas Kling
2021-05-17Browser: Move main browser window logic into a BrowserWindow classAndreas Kling
Having so much the logic and lambdas in main() was getting unwieldy. Moving it into a class simplifies this, and also opens up a path towards supporting "Open in New Window" :^)
2021-05-17WindowServer: Add Menu::is_open() to improve readabilityAndreas Kling
"menu.is_open()" instead of "MenuManager::the().is_open(menu)"
2021-05-17Meta: Build LibWasm and the wasm utility as part of LagomAli Mohammad Pur
2021-05-17LibWasm: Make clang happy by removing an 'extra' set of parenthesisAli Mohammad Pur
These aren't actually an extra set, without them the fold operation would be syntactically invalid. Also remove possible cast of float->double/double->float in Value::to()
2021-05-17LibWasm: Implement memory.grow, memory.size and dropAli Mohammad Pur
These allow a very basic memory-using program to work.
2021-05-17LibWasm: Execute the start function, if one existsAli Mohammad Pur
2021-05-17Utilities/wasm: Say something when execution trapsAli Mohammad Pur
2021-05-17LibWasm: Implement most of the remaining instructionsAli Mohammad Pur
This commit is a bit of a mixed bag, but most of the changes are repetitive enough to just include in a single commit. The following instructions remain unimplemented: - br.table - table.init - table.get - table.set - table.copy - table.size - table.grow - table.fill - ref.null - ref.func - ref.is_null - drop - i32/i64.clz - i32/i64.ctz - i32/i64.popcnt - i32/i64.rotl - i32/i64.rotr - X.trunc.Y - X.trunc_sat.Y - memory.size - memory.grow - memory.init - memory.copy - memory.fill - elem.drop - data.drop
2021-05-17LibWasm: Start implementing a naive bytecode interpreterAli Mohammad Pur
As the parser now flattens out the instructions and inserts synthetic nesting/structured instructions where needed, we can treat the whole thing as a simple parsed bytecode stream. This currently knows how to execute the following instructions: - unreachable - nop - local.get - local.set - {i,f}{32,64}.const - block - loop - if/else - branch / branch_if - i32_add - i32_and/or/xor - i32_ne This also extends the 'wasm' utility to optionally execute the first function in the module with optionally user-supplied arguments.
2021-05-17LibWasm: Do not resize() the function signature list to preallocateAli Mohammad Pur
Instead, use `ensure_capacity()`.
2021-05-17LibWasm: Make structured_end() jump to the instruction after itselfAli Mohammad Pur
2021-05-17AK: Include HashTable.h in StringImpl.cppAli Mohammad Pur
This was used without an include, I'm not sure how it didn't break before :P
2021-05-17AK: Include String.h in ScopeLoggerAli Mohammad Pur
2021-05-17LibWeb: Resolve 2-part and 3-part border-color valuesTimothy Flynn
2021-05-17LibWeb: Resolve 3-part and 4-part border-width valuesTimothy Flynn
2021-05-17Base: Add boxes with multi-part border attributes to borders.htmlTimothy Flynn
2021-05-17Playground: Show the modified state in the window titlefaxe1008
Similar to how updating the title is implemented within TextEditor, GML-Playground now also shows the modified state and requests for saving before closing a modified document.
2021-05-17LibGUI: Reset TextEditor modified state on sucessful write_to_filefaxe1008
Avoids missing reset of the state if saving is done in multiple places.
2021-05-17Kernel: Disable profile timer when the process exitsGunnar Beutner
When profiling a single process we didn't disable the profile timer. enable_profile_timer()/disable_profiler_timer() support nested calls so no special care has to be taken here to only disable the timer when nobody else is using it.
2021-05-17Kernel: Fix return value for {enable,disable}_profile_timer()Gunnar Beutner
These functions should return success when being called when profiling has been requested from multiple callers because enabling/disabling the timer is a no-op in that case and thus didn't fail.
2021-05-17LibJS: Make the forward transition chain weakly cachedAndreas Kling
Before this patch, every shape would permanently remember every other shape it had ever transitioned to. This could lead to pathological accumulation of unused shape objects in some cases. Fix this by using WeakPtr instead of a strongly visited Shape* in the the forward transition chain map. This means that we will now miss out on some shape sharing opportunities, but since this is not required for correctness it doesn't matter. Note that the backward transition chain is still strongly cached, as it's necessary for the reification of property tables. An interesting future optimization could be to allow property tables to get garbage collected (by detaching them from the shape object) and then reconstituted from the backwards transition chain (if needed.)
2021-05-17WebServer: Set no-cache header for responsesGunnar Beutner
This sets the Pragma: no-cache header. Using Cache-Control would be preferable but that's not part of the HTTP/1.0 standard.
2021-05-17WebServer: Don't read until EOFGunnar Beutner
There's no guarantee that the client has closed the socket for writing. Instead we should just read until the first empty line. Fixes #7064.
2021-05-17LibHTTP: Make sure we're not sending an empty path in requestsGunnar Beutner
When the path component of the request URL was empty we'd end up sending requests like "GET HTTP/1.1" (note the missing /). This ensures that we always send a path.
2021-05-17Kernel: Stop overriding built-in serial port with PCI serial portIdan Horowitz
On a second thought, theres nothing stopping us from allowing poeple to use both if they want to :^)
2021-05-17Kernel: Add support for QEMU's emulated pci serial (-pci-serial option)Idan Horowitz