Граф коммитов

64097 Коммитов

Автор SHA1 Сообщение Дата
Lars T Hansen 4ccb30da68 Bug 1441142 - Adapt wasm stubs for ARM64. r=bbouvier
As the SP is weird on ARM64 a number of adjustments must be made to
the stubs code.  On the one hand we never have to check for stack
alignment; on the other hand we don't get to use raw Push and Pop to
manipulate the stack, the word-aligned stack in the JIT ABI requires
some unusual adjustments, and the fact that the JIT treats x28 (the
PseudoStackPointer) as non-volatile requires it to be saved and
restored, or recomputed.

On ARM64 we do not have a pop-return-address-from-memory-and-return,
and this causes a slight problem for the interrupt stub code.  On MIPS
this is fixed by using HeapPtr as a temp for the return address and
then restoring HeapPtr in the branch delay slot, but ARM64 does not
have branch delay slots either.

For now I'm using x28 to hold the return address since Wasm code does
not use x28 (it is not allocatable even in wasm code at this point)
and the interrupt stub only runs when the machine is in the wasm
state.  If this turns out not to be workable we probably need to
reserve another register just for this.

--HG--
extra : rebase_source : bc6f809305fdb8713cd93170ec434ae1d8e64243
2018-02-12 17:42:45 +01:00
Ryan VanderMeulen dde54aa578 Bug 1424281 - Use Visual Studio 2017 15.6.0 for Windows builds. r=froydnj
--HG--
extra : rebase_source : 2d5abb19c1f2b2e2f142b849bd4d0ba9ab46ccbe
2018-03-12 19:24:44 -04:00
Brindusan Cristian cc88a1d417 Backed out changeset 294a422d49b0 (bug 1401939) for sm-arm64 failures on /builds/worker/workspace/build/src/js/src/vm/Xdr.cpp CLOSED TREE 2018-03-12 20:55:23 +02:00
Jason Orendorff 468bb1ce37 Bug 1439026 - Part 4: jsbool* -> builtin/Boolean*. r=jandem.
--HG--
rename : js/src/jsboolinlines.h => js/src/builtin/Boolean-inl.h
rename : js/src/jsbool.cpp => js/src/builtin/Boolean.cpp
rename : js/src/jsbool.h => js/src/builtin/Boolean.h
extra : rebase_source : ec95a5b8ad20212c587a2400313174da2b4cfee0
extra : intermediate-source : 7e197166f04eef36c755602152dd191a85d9915c
extra : source : 5bf88c004e36ab5e624318c3ead48a9fd4c68aa6
2018-02-24 10:31:29 -06:00
Jason Orendorff 0f0edbe7f7 Bug 1439026 - Part 3: jsarray* -> builtin/Array*. r=jandem.
--HG--
rename : js/src/jsarrayinlines.h => js/src/builtin/Array-inl.h
rename : js/src/jsarray.cpp => js/src/builtin/Array.cpp
rename : js/src/jsarray.h => js/src/builtin/Array.h
extra : rebase_source : 6f38576d65c7b212f659cb6355401bd3c5eee570
extra : intermediate-source : 39d03fed10fbafafd4fbd51fac721017a13bde9f
extra : source : 8dfe2e55b75434e8fc30c872546123475b691e09
2018-02-24 10:26:24 -06:00
Nicolas B. Pierron dbd24194ed Bug 1401939 - Align XDR content to avoid undefined behaviours. r=kmag,tcampbell 2018-03-12 18:23:13 +00:00
Jason Orendorff f8a2409258 Bug 1444339 - Crash using baselineCompile() in a fresh compartment. r=nbp.
--HG--
extra : rebase_source : 7f430d80435c4c80598289bdee5c4be6dea42948
2018-03-09 09:33:30 -06:00
Dragan Mladjenovic 1cb1a1d83b Bug 1444303 : [MIPS] Fix build failures after Bug 1425580 part 17; r=jandem
--HG--
extra : rebase_source : 2eb3b1da3aaa857a0b03bce98d33149ff5d17d14
2018-03-09 07:58:43 +01:00
Bogdan Tara ae7a1ff01a Merge inbound to mozilla-central. a=merge 2018-03-12 11:55:11 +02:00
Jan de Mooij 705961f02e Bug 1442561 part 3 - Flip the pref. r=me 2018-03-11 21:11:33 +01:00
arthur.iakab 7983890a31 Merge mozilla-central to autoland 2018-03-11 23:49:17 +02:00
Jan de Mooij f3c25838a5 Bug 1442561 part 2 - Add Spectre mitigations for most shape/group/class guards in JIT code. r=luke,tcampbell 2018-03-11 20:18:24 +01:00
Jan de Mooij 3125869f12 Bug 1442561 part 1 - Add browser pref for misc Spectre object type mitigations. r=luke 2018-03-11 20:14:03 +01:00
Jim Blandy 2e586e022b Bug 1438121: Add jit-test async-livecache.js. r=fitzgen
MozReview-Commit-ID: Jbe1GMPGwKj

--HG--
extra : rebase_source : 60ff2bd3f06bf6cb7b0056efe187a6e2c9bb4c1a
extra : amend_source : 7af0b2cf8165ef689e2ed8248763b64ee5183141
2018-03-09 16:47:58 -08:00
Petr Sumbera ac991196ef Bug 1439885 - Fix RelocationOverlay for big-endian machines in JavaScript : GC. r=sfink 2018-03-09 08:33:57 -08:00
Jan de Mooij 02c732460b Bug 1425580 part 20 - Clean up wasm call LIR instructions a bit. r=bbouvier 2018-03-10 12:34:34 +01:00
Jan de Mooij 81ba2e7314 Bug 1425626 - Properly allow overrecursion in bug1416727.js jit-test. r=me 2018-03-10 12:27:27 +01:00
Noemi Erli 40b1baaab5 Merge inbound to mozilla-central. a=merge 2018-03-10 11:58:34 +02:00
Jim Blandy 4103e8702d Bug 1438121: Final Part 6: Omitted doc fix requested in review. DONTBUILD r=fitzgen
MozReview-Commit-ID: FXQM85VAnfA

