Age | Commit message (Collapse) | Author |
|
|
|
|
|
Fixes #3689.
|
|
|
|
There was one bogus printf in a signal handler, I just left it there.
|
|
I am not sure what this message is supposed to tell me, but I'll just
keep it around.
|
|
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.
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
This makes --option completions work for pipes and sequences too.
|
|
This makes the completion entry retain information about how much of the
suggestion was part of the string that caused the match.
|
|
Also provide a basic default-constructor.
|
|
The C++ completion somehow depends on this, so move that behaviour into
the C++ language server instead.
|
|
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.
|
|
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.
|
|
|
|
Just use VM::call() directly everywhere.
|
|
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.
|
|
|
|
This thing is so simple and sits on the hot path so just inline it.
|
|
|
|
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. :^)
|
|
This avoids refcount churn from implicit conversion in some places.
|
|
|
|
Add a StringOrSymbol::hash() helper function so we can compute the hash
without having to construct a temporary String.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Don't have time to dig into this right now, but let's unbreak Browser.
|
|
|
|
|
|
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.)
|
|
|
|
It's never necessary to find the current Interpreter for a given Cell
anymore. Get rid of this accessor.
|
|
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.
|
|
|
|
|
|
|
|
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}'.
|
|
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
|
|
|
|
|