Commit graph

659 commits

Author SHA1 Message Date
Jeremy Andrews
1cdbf6eb6a Issue #1742 - Part 5: Remove unnecessary GCPtr::unbarrieredGet
Ref: BZ 1323441
2022-05-31 09:12:51 +08:00
Jeremy Andrews
e632fc1e8c Issue #1742 - Part 4: Don't trigger read barriers when comparing wrapped pointers types
This is actually an undocumented dependency of Bug 1325406 for Linux and
SunOS.

Ref: BZ 1308236
2022-05-31 09:12:45 +08:00
Moonchild
30a3ec27a2 Issue #1742 - Remove the ambiguous portions of gc that dealt with tagged pointers for shapes.
Nobody likes "isNullLike(obj)" when trying to garbage collect. It either is or
is not. Master Yoda would be pleased with this change.
2022-05-31 09:12:38 +08:00
Moonchild
574b295d15 Issue #1742 - Part 3: use JS::PropertyResult instead of Shape*
This is the meat of the issue and switches using raw shape pointers out for
PropertyResult objects where feasible.
2022-05-31 09:12:29 +08:00
Moonchild
c48b8e8932 Issue #1742 - Part 2: Add a class to encapsulate the possible results of a property lookup 2022-05-31 09:12:25 +08:00
Moonchild
80d7d43961 Issue #1742 - Part 1: Refactor rooting base class templates
Based on Bug 1325406
2022-05-31 09:12:19 +08:00
FranklinDM
f0e208a861 Issue #1894 - Part 7: Update tests
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1566141
2022-05-22 06:46:47 +08:00
FranklinDM
9dde32ee98 Issue #1894 - Part 6: Check for nullish values when folding coalesce nodes
This uses a different approach by modifying the `Boolish` function directly to act differently if we're checking for nullish values.

Partially based on:
Bug 1566141 - Implement the Nullish Coalescing operator (??) proposal
Bug 1599163 - Nullish coalescing operator returns undefined for void expressions
2022-05-22 06:46:40 +08:00
FranklinDM
707867d165 Issue #1894 - Part 5: Implement bytecode for nullish coalescing
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1566141
2022-05-22 06:46:35 +08:00
FranklinDM
5812721809 Issue #1894 - Part 4: Implement IonMonkey support for nullish coalescing
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1566141
2022-05-22 06:46:31 +08:00
FranklinDM
f282a4c05f Issue #1894 - Part 3: Implement support for nullish coalescing in JS reflection
Partially based on:
Bug 1566141 - Implement the Nullish Coalescing operator (??) proposal
Bug 1593415 - Assertion failure: false, at js/src/builtin/ReflectParse.cpp:3092 with nullish coalescing
2022-05-22 06:46:27 +08:00
FranklinDM
d7cdeaf313 Issue #1894 - Part 2: Implement support for nullish coalescing in the JS parser
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1566141
2022-05-22 06:46:21 +08:00
FranklinDM
3efa23472c Issue #1894 - Part 1: Implement coalesce JS opcode
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1566141
2022-05-22 06:46:16 +08:00
FranklinDM
f2cd5760ba Issue #1658 - Part 8: Update tests 2022-05-05 09:05:06 +08:00
FranklinDM
cb9809634a Issue #1658 - Part 6: Break and return no control flow for jumps emitted by optional chains under IonBuilder
IIUC, we want to process the GOTO in the case of optional chains, and we do not satisfy the requirements mentioned in the comment of snoopControlFlow's caller. Optional chains are not loops, we (probably) don't have a loop in the instruction following the GOTO, and in the GOTO destination, we're either returning an undefined/null value or the actual value.
2022-05-05 09:04:58 +08:00
FranklinDM
4c35296690 Issue #1658 - Part 5: Add and initialize TDZ check to optional chaining emitter
Partially based on: https://bugzilla.mozilla.org/show_bug.cgi?id=1685260
2022-05-05 09:04:54 +08:00
FranklinDM
a350d51223 Issue #1658 - Part 4: Fix optional chaining assertions and remove unreachable code
This includes the following:

