Commit Graph

68536 Commits

Author SHA1 Message Date
shindli
64b3a44ed2 Backed out 3 changesets (bug 1512428, bug 1513040) for causing raptor tp6-5 perma failures on Windows 7 opt/pgo
Backed out changeset bab13130b3f0 (bug 1513040)
Backed out changeset e69ec9477ef8 (bug 1513040)
Backed out changeset 5278b8d5dfe9 (bug 1512428)
2018-12-18 16:13:12 +02:00
Ted Campbell
457ff26c77 Bug 1502744 - Profiler should allow unsynced baseline addresses. r=jandem
The assert was overzealous and should just be removed. Other return
addresses reported by iterator are just sampled by stack and don't
indicate if stack is synced or not.

Also, fix up an out-of-date comment here.

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

--HG--
extra : moz-landing-system : lando
2018-12-18 11:10:08 +00:00
shindli
3841c4f8cd Backed out 3 changesets (bug 1512655) for bustages in s/xpconnect/src/XPCComponents.cpp:2001 CLOSED TREE
Backed out changeset 2593c7d67f51 (bug 1512655)
Backed out changeset da21d7e91e19 (bug 1512655)
Backed out changeset ccb15a086148 (bug 1512655)
2018-12-18 14:55:53 +02:00
Jan de Mooij
76238bc575 Bug 1512655 part 3 - Fix assertion in Cu.permitCPOWsInScope and ensure test globals that use it are in a separate compartment. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D14780

--HG--
extra : moz-landing-system : lando
2018-12-18 00:31:08 +00:00
Jan de Mooij
a2a91d4831 Bug 1512655 part 2 - Assert Cu.setWantXrays is never called on system-principal scopes. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D14695

--HG--
extra : moz-landing-system : lando
2018-12-17 20:38:59 +00:00
Jan de Mooij
111454f4a4 Bug 1512655 part 1 - Move forcePermissiveCOWs from CompartmentPrivate to RealmPrivate. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D14694

--HG--
extra : moz-landing-system : lando
2018-12-17 20:38:11 +00:00
André Bargull
e51fda07c7 Bug 1514587: Add missing cast for typed enum comparison. r=jorendorff 2018-12-17 05:56:49 -08:00
André Bargull
3c90d031f7 Bug 1514212: Global var-declarations are only configurable on nightly. r=jorendorff 2018-12-17 11:09:17 -08:00
Ms2ger
1052d6ee13 Bug 1515013 - Add a run_info field to the jstests wptreport output; r=jgraham 2018-12-18 13:49:16 +01:00
Tom Schuster
2a142f371b Bug 1462741 - Enable test262 test. r=me 2018-12-18 13:16:54 +01:00
Jon Coppeard
c1891f84d7 Bug 1514520 - Gray unmarking shouldn't check whether barriers are enable as it can be called from within the GC r=sfink 2018-12-18 07:14:56 +00:00
Jon Coppeard
bf16d881ed Bug 1514704 - Attribute initial gray marking time to correct stats phase r=sfink 2018-12-18 07:13:59 +00:00
Kris Maglione
3e8d266e8a Bug 1513366: Part 1 - Add do_ImportModule helper for importing JS modules. r=mccr8
This helper makes it considerably easier for C++ code to import a JS module
and wrap it in an appropriately-defined XPIDL interface for its exports.
Typical usage is something like:

Foo.jsm:

  var EXPORTED_SYMBOLS = ["foo"];

  function foo(bar) {
    return bar.toString();
  }

mozIFoo.idl:

  interface mozIFoo : nsISupports {
    AString foo(double meh);
  }

Thing.cpp:

  nsCOMPtr<mozIFoo> foo = do_ImportModule(
    "resource://meh/Foo.jsm");

  MOZ_TRY(foo->Foo(42));

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

--HG--
extra : rebase_source : 4d518205b173fc210908235b42ddace590e6b7e5
2018-12-11 13:28:20 -08:00
arthur.iakab
f1762a3667 Merge mozilla-central to mozilla-inbound 2018-12-18 07:36:08 +02:00
Mike Hommey
6d3046658e Bug 1513798 - Move --with-macos-{sdk,private-frameworks} to python configure. r=nalexander
Because we now set the sysroot include flags early in python configure,
we don't need to set CPP/CXXCPP. We also skip the explicit compiler test
because more complete tests follow anyways.

Differential Revision: https://phabricator.services.mozilla.com/D14380
2018-12-18 10:50:12 +09:00
Mike Hommey
8c199b7a84 Bug 1513798 - Revert bug 638149 and leave it to configure to set -dead_strip. r=nalexander
We're always setting -dead_strip on mac builds, per
cross-mozconfig.common, we might as well not do that and revert bug
638149, which disabled adding -dead_strip with LTO: that is apparently
not a problem anymore.

Differential Revision: https://phabricator.services.mozilla.com/D14373
2018-12-18 10:50:06 +09:00
Jim Blandy
689eea27da Bug 1510768: Move SpiderMonkey promise interface into its own header. r=arai
Move js/src/jsapi.h declarations related to promises and job queues into their
own public header file, js/public/Promise.h. Change the compilation units that
need these declarations to #include the new header.

There should be no changes to the actual functionality here, simply moving the
code to a new file, and removing the "JS" prefix from some typedefs which are
now in the JS namespace.

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

--HG--
extra : moz-landing-system : lando
2018-12-17 23:21:04 +00:00
Paul Bone
f2b9ad36c4 Bug 1507377 - Set pretenuring from an environment variable r=jonco
--HG--
extra : rebase_source : 8106dd065be57526e69cd5853ff791d19b14a143
2018-12-13 14:07:08 +11:00
Paul Bone
6299b00e1f Bug 1507377 - Add tunables for pretenure thresholds r=jonco
--HG--
extra : rebase_source : 68ce83adde9f0387de89ce09eea167f37ee5820d
2018-12-14 11:25:10 +11:00
Paul Bone
0b52451f58 Bug 1507377 - Add a Nursery::tunables() function r=jonco
This function helps the nursery find the GCSchedulingTunables structure.

--HG--
extra : rebase_source : ca25387311736f6cf149bad26376db00e14cdfba
2018-12-14 11:19:58 +11:00
khyperia
459b5b3ae0 Bug 1513040 - Change FOR_EACH_PARSE_NODE_KIND to use type instead of arity. r=jorendorff
Depends on D14321

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

--HG--
extra : moz-landing-system : lando
2018-12-17 17:05:42 +00:00
khyperia
d2784c93ca Bug 1513040 - Rename ParseNodeKinds to end with Stmt or Expr. r=jorendorff
Depends on D13991

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

--HG--
extra : moz-landing-system : lando
2018-12-17 20:00:00 +00:00
khyperia
99e241ea60 Bug 1512428 - Create a ParseNodeVisitor and use it for constant folding. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D13991

--HG--
extra : moz-landing-system : lando
2018-12-17 17:05:38 +00:00
Tom Schuster
be525ca8b0 Bug 1462741 - Update tests. r=jorendorff
Depends on D14704

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

--HG--
extra : moz-landing-system : lando
2018-12-17 18:40:13 +00:00
Tom Schuster
008b4aef30 Bug 1462741 - Make Function.prototype a native function. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D14704