--HG--
extra : rebase_source : baacbcbe3f2e71276f2c5457b191e3156129fcaa
extra : histedit_source : 1f55ff3fa8546434c52109c6a0b1f69344ebd380
2018-03-09 11:40:46 -08:00
Jim Blandy ca023071a6 Bug 1438121: Final Part 5: Remove meaningless 'const' this qualifier from LiveSavedFrameCache::FramePtr::SetHasCachedMatcher::match. r=fitzgen
MozReview-Commit-ID: kfcTilDEwK

--HG--
extra : rebase_source : fc6972b19b95f972b9c1792d0fff5cf88453727a
extra : intermediate-source : 46619a4d5c038078541b5ad6a1b1805e576b22b9
extra : source : bca829119bdcb4cd7eb3c3b9cfaae59d5587327c
extra : histedit_source : be0b4a8aeb89a614ae2b6830597079bf4d7f010a
2018-03-02 23:39:15 -08:00
Jim Blandy cdbdf6aacc Bug 1438121: Final Part 4: Doc fixes for LiveSavedFrameCache. DONTBUILD r=fitzgen
MozReview-Commit-ID: 5672uZ4pC2E

--HG--
extra : rebase_source : 12e590f3d2dc11380ddea492895428a795cd6f6e
extra : histedit_source : 329987014ea179cdb83a3e88d9abc368a48b16f2
2018-03-01 23:22:02 -08:00
Jim Blandy 70a1e58136 Bug 1438121: Final Part 3: Make LiveSavedFrameCache::find pop invalid entries as part of the search. r=fitzgen
Rather than searching from the beginning (old end) of the cache,
LiveSameFrameCache::find can search from the young end of the cache, popping
invalid stack entries as it goes.

This means that the number of entries searched is related to the number of
cached frames popped since the last stack capture, not the total number of
entries in the cache.

This also removes the need for iterators, iterator arithmetic, or any random
access to the stack; the function simply uses the vector's 'back', 'popBack',
'empty', and 'clear' methods.

MozReview-Commit-ID: DCFt0uhiqql

--HG--
extra : rebase_source : 1116f7df31387bb7e9f0419738867ea64f28c1c6
extra : histedit_source : 44da1f91484b02d4ceeac33b3a7f8075198579df
2018-03-01 23:14:45 -08:00
Ted Campbell 362c128dc7 Bug 1408673 - Update EnvironmentObject comments for Gecko r=kmag
MozReview-Commit-ID: AIt3eQ33k7m

--HG--
extra : rebase_source : 4f1c98faffe829db9817bff9974d38b0e279dc91
2018-03-09 14:32:41 -05:00
Jim Blandy 82b8862942 Bug 1438121: Final Part 2: Fix interaction between async parents and the LiveSavedFrameCache in SavedStacks::insertFrames. r=fitzgen
When capturing frames in an activation that had both 1) an async parent stack
established by AutoSetAsyncStackForNewCalls and 2) SavedFrames cached in the
activation's LiveSavedFramesCache, SavedStacks::insertFrames would supplant the
SavedFrame chain from the cache with the async parent stack, causing frames to
be dropped.

The code also looked for frames in the wrong activation's LiveSavedFramesCache.

The code assumed that only the parent of a frame whose hasCachedSavedFrame flag
is set could be retrieved from the cache; this was pessimistic, as we can
compare the cached and actual pc's, and potentially provide cache hits for the
youngest frame with a flag set.

MozReview-Commit-ID: 8tXTI43pjYr

--HG--
extra : rebase_source : 33048a95e8519a323933bb10e4d366c49082b8a5
extra : intermediate-source : a4c506d989bd6aa0054e37ec4d6fed9b3af216bf
extra : source : 1bda10ce352b374aa1cd3913715d2d31cb42614d
extra : histedit_source : a5014695d2271c4ff96e32897b9e51eb908be925
2018-02-24 15:39:43 -08:00
Jim Blandy 9120910ea9 Bug 1438121: Final Part 1: Change JS::CopyAsyncStack's maxFrameCount to be a Maybe, and use that type throughout. r=tromey
I botched another patch in this series because I was confused about when zero
meant "no limit" and when it actually just meant zero, so I figured I'd fix this.

MozReview-Commit-ID: 5vgzKGSKL8F

--HG--
extra : rebase_source : dc57c22b08455a1867eeaa139b3045d2ae181cef
extra : histedit_source : e82898f74e8568bbbd10f7589427f5fbbcfe24fa
2018-03-06 21:52:31 -08:00
Ciure Andrei f8ae1c0643 Backed out 3 changesets (bug 1435360) for Android XPCShel failures a=backout on a CLOSED TREE
Backed out changeset e2a6bd47f697 (bug 1435360)
Backed out changeset 8cdf945be534 (bug 1435360)
Backed out changeset a463d224c412 (bug 1435360)
2018-03-10 02:35:41 +02:00
Ciure Andrei 6b24f5fc1b Backed out 2 changesets (bug 1439026) for webreftest css/CSS2/borders/border-top-width-080.xht failures a=backout on a CLOSED TREE
Backed out changeset 7e197166f04e (bug 1439026)
Backed out changeset 39d03fed10fb (bug 1439026)