Bug 1611777 - Part 1: Report syntax error for optional property access in self-hosting code. r=yulia!
Bug 1611777 - Part 2: Merge same blocks in emitDeleteOptionalChain(). r=yulia!
Bug 1611777 - Part 3: N/A
Bug 1611777 - Part 4: `super` can't occur on the left-hand side of an optional chain
Bug 1611777 - Part 5: Remove unnecessary super-handling in optional delete. r=yulia!
The child node of a DeleteOptionalChainExpr node can't be a super-property
accessor, so we can remove this code.

Bug 1611777 - Part 6: Crash for unexpected super-base in optional call. r=yulia!
Bug 1611777 - Part 7: Add missing entries to list of valid optional chain start expressions. r=yulia!
Bug 1611777 - Part 8: Add missing emitGet in emitOptionalElemExpression. r=yulia!
Aligns emitOptionalElemExpression() with emitOptionalDotExpression(), so it's
easier to compare both methods against each other.

Bug 1611777 - Part 9: Replace an if-statement with an assertion. r=yulia!
Bug 1611777 - Part 10: N/A
Bug 1611777 - Part 11: Support optional chaining in class heritage expression. r=yulia!
Bug 1611777 - Part 12: Use optionalExpr() for update expressions to match spec grammar. r=yulia!

Using optionalExpr matches the spec grammar more closely. This change also
modifies the reported error message. ++a?.b reported before this change
"unexpected token: '?.'", but now reports "invalid increment/decrement operand".

Bug 1611777 - Part 13: N/A
Bug 1611777 - Part 14: Simplify two lines in optionalExpr(). r=yulia!

We don't need to test for tt == TokenKind::Eof when we return for tt != TokenKind::OptionalChain anyway. Omit local variable for the result value and instead use a tail-call. This matches the local style in the parser more closely.