--HG--
extra : moz-landing-system : lando
2018-12-17 19:49:23 +00:00
Jim Blandy
2bb93ce5ff Bug 1482082: Delete JSObject::deprecatedGlobal, since it is unused. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D14691

--HG--
extra : moz-landing-system : lando
2018-12-17 18:39:23 +00:00
Jim Blandy
a9a44998b1 Bug 1482215: Make Debugger visibility per-Compartment, and ensure realms match their compartments. r=jorendorff
Debugger invisibility is only practical to enforce on compartment boundaries,
and for its proper uses, that's good enough. Unfortunately, at present, debugger
invisibility is a flag on realms. This misfit is the reason for the sole
remaining code that assumes that every object is associated with a particular
realm: Debugger.Object.prototype.unwrap consults the unwrapped object's global
to see whether it is about to reveal an object that it must not. We would like
to remove this code.

This patch:

- adds an `invisibleToDebugger` flag to JS::Compartment, and sets it from the
  Realm options (since there is no API for creating compartments directly; only
  the act of creating a Realm can create a compartment to hold it);

- changes Debugger.Object.prototype.unwrap to check the compartment's flag, thus
  removing the final use of JSObject::deprecatedRealm;

- asserts that new realms added to a compartment have a compatible visibility; and

- changes the shell primitive for creating realms to throw an error in case of
  incompatible requested visibilities, rather than crashing.

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

--HG--
extra : moz-landing-system : lando
2018-12-17 18:37:29 +00:00
Noemi Erli
c03f25ec80 Backed out changeset 4700e46a32dd (bug 1514212) for reftest failures in block-scoped-functions-annex-b-with.js CLOSED TREE 2018-12-17 20:26:40 +02:00
André Bargull
6d7530556c Bug 1514212: Global var-declarations are only configurable on nightly. r=jorendorff 2018-12-14 06:35:03 -08:00
Julian Seward
1c2b472ac1 Bug 1508550 - StackMapGenerator::createStackMap: don't clone the MachineStackTracker. r=lth.
Currently createStackMap makes a temporary clone of StackMapGenerator::mst_ on
every call.  This will cause a heap allocation and free in the case where
mst_'s vector size exceeds its inline capacity (64 booleans).  This patch
removes the cloning and instead adds a second MachineStackTracker,
augmentedMst_, to StackMapGenerator, which is used as the temporary inside
createStackMap.  The expectation is that augmentedMst_'s vector will grow in
capacity monotonically during the lifetime of the StackMapGenerator, that is,
over multiple calls to createStackMap.  This should significantly cut down on
heap (re)allocation caused by createStackMap.

--HG--
extra : rebase_source : 3a682e88571c1452f15efe711be3e403f64e0a8f
2018-12-17 08:08:13 +01:00
Gurzau Raul
2887ed4c57 Backed out changeset d3058a4b2450 (bug 1498775) for failing at promise-rejection-tracking-optimized.js on a CLOSED TREE 2018-12-17 10:05:34 +02:00
Tooru Fujisawa
7b06c0abbf Bug 1498775 - Report unhandled rejection for optimized away promise. r=jorendorff 2018-12-17 16:02:31 +09:00
Jan de Mooij
a87026ec12 Bug 1512029 part 2 - Some CompartmentPrivate changes for same-compartment realms. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D14253

--HG--
extra : moz-landing-system : lando
2018-12-16 14:59:50 +00:00
Jan de Mooij
cccc414b7a Bug 1512029 part 1 - Stop calling JS_GetCompartmentPrincipals for system compartments. r=bzbarsky
Because it release-asserts the compartment has a single realm.

I also renamed JS_GetCompartmentPrincipals to JS_DeprecatedGetCompartmentPrincipals
to discourage people from using it.

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

--HG--
extra : moz-landing-system : lando
2018-12-16 14:59:46 +00:00
Jan de Mooij
685b6f3a62 Bug 1514263 - Enter the object's realm in UnboxedPlainObject::convertToNative. r=bhackett
We were failing the realm assert in UnboxedLayout::makeNativeGroup in the browser.
It's possible the assert is overzealous and we don't need the AutoRealm, but this
makes it much easier to reason about the code.

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

--HG--
extra : moz-landing-system : lando
2018-12-16 14:14:41 +00:00
Jan de Mooij
100a324c5b Bug 1512509 - Clone ScriptSourceObject when cloning scripts. r=tcampbell
This fixes bug 1406437. It also simplifies JSScript because it now always stores
a ScriptSourceObject directly instead of a CCW for one.

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

--HG--
extra : moz-landing-system : lando
2018-12-16 11:43:44 +00:00
Csoregi Natalia
1a4a7745fd Merge inbound to mozilla-central. a=merge 2018-12-16 11:50:49 +02:00
Boris Zbarsky
771d1e342c Bug 1514261. Skip messing around with compartments in FunctionForwarder if the forwarder is already same-compartment with the underlying callee. r=bholley 2018-12-16 00:13:53 -05:00
championshuttler
c0174a2ae5 Bug 1466155 - Remove unused labels in CacheIRCompiler::emitGuardIsInt32. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D14688

--HG--
extra : moz-landing-system : lando
2018-12-16 01:42:25 +00:00
Bogdan Tara
f49ad79fde Backed out changeset b6d7250b9df3 (bug 1514346) for sm fuzzing build bustage CLOSED TREE 2018-12-15 18:53:26 +02:00
Steve Fink
a1308a03aa Bug 1514346 - Add --enable-gczeal to fuzzing builds, r=decoder
--HG--
extra : rebase_source : ab44f719e586a6e9d9484f3583dd5eb5447dafd6
2018-12-14 11:47:30 -08:00
Cosmin Sabou
b30ca1fd33 Merge mozilla-inbound to mozilla-central. a=merge 2018-12-15 04:47:12 +02:00
Ciure Andrei
814adb5c46 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-12-15 00:03:24 +02:00
Mike Hommey
7864034d32 Bug 1514209 - Enable the crashreporter code on Windows arm64 builds. r=froydnj
But keep the crashreporter disabled at runtime because it doesn't work
yet.

This has the side effect of creating the artifacts with the
crashreporter symbols and pdbs.

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

--HG--
extra : moz-landing-system : lando
2018-12-14 14:50:30 +00:00
Jason Orendorff
5cb836b0d9 Bug 1513266 - Part 2: Fix OOM crash in ReadableStream. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D14168

--HG--
extra : moz-landing-system : lando
2018-12-14 18:16:59 +00:00
Jason Orendorff
251efa7d15 Bug 1513266 - Part 1: Trivial fixes for oomTest. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D14167

--HG--
extra : moz-landing-system : lando
2018-12-14 18:16:24 +00:00
Jason Orendorff
b50541ce32 Bug 1513570 - Part 4: Back out the jit-tests added in bug 1503012. r=Ms2ger
Differential Revision: https://phabricator.services.mozilla.com/D14317

--HG--
extra : moz-landing-system : lando
2018-12-14 18:15:56 +00:00
Jason Orendorff
b35f3468a1 Bug 1513570 - Part 3: setTimeout polyfill for running web-platform tests in the shell. r=Ms2ger
Differential Revision: https://phabricator.services.mozilla.com/D14316