--HG--
rename : js/src/builtin/Array.cpp => js/src/jsarray.cpp
rename : js/src/builtin/Array.h => js/src/jsarray.h
rename : js/src/builtin/Array-inl.h => js/src/jsarrayinlines.h
rename : js/src/builtin/Boolean.cpp => js/src/jsbool.cpp
rename : js/src/builtin/Boolean.h => js/src/jsbool.h
rename : js/src/builtin/Boolean-inl.h => js/src/jsboolinlines.h
2018-03-10 02:31:43 +02:00
Jason Orendorff d5a1260c08 Bug 1439026 - Part 4: jsbool* -> builtin/Boolean*. r=jandem.
--HG--
rename : js/src/jsboolinlines.h => js/src/builtin/Boolean-inl.h
rename : js/src/jsbool.cpp => js/src/builtin/Boolean.cpp
rename : js/src/jsbool.h => js/src/builtin/Boolean.h
extra : rebase_source : 9faa177f05d079783dddb5fb8d9fab02489e4365
extra : intermediate-source : 17c547757a7a5da24da4f41f19f370d8f4f9b41e
extra : source : 5bf88c004e36ab5e624318c3ead48a9fd4c68aa6
2018-02-24 10:31:29 -06:00
Jason Orendorff a97b7e7d1f Bug 1439026 - Part 3: jsarray* -> builtin/Array*. r=jandem.
--HG--
rename : js/src/jsarrayinlines.h => js/src/builtin/Array-inl.h
rename : js/src/jsarray.cpp => js/src/builtin/Array.cpp
rename : js/src/jsarray.h => js/src/builtin/Array.h
extra : rebase_source : da09e8c8714ad1fded6f380130e0b6f9159d5c9f
extra : intermediate-source : 07d69d9954c1165f66a275f047517f2e57e640df
extra : source : 8dfe2e55b75434e8fc30c872546123475b691e09
2018-02-24 10:26:24 -06:00
Luke Wagner 1ce292d679 Bug 1435360 - Baldr: jit::EnsureAsyncInterrupt() shouldn't cause JSRuntime failure if there is no async interrupt support on CLOSED TREE (r=me) 2018-03-09 14:56:44 -06:00
Aaron Klotz 558ef09a4f Bug 1444494: Initialize DllServices in XPCShell; r=jimm
--HG--
extra : rebase_source : 043a2e7c2b1380f29d46dc889b5b299ecccfcec8
2018-03-09 12:56:33 -07:00
Benjamin Bouvier 44540b0fd1 Bug 1442656: Implement wasm testing functionalty for two-tiered compilation; r=luke
--HG--
extra : rebase_source : 8c89f1e1f535e34f6bd6883da870b22f05aa2fbf
2018-03-09 16:13:23 +01:00
Dorel Luca 30edeead7c Merge mozilla-central to mozilla-inbound. a=merge 2018-03-09 12:01:54 +02:00
Csoregi Natalia 4698787c09 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-03-09 02:19:49 +02:00
Nicolas B. Pierron 69d0cb447e Bug 1444081 - Shutdown the Parent JSRuntime instead of leaking it. r=fitzgen 2018-03-08 17:28:37 +00:00
Jason Orendorff 4d670d3ab3 Bug 1439026 - Part 2: Move the most basic text-processing routines to util/Text.cpp. r=jandem.
Many operations on strings are also moved from builtin/String.cpp to vm/StringType.cpp.

--HG--
extra : rebase_source : 9239b1f1691962b5f1358d65eaae278780ae3f84
extra : source : cfd781da349e59c8d6b9fea7efed04a0b2124a61
2018-02-24 07:33:57 -06:00
Jason Orendorff 53395c4474 Bug 1439026 - Part 1: Rename jsstr* -> builtin/String*. r=jandem.
Also:
vm/StringBuffer.h -> util/
vm/Unicode* -> util/
vm/make_unicode.py -> util/
vm/String* -> vm/StringType*