Bug 1611777 - Part 15: Support FunCall/FunApply optimisations for optional chaining. r=yulia!
Bug 1611777 - Part 16: Pass through ValueUsage in optional chains. r=yulia
2022-05-05 09:04:49 +08:00
FranklinDM
efabdc1885 Issue #1658 - Part 3: Implement support for optional chaining in JS reflection
Partially based on:
Bug 1610447 - Update Reflect to handle Optional Chaining operator
Bug 1657835 - Assertion failure: false, at js/src/builtin/ReflectParse.cpp:3168
2022-05-05 09:04:45 +08:00
FranklinDM
d58db931d5 Issue #1658 - Part 2: Implement bytecode for optional chaining
Partially based on:
Bug 1566143 - Implement the Optional Chaining operator (?.) proposal
Bug 1650340 - Fix deleteElementInOptionalChain
Bug 1644839 - Fix return value of emitOptionalChain on failure
2022-05-05 09:04:40 +08:00
FranklinDM
e04a23ff98 Issue #1658 - Part 1: Implement support for optional chaining in the JS Parser
Partially based on: https://bugzilla.mozilla.org/show_bug.cgi?id=1566143
2022-05-05 09:04:36 +08:00
Brian Smith
d5c43d1d35 Issue #1829 - Readd code cleanup that is not Mac related that got clobbered by reverting Issue #1751 2022-05-04 10:01:23 +08:00
Brian Smith
13fcc4a046 Issue #1829 - Revert "Issue #1751" 2022-05-04 09:40:24 +08:00
Moonchild
eaf9e756a0 Issue #21 - Remove remaining telemetry structs, callers and flags. 2022-04-28 10:33:44 +08:00
Moonchild
d4eac725fd Issue #1877 - Resolve RELEASE_OR_BETA conditionals. 2022-04-21 21:46:47 +08:00
FranklinDM
4a57663c1d Issue #1382 - Set canonical name for trimStart and trimEnd functions
This is needed to fix the assertion on debug builds that self-hosted functions must have consistent names, as these two functions are aliased to `trimLeft` and `trimRight`.
2022-04-19 22:05:45 +08:00
Moonchild
2aeed57657 Issue #1864 - Fix IonBuilder::maybeMarkEmpty.
Look at the instruction's operands instead of the instruction itself,
and take an early exit on empty types.
2022-04-19 22:05:25 +08:00
Moonchild
260cc45e51 [js] Fix AliasSet of MLoadTypedArrayElementHole 2022-04-10 22:58:05 +08:00
Moonchild
72d9d1a476 Don't rely on nsCRT from jsdate. 2022-03-22 22:33:11 +08:00
roytam1
2ceec8871e Bug 1743515 - Add dynamic check for valid serialized length. r=jonco, a=RyanVM 2022-01-19 10:27:16 +08:00
Moonchild
1d1618ff0c Issue #1675 - Move regexp to new-regexp to make bz porting simpler. 2021-08-12 11:21:23 +08:00
Moonchild
12231d9266 Issue #1679 - Part4: Clean up commented-out/WIP code. 2021-08-12 11:21:21 +08:00
Moonchild
3548ae2b2f Issue #1679 - Part 3: Make everything build on supported compilers. 2021-08-12 11:21:20 +08:00
Jeremy Andrews
495db8d7bc Issue #1725 - Fix logic in PerformPromiseAllSettled.
This function essentially appears to work as written, there was an issue with it returning false too early in some situations that prevented it from working properly.
2021-07-23 08:57:36 +08:00
Moonchild
ada10bce17 WIP: Base implementation 2021-07-23 08:57:35 +08:00
Moonchild
ba00d14c12 Issue #1751 - Remove Mac code behind MOZ_WIDGET_TOOLKIT == 'cocoa' 2021-06-24 11:09:47 +08:00
Moonchild
d46c25b5e5 [js] Fix porting typo
Follow-up for 9acd98298ccadd83495fa1615573ebcca6648bae
2021-06-04 09:31:07 +08:00
Jan de Mooij
9c3495379f [js] Fix invalid early return in BaselineFrame::trace.
We were not tracing debugger environments for Baseline frames without any
local/expression slots.
2021-06-04 09:31:06 +08:00
Moonchild
a4b0f333ba Issue #1751 -- Remove XP_MACOSX conditionals from the rest of the tree.
This also removes some PP abuse and takes file entries out of PP when no longer
needed without XP_MACOSX conditionals.
2021-05-07 09:53:59 +08:00
Moonchild
2f27335cc4 Issue #1751 -- Remove XP_DARWIN 2021-05-05 10:27:04 +08:00
Moonchild
a9c8f3a84a Issue #1751 -- Remove XP_IOS 2021-05-05 10:26:14 +08:00
Moonchild
4651d97342 Issue #1756 - Clean up ICU patch.
We don't need ICU_UNUM_HAS_FORMATDOUBLEFORFIELDS because we don't support any
ICU other than the one in-tree.
2021-04-02 10:34:14 +08:00
Moonchild
bdcb9cc504 Issue #1756 - Expose NumberFormat.formatToParts() to content. 2021-04-02 10:34:12 +08:00
Moonchild
5df0028108 Issue #1756 - Initial wrapped implementation in C++ 2021-04-02 10:34:10 +08:00
Moonchild
b8f2ada817 Issue #1053 - Remove __ANDROID__ defines (except in third party code) 2021-03-25 09:04:29 +08:00
Moonchild
9985a44c41 Issue #1053 - Remove android blocks from configure. 2021-03-11 10:13:51 +08:00
Moonchild
50653a7c4c Issue #1053 - Remove build system MOZ_ANDROID_* defines and related code. 2021-03-11 10:13:09 +08:00
Moonchild
d6c1cc53ba [js] Add XMMRegName for invalid_xmm 2021-02-16 14:03:47 +08:00
Moonchild
bd0f8a2eca Issue #1739 - Implement numeric separators.
Resolves #1739
2021-02-16 14:03:45 +08:00
Moonchild
dc1d14fcb9 Issue #1738 - Follow-up: Update comment (no code changes) 2021-02-16 14:03:44 +08:00
Moonchild
23c9fab20d Issue #1738 - Part 2: Implement well-formed JSON stringify
This implements the ES2019 spec for JSON stringification, including
lower-casing, properly escaping lone surrogates, etc.
2021-02-12 10:50:21 +08:00