--HG--
extra : moz-landing-system : lando
2018-12-14 18:15:28 +00:00
Sylvestre Ledru
7cf43b9bc0 Bug 1513205 - Ride along, update some code to match the Google coding style r=Ehsan
# ignore-this-changeset

Depends on D14595

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

--HG--
extra : moz-landing-system : lando
2018-12-14 18:10:08 +00:00
Razvan Maries
a4361b904b Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-12-14 18:32:07 +02:00
Razvan Maries
87aca70b7f Merge mozilla-inbound to mozilla-central a=merge 2018-12-14 18:22:09 +02:00
Jan de Mooij
5a4109cbb9 Bug 1469082 - Always allocate CCWs in the compartment's first realm. r=jonco
CCWs are not really associated with a single realm and we assert code doesn't
enter/request the realm or global of a CCW. However they currently still have an
ObjectGroup that's associated with a single realm. Using the same realm avoids
some potential memory usage issues.

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

--HG--
extra : moz-landing-system : lando
2018-12-14 11:00:48 +00:00
Christian Holler
da1b6f795d Bug 1511599 - Allow the JS shell to dump core when run as suid/sgid in fuzzing. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D14239

--HG--
extra : moz-landing-system : lando
2018-12-14 13:46:33 +00:00
André Bargull
dcf701b66b Bug 1435829 - Part 6: Enable test262 tests for String.matchAll. r=jorendorff 2018-12-13 08:18:54 -08:00
André Bargull
03b1b37a9f Bug 1435829 - Part 5: Update xray tests for RegExp.prototype. r=peterv 2018-12-13 08:18:45 -08:00
André Bargull
d2c7438664 Bug 1435829 - Part 4: Tests for String.prototype.matchAll. r=jorendorff 2018-12-13 08:18:36 -08:00
André Bargull
1d05ecdf51 Bug 1435829 - Part 3: Add fast path to share input RegExp object. r=jorendorff 2018-12-13 08:18:27 -08:00
André Bargull
5a2bb3bb25 Bug 1435829 - Part 2: Add inline support for RegExp-String-Iterator. r=jorendorff 2018-12-13 08:18:09 -08:00
André Bargull
564dc6c495 Bug 1435829 - Part 1: Implement String.prototype.matchAll proposal. r=jorendorff 2018-12-13 08:04:00 -08:00
Jon Coppeard
5ecc7e89e4 Bug 1513842 - Fix spelling mistake in GCRuntime::markUntilBudgetExhaused r=sfink 2018-12-14 10:57:30 +00:00
Tom Ritter
c014980a9a Bug 1485016 - Enable CFG for Windows builds. r=froydnj 2018-12-07 10:54:41 -06:00
Jon Coppeard
038eae013b Bug 1513991 - Fix weak map marking checker when accessing atoms from worker runtimes r=sfink 2018-12-19 13:18:15 +00:00
Dorel Luca
176695a3b3 Backed out changeset 7e548edaf318 (bug 1485016) for build bustage 2018-12-19 10:39:10 +02:00
Tom Ritter
e7f646df03 Bug 1485016 - Enable CFG for Windows builds r=froydnj 2018-12-07 10:54:41 -06:00
André Bargull
97775e2d17 Bug 1513661 - Part 3: Update test262 exclusions. r=jorendorff 2018-12-12 11:34:56 -08:00
André Bargull
d0c5b77fff Bug 1513661 - Part 2: Update test262 - Dec 12 2018 edition. r=jorendorff 2018-12-12 11:36:00 -08:00
André Bargull
d16ddd04ec Bug 1513661 - Part 1: Update test262 importer to handle new feature flags. r=jorendorff 2018-12-12 11:36:41 -08:00
André Bargull
6c89dc30b2 Bug 1512989 - Part 2: Fix browser jstests failures. r=jorendorff
--HG--
rename : js/src/tests/ecma_6/Date/parse-from-tostring-methods.js => js/src/tests/non262/Date/parse-from-tostring-methods.js
2018-12-13 04:10:06 -08:00
Jon Coppeard
04b5512ebb Bug 1513465 - Fix bug in weak map checking where values are atoms and we aren't collecting the atoms zone r=sfink 2018-12-13 10:38:59 +00:00
Cameron Kaiser
fd32b3a6fa Bug 1512162: Disable stack protection for a portion of XPConnect on ppc64le due to a compiler bug. r=bholley 2018-12-12 18:52:08 -08:00
Cosmin Sabou
9835fdf72c Merge mozilla-inbound to mozilla-central. a=merge 2018-12-13 05:56:48 +02:00
Jim Blandy
fe0bd15edb Bug 1509420: Handle CCWs of functions properly in bindToAsyncStack shell function. r=jorendorff
In js.cpp, BindToAsyncStack used JSObject::isCallable to check the type of its
argument, and then BoundToAsyncStack (the native for the function returned)
assumed that it could call JSObject::as<JSFunction> on that value.

However, there are many things that are isCallable but not is<JSFunction>, two
examples being CCWs and function proxies.

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

--HG--
extra : moz-landing-system : lando
2018-12-12 23:58:03 +00:00
Noemi Erli
e4cf4cb51a Backed out 2 changesets (bug 1512989) for jsreftests failures
Backed out changeset 4c79e8192f9f (bug 1512989)
Backed out changeset 59a6d8169f80 (bug 1512989)

--HG--
rename : js/src/tests/non262/Date/parse-from-tostring-methods.js => js/src/tests/ecma_6/Date/parse-from-tostring-methods.js
2018-12-12 23:54:45 +02:00
André Bargull
c5507cac27 Bug 1512989 - Part 2: Fix browser jstests failures. r=jorendorff
--HG--
rename : js/src/tests/ecma_6/Date/parse-from-tostring-methods.js => js/src/tests/non262/Date/parse-from-tostring-methods.js
2018-12-12 08:45:47 -08:00
Jan de Mooij
eee34e39b3 Bug 1513277 part 2 - Use the scripted caller's global in mozJSComponentLoader::FindTargetObject. r=kmag
We have a few places where C++ calls ChromeUtils::Import directly.
I fixed these to pass the target object directly instead of an empty Optional<>.

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

--HG--
extra : moz-landing-system : lando
2018-12-12 21:30:04 +00:00
Jan de Mooij
0326f72625 Bug 1513277 part 1 - Use the scripted caller's global in Cu.importGlobalProperties. r=kmag
With same-compartment-realms enabled we can call a cross-realm Cu.importGlobalProperties
and we ended up defining properties on the wrong global.

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

--HG--
extra : moz-landing-system : lando
2018-12-12 21:03:18 +00:00
Cosmin Sabou
2c6cd998ef Merge mozilla-central to autoland. 2018-12-13 00:01:46 +02:00
Jan de Mooij
ad8a2a6f1e Bug 1512396 - Stop using exclusive expandos for xrays in system-principal sandboxes. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D14250

