The [[HomeObject]] slot is guaranteed to either contain a JSFunction or a
PlainObject, so we can use safely use `JSObject::staticPrototype()` to retrieve
the prototype and can also remove the lazy-proto handling in the compilers.
Differential Revision: https://phabricator.services.mozilla.com/D60680
--HG--
extra : moz-landing-system : lando
Modify JSOp::SuperFun to only retrieve the prototype without any further checks.
Drive-by change:
Take advantage that the object whose prototype gets retrieved is guaranteed to
be a JSFunction, so we neither have to worry about proxy objects nor lazy
prototypes.
Differential Revision: https://phabricator.services.mozilla.com/D60677
--HG--
extra : moz-landing-system : lando
Moving GetFieldTypeForNumberField outside of NumberFormatFields::append let's us
avoid adding another flag to NumberFormatFields in the next part.
Differential Revision: https://phabricator.services.mozilla.com/D60968
--HG--
extra : moz-landing-system : lando
Adds a separate FormattedRelativeTimeToParts function to avoid having to add
another one-off argument to the existing intl::FormattedNumberToParts function.
Differential Revision: https://phabricator.services.mozilla.com/D60966
--HG--
extra : moz-landing-system : lando
This change allows the bytecode emitter to use `JSOp::FunCall` resp. `JSOp::FunApply`
for calls in optional chain expressions.
Differential Revision: https://phabricator.services.mozilla.com/D61162
--HG--
extra : moz-landing-system : lando
- 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.
Differential Revision: https://phabricator.services.mozilla.com/D61161
--HG--
extra : moz-landing-system : lando
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".
Differential Revision: https://phabricator.services.mozilla.com/D61159
--HG--
extra : moz-landing-system : lando
Aligns emitOptionalElemExpression() with emitOptionalDotExpression(), so it's
easier to compare both methods against each other.
Differential Revision: https://phabricator.services.mozilla.com/D61155
--HG--
extra : moz-landing-system : lando
The previous list contained some invalid entries (`await` and comma-expression)
and was missing some possible parse node kinds.
Differential Revision: https://phabricator.services.mozilla.com/D61154
--HG--
extra : moz-landing-system : lando
The child node of a DeleteOptionalChainExpr node can't be a super-property
accessor, so we can remove this code.
Drive-by: Reindent some stack comments.
Differential Revision: https://phabricator.services.mozilla.com/D61152
--HG--
extra : moz-landing-system : lando
Moves the `isSuper()` method from the base class to the (non-optional) derived
classes, because `super?.x` isn't valid syntax, so it's confusing to be able to
ask if an optional property access is applied on `super`.
The next part will further simplify `BytecodeEmitter::emitDelete{Element,Property}InOptChain()`.
Differential Revision: https://phabricator.services.mozilla.com/D61151
--HG--
extra : moz-landing-system : lando
We already assert that this case isn't allowed in the bytecode emitter. Also
report a syntax error to match normal property access.
Differential Revision: https://phabricator.services.mozilla.com/D61146
--HG--
extra : moz-landing-system : lando
Restricted to Nightly so we can enable it by default in tandem with enabling
the same option in NumberFormat and DateTimeFormat.
Differential Revision: https://phabricator.services.mozilla.com/D60959
--HG--
extra : moz-landing-system : lando
This patch mainly enables the pref for SharedArrayBuffer on early Beta. (We have
already enabled that on Nightly by default)
This change causes some tests to fail. This patch handles the failures for
a mochitest and web-platform-tests.
Differential Revision: https://phabricator.services.mozilla.com/D60965
--HG--
extra : moz-landing-system : lando
The proposal specifies class fields as follows:
FieldDefinition[Yield, Await]:
ClassElementName[?Yield, ?Await] Initializer[In, ~Yield, ~Await]opt
This means that await shouldn't be parsed according to the context
where the class is defined: it should always be parsed as an
identifier inside initializers.
Differential Revision: https://phabricator.services.mozilla.com/D58721
--HG--
extra : moz-landing-system : lando
Related to bug 1608121.
When we use Ion and WebAssembly, we might get multiple return values
from function calls. This patch refactors the direct JS-to-Wasm-via-Ion
call path to better support multiple values.
The patch adds a safepoint at the call, as appears to be necessary in
general, and also when results are captured as MIR values. There is a
slight optimization in that void-returning Wasm functions just get a
MConstant result that's visible to the optimizer.
Differential Revision: https://phabricator.services.mozilla.com/D60228
--HG--
extra : moz-landing-system : lando
This adds a JS API to set a performance hint which tells the engine whether a global is in pageload or not. The engine keeps a count so it knows whether any global for that runtime is in pageload, and adjusts GC thresholds appropriately. Currently this strongly discourages atoms GC by doubleing the trigger threshold. This does not disallow it entirely, but with this change it should almost never happen.
This is meant to be a temporary fix. When the stencil project lands we will not have this annoying dependency between parsing and atoms zone GC and can remove this change.
Differential Revision: https://phabricator.services.mozilla.com/D60972
--HG--
extra : moz-landing-system : lando
This makes it easier to update test262, because it's no longer required to
manually mark each WeakRef test in js/src/tests/jstests.list.
Differential Revision: https://phabricator.services.mozilla.com/D60512
--HG--
extra : moz-landing-system : lando
Update test262 to pick up the changed `eval` in parameter expressions tests.
Differential Revision: https://phabricator.services.mozilla.com/D60510
--HG--
extra : moz-landing-system : lando
Removes the direct eval calls, because they're now leading to SyntaxErrors when
attempting to redeclare existing parameters.
Differential Revision: https://phabricator.services.mozilla.com/D60509
--HG--
extra : moz-landing-system : lando
The specification installs the implicit "arguments" binding in the same
lexical environment as the other parameters, but our implementation requires an
extra check to report this redeclaration SyntaxError.
Differential Revision: https://phabricator.services.mozilla.com/D60508
--HG--
extra : moz-landing-system : lando
BytecodeEmitter.cpp:
The normal `DestructuringFlavor::Declaration` can now be used for destructuring
parameter declarations.
Scope.cpp:
The function scope now always acts as a variable scope, even when parameter
expression are present, so we need to set the `QUALIFIED_VAROBJ` flag
unconditionally.
Differential Revision: https://phabricator.services.mozilla.com/D60500
--HG--
extra : moz-landing-system : lando