Commit Graph

74835 Commits

Author SHA1 Message Date
Arnout Engelen
b5b4960457 Bug 1612667 - use explicit format string in JitSpew calls r=iain
To fix 'format not a string literal and no format arguments' warnings

Differential Revision: https://phabricator.services.mozilla.com/D61393

--HG--
extra : moz-landing-system : lando
2020-02-03 09:54:11 +00:00
Sylvestre Ledru
54e0e101e9 Bug 1514782 - vtune: Disable a warning on thirdparty code r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D61072

--HG--
extra : moz-landing-system : lando
2020-02-01 21:18:10 +00:00
Tom Ritter
222bcecdb2 Bug 1612423 - Pass --no-insert-timestamp to lld when building the MinGW builds r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D61322

--HG--
extra : moz-landing-system : lando
2020-01-31 08:18:56 +00:00
André Bargull
2a09c39350 Bug 1608809 - Part 3: Remove lazy-proto code paths from JSOp::SuperBase implementations. r=jandem
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
2020-01-31 06:12:41 +00:00
André Bargull
405a77966e Bug 1608809 - Part 2: Remove unnecessary rooting in JSOp::InitHomeObject interpreter implementation. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D60678

--HG--
extra : moz-landing-system : lando
2020-01-30 16:37:35 +00:00
André Bargull
fd89cca730 Bug 1608809 - Part 1: Don't throw for non-constructors in JSOp::SuperFun. r=jandem
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
2020-01-30 16:37:02 +00:00
Andrew McCreight
a4cdc71de2 Bug 1612384 - Remove mozJSComponentLoader::CompilationScope(). r=kmag
It is unused.

Differential Revision: https://phabricator.services.mozilla.com/D61314

--HG--
extra : moz-landing-system : lando
2020-01-30 19:35:49 +00:00
André Bargull
407d2d3f91 Bug 1612302: Add nightly-only restriction to "numberingSystem" option tests. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D61295

--HG--
extra : moz-landing-system : lando
2020-01-30 13:23:20 +00:00
André Bargull
ffe63d4342 Bug 1610514 - Part 3: Pass through a boolean flag to detect style=unit number formatters. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D60969

--HG--
extra : moz-landing-system : lando
2020-01-30 09:47:48 +00:00
André Bargull
16f000f4f4 Bug 1610514 - Part 2: Move GetFieldTypeForNumberField out of NumberFormatFields::append. r=jwalden
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
2020-01-30 08:31:35 +00:00
André Bargull
f559a89a1e Bug 1610514 - Part 1: Create a separate FormattedRelativeTimeToParts function. r=jwalden
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
2020-01-30 08:31:23 +00:00
André Bargull
f071c7231c Bug 1611777 - Part 16: Pass through ValueUsage in optional chains. r=yulia
This allows us to emit `JSOp::CallIgnoresRv` in optional chains.

Differential Revision: https://phabricator.services.mozilla.com/D61163

--HG--
extra : moz-landing-system : lando
2020-01-30 08:21:44 +00:00
André Bargull
cfebe40891 Bug 1611777 - Part 15: Support FunCall/FunApply optimisations for optional chaining. r=yulia
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
2020-01-29 16:31:20 +00:00
André Bargull
98b5331ebd 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.

Differential Revision: https://phabricator.services.mozilla.com/D61161

--HG--
extra : moz-landing-system : lando
2020-01-29 16:30:36 +00:00
André Bargull
2dfa51408f Bug 1611777 - Part 13: Remove unused default arguments from parser methods. r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D61160

--HG--
extra : moz-landing-system : lando
2020-01-29 16:30:01 +00:00
André Bargull
28e80790f9 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".

Differential Revision: https://phabricator.services.mozilla.com/D61159

--HG--
extra : moz-landing-system : lando
2020-01-29 16:29:22 +00:00
André Bargull
93ba9d4967 Bug 1611777 - Part 11: Support optional chaining in class heritage expression. r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D61158