--HG--
extra : moz-landing-system : lando
2018-12-12 20:16:56 +00:00
Razvan Maries
ab8798913b Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-12-12 18:37:45 +02:00
Razvan Maries
cef33be47c Merge mozilla-inbound to mozilla-central a=merge 2018-12-12 18:32:14 +02:00
Margareta Eliza Balazs
502c1c64cb Backout 2c48655b33ca (Bug 1510607) for causing regression in Bug 1513471, requested by allstars.chh 2018-12-12 18:24:47 +02:00
Jan de Mooij
b8a316aca4 Bug 1512260 - Make wrapper nuking work with a target realm instead of target compartment. r=kmag
For *incoming* wrappers this preserves behavior. We nuke *outgoing* wrappers
when all realms in the compartment have been nuked. To implement this I moved
the wasNuked flag from XPConnect to JS::Compartment as nukedOutgoingWrappers and
to JS::Realm as nukedIncomingWrappers.

The code to create a dead wrapper in the nuked compartment/realm case was also
moved into the JS engine. I added a shell test for it.

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

--HG--
extra : moz-landing-system : lando
2018-12-12 08:02:30 +00:00
Ciure Andrei
12adcc1edd Backed out changeset a8dd01db9f92 (bug 1512260) requsted by owner (missing test) CLOSED TREE 2018-12-12 09:14:53 +02:00
Jan de Mooij
89da963b10 Bug 1512260 - Make wrapper nuking work with a target realm instead of target compartment. r=kmag
For *incoming* wrappers this preserves behavior. We nuke *outgoing* wrappers
when all realms in the compartment have been nuked. To implement this I moved
the wasNuked flag from XPConnect to JS::Compartment as nukedOutgoingWrappers and
to JS::Realm as nukedIncomingWrappers.

The code to create a dead wrapper in the nuked compartment/realm case was also
moved into the JS engine. I added a shell test for it.

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

--HG--
extra : moz-landing-system : lando
2018-12-12 06:39:38 +00:00
Coroiu Cristina
3160ddc1f0 Merge inbound to mozilla-central a=merge 2018-12-12 07:12:07 +02:00
Ted Campbell
8076a065aa Bug 1513433 - Fix gc/Verifier.cpp in opt gczeal configuration. r=sfink 2018-12-11 21:26:11 -05:00
Coroiu Cristina
add0a6f476 Merge mozilla-central to autoland a=merge on a CLOSED TREE 2018-12-11 23:59:59 +02:00
André Bargull
90e657e176 Bug 1506524: Handle LambdaArrow in MFunctionEnvironment::foldsTo. r=nbp 2018-12-05 03:15:51 -08:00
Jeff Walden
da31bae9c2 Bug 1492937 - Make mozIJSSubScriptLoader.loadSubScriptWithOptions interpret script data only as UTF-8, without any way to use another charset. r=kmag
--HG--
extra : rebase_source : ffcc1599cf68c007f875c99f20660961a447e966
2018-12-08 18:14:27 -05:00
Jeff Walden
e5132ffa4b Bug 1492932 - Load JS components and modules as UTF-8, not as Latin-1. r=kmag
--HG--
extra : rebase_source : d09627655e9c72e674356e996f936ec65a80b6f0
2018-12-04 17:01:06 -05:00
Jeff Walden
4ad73b310e Bug 1512036 - Turn off clang formatting when defining JIT_COMPILER_OPTIONS, because the Google-approved autoformatting is outright barbarous. r=jandem
--HG--
extra : rebase_source : 8080149fdf464d259428464990245e471b50de3f
2018-12-04 14:35:46 -05:00
Jon Coppeard
bab2b35542 Bug 1510145 - Refactor GC resets and ensure the store buffer is always empty when we start sweeping r=pbone a=dveditz 2018-12-03 17:17:34 -05:00
James Graham
8b93408a2f Bug 1511399 - Fixup readable-stream jit tests for upstream changes, r=Ms2ger
Differential Revision: https://phabricator.services.mozilla.com/D14144
2018-12-11 15:50:09 +00:00
Sean Stangl
54ecbf0fbe Bug 1511447 - Fix truncated division on ARM64. r=nbp 2018-11-30 11:10:00 +02:00
Boris Zbarsky
f259a2c4c7 Bug 1513213. Include the header we need for SprintfLiteral. r=nbp 2018-12-13 16:58:14 -05:00
Mike Hommey
ab48d17e1a Bug 1513134 - Detect unnecessary --help dependencies. r=firefox-build-system-reviewers,gps
Depends on D14125

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

--HG--
extra : moz-landing-system : lando
2018-12-11 19:34:28 +00:00
Narcis Beleuzu
208387527a Merge mozilla-central to inbound. a=merge 2018-12-11 07:26:37 +02:00
Jason Orendorff
4499193a01 Backed out 2 changesets (bug 1488417, bug 1259822) for web compat issues.
Backed out changeset b58b7cd29a0b (bug 1488417)
Backed out changeset f0c6e521429c (bug 1259822)

--HG--
extra : rebase_source : 8c06ed65ee33eddad7131694beb9740abeca82cb
2018-12-10 10:47:47 -06:00
Boris Zbarsky
c734e83c48 Bug 1511401 part 4. Use CallArgs::requireAtLeast in the DOM. r=nbp,qdot 2018-12-10 14:13:06 -05:00
Boris Zbarsky
d28b50be98 Bug 1511401 part 3. Inline the fast (no error) path of requireAtLeast. r=nbp
We don't want to pay the cost of a function call here in DOM bindings.
2018-12-10 14:13:05 -05:00
Boris Zbarsky
7f5c7dd8aa Bug 1511401 part 2. Have JSMGS_MORE_ARGS_NEEDED say how many args it actually got. r=nbp 2018-12-10 14:13:05 -05:00
Boris Zbarsky
fee3a8438c Bug 1511401 part 1. Use requireAtLeast more in the JS engine. r=nbp
Looks like these uses might predate requireAtLeast existing.
2018-12-10 14:13:05 -05:00
Brindusan Cristian
989d78f3d0 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-12-11 00:10:08 +02:00
Jon Coppeard
dcd1ca85ca Bug 1509923 - Check weak map marking state in debug builds and when enabled with a zeal mode r=sfink 2018-12-06 16:27:21 -05:00
Jason Orendorff
fec8b068ba Bug 1512008 - Fix assertion failure with ReadableStream and Promise[Symbol.species]. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D13945

--HG--
extra : moz-landing-system : lando
2018-12-09 22:24:22 +00:00
Jason Orendorff
91b7c80aeb Bug 1512050 - Add not-yet-fully-passing web-platform tests about readable streams to jit-test anyway. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D13750

--HG--
extra : moz-landing-system : lando
2018-12-09 18:03:50 +00:00
Jason Orendorff
093fdb512f Bug 1507950 - Allow calling controller.error() when the stream is not readable. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D13748

--HG--
extra : moz-landing-system : lando
2018-12-09 17:59:36 +00:00
Jason Orendorff
3051b62a12 Bug 1507943 - Fix ReadableStream constructor handling of "pull" and "cancel" methods. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D13747

--HG--
extra : moz-landing-system : lando
2018-12-09 17:57:09 +00:00
Jason Orendorff
45c6c35730 Bug 1503012 - Part 2: Shim some web-platform-tests for streams into the jit-tests. r=arai,chmanchester,jimb
This is an egregious hack. The web-platform-tests were not meant to run in the shell.

The eight tests that are included are the ones that we pass with flying colors.
In most of the others, we still have a failure or two.

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

