Commit Graph

68835 Commits

Author SHA1 Message Date
Tom Schuster
bbf30da9de Bug 1339777 - Collect telemetry for String generics. r=arai,janerik data-review=chutten
Differential Revision: https://phabricator.services.mozilla.com/D17257

--HG--
extra : rebase_source : 12fc69cf83bb9b92790f105367af4d03626d6295
2019-01-22 17:54:12 +01:00
Ciure Andrei
a4eeeccf1d Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-01-23 20:55:29 +02:00
Sebastian Hengst
a612973f64 Merge mozilla-inbound to mozilla-central. a=merge 2019-01-23 18:51:14 +02:00
David Major
5d867a09d0 Bug 1520014: Disable -Wc++11-narrowing in vixl under clang-cl. r=froydnj 2019-01-23 11:01:05 -05:00
Sebastian Hengst
2ecf173b14 Merge mozilla-central to autoland 2019-01-23 11:31:44 +02:00
Mike Hommey
3567be6105 Bug 1521691 - Move the remains of CC_VERSION to python configure. r=chmanchester
which, at this point, is only the AC_SUBST, so we don't even need to
give it to old-configure anymore.

Depends on D17207

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

--HG--
extra : moz-landing-system : lando
2019-01-23 00:27:38 +00:00
Mike Hommey
03a6fa8570 Bug 1521691 - Remove _MSC_VER from configure. r=chmanchester
The only use in configure itself is for a MSVC version check that is now
always true (we don't accept versions < 19.15 anymore).

The only uses in the build system are in code that could just use
CC_TYPE instead.

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

--HG--
extra : moz-landing-system : lando
2019-01-23 00:35:10 +00:00
shindli
2aae270ee0 Backed out 2 changesets (bug 1521691) for bustages in clang-plugin.dll CLOSED TREE
Backed out changeset 09e1109d2350 (bug 1521691)
Backed out changeset cfee3de00f12 (bug 1521691)
2019-01-23 00:51:59 +02:00
Mike Hommey
f2798e8385 Bug 1521691 - Move the remains of CC_VERSION to python configure. r=chmanchester
which, at this point, is only the AC_SUBST, so we don't even need to
give it to old-configure anymore.

Depends on D17207

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

--HG--
extra : moz-landing-system : lando
2019-01-22 22:26:28 +00:00
Mike Hommey
bc1c78e811 Bug 1521691 - Remove _MSC_VER from configure. r=chmanchester
The only use in configure itself is for a MSVC version check that is now
always true (we don't accept versions < 19.15 anymore).

The only uses in the build system are in code that could just use
CC_TYPE instead.

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

--HG--
extra : moz-landing-system : lando
2019-01-22 22:26:15 +00:00
Peter Van der Beken
fd3d6252af Bug 1521848 - Replace nsTArrayToJSArray with ToJSValue. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D17263

--HG--
extra : moz-landing-system : lando
2019-01-22 18:36:07 +00:00
André Bargull
b1378cf731 Bug 1521127 - Part 3: Don't check for singleton allocation sites when creating typed arrays. r=jandem 2019-01-18 09:35:27 -08:00
André Bargull
d30079bc52 Bug 1521127 - Part 2: Remove more preliminary objects tracking for array objects. r=jandem 2019-01-22 05:02:45 -08:00
André Bargull
5c52c10f8f Bug 1521127 - Part 1: Remove js::Class* argument from SetClassAndProto and splicePrototype. r=jandem 2019-01-18 09:37:49 -08:00
Coroiu Cristina
9d23ccbca9 Backed out 3 changesets (bug 1521127) for build bustages at builds/worker/workspace/build/src/js/src/vm/ObjectGroup.cpp on a CLOSED TREE
Backed out changeset 10f6f2e55f09 (bug 1521127)
Backed out changeset 232668044fbf (bug 1521127)
Backed out changeset 6ac126ad6e18 (bug 1521127)
2019-01-23 15:05:09 +02:00
Tooru Fujisawa
39265dd582 Bug 1495611 - Part 4: Run binast/lazy and binast/nonlazy only on linux64 SM(p,cgc). r=Yoric,sfink
Differential Revision: https://phabricator.services.mozilla.com/D16939
2019-01-18 13:52:31 +09:00
Tooru Fujisawa
b17612ddfd Bug 1495611 - Part 3: Add jit-tests in BinAST format. r=Yoric
Differential Revision: https://phabricator.services.mozilla.com/D16810
2019-01-17 20:15:54 +09:00
Tooru Fujisawa
e4a77093ef Bug 1495611 - Part 2: Apply cgc-jittest-timeouts.txt to binast directory. r=Yoric
Differential Revision: https://phabricator.services.mozilla.com/D16809
2019-01-17 20:15:36 +09:00
Tooru Fujisawa
dce9862636 Bug 1495611 - Part 1: Add script to encode jit-tests into BinAST files. r=Yoric
Differential Revision: https://phabricator.services.mozilla.com/D16808
2019-01-17 20:15:36 +09:00
Nathan Froyd
a9fb00a2f6 Bug 1485216 - remove Scheduler and related code from xpcom/threads; r=mccr8
Quantum DOM is no longer a priority, and the extra code it introduces to
several places block useful refactorings.
2019-01-22 20:16:56 -05:00
Sylvestre Ledru
0b4021fcad Bug 1521460 - Also reformat objective-c files r=mstange,ehsan,spohl
# ignore-this-changeset

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

--HG--
extra : histedit_source : 084f340503d2e1a2d9e1753c38b2c4ee9c7819f3
2019-01-21 18:18:16 +01:00
André Bargull
20c9e44215 Bug 1521127 - Part 1: Remove js::Class* argument from SetClassAndProto and splicePrototype. r=jandem 2019-01-18 09:37:49 -08:00
André Bargull
20793d1ee7 Bug 1521127 - Part 2: Remove more preliminary objects tracking for array objects. r=jandem 2019-01-22 05:02:45 -08:00
André Bargull
f993a3ae06 Bug 1521127 - Part 3: Don't check for singleton allocation sites when creating typed arrays. r=jandem 2019-01-18 09:35:27 -08:00
Paul Bone
258552596b Bug 1520076 - Schedule zones for GC after running callbacks r=jonco
--HG--
extra : rebase_source : 38b9918b974e805118edb6f6e4eb5ef7bdb0a5da
2019-01-23 11:43:08 +11:00
André Bargull
0f8a834501 Bug 1521509: Remove superfluous call to JSObject::setSingleton in NewObjectOperation. r=tcampbell 2019-01-21 05:57:02 -08:00
Ted Campbell
ec8ee04a23 Bug 1520366 - Update LifoAlloc growth heuristics to track smallAllocsSize. r=nbp
- Replace oversizeSize with smallAllocsSize. This will track sizes of
  non-transferred small allocation chunks. It excludes unused chunks,
  oversize chunks and chunks transfered from other LifoAlloc. This new
  counter is used to determine chunk size growth heuristics. This aims
  to reduce memory spikes due to transferFrom allocation patterns that
  we see in the wild.
- Also fix a pre-existing typo in LifoAlloc::reset
2019-01-22 11:10:53 -05:00
Ted Campbell
817e76e410 Bug 1520366 - Prepend LifoAlloc chunks when transferring them. r=nbp
When using LifoAlloc::transferFrom to merge allocators (such as for
types), prepend the chunks to avoid wasted space at end of current last
chunk. This helps usecases such as TypeInference to behave more
predictably when merging small allocators.

(Original implementation by :nbp)
2019-01-22 11:10:53 -05:00
André Bargull
596bb218c5 Bug 1520473: Don't set the overwritten-bit in TI when initialising global lexicals. r=jandem 2019-01-17 06:04:16 -08:00
Lars T Hansen
ed3f09f1f8 Bug 1394420 - Consolidate feeling-lucky atomics. r=froydnj
With jitted primitives for racy atomic access in place, we can
consolidate most C++ realizations of the atomic primitives into two
headers, one for gcc/Clang and one for MSVC, that will be used as
default fallbacks on non-tier-1 platforms.

Non-tier-1 platforms can still implement their own atomics layer, as
does MIPS already; we leave the MIPS code alone here.

--HG--
rename : js/src/jit/none/AtomicOperations-feeling-lucky.h => js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
rename : js/src/jit/x86-shared/AtomicOperations-x86-shared-msvc.h => js/src/jit/shared/AtomicOperations-feeling-lucky-msvc.h
extra : rebase_source : e6d98623d0ae2992929e44a04e61abf0ff2669f0
extra : histedit_source : 286a6b4d8250342ebe6206c7af3fd80d49f1851c
2018-10-11 14:54:25 +02:00
Lars T Hansen
d8411edc23 Bug 1394420 - jit-generate atomic ops to be called from c++. r=nbp, r=froydnj
SpiderMonkey (and eventually DOM) will sometimes access shared memory
from multiple threads without synchronization; this is a natural
consequence of the JS memory model + JS/DOM specs.  We have always had
a hardware-specific abstraction layer for these accesses, to isolate
code from the details of how unsynchronized / racy access is handled.
This layer has been written in C++ and has several problems:

- In C++, racy access is undefined behavior, and the abstraction layer
  is therefore inherently unsafe, especially in the presence of
  inlining, PGO, and clever compilers.  (And TSAN will start
  complaining, too.)

- Some of the compiler intrinsics that are used in the C++ abstraction
  layer are not actually the right primitives -- they assume C++, ie
  non-racy, semantics, and may not implement the correct barriers in
  all cases.

- There are few guarantees that the synchronization implemented by the
  C++ primitives is actually compatible with the synchronization used
  by jitted code.

- While x86 and ARM have 8-byte synchronized access (CMPXCHG8B and
  LDREXD/STREXD), some C++ compilers do not support their use well or
  at all, leading to occasional hardship for porting teams.

This patch solves all these problems by jit-generating the racy access
abstraction layer in the form of C++-compatible functions that: do not
trigger UB in the C++ code; do not depend on possibly-incorrect
intrinsics but instead always emit the proper barriers; are guaranteed
to be JIT-compatible; and support x86 properly.

Mostly this code is straightforward: each access function is a short,
nearly prologue- and epilogue-less, sequence of instructions that
performs a normal load or store or appropriately synchronized
operation (CMPXCHG or similar).  Safe-for-races memcpy and memmove are
trickier but are handled by combining some C++ code with several
jit-generated functions that perform unrolled copies for various block
sizes and alignments.

The performance story is not completely satisfactory:

On the one hand, we don't regress anything because copying
unshared-to-unshared we do not use the new primitives but instead the
C++ compiler's optimized memcpy and standard memory loads and stores.

On the other hand, performance with shared memory is lower than
performance with unshared memory.  TypedArray.prototype.set() is a
good test case.  When the source and target arrays have the same type,
the engine uses a memcpy; shared memory copying is 3x slower than
unshared memory for 100,000 8K copies (Uint8).  However, when the
source and target arrays are slightly different types (Uint8 vs Int8)
the engine uses individual loads and stores, which for shared memory
turns into two calls per byte being moved; in this case, shared memory
is 127x slower than unshared memory.  (All numbers on x64 Linux.)

Can we live with the very significant slowdown in the latter case?  It
depends on the applications we envision for shared memory.  Primarily,
shared memory will be used as wasm heap memory, in which case most
applications that need to move data will use all Uint8Array arrays and
the slowdown is OK.  But it is clearly a type of performance cliff.

We can reduce the overhead by jit-generating more code, specifically
code to perform the load, convert, and store in common cases.  More
interestingly, and simpler, we can probably use memcpy in all cases by
copying first (fairly fast) and then running a local fixup.  A bug
should be filed for this but IMO we're OK with the current solution.

(Memcpy can also be further sped up in platform-specific ways by
generating cleverer code that uses REP MOVS or SIMD or similar.)

--HG--
extra : rebase_source : 0b7e6512d87e7b0ce98147df4be9f8293998fa44
extra : histedit_source : 6474c01aa1eb37290073dabdf3e9f37190ff1a5d%2C24c956ef5b5869bc4a0c0a99c8595bc58a9f6fe5
2018-08-21 21:13:12 +02:00
Mike Hommey
aa2783bf67 Bug 1521284 - Don't hardcode config.log path in old-configure. r=nalexander
Because old-configure is only refreshed when, essentially,
old-configure.in changes, hardcoded (absolute) paths don't necessarily
match the build environment of the current build.

So instead, use an environment variable that we pass from python
configure when invoking old-configure.

Also do dummy changes to old-configure.in so that old-configure is
refreshed at least once to get the environment-based value.

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

--HG--
extra : moz-landing-system : lando
2019-01-21 17:32:11 +00:00
Razvan Maries
8123914263 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2019-01-21 19:58:38 +02:00
Razvan Maries
299b5e79f7 Merge mozilla-inbound to mozilla-central a=merge 2019-01-21 19:50:56 +02:00
Sylvestre Ledru
755a1a7c2f Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-01-21 14:49:22 +00:00
Jon Coppeard
a96229ddb3 Bug 1512749 - Convert JS::gcreason::Reason to enum class JS:GCReason r=jonco r=mccr8 2019-01-21 13:09:12 +00:00
Jon Coppeard
f79e272ffd Bug 1520778 - Ensure implicit edges are marked on all paths through the marking code r=sfink 2019-01-21 12:40:52 +00:00
Ciure Andrei
223df12d99 Backed out 2 changesets (bug 1394420) for failing testAtomicOperations.cpp, ESling and jit failures CLOSED TREE
Backed out changeset b2ffeeac7326 (bug 1394420)
Backed out changeset 2f5be1913934 (bug 1394420)

--HG--
rename : js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h => js/src/jit/none/AtomicOperations-feeling-lucky.h
rename : js/src/jit/shared/AtomicOperations-feeling-lucky-msvc.h => js/src/jit/x86-shared/AtomicOperations-x86-shared-msvc.h
2019-01-21 14:26:34 +02:00
Boris Zbarsky
2646f35e2b Bug 1160757. Make it clear that XrayWrapper::getPropertyDescriptor is unused. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D15669

--HG--
extra : moz-landing-system : lando
2019-01-21 03:34:29 +00:00
Boris Zbarsky
e5c8ead70a Bug 1363208 part 9. Remove now-unused cross-origin Xray infrastructure. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D15433

--HG--
extra : moz-landing-system : lando
2019-01-21 03:33:55 +00:00
Boris Zbarsky
ffd07255aa Bug 1363208 part 8. Stop using cross-origin Xrays for Location. r=peterv
The test change is because it was testing Window, not Location.

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

--HG--
extra : moz-landing-system : lando
2019-01-21 03:33:32 +00:00
Boris Zbarsky
abd3e90089 Bug 1363208 part 5. Remove now-unnecessary named subframe handling from XrayWrapper. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D15429

--HG--
extra : moz-landing-system : lando
2019-01-21 03:33:14 +00:00
Boris Zbarsky
c17e30f6b2 Bug 1363208 part 4. Stop using cross-origin Xrays for WindowProxy. r=peterv,jandem
The change to test_bug440572.html is due to a behavior change.  Specifically,
before this change, any IDL-declared property, even one not exposed
cross-origin, would prevent named frames with that name being visible
cross-origin.  The new behavior is that cross-origin-exposed IDL properties
prevent corresponding frame names from being visible, but ones not exposed
cross-origin don't.  This matches the spec and other browsers.

Same thing for the changes to test_bug860494.xul.

The wpt test changes are just adding test coverage for the thing the other
tests caught.

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

--HG--
extra : moz-landing-system : lando
2019-01-21 03:30:31 +00:00
Jan de Mooij
68214025ae Bug 1520998 - Remove Ion LoopUnroller code. r=nbp
It was added more than 4 years ago but never got enabled due to benchmark
regressions. Websites can now use WebAssembly for hot code (and the plan is to
use Cranelift instead of Ion there) so it's unlikely we will need this soon.

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

--HG--
extra : moz-landing-system : lando
2019-01-18 14:06:46 +00:00
Cosmin Sabou
7ccc9d8b0b Merge mozilla-inbound to mozilla-central. a=merge 2019-01-19 11:57:49 +02:00
Luke Wagner
91b5d3d223 Bug 1521058 - Baldr: fix IDB deserialization flags on arm64 (r=lth)
--HG--
extra : rebase_source : 6797831a63caff52072803dc9cffb7347725d270
2019-01-18 12:10:35 -06:00
Ciure Andrei
4ff1c7c183 Backed out changeset dd45dce4d3a9 (bug 1521058) for causing WasmModule.cpp build bustage CLOSED TREE
--HG--
extra : rebase_source : 4a597cd98e812b578ae054c386f4a8022a536376
2019-01-19 02:11:56 +02:00
Luke Wagner
dab3fdbea9 Bug 1521058 - Baldr: fix IDB deserialization flags on arm64 (r=lth)
--HG--
extra : rebase_source : 964cd8051d81ff79b671a58790456139ee1b3173
2019-01-18 12:10:35 -06:00
Jan de Mooij
88fc8a5784 Bug 1284719 part 2 - Fold EmitSection into BytecodeEmitter, remove prologue/main split. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D16948

--HG--
extra : moz-landing-system : lando
2019-01-18 13:15:27 +00:00
Jan de Mooij
84699eccac Bug 1284719 part 1 - Emit hoisted top-level functions directly in the prologue, remove switchToPrologue. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D16947

--HG--
extra : moz-landing-system : lando
2019-01-18 13:14:58 +00:00