--HG--
extra : moz-landing-system : lando
2020-01-29 16:29:15 +00:00
André Bargull
7222fc1690 Bug 1611777 - Part 10: Remove unnecessary "allowCallSyntax" parameter from Parser::optionalExpr. r=yulia
All callers pass allowCallSyntax=true, so we can omit this parameter.

Differential Revision: https://phabricator.services.mozilla.com/D61157

--HG--
extra : moz-landing-system : lando
2020-01-29 16:28:05 +00:00
André Bargull
2f422198df Bug 1611777 - Part 9: Replace an if-statement with an assertion. r=yulia
`nextMember` is never nullptr, so we don't need to test for it.

Differential Revision: https://phabricator.services.mozilla.com/D61156

--HG--
extra : moz-landing-system : lando
2020-01-29 16:27:22 +00:00
André Bargull
e2cbc96373 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.

Differential Revision: https://phabricator.services.mozilla.com/D61155

--HG--
extra : moz-landing-system : lando
2020-01-29 16:26:44 +00:00
André Bargull
8ca239b387 Bug 1611777 - Part 7: Add missing entries to list of valid optional chain start expressions. r=yulia
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
2020-01-29 16:26:06 +00:00
André Bargull
eb65f2c1d7 Bug 1611777 - Part 6: Crash for unexpected super-base in optional call. r=yulia
`super?.()` isn't valid code, so we don't need to handle this case.

Differential Revision: https://phabricator.services.mozilla.com/D61153

--HG--
extra : moz-landing-system : lando
2020-01-29 16:25:23 +00:00
André Bargull
1444e39609 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.

Drive-by: Reindent some stack comments.

Differential Revision: https://phabricator.services.mozilla.com/D61152

--HG--
extra : moz-landing-system : lando
2020-01-29 16:24:50 +00:00
André Bargull
15e84c1e7a Bug 1611777 - Part 4: super can't occur on the left-hand side of an optional chain. r=yulia
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
2020-01-29 16:24:12 +00:00
André Bargull
f06ccdae60 Bug 1611777 - Part 3: Change emitOptionalCalleeAndThis() parameter to use CallNode. r=yulia
That way we don't need the explicit cast.

Differential Revision: https://phabricator.services.mozilla.com/D61148

--HG--
extra : moz-landing-system : lando
2020-01-29 16:23:29 +00:00
André Bargull
d386e1b6f5 Bug 1611777 - Part 2: Merge same blocks in emitDeleteOptionalChain(). r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D61147

--HG--
extra : moz-landing-system : lando
2020-01-29 16:23:21 +00:00
André Bargull
61477481c9 Bug 1611777 - Part 1: Report syntax error for optional property access in self-hosting code. r=yulia
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
2020-01-29 16:22:09 +00:00
André Bargull
76620e1e52 Bug 1610513: Add numberingSystem option support to Intl.RelativeTimeFormat. r=jwalden
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
2020-01-29 13:07:34 +00:00
Matthew Gaudet
8901d4de27 Bug 1594851 - Run clang-plugin on SM(p) builds on linux r=sfink
Also changes SM(p) to use Clang.

Differential Revision: https://phabricator.services.mozilla.com/D60897

--HG--
extra : moz-landing-system : lando
2020-01-29 10:22:16 +00:00
Tom Tung
6db05b23ac Bug 1599496 - Turn javascript.options.shared_memory on by default on early Beta; r=bzbarsky
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
2020-01-28 14:53:08 +00:00
Nicolò Ribaudo
77b4543956 Bug 1607050 - Parse await as an identifier in fields initializers r=anba
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
2020-01-29 07:33:39 +00:00
Csoregi Natalia
fa1de91185 Backed out changeset 8984a7d5601f (bug 1594851) for spidermonkey bustage. CLOSED TREE 2020-01-29 07:56:24 +02:00
Matthew Gaudet
73acd23b46 Bug 1594851 - Run clang-plugin on SM(p) builds on linux r=sfink
Also changes SM(p) to use Clang.