--HG--
rename : dom/imptests/testharness.js => js/src/jit-test/lib/w3c-testharness.js
extra : moz-landing-system : lando
2018-12-09 15:48:33 +00:00
Jan de Mooij
67a457bc60 Bug 1512410 part 2 - Don't create a TypeNewScript for cross-realm constructors, add more asserts. r=luke
Depends on D13903

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

--HG--
extra : moz-landing-system : lando
2018-12-08 18:10:29 +00:00
Jan de Mooij
469c952020 Bug 1512410 part 1 - Add a realm check to the NewObjectCache to fix a bug with same-compartment realms. r=luke
Differential Revision: https://phabricator.services.mozilla.com/D13903

--HG--
extra : moz-landing-system : lando
2018-12-08 18:06:17 +00:00
Jan de Mooij
b9ac626c2a Bug 1512718 - Do a realm check instead of compartment check in mozJSSubScriptLoader::DoLoadSubScriptWithOptions. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D13996

--HG--
extra : moz-landing-system : lando
2018-12-08 16:35:06 +00:00
Dorel Luca
f846fdef21 Backed out 5 changesets (bug 1507950, bug 1503012, bug 1507943, bug 1512050, bug 1512008) for spidermonkey and jit failures
Backed out changeset 71253f35ac3c (bug 1512008)
Backed out changeset f5c4eb412990 (bug 1512050)
Backed out changeset bc83a2fe5c17 (bug 1507950)
Backed out changeset 345ad3e746e8 (bug 1507943)
Backed out changeset b2a0ae5e5115 (bug 1503012)
2018-12-08 00:11:12 +02:00
Jason Orendorff
cffe8c66f4 Bug 1512008 - Fix assertion failure with ReadableStream and Promise[Symbol.species]. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D13945

--HG--
extra : moz-landing-system : lando
2018-12-07 20:04:39 +00:00
Jason Orendorff
8272017a22 Bug 1512050 - Add not-yet-fully-passing web-platform tests about readable streams to jit-test anyway. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D13750

--HG--
extra : moz-landing-system : lando
2018-12-07 20:04:08 +00:00
Jason Orendorff
606ca1b124 Bug 1507950 - Allow calling controller.error() when the stream is not readable. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D13748

--HG--
extra : moz-landing-system : lando
2018-12-07 20:03:46 +00:00
Jason Orendorff
4c4dad7b5a Bug 1507943 - Fix ReadableStream constructor handling of "pull" and "cancel" methods. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D13747

--HG--
extra : moz-landing-system : lando
2018-12-07 20:03:16 +00:00
Jason Orendorff
31a9f32c95 Bug 1503012 - Part 2: Shim some web-platform-tests for streams into the jit-tests. r=arai,chmanchester
This is an egregious hack. The web-platform-tests were not meant to run in the shell.

The eight tests that are included are the ones that we pass with flying colors.
In most of the others, we still have a failure or two.

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

--HG--
rename : dom/imptests/testharness.js => js/src/jit-test/lib/w3c-testharness.js
extra : moz-landing-system : lando
2018-12-07 20:02:53 +00:00
Denis Palmeiro
1fdd1df655 Bug 1503251 - Keep payload values in the dictionary if they are still alive. r=djvj
If the JS::ResetTraceLogger() routine is called, then keep track of existing event payloads and keep their existence alive instead of clearing them.  This data can still be referred to in another profiler session and can therefore cause to dangling pointers if we free them.

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

--HG--
extra : moz-landing-system : lando
2018-12-07 17:42:39 +00:00
Jason Orendorff
20d0366a50 Bug 1493260 - Revise the SMDOC comment in js/src/jit/Bailouts.h. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D13742

--HG--
extra : moz-landing-system : lando
2018-12-07 14:40:20 +00:00
Daniel Varga
6ba153fa56 Merge mozilla-inbound to mozilla-central. a=merge 2018-12-06 23:41:15 +02:00
Yoshi Huang
4495599540 Bug 1510607 - Implement JS::IsCCTraceKind using the JS_FOR_EACH_TRACEKIND data. r=jonco
To use the data inside JS_FOR_EACH_TRACEKIND, so we could have a unified source
of data to decide whether CC should care about this Trackind.
2018-12-06 10:04:03 -05:00
Gian-Carlo Pascutto
ec7b320b38 Bug 1359905 - Enable fstack-protector-strong on js/. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D13570

--HG--
extra : moz-landing-system : lando
2018-12-05 14:33:07 +00:00
Sylvestre Ledru
ad75e912fb Bug 1512961 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2018-12-10 19:23:16 +00:00
hyperion
5dcce00594 Bug 1468749 trackAttached method added for TypeOfIrGenerator in CacheIR.cpp r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D13874

--HG--
extra : moz-landing-system : lando
2018-12-10 19:28:36 +00:00
André Bargull
fa4d94aff4 Bug 1488117: Export* modules can be uninstantiated when ModuleGetExportedNames is called. r=jonco 2018-12-05 03:14:12 -08:00
Tooru Fujisawa
17371adba7 Bug 1511385 - Re-format the stack comment in BytecodeEmitter and helper classes. r=jorendorff 2018-12-05 08:46:48 -05:00
Lars T Hansen
7471c576bb Bug 1510216 - Add WasmAnyRef type to the TypedObject system. r=luke
We add support for the wasm "anyref" type to the TypedObject system,
so that TypedObjects can represent wasm objects faithfully and we can
get proper boxing/unboxing when JS writes and reads these properties.

The new type is a reference type named "WasmAnyRef" / TYPE_WASM_ANYREF
internally, and it also appears as TypedObject.WasmAnyRef in JS.

Accesses to AnyRef fields are not optimized by the JIT at the moment,
but call into intrinsic functions in the wasm subsystem for sundry
predicates and boxing and unboxing.  More can be done here.

Currently the code knows that an anyref in wasm is a possibly-null
JSObject* representing either an Object or a boxed value.  More
complexity will appear when we box more values in the pointer.  There
are "TODO/AnyRef-boxing" comments left in the code to mark places that
must definitely be adapted.

--HG--
extra : rebase_source : a08443ee58d2f4dd5fdc52f998e30c6a4d24be21
2018-11-28 12:47:19 +01:00
Tom Ritter
6b6e5440aa Bug 1512921 - Bump clang to trunk 348970 for Windows builds. r=dmajor
This removes several patches that have been upstreamed.
2018-11-27 14:44:34 -06:00
Lars T Hansen
543a3dd59f Bug 1505768 - Box/unbox non-pointers for anyref as WasmValueBox objects. r=luke
This is stage 0 of the anyref boxing/unboxing work.

At the JS->wasm boundary, when a JS value flows into an anyref, we box
everything that isn't already an Object or null into a WasmValueBox (a
distinguished NativeObject subclass with a null prototype).  At the
wasm->JS boundary, when an anyref value flows out from wasm, we unbox
it back into the proper JS value.  Note that strings and atoms and
other non-Object reference types are also boxed/unboxed this way.

