Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
This allows us to tighten typing in various other classes.
|
|
|
|
Unless we've verified that a Value is a boolean, we should not be
calling as_bool() on it.
|
|
The ID allocator is destroyed before a timer in HackStudio is
is unregistered leading to an access violation.
Fixes #1382.
|
|
|
|
We can't expect the conditionals in "if" and "while" statements to
always return a bool, so we need to know how to boolify a JS::Value.
|
|
We only really care to visit values if they refer to a Cell, but it's
nice to be able to say visit(some_value).
|
|
Don't visit cells that are already marked. This prevents the marking
phase from looping forever when two cells refer to each other.
Also do the marking directly from the CellVisitor, removing another
unnecessary phase of the collector. :^)
|
|
|
|
This ensures that local variables survive GC.
|
|
This allows us to allocate an empty new Object on the GC heap.
|
|
This will be immensely useful for testing.
|
|
It's now possible to assign expressions to variables. The variables are
put into the current scope of the interpreter.
Variable lookup follows the scope chain, ending in the global object.
|
|
Instead of iterating over every single cell, simply iterate over the
live cells and mark them from there.
Thanks to Blam for suggesting this! :^)
|
|
|
|
Do note that when it comes to evaluating binary expressions, we are
asserting in multiple contexts that the values we're operating on are
numbers, we should probably handle other value types to be more tolerant
in the future, since for example, adding a number and a string, in
which case the number is converted to a string implicitly which is then
concatenated, although ugly, is valid javascript.
|
|
|
|
|
|
|
|
Clearing all marked flags has been integrated into the sweep function,
saving an additional full iteration over the heap.
|
|
Objects can now be allocated via the interpreter's heap. Objects that
are allocated in this way will need to be provably reachable from at
least one of the known object graph roots.
The roots are currently determined by Heap::collect_roots().
Anything that wants be collectable garbage should inherit from Cell,
the fundamental atom of the GC heap.
This is pretty neat! :^)
|
|
|
|
|
|
|
|
Use this instead of uintptr_t throughout the codebase. This makes it
possible to pass a FlatPtr to something that has u32 and u64 overloads.
|
|
|
|
If statements execute a certain action or an alternative one depending
on whether the tested condition is true or false, this commit helps
establish basic control flow capabilities in the AST.
|
|
Logical expressions are expressions which can return either true or
false according to a provided condition.
|
|
The `===` operator allows us to compare two values while taking their
type into consideration.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
I always tell people to start building things by working on the thing
that seems the most interesting right now. The most interesting thing
here was an AST + simple interpreter, so that's where we start!
There is no lexer or parser yet, we build an AST directly and then
execute it in the interpreter, producing a return value.
This seems like the start of something interesting. :^)
|
|
This way we don't refetch the background image every time style is
recomputed (e.g when hovering different elements.)
|
|
Let's rename this to LibWeb since it aims to provide more parts of the
web platform than just HTML. :^)
|
|
|
|
We also clean up some old references to the old G prefixed GUI classes
This also fixes a potential bug with using: C_OBJECT_ABSTRACT(GAbstractButton)
instead of C_OBJECT_ABSTRACT(AbstractButton)
|
|
LibCore's GZip is also moved into the Core namespace with this change.
|
|
When holding ALT & selecting text, the terminal now forms a rectangle
selection similar to other terminal behaviors.
|
|
|
|
After we mprotect(PROT_NONE) an allocation block, we can't expect to
read the m_size from that block right after. :^)
|
|
This was causing some obvious-in-hindsight but hard to spot bugs where
we'd implicitly convert the bool to an integer type and carry on with
the number 1 instead of the actual value().
|
|
Also fix a bug in mktime() caused by forgetting to check if the present year
is a leap year.
|
|
We should only detach from the cursor tracking widgets on unparenting
if they were the same widget that's being unparented!
Thanks to @agoose77 for spotting this!
Fixes #1354.
|