Commit Graph

74816 Commits

Author SHA1 Message Date
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
Narcis Beleuzu
d551a31fb6 Backed out changeset 18f02f6b7243 (bug 1609889) for SM bustages on ion-inlinedcall-resumepoint.js. CLOSED TREE 2020-01-27 17:17:48 +02:00
Andy Wingo
1fd00f79c5 Bug 1609887 - Prevent instruction reordering between wasm call and result r=lth
Differential Revision: https://phabricator.services.mozilla.com/D60240

--HG--
extra : moz-landing-system : lando
2020-01-27 13:44:00 +00:00
Andy Wingo
84b61de05c 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-27 13:43:17 +00:00
Jon Coppeard
6b1a075865 Bug 1610412 - Fix FinalizationGroup test that assumed the browser wouldn't trigger a GC during the test r=mccr8
Depends on D60866

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

--HG--
extra : moz-landing-system : lando
2020-01-24 20:53:43 +00:00
Ryan Hunt
fb42ac6003 Bug 1574865 - Wasm: Allow stackmaps that are indexed at an x86 indirect call instruction with any register. r=jseward
Cranelift fails this assertion and it's not clear to me that there is any restriction inside
Cranelift that would limit the set of registers we'd need to check here.

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

--HG--
extra : moz-landing-system : lando
2020-01-26 03:17:07 +00:00
Ryan Hunt
38e117a093 Bug 1574865 - Baldr: Add support for Cranelift stackmaps. r=jseward
This commit adds support for receiving stackmaps from Cranelift
and converting to wasm::Stackmaps. [1] will change the stackmap
representation in Cranelift to be the same as in Spidermonkey.

The stack overflow/interrupt trap handler stackmap is implemented by
sharing code with Ion.

[1] https://github.com/bytecodealliance/cranelift/pull/1317

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

--HG--
extra : moz-landing-system : lando
2020-01-26 03:16:52 +00:00
Ryan Hunt
7b7bd2c93c Bug 1574865 - Baldr: Translate reference type globals using slow OOL barriers. r=jseward
cranelift-wasm cannot express arbitrary control flow inside of
'global.get/set' easily. This makes it difficult to implement the pre/post write
barriers inline like the baseline compiler does.

[1] has a discussion about the ideal solution to problem, which involves a new IR
concept called templates. We will want to use that when it is ready.

In the short-term, this commit implements pre/post write barriers using slow OOL
functions and implements Wasm globals.

[1] https://github.com/bytecodealliance/cranelift/issues/1176

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

--HG--
extra : moz-landing-system : lando
2020-01-26 03:16:42 +00:00
Ryan Hunt
56f916b6eb Bug 1574865 - Baldr: Translate reference types and implement table/ref instruction translation. r=jseward
This commit translates the basic parts of reference types that does not
require any barriers. AnyRef,FuncRef,NullRef are translated to R32/R64. The
existing bulk-memory instructions are extended to operate on multiple tables,
and the new reference type instructions are implemented with instance calls.

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

--HG--
extra : moz-landing-system : lando
2020-01-26 03:16:22 +00:00
Ryan Hunt
f371899b51 Bug 1574865 - Wasm: Change compiler selection to allow Cranelift when reference types is enabled. r=jseward
This commit changes the wasm compiler feature detection bits to report that
cranelift supports reference types.

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

--HG--
extra : moz-landing-system : lando
2020-01-26 03:16:13 +00:00
Ryan Hunt
af432e59ad Bug 1574865 - Wasm: Update encoding of nullref to match proposal. r=lth
This commit updates the encoding of nullref to match the one given in
the reference types proposal.

Spec: https://github.com/WebAssembly/reference-types/pull/66

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

--HG--
extra : moz-landing-system : lando
2020-01-26 04:13:56 +00:00
Andrew McCreight
359a6cd8c2 Bug 1611173 - Remove support for non-nsISupports XPIDL interfaces. r=nika
It used to be that some XPIDL interfaces were allowed to be non-nsISupports,
and were only used to hold a bunch of constants. It appears that we've now
had enough de-COM work happen that there are no longer any, so we can remove
support for this.

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