This patch handles boxing and unboxing for function anyref parameters
and anyref returns (on the interpreter-only stubs path, since the JIT
stubs path is not used for reference types at this time), for wasm
globals-of-anyref, and for wasm tables-of-anyref.  We don't have to
handle (ref T) parameters, returns, or globals, since they are not
exported to JS so as not to expose their types.  And there are no
tables of (ref T) type.

The patch does *not* handle boxing/unboxing for values flowing into
and out of anyref struct fields for the prototype GC work.  Doing so
will require work on our TypedObject implementation and can be
deferred to a later patch: the current system will simply fail to box
some JS values that flow into an anyref field or will incorrectly
convert those values to JS Object types; it may also reveal the
WasmValueBox object to JS in some cases when an anyref field is read.
This is annoying but safe.

The many "TODO/AnyRef-boxing" comments and accompanying asserts left
in the code mark places that we have to update when we implement an
optimized boxing, which will use a tagged format to avoid allocation
for small immediate values (integers, booleans, undefined) and
probably strings.  Generally, the TypedObjects code that needs to
change to accomodate boxing/unboxing is not tagged in this way.

--HG--
extra : rebase_source : 66e2a3916a17a8eeba64c5ec30f632aa434c0401
2018-11-20 18:36:27 +01:00
Jeff Walden
0c43d5bf94 Bug 1504947 - Change column-number-computing code so that column numbers can be quickly converted to code *point* counts from the code *unit* counts they are now, simply by changing a single #define. (This gets a bit of patching landed and in the tree, without taking the final step to change observable behavior.) r=tcampbell
--HG--
extra : rebase_source : 8e91df4aae5b567cd93e91c797491761035c0ab1
2018-11-10 23:29:02 -08:00
Jeff Walden
c1c851f24f Bug 1504947 - Implement js::unicode::CountCodePoints(const Unit* begin, const Unit* end) for use in counting code points in a range, generally. r=tcampbell
--HG--
extra : rebase_source : f80ee3ffbf7fe47ded21cc34fa5a53f40c778a22
2018-11-10 23:15:58 -08:00
Jeff Walden
ef26ad7739 Bug 1504947 - Rename fillExcludingContext to fillExceptingContext, and distribute line/column-setting responsibilities across a version of it in any-chars code and a version in Unit-aware code. r=tcampbell
--HG--
extra : rebase_source : 779b840a84ba2e2530b69dd55b25fb01e67cdad6
2018-11-10 22:06:04 -08:00
Jeff Walden
59f399cbe3 Bug 1504947 - Implement EitherParser::computeLineAndColumn by calling the version of the function in GeneralTokenStreamChars, not the one that's going away in TokenStreamAnyChars. r=tcampbell
--HG--
extra : rebase_source : 17b882071cc03f983f34fccf5cb7e6e12e9899b6
2018-11-10 21:59:10 -08:00
Jeff Walden
e33ca05b5d Bug 1504947 - Change fake-column computations to work from (LineToken, uint32_t offset) inputs. r=tcampbell
--HG--
extra : rebase_source : b2518ff4566613388ad61c7c31ad1cf4036ce326
2018-11-10 21:56:01 -08:00
Jeff Walden
ee08a32df3 Bug 1504947 - Introduce a LineToken concept so that users can't accidentally do the work of determining a SourceCoords vector index twice. r=tcampbell
--HG--
extra : rebase_source : 420ef724b15f3046999b565b1d316076f0abd9e0
2018-11-10 21:52:57 -08:00
Jeff Walden
842515b435 Bug 1504947 - Use GeneralTokenStreamChars::computeLineAndColumn in more places so they're column-aware-ready. r=tcampbell
--HG--
extra : rebase_source : e8e0ce16450d652a4cba3001747053868197aca5
2018-11-10 21:44:29 -08:00
Jeff Walden
43249769ee Bug 1504947 - Rename a bunch of different SourceCoords concepts for increased readability. r=tcampbell
--HG--
extra : rebase_source : edbedb93e876885b0d23ad8ef98c5805d6979735
2018-11-10 21:43:03 -08:00
Jeff Walden
e0ba59551f Bug 1504947 - Common up some code in FunctionValidator to add a call-site line number into a function. r=tcampbell
--HG--
extra : rebase_source : 7979e59d31852ee1507c11dd09a10222051044c2
2018-11-10 21:24:31 -08:00
Jeff Walden
3de0d5df45 Bug 1504947 - Replace a FunctionBox::setStart function with a GeneralTokenStream::setFunctionStart that'll have proper column handling when the column-counting guts are redone. r=tcampbell
--HG--
extra : rebase_source : 8701405df092e6450abd4f052d6e766d6d9b6350
2018-11-10 21:23:52 -08:00
Jeff Walden
d0becfca72 Bug 1504947 - Add a GeneralTokenStream::computeLineAndColumn function that delegates to the any-chars version of the same, allowing the affected callers to be rewritten to their final form in advance of the guts of the UTF-8/16 column-counting fix. r=tcampbell
--HG--
extra : rebase_source : 2451e3eef63cce4b7e57835771e2a157b2cd14f5
2018-11-10 21:21:13 -08:00
Jon Coppeard
1a447840e2 Bug 1512045 - Simplify GC resets r=sfink 2018-12-11 18:26:06 +00:00
Jon Coppeard
14d6c98fec Bug 1512969 - Add cross-compartment marking assertion to catch errors in sweep groups calculation r=sfink 2018-12-06 16:27:21 -05:00
Luke Wagner
0095086495 Bug 1514143 - Only use trap state for unwinding innermost wasm frame (r=lth)
--HG--
extra : rebase_source : d2bf61e92a6bd05d655ad43020a82bfc53aa04fe
2018-12-17 10:12:01 -06:00
Denis Palmeiro
1d2e62c07a Bug 1497016 - Add an API to extract tracelogger data and use this within the gecko profiler r=mstange,djvj
Add a new class to extract tracelogger data using chunked buffers and use this to write the data out to the profiler JSON output.  Copying the data in chunks lets us minimize our memory overhead when writing out to the profiler so a large array of millions of elements does not need to be allocated ahead of time.

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

--HG--
extra : moz-landing-system : lando
2018-12-04 21:43:38 +00:00
Alex Gaynor
9522d924c4 Bug 1510272 - upgraded yaml-rust to 0.4.2; r=ted
This resolves a cargo audit warning in yaml-rust<4.1.

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

--HG--
extra : moz-landing-system : lando
2018-12-03 19:23:36 +00:00
Jason Orendorff
81c926f4e2 Bug 1510717 - Part 3: #ifdef out more code involving user-defined byte streams. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D13295

--HG--
extra : moz-landing-system : lando
2018-12-04 19:55:43 +00:00
Jason Orendorff
5e251da382 Bug 1510717 - Part 2: Remove unused flag ReadableStreamController::Flag_TeeBranch. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D13294

--HG--
extra : moz-landing-system : lando
2018-12-04 19:55:13 +00:00
Jason Orendorff
dcbc1a2506 Bug 1510717 - Part 1: Delete unused js::Class for abstract base class ReadableStreamController. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D13293

--HG--
extra : moz-landing-system : lando
2018-12-04 19:54:33 +00:00
Jason Orendorff
71067f0b22 Bug 1510598 - Handle uncatchable errors in RejectPromiseWithPendingError. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D13434

