Age | Commit message (Collapse) | Author |
|
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/b0411b4
|
|
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/46f97ea
|
|
This also allows removing a bit of a BigInt hack to resolve plurality of
BigInt numbers (because the AOs used in ResolvePlural support BigInt,
wherease the naive Unicode::select_pattern_with_plurality did not).
We use cardinal form here; the number format patterns in the CLDR align
with the cardinal form of the plural rules.
|
|
The NumberFormat spec casually indicates the need for a PluralRules
object without explicity saying so, with text such as:
"which may depend on x in languages having different plural forms."
Other implementations actually do create a PluralRules object to resolve
those cases with ResolvePlural. However, ResolvePlural doesn't need much
from PluralRules to operate, so this can be abstracted out for use in
NumberFormat without the need to allocate a PluralRules instance.
|
|
|
|
The PluralCategory enum is currently generated for plural rules. Instead
of generating it, this moves the enum to the public LibUnicode header.
While it was nice to auto-discover these values, they are well defined
by TR-35, and we will need their values from within the number format
code generator (which can't rely on the plural rules generator having
run yet). Further, number format will require additional values in the
enum that plural rules doesn't know about.
|
|
The Polish test cases added here cover previous failures from test262,
due to the way that 0 is specified to be "many" in Polish.
|
|
|
|
|
|
The JS::Intl enum was added when implementing the PluralRules
constructor. Now that LibUnicode has a plural rules implementation,
replace the JS::Intl enum with the analagous Unicode enum.
|
|
Not critical, but in subsequent commits this will be invoked from a
constant context.
|
|
|
|
|
|
|
|
|
|
|
|
We do not yet parse collation data from the CLDR. This stubs out the
collations property, analogous to Intl.supportedValuesOf.
|
|
|
|
This is a manual but clean revert of all commits from #12595.
Adding a partial implementation of the resizable ArrayBuffer proposal
without implementing all the updates to TypedArray infrastructure that
is also covered by the spec introduced a bunch of crashes, so we
decided to revert it for now until a full implementation is completed.
|
|
|
|
These were obvious wrong uses of the old default "only first occurence"
parameter that was used in String::replace.
|
|
This commit has no behavior changes.
In particular, this does not fix any of the wrong uses of the previous
default parameter (which used to be 'false', meaning "only replace the
first occurence in the string"). It simply replaces the default uses by
String::replace(..., ReplaceMode::FirstOnly), leaving them incorrect.
|
|
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/70de75b
|
|
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/9ddd57e
|
|
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/5ebd34b
|
|
This is an editorial change in the Temporal spec.
See:
- https://github.com/tc39/proposal-temporal/commit/ccef468
- https://github.com/tc39/proposal-temporal/commit/5b38ab4
|
|
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/c8ee2bd
|
|
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/9f3bf53
|
|
Due to macOS visibility rules, this function did not end up being
exported from liblagom-js.dylib, causing LagomWeb to fail to link.
|
|
It keeps failing on i686, and will until we've updated a bunch of size_t
APIs in the codebase to u64.
|
|
This aligns it with the spec again, it was clarified that the additional
range check before ArrayCreate is intentional:
https://github.com/tc39/proposal-change-array-by-copy/issues/94
Also cast the final variable to an u64 instead of size_t after we have
determined that it is safe to do so, as that's what Array::create()
takes now.
|
|
This doesn't matter per se as the value is immediately validated to be
in the 0 to 2^32 - 1 range, but it avoids having to cast a number that
potentially doesn't fit into a size_t into one at the call site. More
often than not, array-like lengths are only validated to be <= 2^52 - 1,
i.e. MAX_SAFE_INTEGER.
This is fully backwards compatible with existing code as a size_t always
fits into an u64, but an u64 might not always fit into a size_t.
|
|
|
|
This also allows constructing from other integral types like u64, which
would have been ambiguous before (at least on i686):
```
error: call of overloaded 'Value(u64&)' is ambiguous
note: candidate: 'JS::Value::Value(i32)'
175 | explicit Value(i32 value)
| ^~~~~
note: candidate: 'JS::Value::Value(unsigned int)'
164 | explicit Value(unsigned value)
| ^~~~~
note: candidate: 'JS::Value::Value(long unsigned int)'
153 | explicit Value(unsigned long value)
| ^~~~~
note: candidate: 'JS::Value::Value(double)'
141 | explicit Value(double value)
| ^~~~~
```
|
|
The implementation no longer matches the spec text, but I believe that's
a bug anyway. No point in allowing array lengths up to 2^53 - 1 when the
ArrayCreate AO rejects anything above 2^32 - 1.
|
|
|
|
|
|
This is a normative change in the Intl.DurationFormat spec.
See: https://github.com/tc39/proposal-intl-duration-format/commit/b293603e
|
|
This is a normative change in the Intl.DurationFormat spec.
See: https://github.com/tc39/proposal-intl-duration-format/commit/89ab1855
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If the for loop's body is not block terminated, we will generate a Jump
to the end block which will block terminate the body. Then, we ended
the lexical variable scope if needed. However, since the body is now
block terminated, the "LeaveLexicalEnvironment" instruction that is
generated by end_variable_scope is now dropped on the floor.
This fixes this by moving it to the beginning of the end block.
|
|
Previously we only did this if the body block was not terminated.
If it was, all future codegen would happen in this block terminated
body block until another switch occurred, dropping all generated
instructions in this time on the floor.
|