--HG--
rename : js/src/jsstr.cpp => js/src/builtin/String.cpp
rename : js/src/jsstr.h => js/src/builtin/String.h
rename : js/src/builtin/SymbolObject.cpp => js/src/builtin/Symbol.cpp
rename : js/src/builtin/SymbolObject.h => js/src/builtin/Symbol.h
rename : js/src/vm/StringBuffer.cpp => js/src/util/StringBuffer.cpp
rename : js/src/vm/StringBuffer.h => js/src/util/StringBuffer.h
rename : js/src/vm/Unicode.cpp => js/src/util/Unicode.cpp
rename : js/src/vm/Unicode.h => js/src/util/Unicode.h
rename : js/src/vm/UnicodeData.txt => js/src/util/UnicodeData.txt
rename : js/src/vm/UnicodeNonBMP.h => js/src/util/UnicodeNonBMP.h
rename : js/src/vm/make_unicode.py => js/src/util/make_unicode.py
rename : js/src/vm/String-inl.h => js/src/vm/StringType-inl.h
rename : js/src/vm/String.cpp => js/src/vm/StringType.cpp
rename : js/src/vm/String.h => js/src/vm/StringType.h
rename : js/src/vm/Symbol.cpp => js/src/vm/SymbolType.cpp
rename : js/src/vm/Symbol.h => js/src/vm/SymbolType.h
extra : rebase_source : cb5d8901c9b328c72ebb24eb28297a579c714da5
extra : source : 72a84df56d3901e17b78b5cc7698cee8883f6614
2018-02-24 08:55:13 -06:00
Dragan Mladjenovic 89fb22657a Bug 1443727 : [MIPS] Fix miscellaneous build warnings r=bbouvier
--HG--
extra : amend_source : 88cbea3ed66edd9d5cadff6ea6c614d884109a12
2018-03-06 23:13:00 +02:00
Jan de Mooij 4ea06d956b Bug 1425580 part 19 - Remove LNode::numSuccessors_. r=nbp 2018-03-08 11:10:51 +01:00
Jan de Mooij 42d02c9236 Bug 1425580 part 18 - Assert LIR instructions are non-virtual. r=nbp 2018-03-08 11:10:50 +01:00
Jan de Mooij 039786462b Bug 1425580 part 17 - Devirtualize LNode::op. r=nbp 2018-03-08 11:10:50 +01:00
Jan de Mooij 3ff73e8218 Bug 1425580 part 16 - Devirtualize LInstruction::getOperand. r=nbp 2018-03-08 11:10:50 +01:00
Jan de Mooij 644c029d87 Bug 1425580 part 15 - Move virtual LNode::getOperand to LInstruction, devirtualize LPhi::getOperand. r=nbp 2018-03-08 11:10:50 +01:00
Jim Blandy 00f3f3318d Bug 1443592: Part 7: Use jit::CommonFrameLayout to store the hasCachedSavedFrame flag for Baseline frames. r=jandem
A jit::BaselineFrame is followed in memory by a jit::JitFrameLayout; as the
stack grows downwards, the JitFrameLayout is pushed first, "followed" by the
BaselineFrame at lower addresses, and finally by locals and the operand stack.

A BaselineFrame* points, naturally, at the BaselineFrame structure, but we use
the address of the JitFrameLayout as the address for a physical Ion frame -
actually, a pointer to its base class, jit::CommonFrameLayout. This means that,
if OSR replaces a BaselineFrame with an Ion frame, then walking the stack with a
FrameIter will see an Ion frame where a BaselineFrame used to appear, and the
LiveSavedFrameCache::FramePtr we'll construct from that FrameIter will be
different.

If the LiveSavedFrameCache wants to assert that frames with their bits set
indeed appear in the cache, then we'd better clear the flag whenever we OSR the
frame. But this is a pity; it's still the same frame, representing the same
function activation.

Meanwhile, both BaselineFrame and CommonFrameLayout have their own
hasCachedSavedFrame flags, which is confusing.

This patch changes FramePtr to use a jit::CommonFrameLayout* for both Baseline
frames and physical Ion frames, so OSR does not change the frame's address, and
use CommonFrameLayout's hasCachedSavedFrame flag for both types, so that OSR
need not take any explicit steps to propagate the cached flag to the new frame.

MozReview-Commit-ID: rOMjUXlwIQ

--HG--
extra : rebase_source : 360cca36216e24b5668c28e7f4d02ef76b6a0fb8
extra : source : 000d13ca4b5c8427308753a4a1e23f56245dc19f
2018-03-06 14:55:28 -08:00
Jim Blandy 9781c17f42 Bug 1443592: Part 6: Remove hasCachedSavedFrame accessors from AbstractFramePtr. r=fitzgen
Some variants of AbstractFramePtr have a cached saved frame flag, and others
don't, but the whole point of LiveSavedFrameCache::FramePtr is that it
represents a frame that does have a flag.

Rather than one variant of FramePtr that is an AbstractFramePtr (restricted to
certain variants), flatten out the two enums into one, and make FramePtr the
sole authority on which sorts of frames we have, and how to access their flags.

This means there is no need for hasCachedSavedFrame accessors on
AbstractFramePtr, just on the individual concrete frame types.

MozReview-Commit-ID: BRVdfqOqBsG

--HG--
extra : rebase_source : 479940f862b861a5dc05be5e2b02a357f3a58c1b
extra : source : 22eb481891541995573ff8a223393567ccfecda6
2018-03-06 13:51:13 -08:00
Jim Blandy e5e4521bc0 Bug 1443592: Part 5: Move LiveSavedFrameCache::getFramePtr to FramePtr::create. r=fitzgen
MozReview-Commit-ID: EZHdkBeMGnm

--HG--
extra : rebase_source : 350b3b792c58c43ba109fac5902543704ecdbd76
extra : intermediate-source : 082f193f8e8501ef4ccf15ae403eafee1bc594e7
extra : source : d529affcc8d8ae697e4f0e274c4c4ac39e835b57
2018-03-06 13:33:52 -08:00
Jim Blandy 5b7e019a17 Bug 1443592: Part 4: Enable saved frame caching for wasm debug frames. r=jandem
MozReview-Commit-ID: 623CUCku6S1

--HG--
extra : rebase_source : cd70af3cb8afa7d19383be65d5b8a58cab6bf29b
2018-03-06 13:13:39 -08:00
Jim Blandy 501050e8e1 Bug 1443592: Part 3: Change LiveSavedFrameCache::find to take a FramePtr, not a FrameIter. r=fitzgen
This obviates dynamic checks in find about the state of the iterator, since
they're covered by the fact that we were able to obtain a FramePtr at all.

This does mean that we have to pass the pc separately. But that's symmetrical
with the insert method, so it's okay.

MozReview-Commit-ID: FgsDjHB2il4