--HG--
extra : moz-landing-system : lando
2018-12-04 19:54:05 +00:00
Jan de Mooij
0ea04a1064 Bug 1511837 - Simplify JSOP_SUPERFUN and JSOP_SUPERBASE by factoring out the callee lookup. r=arai
We now emit JSOP_CALLEE or JSOP_ENVCALLEE (a new op) to load the callee.
JSOP_SUPERFUN and JSOP_SUPERBASE no longer have to walk the scope/environment
chain.

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

--HG--
extra : moz-landing-system : lando
2018-12-04 19:48:34 +00:00
Matthew Gaudet
a2c6c03a73 Bug 1511168: Mark low-level memory management comment with SMDOC r=tcampbell DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D13733

--HG--
extra : moz-landing-system : lando
2018-12-04 18:19:51 +00:00
Jan de Mooij
0c52a64c75 Bug 1511210 part 3 - Remove unnecessary call to ensureHasTypes in jit::CreateThis. r=tcampbell
This was added in bug 833076 because back then TypeScript::SetThis assumed
non-null script->types. However since bug 875276 we don't need this anymore.

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

--HG--
extra : moz-landing-system : lando
2018-12-02 22:38:39 +00:00
Jan de Mooij
9a73ceef5f Bug 1511210 part 2 - Ensure we have a JitRealm in ICScript::create. r=tcampbell
Depends on D13650

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

--HG--
extra : moz-landing-system : lando
2018-12-02 22:29:55 +00:00
Jan de Mooij
7d64f9c2b3 Bug 1511210 part 1 - Check script warm up count before calling ensureJitRealmExists in CanEnterBaselineJIT. r=tcampbell
This is just a minor optimization, but it makes the bug fixed by part 2
reproducible when running jit-tests.

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

--HG--
extra : moz-landing-system : lando
2018-12-02 22:05:08 +00:00
Rob Wu
7d113fddff Bug 1504660 - Implement Xrays for instanceof r=bholley
Ensure that "a instanceof b" has Xray semantics, i.e. that when b is a
XrayWrapper, that the wrapped object's getters, `Symbol.hasInstance`
hook and proxy traps are not triggered.

The toolkit/components/mozintl/test/test_mozintlhelper.js test was
updated to explicitly waive Xrays, instead of relying on the previous
behavior where Xrays were automatically waived.

Depends on D11591

Depends on D11591

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

--HG--
extra : moz-landing-system : lando
2018-12-02 22:21:51 +00:00
Rob Wu
15f88c421b Bug 1504660 - Move js::InstanceOfOperator to JS::InstanceofOperator r=bholley
There is currently no public API to call the 'instanceof' handler
without triggering proxies. The public method, JS_HasInstance, may
skip the default logic if a class has a non-null JSHasInstanceOp.
(i.e. js/src/proxy/Proxy.cpp and js/src/ctypes/CTypes.cpp ).

To serve the need of the next patch (which needs to trigger the
instanceof logic without triggering the proxy), this patch publishes the
js::InstanceofOperator method.
JS::InstanceOfOperator is the new name, and the new capitalization
matches the name of the abstract operation in the ES6 specification.

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

--HG--
extra : moz-landing-system : lando
2018-12-02 22:21:48 +00:00
Lars T Hansen
0c89febd85 Bug 1508665 - Split BaseStackFrame to simplify it. r=bbouvier
BaseStackFrame is split into two parts:

- BaseStackFrameAllocator is now responsible for dealing with stack
  allocation and deallocation in all complex cases (which means
  everything except for the simple native masm.Push and masm.Pop
  cases).

- What's left of BaseStackFrame is then a simple-to-use API for the
  rest of the compiler that maintains and checks invariants and does
  various kinds of bookkeeping and hides the remaining differences
  between the chunky and non-chunky stacks.

