summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2021-06-19LibDebug: Convert LibDebug to east-const styleItamar
2021-06-19LibCoreDump: Include source locations of inlined functions in backtraceItamar
2021-06-19LibDebug: Add DebugInfo::get_source_position_with_inlinesItamar
This function returns the source position of a given address in the program. If that address exists in an inline chain, then it also returns the source positions that are in the chain.
2021-06-19LibDebug: Add DwarfInfo::get_cached_die_at_offsetItamar
This function returns a DIE object from the cache with the given offset in the debug_info section.
2021-06-19LibDebug:: Add DwarfInfo::get_die_at_addressItamar
This function returns the die object whose address range intersects with the given address. This function will also construct the DIE cache, if it hasn't been constructed yet.
2021-06-19LibDebug: Add caches of DIE objects to DwarfInfoItamar
There is one cache that indexes DIE objects by the start address of their range, and another cache that indexes by their offset in the debug_info section. Both caches are implemented with RedBlackTree, and are optional - they will only be populated if 'build_cached_dies' is invoked.
2021-06-19LibDebug: Store optional parent_offset in Dwarf::DIE objectsItamar
In the current implementation, only DIE objects that are created via DIE::for_each_child() will have parent offsets. DIE objects that are created with CompilationUnit::get_die_at_offset() do not currently store a parent offset. We may improve this in the future, but this is enough for what we currently need.
2021-06-19LibDebug: Add AttributeForm field to Dwarf::AttributeValueItamar
In some contexts, it's helpful to also know the "Attribute Form", in addition to the "Attribute Type". An example for such context is the interpretation of the "DW_AT_high_pc" attribute, which has different meaning if the form is an address or a constant.
2021-06-19LibCoreDump: Use "eip - 1" when creating backtrace entriesItamar
We need to do this because the return address from a function frame is the instruction that comes after the 'call' instruction.
2021-06-19LibDebug: Add LineProgram::get_directory_and_file(size_t)Itamar
This function returns the directory path & filename for a given file index.
2021-06-19LibDebug: Move Dwarf::LineProgram into Dwarf::CompilationUnitItamar
Previously, the LineProgram objects were short-lived, and only created inside DebugInfo::prepare_lines() to create a vector of sorted LineInfo data. However, Dwarf::LineProgram also contains other useful data, such as index-to-string mapping of source directories and filenames. This commit makes each Dwarf::CompilationUnit own its Dwarf::LineProgram. DebugInfo::prepare_lines() then iterates over the compilation units to prepare its sorted vector of lines.
2021-06-19LibDebug: Store LibDebug objects on the heap & make them non-copyableItamar
This fixes an issue were some LibDebug objects (for example, Dwarf::CompilationUnit) held a reference to their parent Dwarf::DwarfInfo object, which was constructed on the stack and later moved to the heap.
2021-06-19LibDebug: Move Dwarf::AttributeValue to a separate fileItamar
2021-06-19LibDebug: Move get_die_at_offset to Dwarf::CompilationUnitItamar
2021-06-19LibDebug: Remove unused DebugInfo::for_each_source_positionItamar
2021-06-19LibDebug: Fix typo in DebugInfo::get_source_positionItamar
2021-06-19LibJS: Object.getOwnPropertyNames() should enumerate String's .lengthAndreas Kling
We were incorrectly aborting property name enumeration after generating names for all the indexable properties in the underlying string.
2021-06-19LibJS: Make Object.getOwnPropertyDescriptor() work on String subscriptsAndreas Kling
String objects are a bit special since the indexed properties are overridden by the contents of the underlying PrimitiveString. getOwnPropertyDescriptor() was not taking this into account, and would instead return undefined when asked about an indexed property in a String object.
2021-06-19LibJS: Support object rest elements in the bytecode interpreterMatthew Olsson
2021-06-19LibJS: Support array rest elements in the bytecode interpreterMatthew Olsson
2021-06-19LibJS: Implement array destructuring for the bytecode interpreterMatthew Olsson
2021-06-19LibJS: Implement more IteratorOperations and organize fileMatthew Olsson
Implemented IteratorComplete and IteratorValue, and sorted functions based on their spec ordering.
2021-06-19LibJS: Support object destructuring in the bytecode interpreterMatthew Olsson
2021-06-19LibJS: Add JumpUndefined bytecodeMatthew Olsson
2021-06-19LibJS: Ensure GetBy{Id,Value} never load <empty> into the accumulatorMatthew Olsson
2021-06-19LibJS: Restructure and fully implement BindingPatternsMatthew Olsson
2021-06-19LibJS: Remove bad spread check in declaration parsingMatthew Olsson
This would allow assignments such as `let ...{ a } = { a: 20 }`
2021-06-19LibJS: Add missing exception checks to Number() constructorLinus Groh
2021-06-19LibJS: Make Number() constructor spec compliantLinus Groh
By using to_numeric() and adding BigInt handling, we get support for `Number(123n)`. Fixes #8125.
2021-06-19LibJS: Add a bunch more missing ECMA-262 section/title/URL commentsLinus Groh
2021-06-19LibJS: Disallow 'yield' identifier initializer in GeneratorFunctionsMatthew Olsson
2021-06-19LibJS: Implement GeneratorFunctionConstructor::constructMatthew Olsson
2021-06-19LibJS: Add the remaining generator objectsMatthew Olsson
- %GeneratorFunction% - %GeneratorFunction.prototype% - %GeneratorFunction.prototype.prototype% - %Generator%.prototype
2021-06-19LibCrypto: Fix Hash::MD5's movabilityDexesTTP
Because MD5 stored a "Bytes {}" wrapper to its internal data buffer, it was not actually movable. However, its use in several parts of the system (such as HashManager) assumed it was, leading to crashes. Fixes #8135
2021-06-18LibJS: Add and use the ArraySpeciesCreate abstract operationIdan Horowitz
This ensures that the Array.prototype methods produce results using the constructor of the derived object if it is one instead of always using the default constructor.
2021-06-18LibJS: Bring FlattenIntoArray closer to the specificationIdan Horowitz
This fixes the incorrect exception order and missing exception checks that were caused by the implementation not conforming exactly to the specification.
2021-06-18LibJS: Implement the 'Hashbang Grammar for JS' proposalLinus Groh
Stage 3 since August 2019 - we already have shebang stripping implemented in js(1), so this removes it from there in favor of adding support to the lexer directly. Most straightforward proposal and implementation I've ever seen :^) https://github.com/tc39/proposal-hashbang
2021-06-18LibJS/Tests: Use eval() for toEvalTo(), not Function()Linus Groh
Since we have had eval() for a while now, we can finally use it here - this allows us to get rid of the confusing return statements in tested source code.
2021-06-18LibJS: Throw on detached viewed ArrayBuffer when validating TypedArraysIdan Horowitz
2021-06-18LibJS: Add the TypedArray.prototype.toString propertyIdan Horowitz
This is initialized to be the same function object as the initial value of the Array.prototype.toString generic function.
2021-06-18LibJS: Add the TypedArray.prototype.join methodIdan Horowitz
2021-06-18LibJS: Add the TypedArray.prototype[Symbol.toString] getter accessorIdan Horowitz
2021-06-18LibJS: Do not trim whitespace from property names when they're numberssin-ack
Fixes #7803.
2021-06-18LibJS: Add %TypedArray%.prototype.someLuke
2021-06-18LibJS: Add %TypedArray%.prototype.forEachLuke
2021-06-18LibJS: Add %TypedArray%.prototype.findIndexLuke
2021-06-18LibJS: Add %TypedArray%.prototype.findLuke
2021-06-18LibJS: Add %TypedArray%.prototype.everyLuke
2021-06-18WindowServer: Move key event handling to its own functionAndreas Kling
Instead of making WindowManager::event() all about key events.
2021-06-18WindowServer: Make various functions take MouseEvent by const referenceAndreas Kling
Some paths of the mouse event processing code will upgrade the event from a regular MouseDown to a MouseDoubleClick. That's why we were passing `MouseEvent&` everywhere. For the paths that don't need to do this, passing `MouseEvent const&` reduces the cognitive burden a bit, so let's do that.