--HG--
extra : rebase_source : cea62332ed0f138a41d4898c43945d1f981c6c98
2018-03-06 11:42:36 -08:00
Jim Blandy 8c139613f3 Bug 1443592: Part 2: Move hasCachedSavedFrame flag access from FrameIter to LiveSavedFrameCache::FramePtr. r=fitzgen
Instead of using FrameIter::hasCachedSavedFrame, the code should instead try to
construct a FramePtr via LiveSavedFrameCache::getFramePtr, which returns a
Maybe<FramePtr>. If that is Some, then we know the frame at hand actually has a
flag, and we can test and set it.

Since the existing FrameIter::hasCachedSavedFrame screens out all wasm frames,
we change LiveSavedFrameCache::getFramePtr to do the same. However, the existing
behavior was incorrect, since wasm::DebugFrame does carry the flag; we'll fix
that in a later patch.

FrameIter::hasCachedSavedFrame asserted that jsJitFrame().isIonScripted(); this
is tested by isPhysicalIonFrame(), so that case is already covered.

MozReview-Commit-ID: 92wCc71s4nU

--HG--
extra : rebase_source : 54f60fbf298037448d9c051df3419df2a80f17d2
2018-03-06 11:28:53 -08:00
Jim Blandy 5866349735 Bug 1443592: Part 1: Introduce opaque LiveSavedFrameCache::Key type for cache keys. r=fitzgen
By design, the LiveSavedFrameCache holds the addresses of both live and dead
stack frames. This change wraps those addresses in an opaque type that can only
be compared for equality with other such values, and provides no interface to
retrieve the underlying pointer, ensuring statically that we will not
accidentally use a cache key to access memory.

MozReview-Commit-ID: 9Wom5gFVQls

--HG--
extra : rebase_source : e3dff595085973f1f10f57a67c192656c0bcd866
2018-03-05 18:03:56 -08:00
Matt Brubeck 1fbdfd78ef Bug 1444097 - Clean up env_logger dependencies. r=ted
For the "js" crate, disable the "regex" feature to reduce binary size.

For the "u2fhid" crate, it's used only in examples. Make it a dev-dependency
so it won't be part of the Firefox build.

MozReview-Commit-ID: DY9indMqrRw

--HG--
extra : rebase_source : aa66fe1effaeca0ae35ec5dd20b33724eb3fac48
2018-03-08 07:35:11 -08:00
Jan de Mooij d7a8ae09e2 Bug 1441012 - Don't attempt to inline scripts we know Ion cannot compile. r=nbp
--HG--
extra : rebase_source : 7cab8920a82577a94f280b42f9d46d384533bb59
2018-03-07 16:51:45 +01:00
Jason Orendorff 1684805047 Bug 1443147 - Fix PosixNSPR build after bug 1441454. r=sfink
--HG--
extra : rebase_source : 8187dec35e6d7c398f31c2438cd903edb52fe6b4
2018-03-05 17:10:05 -06:00
Philip Chimento 5dd1b01d13 Bug 1430438 - Allow reference counted data in JS_NewArrayBufferWithContents(). r=sfink
--HG--
extra : rebase_source : fbea1f2f9408247b2375c575ca2d8997d43d7200
2018-02-22 21:03:00 -08:00
Jim Blandy b1a56f5e14 Bug 1438121: Part 13: Make LiveSavedFrameCache::Entry's members const. r=fitzgen
MozReview-Commit-ID: GbJhE9nylaa

--HG--
extra : rebase_source : 07d6f2480dec2e384b4b28c3ab9e5f23cc718fe5
extra : amend_source : 2e22e23b0294d8e011a2fa162b1ed7a7ac612dc3
2018-03-02 23:56:26 -08:00
Kannan Vijayan 627eb6ae9a Bug 1411415 - r=bz r=fitzgen 2018-03-05 19:27:02 -05:00
Jim Blandy dd76a8cf31 Bug 1438121: Part 3: Add shell tests for implicit async stacks. r=fitzgen
MozReview-Commit-ID: BfPPrvEGSgg

--HG--
extra : rebase_source : 09c9bc2b61f83d5316fd46f2da2e8a15dc986060
2018-02-25 16:22:32 -08:00
Jim Blandy 2dde84ffff Bug 1438121: Part 2: Define the 'bindToAsyncStack' JS shell testing function. r=fitzgen
See JS_FN documentation for details.

MozReview-Commit-ID: 6WUaGfdwogX

--HG--
extra : rebase_source : 24116d97e9ed40697d296b3b18879ab5b4705fe4
2018-02-25 15:43:20 -08:00
Jim Blandy f61135a1b9 Bug 1438121: Part 1: Add job dispatch primitive to shell. r=fitzgen
See JS_FN documentation for details.

MozReview-Commit-ID: 8ZLyOX85qqh

--HG--
extra : rebase_source : 3b249dc19ffba6fb700290b88b23207de539bcb5
2018-02-25 14:06:05 -08:00
Jim Blandy 011d61207b Bug 1438121: Part 5: Don't propagate the 'hasCachedSavedFrame_' bit from the RematerializedFrame to the BaselineFrame. r=fitzgen
When capturing the JavaScript stack as a chain of SavedFrames, the
hasCachedSavedFrame flag on a frame indicates that the frame has an entry in
the LiveSavedFrameCache, which may hand us the SavedFrame for a previously
captured remainder of the stack, letting us stop the stack walk early.

The LiveSavedFrameCache uses AbstractFramePtr and jit::CommonFrameLayout* values
as keys. A RematerializedFrame uses an AbstractFramePtr as its key, but the
BaselineFrame we build from it has a jit::CommonFrameLayout* as its key; the two
keys are unequal. It's valuable to be able to assert that, if a frame has its
hasCachedSavedFrame flag set, then it must have an entry in the cache; to allow
that, converting a RematerializedFrame to a BaselineFrame must clear the flag,
since the BaselineFrame's key is not present.