The latter class inherits from the former because this is simplest
(and it's easy to accomplish with 'protected').

There are a couple of minor functional changes here:

- The variable maxFramePushed_ now actually records the maximum value
  of masm.framePushed, not the maximum stack height.  The new behavior
  is correct even with the chunky stack, since this value is used for
  stack overflow checking.  There should however be no observable
  changes because of this.  (Trivial reason: only ARM64 is affected
  and we have no ARM64 products.  Deeper reason: stacks are aligned at
  coarser boundaries than our stack chunks, and have lots of headroom.)

- Member variables tracking the stack height are now set up in a new
  method, onFixedStackAllocated(), which is called after
  beginFunction() has allocated the space for the Header and Local
  areas of the frame.  The old behavior was correct but very obscure.
  The new code is easier to understand.

--HG--
extra : rebase_source : b3a06eb2a845a76c671d3060fa9e77cb0e4e4b69
2018-11-26 15:15:59 +01:00
Lars T Hansen
0bc0543a7b Bug 1510193 - don't use TypedObjects if not available and necessary. r=jorendorff
We rely on TypedObjects for the experimental wasm GC feature, but that
feature is Nightly-only and we should not be touching TypedObjects if
we don't need them.  Furthermore we should just fail to compile
outright if wasm GC is enabled but TypedObjects are not.

--HG--
extra : rebase_source : e76a01ea25158aa6d3bd8760339e06be41dbba80
2018-11-29 10:10:02 +01:00
Gurzau Raul
a2ac06c603 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-12-01 16:33:38 +02:00
Coroiu Cristina
1ca919f882 Merge mozilla-central to autoland a=merge 2018-12-01 07:55:13 +02:00
Coroiu Cristina
3564dfde3b Merge inbound to mozila-central a=merge 2018-12-01 07:46:00 +02:00
Jan de Mooij
998a522b90 Bug 1511412 - Fix an issue with incremental sweeping and ICScript. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D13566

--HG--
extra : moz-landing-system : lando
2018-11-30 19:59:04 +00:00
Sean Stangl
3dcc5d23c4 Bug 1510334 - Lower LMulI and fix register corruption. Fixes arguments/args2d.js. r=nbp 2018-11-30 09:28:00 +02:00
Sean Stangl
ee1ecb8b3e Bug 1510735 - ARM64 codegen for LTestDAndBranch and LTestFAndBranch. r=nbp 2018-11-30 09:30:00 +02:00
Sean Stangl
02b6e39ab1 Bug 1510749 - The AArch64 ISR explicitly allows CSINC to accept ZR. r=nbp
--HG--
extra : rebase_source : 66b7a76d979bd2aa8c8b228cba39db9310287944
2018-11-30 11:21:00 +02:00
Matthew Gaudet
5918e7b11c Bug 1510604 - Add SPEW=help to explain structured spewer r=tcampbell
Also cleans out no longer valid IONFLAG bl-ic-stats

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

--HG--
extra : moz-landing-system : lando
2018-11-30 20:18:27 +00:00
Jeff Walden
e23179884e Bug 1506969 - Tests. r=tcampbell
--HG--
extra : rebase_source : 5e466fc9a5206829a0498ab8757c3d325db05eaa
2018-11-29 16:53:53 -08:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Noemi Erli
8f0db72fb6 Merge inbound to mozilla-central. a=merge 2018-11-30 11:35:05 +02:00
arthur.iakab
b32fed790c Backed out changeset 5e65de3569fe (bug 1506969) for causing spidermonkey bustages on testScriptSourceCompression.cpp CLOSED TREE 2018-11-30 08:42:51 +02:00
Jeff Walden
6e3babac6f Bug 1506969 - Tests. r=tcampbell 2018-11-29 16:53:53 -08:00
Jeff Walden
e261cecaf9 Bug 1506969. r=tcampbell
--HG--
extra : rebase_source : 81aef7997b882e3640a0c83964e102375b4d1b77
2018-11-26 13:12:29 -08:00
Jeff Walden
ddf47e46d5 Bug 1510367 - More precisely specify the |breakpoint| function that ought be broken on in js/src/gdb/tests tests so that we don't mis-specify it on js::jit::AssemblerX86Shared::breakpoint. :-\ r=jimb
--HG--
extra : rebase_source : 77831855a52fc6294cf035613bd6ce4dc5dd10bd
2018-11-20 09:45:21 -08:00
Adam Holm
6fba94b2f0 Bug 1451591 - Flush CacheIR Spewer on regular intervals. r=mgaudet 2018-11-28 12:08:52 -08:00
Razvan Maries
d696b8eb57 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-11-29 23:46:52 +02:00
Jan de Mooij
b38ee74e4d Bug 1499644 - Move IC data out of BaselineScript. r=tcampbell
ICEntries and the fallback stub space are now stored in ICScript. The ICScript*
is stored in TypeScript to not increase sizeof(JSScript).

We need this for bug 1499324 but it also lets us greatly simplify the
BaselineDebugModeOSR code as this patch shows.

Note: some ICScript method definitions are still in BaselineJIT.cpp instead of
BaselineIC.cpp to make this patch easier to review. We could move them to
BaselineIC.cpp as a follow-up change.

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

--HG--
extra : moz-landing-system : lando
2018-11-29 19:08:28 +00:00
Daniel Varga
97590ebbad Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-11-29 19:13:14 +02:00
Matthew Gaudet
056ca1083b Bug 1504005 - Initial Structured Spewer r=jandem
This spewer design has two goals:

  1. Provide a spew mechanism that has first-class support for slicing and
     dicing output. This means that filtering by script and channel should be
     the dominant output mechanism.
  2. Provide a simple powerful mechanism for getting information out of the
     compiler and into tools. I'm inspired by tools like CacheIR analyzer,
     IR Hydra, and the upcoming tracelogger integration into perf.html.

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

--HG--
extra : moz-landing-system : lando
2018-11-29 14:37:01 +00:00
Daniel Varga
dc295b2050 Backed out changeset 5c1893bd77c2 (bug 1499323) for linting failure at /builds/worker/checkouts/gecko/config/check_macroassembler_style.py:149:5 on a CLOSED TREE 2018-11-29 16:03:08 +02:00
Nicolas B. Pierron
6570f1fb9f Bug 1499323 - Prepare the check_macroassembler_style python script to accept clang-format rewritting. r=jandem 2018-11-29 14:46:02 +01:00
Coroiu Cristina
da4da94439 Merge mozilla-central to inbound a=merge 2018-11-29 06:39:53 +02:00
Coroiu Cristina
e92b0f1d7f Merge inbound to mozilla-central a=merge 2018-11-29 06:27:40 +02:00
Coroiu Cristina
b8bc09a5b5 Merge mozilla-central to inbound a=merge on a CLOSED TREE
--HG--
rename : python/mozrelease/test/data/Firefox-62.0b11.update.json => python/mozrelease/test/data/Firefox-64.0b13.update.json
extra : rebase_source : 6eb078869182f40343e201993c0d0442ed96ad46
2018-11-29 00:34:07 +02:00
Coroiu Cristina
d4aafa8e1c Merge inbound to mozilla-central a=merge 2018-11-28 23:49:09 +02:00
Jason Orendorff
a942af532c Bug 1506200 - Remove ReadableStream EmbeddingFlags. r=baku,jwalden
Differential Revision: https://phabricator.services.mozilla.com/D11903

--HG--
extra : moz-landing-system : lando
2018-11-28 22:20:55 +00:00
Matthew Gaudet
2ec7f9e1f3 Bug 1510018: Fix error in callVM comment r=nbp DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D13106

--HG--
extra : moz-landing-system : lando
2018-11-28 10:28:57 +00:00
Narcis Beleuzu
6d70864397 Merge mozilla-central to autoland. CLOSED TREE 2018-11-28 12:00:56 +02:00
Ehsan Akhgari
ca162bee20 Bug 1508472 - Part 4: Fourth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-28 09:16:55 +00:00
Ehsan Akhgari
0ad55ab74f Bug 1510513 - Retain the formatting of MOZ_DEFINE_ENUM_* macros r=sylvestre
These macros tend to be handled quite poorly since the clang-format
tokenizer cannot figure out how to handle them.

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

--HG--
extra : moz-landing-system : lando
2018-11-28 09:14:19 +00:00
Tooru Fujisawa
a056a49888 Bug 1501155 - Part 2: Use WTF-8 as BinAST string encoding. r=Yoric 2018-11-28 14:16:29 +09:00
Tooru Fujisawa
6ca00b0b03 Bug 1501155 - Part 1: Add AtomizeWTF8Chars. r=jwalden 2018-11-28 14:16:29 +09:00
Coroiu Cristina
47323ec73b Merge mozilla-central to autoland a=merge on a CLOSED TREE 2018-11-28 23:56:03 +02:00
Brian Hackett
3b62690341 Bug 1510105 - Save/restore JSReturnOperand when doing debug mode OSR after a VM call returns, r=tcampbell.
--HG--
extra : rebase_source : b20c636ec65a7771c18feb67545a4e2afdfb6083
2018-11-27 05:57:15 -10:00
Brian Hackett
05a3dfff56 Bug 1510684 - Advance iterator in maybeIonFrameRecovery, r=nbp.
--HG--
extra : rebase_source : 1a5dcf2a9708db013ba7e898001e4cb0de3b75d6
2018-11-28 10:02:07 -10:00
Matthew Gaudet
b31f4edbbf Bug 1509293: Add missing lazyProtoCheck to tryAttachArrayPush r=djvj
Differential Revision: https://phabricator.services.mozilla.com/D12787

--HG--
extra : moz-landing-system : lando
2018-11-28 17:52:16 +00:00
Benjamin Bouvier
aee3f05f7d Bug 1509283: Compile the last wasm function batch on the main thread; r=luke
--HG--
extra : rebase_source : 69645820d66e45bed4f622280b3f059525c39f09
2018-11-22 11:12:20 +01:00
Tooru Fujisawa
05a6adee89 Bug 1508063 - Part 5: Move non-auto-generated part of BinASTParser into BinASTParserPerTokenizer. r=Yoric 2018-11-29 01:03:46 +09:00
Tooru Fujisawa
f5534517cb Bug 1508063 - Part 4: Rename BinSource-auto.{cpp,h} to BinASTParser.{cpp,h}, and BinSource.{cpp,h} to BinASTParserPerTokenizer.{cpp,h}. r=Yoric 2018-11-29 01:03:45 +09:00
Tooru Fujisawa
4023bc8687 Bug 1508063 - Part 3: Fix typo in Binsource.yaml. r=Yoric 2018-11-29 01:03:45 +09:00