Differential Revision: https://phabricator.services.mozilla.com/D60897

--HG--
extra : moz-landing-system : lando
2020-01-29 05:25:26 +00:00
Daniel Varga
2b03cc0b92 Backed out changeset 648a8170fec2 (bug 1609889) for causing spiderMonkey buil failure at src/jit-test/tests/wasm/gc/stackmaps3.js
CLOSED TREE
2020-01-28 18:04:51 +02:00
Andy Wingo
166237770a Bug 1609889 - Separate wasm return values from calls in inlined Ion-to-Wasm calls r=lth
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
2020-01-28 13:03:05 +00:00
Jeff Walden
d81c71eeaf Bug 1596706. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D59963

--HG--
extra : moz-landing-system : lando
2020-01-24 12:04:14 +00:00
Jon Coppeard
785ce013ee Bug 1609956 - Discourage atoms zone collection during page load r=sfink,smaug
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
2020-01-28 13:06:40 +00:00
André Bargull
5417502206 Bug 1608808 - Part 12: Automatically generate shell-option string for WeakRef tests. r=jonco
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
2020-01-28 12:46:56 +00:00
André Bargull
87894eee0c Bug 1608808 - Part 11: Update test262 exclusion lists. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D60511

--HG--
extra : moz-landing-system : lando
2020-01-28 09:10:03 +00:00
André Bargull
75cba2a46c Bug 1608808 - Part 10: Update test262. r=jwalden
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
2020-01-28 09:09:24 +00:00
André Bargull
ea82b69fbb Bug 1608808 - Part 9: Update existing jit-tests. r=jwalden
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
2020-01-28 09:03:03 +00:00
André Bargull
41f6f7a9bb Bug 1608808 - Part 8: Disallow redeclaring "arguments" in function parameter expressions. r=jwalden
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
2020-01-28 09:02:30 +00:00
André Bargull
1d0675c3a6 Bug 1608808 - Part 7: Update comments for for-of redeclaration checks. r=jwalden
Drive-by fix, spotted while checking this code.

Differential Revision: https://phabricator.services.mozilla.com/D60507

--HG--
extra : moz-landing-system : lando
2020-01-28 09:01:52 +00:00
André Bargull
89ab2ac253 Bug 1608808 - Part 6: Remove hasDirectEvalInParameterExpr flag. r=jwalden
This flag is no longer used after part 2 and part 4.

Differential Revision: https://phabricator.services.mozilla.com/D60506

--HG--
extra : moz-landing-system : lando
2020-01-28 09:01:19 +00:00
André Bargull
9eb6c65207 Bug 1608808 - Part 5: Remove no longer used parameter to FunctionScopeEnvShapeFlags. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D60504

--HG--
extra : moz-landing-system : lando
2020-01-28 09:01:17 +00:00
André Bargull
4d18d3c1b4 Bug 1608808 - Part 4: Remove DestructuringFlavor::FormalParameterInVarScope. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D60503

--HG--
extra : moz-landing-system : lando
2020-01-28 09:00:04 +00:00
André Bargull
1b6c79fad9 Bug 1608808 - Part 3: Remove ScopeKind::ParameterExpressionVar. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D60502

--HG--
extra : moz-landing-system : lando
2020-01-28 08:59:26 +00:00
André Bargull
d710c95dbf Bug 1608808 - Part 2: Remove now unused {enter,leaves}ParameterExpressionVar methods. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D60501

--HG--
extra : moz-landing-system : lando
2020-01-28 08:58:29 +00:00
André Bargull
2d6e612cc4 Bug 1608808 - Part 1: Stop emitting the parameter expression var scope. r=jwalden
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
2020-01-28 08:57:51 +00:00
yulia
82bf31e33a Bug 1611686 - update optional chain test to accept more forms of the same error message r=arai
Differential Revision: https://phabricator.services.mozilla.com/D61102

--HG--
extra : moz-landing-system : lando
2020-01-27 14:35:26 +00:00