We could instead fix up the cache entry's key, and carry over the flag, but it's
simpler to just let the cache get repopulated as needed.

MozReview-Commit-ID: 612daDJ1R4w

--HG--
extra : rebase_source : c528eafff0b1d7eeaa5f7c688a6c82631f5282a6
2018-02-23 22:28:56 -08:00
Jim Blandy da36f58516 Bug 1438121: Part 12: Make LiveSavedFrameCache::getFramePtr's parameter const. r=fitzgen
MozReview-Commit-ID: K4JAFidKNzJ

--HG--
extra : rebase_source : 112932d0bf455d1eab0061d3500be7e4ad838712
2018-03-02 00:05:27 -08:00
Jim Blandy 2216bc1d9b Bug 1438121: Part 8: AutoSetAsyncStackForNewCalls doc fix. DONTBUILD r=fitzgen
MozReview-Commit-ID: JwIM2EAmPZY

--HG--
extra : rebase_source : 7bf7dc85b676fe3597b919989f2a8ae2b9ec677e
2018-02-25 23:33:54 -08:00
Jim Blandy eda1ea97d0 Bug 1438121: Part 6: Improve comments for js::LiveSavedFrameCache. DONTBUILD r=fitzgen
MozReview-Commit-ID: C4W5cgwdNtv

--HG--
extra : rebase_source : 3e0f37f632b267dd79a27b30d75d9db7fe4cab02
2018-02-24 13:57:41 -08:00
Cosmin Sabou ed1b2a8736 Backed out 4 changesets (bug 1437167) for build bustages on nsUpdateDriver.cpp and WindowsMessageLoop.cpp on a CLOSED TREE.
Backed out changeset b98740e7c639 (bug 1437167)
Backed out changeset 4476e8f51fa6 (bug 1437167)
Backed out changeset c79dc40faa41 (bug 1437167)
Backed out changeset b608d2dcbb86 (bug 1437167)
2018-03-06 00:09:46 +02:00
Jim Blandy 0ed1746833 Bug 1437733: Merge JSFunction::u::wasm with other members. r=bbouvier
In JSFunction, u.wasm.native_ member must have the same type and offset as
u.native.func_. This is better accomplished by simply using func_ for both.

Further, u.wasm.jitEntry_ must alias u.native.extra.asmJSFuncIndex_. This is
better accomplished simply by making them both members of the same union.

This leaves u.wasm empty, so it can be deleted. Two static assertions about
member offsets can be removed.

MozReview-Commit-ID: 8ukNaFysWvD

--HG--
extra : rebase_source : e58a294ecd9b31592214e5e11be2f8729edb38fd
2018-02-12 17:55:22 -08:00
Emilio Cobos Álvarez f464bc3e84 Bug 1444679: Remove WrappedJSIdentity. r=bholley
Seemed to only be used for the method that was removed in the previous patch.

MozReview-Commit-ID: 1cKpVBlxa7r

--HG--
extra : rebase_source : 357e5f9f34e418e386ac3966760241db8b7e088f
2018-03-11 03:13:47 +01:00
Emilio Cobos Álvarez f3abce1a17 Bug 1444679: Remove unused nsXPCWrappedJSClass::IsWrappedJS. r=bholley
MozReview-Commit-ID: KnNOjaEpa0g

--HG--
extra : rebase_source : f3f8b42181f009135c0cb4a44f065d79338b201a
2018-03-11 02:36:46 +01:00
Nika Layzell 262be91f75 Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj
MozReview-Commit-ID: BN18I8Q6c7S
2018-03-05 16:00:00 -05:00
Luke Wagner 431a06c454 Bug 1435360 - Baldr: implement wasm interrupt in terms of TlsData branch and stack overflow check (r=bbouvier)
--HG--
extra : rebase_source : 2384561de07e6849cb83a00713ba57e71b3715f6
2018-03-09 13:04:53 -06:00
Luke Wagner 9966ab45b0 Bug 1435360 - Baldr: remove wasm async interrupt support (r=jandem)
--HG--
extra : rebase_source : 044738d64e84f443a07df77f49143de570de7281
2018-03-09 13:04:15 -06:00
Nicolas B. Pierron 24a071ddce Bug 1438886 - Fix arm disassembler by adding support for CSDB instruction. r=me
CLOSED TREE
2018-03-09 19:20:33 +00:00
Nicolas B. Pierron 36b48bece7 Bug 1438886 - Prevent speculative execution after returning from GC-capable C++ code. r=jandem 2018-03-09 18:29:10 +00:00
Lars T Hansen a9e9de65d4 Bug 1441142 - Adapt wasm frame code for ARM64. r=bbouvier
Since the SP behaves unusually on ARM64 we get architecture-specific
code paths for the prologue, the epilogue, and the unwinding, and the
Frame must also be 16-byte aligned.

--HG--
extra : rebase_source : d6bca83621abd882d7cdf3be6a594d96ac2ec4d9
extra : source : fe253cc42e453dec1199b4284c84425ed6cacb1a
2018-01-22 11:13:14 +01:00
Lars T Hansen 178e4d5ab5 Bug 1439404 - Wasm baseline, fill in the porting APIs for ARM64. r=bbouvier
The only remarkable thing about this patch is that it sets up the
assembler to use the native SP, not the pseudo-SP used by the JS
baseline compiler.  The stubs and frame code (bug 1441142) also
assumes this.  Doing this, we generate fewer instructions and we gain
a register (though we do not yet use that register here because it is
used for interrupt handling, see the other bug).

