Age | Commit message (Collapse) | Author | |
---|---|---|---|
2021-07-22 | LibJS: Transcode UTF-8 strings to UTF-16 and add UTF-16 accessors | Timothy Flynn | |
LibJS parses JavaScript as UTF-8, so when creating a string, we must transcode it to UTF-16 to handle encoded surrogate pairs. For example, consider the following string: "\ud83d\ude00" The UTF-8 encoding of this surrogate pair is: 0xf0 0x9f 0x98 0x80 However, LibJS will currently store the two surrogates individually as UTF-8 encoded bytes, rather than combining the pair: 0xed 0xa0 0xb8, 0xed 0xb8 0x80 These are not equivalent. So, as String.prototype becomes UTF-16 aware, this encoding will no longer work for abstractions like strict equality. | |||
2021-07-22 | LibJS: Add UTF-16 tests to String.prototype methods that already work | Timothy Flynn | |
These methods did not require UTF-16 views, so just add test cases to ensure they remain correct. This also adds a couple of FIXME comments on tests that will fail even with UTF-16 String.prototype support (for reasons such as lack of UTF-16 support in RegExp.prototype and Unicode case folding). | |||
2021-07-21 | LibJS: Implement Temporal.PlainDate.prototype.equals & Required AO | Idan Horowitz | |
2021-07-21 | LibJS: Implement the ToTemporalDate Abstract Operation | Idan Horowitz | |
This is required by most Temporal.PlainDate.prototype methods. | |||
2021-07-21 | LibJS: Add Temporal.Calendar.prototype.dateFromFields & required AOs | Idan Horowitz | |
This is required for implementing the DateFromFields PlainDate AO. | |||
2021-07-21 | LibJS: Use trunc instead of a static_cast<i64> in is_integral_number | Idan Horowitz | |
This ensures we return true for integers that do not fit in an i64 aka, above 9223372036854775807. (2**63 - 1) | |||
2021-07-21 | LibJS: Remove usages of String's null state in Temporal AOs | Idan Horowitz | |
2021-07-21 | LibJS: Implement Temporal.PlainDate.prototype.valueOf | Idan Horowitz | |
2021-07-21 | LibJS: Use IntrusiveList for keeping track of WeakContainers | Andreas Kling | |
2021-07-21 | LibJS: Use IntrusiveList for keeping track of MarkedValueLists | Andreas Kling | |
2021-07-20 | LibJS: Fix that non-existent references are unresolvable in strict mode | davidot | |
2021-07-20 | LibJS: Follow the spec more closely when determining the this value | Timothy Flynn | |
Co-authored-by: davidot <david.tuin@gmail.com> | |||
2021-07-20 | LibJS: Fix that vm.in_strict_mode was propagated to eval and functions | davidot | |
For eval it depends on the CallerMode and for a created function it depends on the function itself. | |||
2021-07-19 | Everywhere: Use AK/Math.h if applicable | Hendiadyoin1 | |
AK's version should see better inlining behaviors, than the LibM one. We avoid mixed usage for now though. Also clean up some stale math includes and improper floatingpoint usage. | |||
2021-07-19 | LibJS: Implement Temporal.PlainDate.prototype.calendar | Idan Horowitz | |
2021-07-19 | LibJS: Implement Temporal.PlainDate.prototype[@@toStringTag] | Idan Horowitz | |
2021-07-19 | LibJS: Start implementing Temporal.PlainDate | Idan Horowitz | |
This commit adds the PlainDate object itself, its constructor and prototype (currently empty), and several required abstract operations. | |||
2021-07-19 | LibJS: Rename Temporal.now => Temporal.Now | Linus Groh | |
See: - https://github.com/tc39/proposal-temporal/commit/d0acb66 - https://github.com/tc39/proposal-temporal/commit/0097fdd | |||
2021-07-19 | LibJS: Reflect recent editorial changes in the Temporal proposal | Linus Groh | |
See: - https://github.com/tc39/proposal-temporal/commit/2148441 - https://github.com/tc39/proposal-temporal/commit/08c04cc - https://github.com/tc39/proposal-temporal/commit/b77da58 | |||
2021-07-19 | LibJS: Implement Temporal.Duration.from() | Linus Groh | |
...with ParseTemporalDurationString currently TODO()'d. | |||
2021-07-19 | LibJS: Fix TemporalDurationLike property order | Linus Groh | |
The table is sorted alphabetically and supposed to be iterated in that oder. Also move this to a templated lambda for later re-use with different target structs and value types. | |||
2021-07-19 | LibJS: Move Temporal AO structs/enum classes above function declarations | Linus Groh | |
This is a bit closer to our usual style, and tidier. | |||
2021-07-18 | LibJS: Use a Utf8View on the subject if the regex has the unicode flag | Ali Mohammad Pur | |
This makes LibRegex behave (more) correctly with regards to matching unicode code points. | |||
2021-07-17 | LibJS: Report string length as the code point length, not byte length | Timothy Flynn | |
For example, U+180E is 3 bytes, but should have a string length of 1. | |||
2021-07-16 | LibJS: Implement Temporal.Duration.prototype.abs() | Linus Groh | |
2021-07-16 | LibJS: Implement Temporal.Duration.prototype.negated() | Linus Groh | |
2021-07-16 | LibJS: Implement Temporal.Duration.prototype.with() | Linus Groh | |
2021-07-16 | LibJS: Ensure RegExpStringIterator keeps the RegExp matcher object alive | Timothy Flynn | |
Fixes a crash found with 'test-js -g' due to this object going out of scope. | |||
2021-07-16 | LibJS: Replace the boolean argument of Object::set with an enum class | Idan Horowitz | |
This is more serenity-esque and also makes pointing out missing exception checks during reviews much easier. | |||
2021-07-16 | LibJS: Remove unused Object::PutOwnPropertyMode enum class | Idan Horowitz | |
All usages of this enum class were removed in the Object rewrite, but this enum was left behind. | |||
2021-07-16 | LibJS: Implement RegExp AdvanceStringIndex abstraction | Timothy Flynn | |
This isn't particularly useful yet because the underlying LibRegex engine doesn't support unicode matching yet. But the debt of FIXMEs related to AdvanceStringIndex have added up, so let's get this out of the way. | |||
2021-07-16 | LibJS: Implement RegExp.prototype [ @@matchAll ] | Timothy Flynn | |
This also allows String.prototype.matchAll to work, as all calls to that method result in an invocation to @@matchAll. | |||
2021-07-16 | LibJS: Implement the RegExpStringIterator object | Timothy Flynn | |
This implementation closely follows the StringIterator object in that the abstract closure meant to be created in CreateRegExpStringIterator is instead unrolled into RegExpStringIterator.prototype.next. | |||
2021-07-16 | LibJS: Make the RegExpExec abstraction publically available | Timothy Flynn | |
For RegExpStringIterator, this will be needed outside of the RegExp prototype. | |||
2021-07-16 | LibJS: Implement Temporal.Duration.prototype.valueOf() | Linus Groh | |
2021-07-16 | LibJS: Implement Temporal.Duration.prototype.blank | Linus Groh | |
2021-07-16 | LibJS: Implement Temporal.Duration.prototype.sign | Linus Groh | |
2021-07-16 | LibJS: Implement Temporal.Duration.prototype.nanoseconds | Linus Groh | |
2021-07-16 | LibJS: Implement Temporal.Duration.prototype.microseconds | Linus Groh | |
2021-07-16 | LibJS: Implement Temporal.Duration.prototype.milliseconds | Linus Groh | |
2021-07-16 | LibJS: Implement Temporal.Duration.prototype.seconds | Linus Groh | |
2021-07-16 | LibJS: Implement Temporal.Duration.prototype.minutes | Linus Groh | |
2021-07-16 | LibJS: Implement Temporal.Duration.prototype.hours | Linus Groh | |
2021-07-16 | LibJS: Implement Temporal.Duration.prototype.days | Linus Groh | |
2021-07-16 | LibJS: Implement Temporal.Duration.prototype.weeks | Linus Groh | |
2021-07-16 | LibJS: Implement Temporal.Duration.prototype.months | Linus Groh | |
2021-07-16 | LibJS: Implement Temporal.Duration.prototype.years | Linus Groh | |
2021-07-16 | LibJS: Implement Temporal.Duration.prototype[@@toStringTag] | Linus Groh | |
2021-07-16 | LibJS: Start implementing Temporal.Duration | Linus Groh | |
This patch adds the Duration object itself, its constructor and prototype (currently empty), and three required abstract operations. | |||
2021-07-14 | LibJS: Implement Temporal.Calendar.prototype.id | Linus Groh | |