summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-09-28Spreadsheet: Let the cells know their own position in the sheetAnotherTest
2020-09-28AK+Format: Support default index in replacement field.asynts
The following does now work: outf("{:0{}}", 1, 3); // 001
2020-09-28Shell: Don't execute scripts interactively.asynts
The following example should illustrate one issue arising from this: $ echo 'exit 1' > example.sh $ Shell example.sh Good-bye! This message is meant to be shown to an interactive user, but not in a shell script.
2020-09-28LibWeb: LoadRequest::operator==() should compare header valuesAndreas Kling
It was only comparing header names. Thanks to @Sponji for noticing!
2020-09-28AK+TestSuite: Don't assume that the test passed in output.asynts
The problem with our test suite is that it can't detect if a test failed. When a test fails we simply write 'FAIL ...' to stderr and move on. Previously, the test suite would list all tests as passing regardless how many assertions failed. In the future it might be smart to implement this properly but test suites for C++ are always hard to do nicely. (Because C++ execution isn't meant to be embedded.)
2020-09-28LibGUI: Correct inline editor placement in ColumnsViewAndreas Kling
Thanks to @bugaevc for noticing that I didn't account for the 1px space between columns, and for the space occupied by the item icon.
2020-09-28LibWeb: Support <form method=POST>Andreas Kling
Use the new support for HTTP method and request body to implement basic support for POST'ed forms. This is pretty cool! :^)
2020-09-28ProtocolServer+LibWeb: Support more detailed HTTP requestsAndreas Kling
This patch adds the ability for ProtocolServer clients to specify which HTTP method to use, and also to include an optional HTTP request body.
2020-09-28LibWeb: Expand LoadRequest class to include method, headers and bodyAndreas Kling
This will allow us to create more detailed requests from inside the web engine.
2020-09-28AK+Format: Keep type information for integers in TypeErasedParameter.asynts
It's now save to pass a signed integer as parameter and then use it as replacement field (previously, this would just cast it to size_t which would be bad.)
2020-09-28AK+Format: Clean up format specifier parsing using GenericLexer.asynts
Also adds support for replacement fields.
2020-09-28LibJS: Add missing <AK/Function.h> include in JSONObject.cppAndreas Kling
2020-09-27AK: Remove the ctype adapters and use the actual ctype functions insteadBenoît Lormeau
This finally takes care of the kind-of excessive boilerplate code that were the ctype adapters. On the other hand, I had to link `LibC/ctype.cpp` to the Kernel (for `AK/JsonParser.cpp` and `AK/Format.cpp`). The previous commit actually makes sense now: the `string.h` includes in `ctype.{h,cpp}` would require to link more LibC stuff to the Kernel when it only needs the `_ctype_` array of `ctype.cpp`, and there wasn't any string stuff used in ctype. Instead of all this I could have put static derivatives of `is_any_of()` in the concerned AK files, however that would have meant more boilerplate and workarounds; so I went for the Kernel approach.
2020-09-27LibC: Remove an unneeded string.h include in ctype.h/cppBenoit Lormeau
And include string.h in the files that actually needed it
2020-09-27AK: Use templates instead of Function for Conditions in the GenericLexerBenoit Lormeau
Since commit 1ec59f28cea56f1afced0994127e2df62300e618 turns the ctype macros into functions we can now feed them directly to a GenericLexer! This will lead to removing the ctype adapters that were kind-of excessive boilerplate, but needed as the Kernel doesn't compile with the LibC.
2020-09-27LibMarkdown: Parse paragraphs line-wiseAnotherTest
This gets rid of the doubled-up checks in `Paragraph::parse()`, and makes a paragraph the last possible kind of block to be parsed.
2020-09-27LibMarkdown: Add support for TablesAnotherTest
This adds support for GFM-like tables. The HTML rendering ignores the alignments and relative sizes, but the terminal view does not!
2020-09-27LibMarkdown: Add a Text(String) constructorAnotherTest
2020-09-27LibMarkdown: Make Text default-constructible and move-assignableAnotherTest
2020-09-27LibMarkdown: Take a 'view_width' argument for render_for_terminal()AnotherTest
Some constructs will require the width of the terminal (or a general 'width') to be rendered correctly, such as tables.
2020-09-27AK: Move trim_whitespace() into StringUtils and add it to StringViewAnotherTest
No behaviour change; also patches use of `String::TrimMode` in LibJS.
2020-09-27Toolchain: Fix outdated error message about SERENITY_ROOT (#3624)Brian Pfeil
2020-09-27LibWeb: Use JS::VM::call() in timer and RAF callback invocationAndreas Kling
This removes assumptions about having an Interpreter, and also unbreaks requestAnimationFrame which was asserting.
2020-09-27LibJS: Stop using Interpreter& in the iterator operations helpersAndreas Kling
2020-09-27LibJS: Remove a whole bunch of includes of <LibJS/Interpreter.h>Andreas Kling
2020-09-27LibWeb: Bypass the JS::Interpreter when invoking JS event callbacksAndreas Kling
Use VM::call() instead of Interpreter::call().
2020-09-27LibJS: Remove a bunch of unnecessary uses of Cell::interpreter()Andreas Kling
We'll want to get rid of all uses of this, to free up the engine from the old assumption that there's always an Interpreter available.
2020-09-27LibJS: Remove js_string(Interpreter&, ...)Andreas Kling
2020-09-27LibJS: Remove js_bigint(Interpreter&, ...)Andreas Kling
2020-09-27LibJS: Don't require Interpreter& for constructing an AccessorAndreas Kling
2020-09-27LibJS: Reduce Interpreter& usage in the Object classAndreas Kling
2020-09-27LibJS: Don't require Interpreter& in PropertyName and StringOrSymbolAndreas Kling
2020-09-27LibJS: Make all the JS::Value binary op helpers take GlobalObject&Andreas Kling
We don't need the Interpreter& for anything here, the GlobalObject is enough for getting to the VM and possibly throwing exceptions.
2020-09-27LibJS: Remove unused js_symbol(Interpreter&, ...)Andreas Kling
2020-09-27LibJS: Remove use of Interpreter& in JSONObject codeAndreas Kling
2020-09-27LibJS: Remove Interpreter& argument to Function::construct()Andreas Kling
This is no longer needed, we can get everything we need from the VM.
2020-09-27LibJS: Make native function/property callbacks take VM, not InterpreterAndreas Kling
More work on decoupling the general runtime from Interpreter. The goal is becoming clearer. Interpreter should be one possible way to execute code inside a VM. In the future we might have other ways :^)
2020-09-27LibJS: Make Function::call() not require an Interpreter&Andreas Kling
This makes a difference inside ScriptFunction::call(), which will now instantiate a temporary Interpreter if one is not attached to the VM.
2020-09-27LibJS: Move scope stack from VM back to InterpreterAndreas Kling
Okay, my vision here is improving. Interpreter should be a thing that executes an AST. The scope stack is irrelevant to the VM proper, so we can move that to the Interpreter. Same with execute_statement().
2020-09-27LibJS: Move most of Interpreter into VMAndreas Kling
This patch moves the exception state, call stack and scope stack from Interpreter to VM. I'm doing this to help myself discover what the split between Interpreter and VM should be, by shuffling things around and seeing what falls where. With these changes, we no longer have a persistent lexical environment for the current global object on the Interpreter's call stack. Instead, we push/pop that environment on Interpreter::run() enter/exit. Since it should only be used to find the global "this", and not for variable storage (that goes directly into the global object instead!), I had to insert some short-circuiting when walking the environment parent chain during variable lookup. Note that this is a "stepping stone" commit, not a final design.
2020-09-27Kernel: Make Thread refcountedTom
Similar to Process, we need to make Thread refcounted. This will solve problems that will appear once we schedule threads on more than one processor. This allows us to hold onto threads without necessarily holding the scheduler lock for the entire duration.
2020-09-27AK: Clear previous/next link in InlineLinkList::removeTom
2020-09-27Ports: Add OpenSSH portLuke
2020-09-27LibC: Add SCM_RIGHTS to sockets.h and caddr_t to types.hLuke
2020-09-27LibC: Make isalum/isalpha/etc. functions instead of macrosLuke
These are supposed to be both functions and macros. I'm not sure how to provide the functions at the same time as the macros, as they collide with each other and cause compile errors. However, some ports fully expect them to be functions. For example, OpenSSH stores them into structures as function pointers.
2020-09-27LibC: Add ss_family to sockaddr_storageLuke
I'm not exactly sure if this is in the right spot in the structure, especially since I read that this is supposed to be cast into other structures.
2020-09-27LibELF: Validate PT_GNU_RELRO program headerLuke
I'm not sure if this is the correct validation. This is based on it being "read-only after relocation".
2020-09-27LibC: Add missing utmp backwards compatibility hacks and user/dead process ↵Luke
macros The user/dead process macros are not used anywhere in Serenity right now, but are required for OpenSSH.
2020-09-27Kernel: Implement _SC_OPEN_MAXLuke
2020-09-27LibC: Made mbtowc return int instead of size_tLuke