--HG--
extra : rebase_source : 2f4a9dec5853470c7cf315b26b28893f420db29d
extra : intermediate-source : ac5df2f178cbf8b560efe9551ff9dc46e8e030e5
extra : source : 34bd5eae004e6aad8dafd288e4c4c1935d69976e
2017-11-27 09:07:04 +01:00
Lars T Hansen d888162e16 Bug 1439404 - Wasm baseline, support the chunky ARM64 stack. r=bbouvier
ARM64 cannot allocate stack in word-sized increments (well it can, but
SP cannot be used to dereference it unless double-word aligned).  So
modify the stack abstraction to allocate the stack in larger, aligned
increments.

Here we allocate in 8-word increments, and we preallocate the first
8-word chunk when we enter the function, both since "empty stack" is
expected to be a common occurrence and because a short stack is
expected to be typical.  If we're lucky, few stack
allocations/deallocations will actually be necessary.  Future work
will try to get a grip on the best chunk size.

--HG--
extra : rebase_source : 9270d5257a4048dd789dab251aacf6727995d371
extra : intermediate-source : 6289887b1735ee87ec08db8df5bec686b91a48a0
extra : source : c6c50d230e354f9b6a2c5e7bdc2aad4a6e7da0ae
2017-11-17 13:17:29 +01:00
Lars T Hansen 652c98efbf Bug 1439404 - ARM64 simulator bugfix, add missing guard. r=bbouvier
--HG--
extra : rebase_source : 2486fda4c0c63814a7bce0b3609334261b7e0b6d
2018-03-06 16:29:42 +01:00
Lars T Hansen 5685d3b783 Bug 1439404 - Wasm on ARM64: gating. r=bbouvier
Make wasm::HasCompilerSupport() and wasm::BaselineCanCompile()
know that ARM64 compilation is supported.

--HG--
extra : rebase_source : b976cec924d270ff46bcfbb5a7f5e6bfc78ad546
extra : intermediate-source : d7c0cdc04e7858b764314708eb48ed7d40677baf
extra : source : 061bb6ba20742e0d9913a8fbfec6874e3110dfee
2017-11-28 10:05:36 +01:00
Lars T Hansen 7371a080ac Bug 1442583 - Properly initialize ARM64 icache flushing machinery. r=sstangl
--HG--
extra : rebase_source : 73b5921da1fa0a19d6072e35d09bd7b528bb6bfc
extra : intermediate-source : 19516efbbf6750ba04e11c7099586d5be2fe818f
extra : source : 4316cc82d6302edf839a4af6fcb815f0ffa9f65c
2018-03-05 09:55:28 +01:00
Lars T Hansen fc25eb4380 Bug 1375074 - Save and restore non-volatile x28 on ARM64 for generated unboxed object constructor. r=sstangl
--HG--
extra : rebase_source : 4a2824b23cf7453d07c962123f780c0ff2fd5292
extra : source : dec6ab6522a4eb4b3c2defc5078b38ed904f3383
2018-02-28 13:57:52 +01:00
Andrea Marchesini 5784769019 Bug 1443079 - nsScriptError.isFromPrivateWindow must match the correct value also in e10s mode, r=smaug 2018-03-13 06:40:38 +01:00
Jeff Walden 00468f1caf |this|-qualify a couple calls to |Cell::is| inside Cell template member functions, because some gcc trips and falls when asked to compile them (possibly because the |is|-call appears inside a decltype?). No bug, r=multiple-bustage-reports-from-treeherder-and-bz
--HG--
extra : rebase_source : 8a2f2096684d25541be63490e722e8b1d5910c9f
2018-03-09 23:16:03 -08:00
Brindusan Cristian 575a3a3976 Backed out 3 changesets (bug 1435360) for web-platform reftests failures on marionette/content/reftest.js CLOSED TREE
Backed out changeset c4bc47b31311 (bug 1435360)
Backed out changeset eb7a4a96c333 (bug 1435360)
Backed out changeset 7d6183aa40da (bug 1435360)
2018-03-12 23:53:41 +02:00
Luke Wagner d389a89796 Bug 1435360 - Baldr: implement wasm interrupt in terms of TlsData branch and stack overflow check (r=bbouvier)
--HG--
extra : rebase_source : c65945e89c19c0f4bd4208b0e67348ef6b410797
2018-03-12 15:10:06 -05:00
Luke Wagner 67e7b22f0f Bug 1435360 - Baldr: remove wasm async interrupt support (r=jandem)
--HG--
extra : rebase_source : 7bb9f6e91f0e95213f7f6a5878ffe713de2cf486
2018-03-12 11:12:54 -05:00
Kris Maglione a036df8b65 Bug 1403348: Part 4 - Annotate certain startup crashes with AsyncShutdown script contents. r=mccr8 data-r=rweiss
We're seeing startup crashes which point to data corruption in the source of
the AsyncShutdown component and module, but it's unclear whether the source of
this corruption is on disk, in memory, or in XDR data.

This change annotates crash reports with the contents of those files, so that
we can compare the actual source with the corrupted values in the generated
errors, and narrow down the source of the corruption.

MozReview-Commit-ID: 7p8y73XUGLK

--HG--
extra : rebase_source : 8e1b85df0cf69556af6f998f3d638bf2033e6ca0
extra : source : cf8613751378c8790b56131cd2a1be68573f9286
2017-11-04 17:20:17 -07:00
Csoregi Natalia 16068f9f72 Backed out changeset cf8613751378 (bug 1403348) for Build Bustage on ServiceWorkerRegistrar.cpp:29. CLOSED TREE 2018-03-09 00:59:11 +02:00
Kris Maglione 2c7b68e235 Bug 1443983: Part 3 - Remove platform support for interpositions. r=mccr8
This is all dead code now that the interposition service has been removed.