--HG--
extra : moz-landing-system : lando
2020-01-24 23:13:30 +00:00
Boris Zbarsky
7a190b94ba Bug 1181957. Don't set up an AutoEntryScript if we're not planning to call script in nsXPCWrappedJS::DelegatedQueryInterface. r=mccr8
For builtinclass interfaces, or ones not declared in IDL, we don't call out
into scripted QueryInterface anyway, so we can return earlier, before we ever
set up the AutoEntryScript.

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

--HG--
extra : moz-landing-system : lando
2020-01-25 00:13:56 +00:00
Oana Pop Rus
80b7b4208b Backed out 6 changesets (bug 1574865) for build bustages on a CLOSED TREE
Backed out changeset 5683b58e5a5c (bug 1574865)
Backed out changeset fd4311521f6b (bug 1574865)
Backed out changeset 6524f814a556 (bug 1574865)
Backed out changeset e800ad37740b (bug 1574865)
Backed out changeset c23741f62a09 (bug 1574865)
Backed out changeset f76fa61db00e (bug 1574865)
2020-01-25 01:23:07 +02:00
Ryan Hunt
62e6e75256 Bug 1574865 - Wasm: Allow stackmaps that are indexed at an x86 indirect call instruction with any register. r=jseward
Cranelift fails this assertion and it's not clear to me that there is any restriction inside
Cranelift that would limit the set of registers we'd need to check here.

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

--HG--
extra : moz-landing-system : lando
2020-01-24 23:08:27 +00:00
Ryan Hunt
d5760c1b01 Bug 1574865 - Baldr: Add support for Cranelift stackmaps. r=jseward
This commit adds support for receiving stackmaps from Cranelift
and converting to wasm::Stackmaps. [1] will change the stackmap
representation in Cranelift to be the same as in Spidermonkey.

The stack overflow/interrupt trap handler stackmap is implemented by
sharing code with Ion.

[1] https://github.com/bytecodealliance/cranelift/pull/1317

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

--HG--
extra : moz-landing-system : lando
2020-01-24 23:08:12 +00:00
Ryan Hunt
6bef31aa21 Bug 1574865 - Baldr: Translate reference type globals using slow OOL barriers. r=jseward
cranelift-wasm cannot express arbitrary control flow inside of
'global.get/set' easily. This makes it difficult to implement the pre/post write
barriers inline like the baseline compiler does.

[1] has a discussion about the ideal solution to problem, which involves a new IR
concept called templates. We will want to use that when it is ready.

In the short-term, this commit implements pre/post write barriers using slow OOL
functions and implements Wasm globals.

[1] https://github.com/bytecodealliance/cranelift/issues/1176

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

--HG--
extra : moz-landing-system : lando
2020-01-24 23:07:52 +00:00
Ryan Hunt
c66fc5a031 Bug 1574865 - Baldr: Translate reference types and implement table/ref instruction translation. r=jseward
This commit translates the basic parts of reference types that does not
require any barriers. AnyRef,FuncRef,NullRef are translated to R32/R64. The
existing bulk-memory instructions are extended to operate on multiple tables,
and the new reference type instructions are implemented with instance calls.

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

--HG--
extra : moz-landing-system : lando
2020-01-24 23:07:35 +00:00
Ryan Hunt
7d7bfb5ba7 Bug 1574865 - Wasm: Change compiler selection to allow Cranelift when reference types is enabled. r=jseward
This commit changes the wasm compiler feature detection bits to report that
cranelift supports reference types.

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

--HG--
extra : moz-landing-system : lando
2020-01-24 23:07:15 +00:00
Ryan Hunt
f6a417ece8 Bug 1574865 - Wasm: Update encoding of nullref to match proposal. r=lth
This commit updates the encoding of nullref to match the one given in
the reference types proposal.

Spec: https://github.com/WebAssembly/reference-types/pull/66

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

--HG--
extra : moz-landing-system : lando
2020-01-24 23:09:05 +00:00