summaryrefslogtreecommitdiff
path: root/Libraries
AgeCommit message (Collapse)Author
2020-03-11LibGUI: Fix overflow crash in highlighterOriko
2020-03-11LibGUI: Syntax highlight string escape sequencesOriko
2020-03-11LibGUI: Clear old syntax highlightingOriko
2020-03-10LibJS: Let's say that Identifier is an Expression for nowAndreas Kling
This allows us to tighten typing in various other classes.
2020-03-10LibJS: Move Value ops into Value.cpp and tweak BinaryOp namesAndreas Kling
2020-03-10LibJS: Use Value::to_boolean() wherever we haven't checked is_boolean()Andreas Kling
Unless we've verified that a Value is a boolean, we should not be calling as_bool() on it.
2020-03-10EventLoop: Don't destroy ID allocator (#1403)Alex Muscar
The ID allocator is destroyed before a timer in HackStudio is is unregistered leading to an access violation. Fixes #1382.
2020-03-10LibJS: Oops, non-zero values should boolify to true, not falseAndreas Kling
2020-03-10LibJS: Implement basic boolean coercionAndreas Kling
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.
2020-03-09LibJS: Add a convenience helper for visiting a JS::ValueAndreas Kling
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).
2020-03-09LibJS: Make the GC marking phase cycle-proofAndreas Kling
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. :^)
2020-03-09LibJS: Make FunctionDeclaration and CallExpression scope-awareAndreas Kling
2020-03-09LibJS: Make sure we mark everything reachable from the scope stackAndreas Kling
This ensures that local variables survive GC.
2020-03-09LibJS: Add a very simple ObjectExpression for "var x = {}"Andreas Kling
This allows us to allocate an empty new Object on the GC heap.
2020-03-09LibJS: Add magical "$gc" function that can be called to trigger GCAndreas Kling
This will be immensely useful for testing.
2020-03-09LibJS: Add basic support for (scoped) variablesAndreas Kling
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.
2020-03-09LibJS: Simplify Heap::mark_live_cells()Andreas Kling
Instead of iterating over every single cell, simply iterate over the live cells and mark them from there. Thanks to Blam for suggesting this! :^)
2020-03-09LibJS: Move logical not operator to new unary expression class0xtechnobabble
2020-03-09LibJS: Add new bitwise and relational operators0xtechnobabble
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.
2020-03-09LibJS: Remove superfluous explicit in AST.h (#1395)howar6hill
2020-03-09LibBareMetal: Return FlatPtr from PhysicalAddress::offset_in_page()Liav A
2020-03-09LibJS: Implement While statementshowar6hill
2020-03-09LibJS: GC: Remove clear_all_mark_bits()Stephan Unverwerth
Clearing all marked flags has been integrated into the sweep function, saving an additional full iteration over the heap.
2020-03-08LibJS: Add a basic mark&sweep garbage collector :^)Andreas Kling
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! :^)
2020-03-08LibC: Fix a bug involving miscalculating week counts of last yearhowar6hill
2020-03-08LibC: Reimplement asctime() in terms of strftime()howar6hill
2020-03-08Userspace: Add missing #includes now that AK/StdLibExtras.h is smallerAndreas Kling
2020-03-08AK: Add global FlatPtr typedef. It's u32 or u64, based on sizeof(void*)Andreas Kling
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.
2020-03-08LibCore: Add format option for DateTime::to_string() (#1358)howar6hill
2020-03-08LibJS: Implement if statements0xtechnobabble
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.
2020-03-08LibJS: Implement logical expressions0xtechnobabble
Logical expressions are expressions which can return either true or false according to a provided condition.
2020-03-08LibJS: Add typed comparison operator0xtechnobabble
The `===` operator allows us to compare two values while taking their type into consideration.
2020-03-08LibJS: Allow the dumping of literals that aren't numbers0xtechnobabble
2020-03-08LibGUI: Fix null-termination of TextDocumentLineTibor Nagy
2020-03-07LibJS: Include the operator in BinaryExpression dumpsAndreas Kling
2020-03-07LibJS: Flesh out JS::Value a little bit moreAndreas Kling
2020-03-07LibJS: Simplify LogStream::operator<<(JS::Value) and move to .cpp fileAndreas Kling
2020-03-07LibJS: Fix string representation for value of type undefinedElisée Maurer
2020-03-07LibJS: Start building a JavaScript engine for SerenityOS :^)Andreas Kling
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. :^)
2020-03-07LibWeb: Cache the <body background> style image valueAndreas Kling
This way we don't refetch the background image every time style is recomputed (e.g when hovering different elements.)
2020-03-07LibWeb: Rename directory LibHTML => LibWebAndreas Kling
Let's rename this to LibWeb since it aims to provide more parts of the web platform than just HTML. :^)
2020-03-07LibWeb: Move everything into the Web namespaceAndreas Kling
2020-03-07LibGUI: Move Icon and FontDatabase into the GUI namespaceShannon Booth
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)
2020-03-07LibCore: Remove all remaining C prefix referencesShannon Booth
LibCore's GZip is also moved into the Core namespace with this change.
2020-03-06TerminalWidget: Implement ALT selectionrhin123
When holding ALT & selecting text, the terminal now forms a rectangle selection similar to other terminal behaviors.
2020-03-06LibC: Fix a indentation problem in time.cpphowar6hill
2020-03-06LibC: Fix crash in free() now that mprotect() works correctlyAndreas Kling
After we mprotect(PROT_NONE) an allocation block, we can't expect to read the m_size from that block right after. :^)
2020-03-06AK: Remove Optional::operator bool()Andreas Kling
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().
2020-03-06LibC: Implement time formatting functions, partially support timezonehowar6hill
Also fix a bug in mktime() caused by forgetting to check if the present year is a leap year.
2020-03-05LibGUI: Fix missing equality checks in Window::did_remove_widget()Andreas Kling
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.