MozReview-Commit-ID: H6eS26y1f0f

--HG--
extra : rebase_source : c6f94df51441a62c4fbff4be657aedc9699265f5
2018-03-07 18:11:18 -08:00
Kris Maglione f66b3733ba Bug 1443964: Part 2 - Remove most add-on compatibility shims. r=mconley
The TabBrowser.addProgressListener shim is the only remaining exception, since
the browser_google_behavior.js non-trivially relies on it.

MozReview-Commit-ID: Cc2ARwLkjTA

--HG--
extra : rebase_source : beea6f21dda0517c0a4c9cf09daeafcff85b93c0
2018-03-07 12:16:37 -08:00
Kris Maglione fac1655973 Bug 1403348: Part 4 - Annotate certain startup crashes with AsyncShutdown script contents. r=mccr8 data-r=rweiss
We're seeing startup crashes which point to data corruption in the source of
the AsyncShutdown component and module, but it's unclear whether the source of
this corruption is on disk, in memory, or in XDR data.

This change annotates crash reports with the contents of those files, so that
we can compare the actual source with the corrupted values in the generated
errors, and narrow down the source of the corruption.

MozReview-Commit-ID: 7p8y73XUGLK

--HG--
extra : rebase_source : ad31c4fae1cb5c931e166702499dd1e56758d3e3
2017-11-04 17:20:17 -07:00
Olli Pettay 2439836b37 Bug 1193394 - Part 1: Microtasks and promises scheduling. r=bevis 2017-11-17 11:01:27 +08:00
Tom Ritter e120c89f6d Bug 1440539 - Support time jitter in the JS Shell, and expose a function to enable it. r=luke
This adds jittering to the already existing logic for time clamping. It also exposes a
testing function allowing those interested to enable time clamping or time clamping and
jittering.

Neither (clamping nor jittering) is enabled by default.

MozReview-Commit-ID: JcHCEwRQPch

--HG--
extra : amend_source : 81d9a0c425ed2549561e5b6711f4c654614b1f38
2018-03-02 13:47:44 -06:00
Tom Ritter 4b715680d2 Bug 1425462 Normalize the JavaScript Engine behavior by adding a callback r=luke
Time Precision Reduction in the JS Engine was handled by a small bit of
duplicated logic. With Time Jittering, and general improvements to the
logic due to float fuzziness, we want to unify the logic for the JS Engine
and the browser into one location. This patch does that.

Note that this will leave the JS Shell without a time jittering implementation.
It currently has a time clamping implementation - but I'm not actually sure if
the shell is doing anything with it, because it's probably not calling
SetTimeResolutionUsec to set it up.  In Bug 1440539 we will add a jitter
implementation for the shell. (And probably turn time rounding and jittering on
for it too.)

MozReview-Commit-ID: 2BTIMzE8MjW

--HG--
extra : rebase_source : db5cd6a219e1b89988f142fc22994bf816507889
2018-02-22 16:05:50 -06:00
Tom Ritter 845ef57dd6 Bug 1425462 When reducing the precision of timestamps, also apply fuzzytime to them r=bkelly
Fuzzytime deterministically generates a random midpoint between two clamped values,
and if the unreduced timestamp is above the midpoint, the time is rounded upwards.
This allows safe time jittering to occur, as time will never go backwards on a given
timeline.

It _is_ possible for time to go backwards when comparing different (but related)
timelines, such as a relative timeline in one page (with its own
performance.timeOrigin) and a relative timeline in an iframe or Worker (which
also has its own performance.timeOrigin). This is the same behavior as the 2ms timer
reduction we previously landed; jitter doesn't make this any better or worse.

MozReview-Commit-ID: IdRLxcWDQBZ

--HG--
extra : rebase_source : 40b29d34e5cc99f9b8e6d5e711a03b9fe9bfa595
2018-03-01 00:07:03 -06:00
Brindusan Cristian 6cf5ac594a Merge inbound to mozilla-central. a=merge 2018-03-03 11:40:49 +02:00
shindli ebf177f7c0 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-03-03 01:17:14 +02:00
shindli 73e569944b Merge inbound to mozilla-central. a=merge 2018-03-03 01:06:35 +02:00
shindli 68a1ed26ac Merge autoland to mozilla-central. a=merge 2018-03-03 01:05:23 +02:00
Mike Hommey b98ffc5e45 Bug 1442508 - Enable tests on the nojit builds. r=sfink
--HG--
extra : rebase_source : 66a7f322c46dbc9572bac09b93a40621b43c4701
2018-03-02 12:04:15 +09:00
Boris Zbarsky 04cc99d225 Bug 1442313 part 1. Make xpc::IsInAutomation a bit faster. r=bholley
MozReview-Commit-ID: HTs3RwEOmZ4
2018-03-01 14:24:17 -05:00
Andreea Pavel 14a1838c54 Backed out 4 changesets (bug 1442313) for frequently failing crashtests on android, e.g. libeditor/crashtests/772282.html and layout/generic/crashtests/542136-1.html a=backout
Backed out changeset bfef9139500f (bug 1442313)
Backed out changeset 660332ce1bf0 (bug 1442313)
Backed out changeset 9788a46b8874 (bug 1442313)
Backed out changeset 8fc2c103027b (bug 1442313)
2018-03-02 18:08:23 +02:00