summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-10-05AK: Move StringImpl::operator== implementation into StringImplNico Weber
2020-10-05FileManager: Use new format functions.asynts
2020-10-05LibJS: Evaluate AssignmentExpression LHS before RHS according to the specLinus Groh
Fixes #3689.
2020-10-05DisplaySettings: Use format instead of printf.asynts
2020-10-05Debugger: Use format instead of printf.asynts
There was one bogus printf in a signal handler, I just left it there.
2020-10-05Calendar: Use format instead of printf.asynts
I am not sure what this message is supposed to tell me, but I'll just keep it around.
2020-10-05Calculator: Use format instead of printf.asynts
This also fixes a graphical bug where the decimal point was always rendered. The number four was represented as '4.' instead of '4'. Now the decimal point is only shown when there are decimal places.
2020-10-05AK: Add formatter for NonnullRefPtr<T>.asynts
2020-10-05LibJS: Make assignment to CallExpression a syntax error in strict modeLinus Groh
2020-10-05LibJS: Validate all assignment expressions, not just "="Linus Groh
The check for invalid lhs and assignment to eval/arguments in strict mode should happen for all kinds of assignment expressions, not just AssignmentOp::Assignment.
2020-10-04LibJS: Unify syntax highlightingLinus Groh
So far we have three different syntax highlighters for LibJS: - js's Line::Editor stylization - JS::MarkupGenerator - GUI::JSSyntaxHighlighter This not only caused repetition of most token types in each highlighter but also a lot of inconsistency regarding the styling of certain tokens: - JSSyntaxHighlighter was considering TokenType::Period to be an operator whereas MarkupGenerator categorized it as punctuation. - MarkupGenerator was considering TokenType::{Break,Case,Continue, Default,Switch,With} control keywords whereas JSSyntaxHighlighter just disregarded them - MarkupGenerator considered some future reserved keywords invalid and others not. JSSyntaxHighlighter and js disregarded most Adding a new token type meant adding it to ENUMERATE_JS_TOKENS as well as each individual highlighter's switch/case construct. I added a TokenCategory enum, and each TokenType is now associated to a certain category, which the syntax highlighters then can use for styling rather than operating on the token type directly. This also makes changing a token's category everywhere easier, should we need to do that (e.g. I decided to make TokenType::{Period,QuestionMarkPeriod} TokenCategory::Operator for now, but we might want to change them to Punctuation.
2020-10-04HackStudio: Add a Shell language serverAnotherTest
2020-10-04Shell: Fix closest command node detection in Pipes and SequencesAnotherTest
This makes --option completions work for pipes and sequences too.
2020-10-04Shell+LibLine: Record the input offset of completionsAnotherTest
This makes the completion entry retain information about how much of the suggestion was part of the string that caused the match.
2020-10-04Shell: Move everything to the Shell namespaceAnotherTest
Also provide a basic default-constructor.
2020-10-04HackStudio: Do not change the cursor in the LSP autocomplete requestAnotherTest
The C++ completion somehow depends on this, so move that behaviour into the C++ language server instead.
2020-10-04HackStudio: Relay completions requests to the language server unfilteredAnotherTest
Previously, the client would decide when to ask the server for completions, and it would only do so for identifiers that had spans (determined via the highlighter!). Swap this around and make the server decide if it wants to complete something. This commit also adds a CompletionKind (which only has one value: Identifier), to work with other kinds of completions as well.
2020-10-04LibIPC: Make IPC::encode() and ::decode() fail at compiletime when usedAnotherTest
This would previously fail at runtime, and it would have zero indication of what exactly went wrong. Also adds `AK::DependentFalse<Ts...>', which is a...dependent false.
2020-10-04LibJS: Remove some unused Interpreter member functionsAndreas Kling
2020-10-04LibJS: Remove Interpreter::call()Andreas Kling
Just use VM::call() directly everywhere.
2020-10-04LibJS: Make global objects have unique shape from the startAndreas Kling
There's no point in trying to achieve shape sharing for global objects, so we can simply make the shape unique from the start and avoid making a transition chain.
2020-10-04LibJS: Avoid an unnecessary MarkedValueList copy in VM::call_internal()Andreas Kling
2020-10-04LibJS: Always inline HeapBlock::allocate()Andreas Kling
This thing is so simple and sits on the hot path so just inline it.
2020-10-04LibJS: Pre-size the hash map and vector used in ensure_property_table()Andreas Kling
2020-10-04LibJS: Don't force property table reification on Shape::property_count()Andreas Kling
Previously whenever you would ask a Shape how many properties it had, it would reify the property table into a HashMap and use HashMap::size() to answer the question. This can be a huge waste of time if we don't need the property table for anything else, so this patch implements property count tracking in a separate integer member of Shape. :^)
2020-10-04LibJS: Add StringOrSymbol constructor that takes a FlyStringAndreas Kling
This avoids refcount churn from implicit conversion in some places.
2020-10-04LibJS: Avoid creating a temporary String in StringOrSymbol::operator==Andreas Kling
2020-10-04LibJS: Avoid StringImpl refcount churn when hashing StringOrSymbolAndreas Kling
Add a StringOrSymbol::hash() helper function so we can compute the hash without having to construct a temporary String.
2020-10-04LibJS: Avoid unnecessary StringImpl copy in StringOrSymbol(String)Andreas Kling
2020-10-04LibJS: Replace a few dbg() with dbgln()Linus Groh
2020-10-04LibJS: Use String::formatted() in various other placesLinus Groh
2020-10-04LibJS: Use string::formatted() in to_string() functionsLinus Groh
2020-10-04LibJS: Use String::formatted() for parser error messagesLinus Groh
2020-10-04LibJS: Use String::formatted() for throw_exception() messageLinus Groh
2020-10-04LibJS: Use String::formatted() in MarkupGeneratorLinus Groh
2020-10-04AK: Make the return type of dbgputstr consistent.asynts
2020-10-04Browser: Remove dbgln() statement that was crashing on startupAndreas Kling
Don't have time to dig into this right now, but let's unbreak Browser.
2020-10-04Browser: Fix build after dbgf() -> dbgln() renameAndreas Kling
2020-10-04UserspaceEmulator: Remove remaining printf calls.asynts
2020-10-04AK: Don't add newline for outf/dbgf/warnf.asynts
In the future all (normal) output should be written by any of the following functions: out (currently called new_out) outln dbg (currently called new_dbg) dbgln warn (currently called new_warn) warnln However, there are still a ton of uses of the old out/warn/dbg in the code base so the new functions are called new_out/new_warn/new_dbg. I am going to rename them as soon as all the other usages are gone (this might take a while.) I also added raw_out/raw_dbg/raw_warn which don't do any escaping, this should be useful if no formatting is required and if the input contains tons of curly braces. (I am not entirely sure if this function will stay, but I am adding it for now.)
2020-10-04LibJS: Remove unused Heap::interpreter()Andreas Kling
2020-10-04LibJS: Remove Cell::interpreter()Andreas Kling
It's never necessary to find the current Interpreter for a given Cell anymore. Get rid of this accessor.
2020-10-04LibJS: Move "strict mode" state to the call stackAndreas Kling
Each call frame now knows whether it's executing in strict mode. It's no longer necessary to access the scope stack to find this mode.
2020-10-04AK: Add Formatter for FlyString :^)Andreas Kling
2020-10-04Browser: Use format functions instead of printf.asynts
2020-10-04AK: Add formatter for URL.asynts
2020-10-04AK: Add special formatter for char.asynts
When we format a character we want to put the ascii value and not the decimal value. The old behaviour can be obtained with '{:d}'.
2020-10-04LibJS: Strict mode is now handled by Functions and Programs, not BlocksMatthew Olsson
Since blocks can't be strict by themselves, it makes no sense for them to store whether or not they are strict. Strict-ness is now stored in the Program and FunctionNode ASTNodes. Fixes issue #3641
2020-10-04Userland: tar: support extracting gzipped filesPeter Elliott
2020-10-04Userland: Add tar commandPeter Elliott