Commit Graph

64970 Commits

Author SHA1 Message Date
Nika Layzell
656ad38909 Bug 1457972 - Part 8: Remove external consumers of XPCConvert::NativeArray2JS/JSArray2Native, r=mccr8
Current XPIDL native arrays currently also require a custom entry point. With
the new arraylen parameter we can handle them in JSData2Native/NativeData2JS. As
these methods are more complex and don't share logic with an existing codepath,
I keep them in external helper methods.
2018-05-14 17:55:57 -04:00
Nika Layzell
3efaead212 Bug 1457972 - Part 7: Eliminate XPCConvert::NativeStringWithSize2JS/JSStringWithSize2Native, r=mccr8
XPIDL supports explicitly sized string types. These types currently have to be
handled by a separate entry point into XPCConvert, and don't share any logic
with the implicitly sized string types.

If we just add an array length parameter to the basic JSData2Native and
NativeData2JS methods we can handle them in the same place as every other type.

This also allows us to share a lot of code with non-sized string types, which is
nice :-).
2018-05-14 17:55:56 -04:00
Nika Layzell
e97495d7b3 Bug 1457972 - Part 5: Use modern JS APIs to root jsval temporaries in XPConnect, r=mccr8
When a jsval passed from JS code it needs to be stored in a nsXPTCVariant
object. This object is not rooted by default, as it is stored in some
C++-allocated memory. Currently, we root the values by adding a custom root
using the `js::AddRawValueRoot` API, which is deprecated, and only used by this
code and ErrorResult.

This also has the unfortunate effect that we cannot support XPCOM arrays of
jsvals, as we cannot root all of the values in the array using this API.

Fortunately, the JS engine has a better rooting API which we can use here
instead. I make the call context a custom rooter, like the SequenceRooter type
from WebIDL, and make sure to note every jsval when tracing, both in arrays and
as direct values.

This should allow us to avoid some hashtable operations with roots when
performing XPConnect calls, and remove a consumer of this gross legacy API.

In addition it allows us to support arrays. This will be even more useful in the
future when I add support for sequence<T> (which is a nsTArray<T>) to xpidl and
xpconnect.
2018-05-14 17:55:55 -04:00
Nika Layzell
e2240ec5a2 Bug 1457972 - Part 4: Remove dipper types, r=mccr8
In XPConnect, native values are passed around within nsXPTCMiniVariant objects.
an [nsXPTCMiniVariant] contains 64-bits of data in a union type.

nsXPTCMiniVariant values are created by the platform-specific glue code and
passed into XPConnect proper when calling from C++ into JS.

When calling from JS into C++, we instead create nsXPTCVariant objects and pass
them into the glue code. These objects have extra information in addition to the
nsXPTCMiniVariant: namely they also have a `type` field with the type stored in
the variant, space for flags, and a `ptr` field which is passed over IPC instead
of the inner nsXPTCMiniVariant when a flag (`PTR_IS_DATA`) is set.

The JSValue type in XPConnect is always passed as a pointer to a JSValue object,
both for in parameters and out parameters. This is handled by making the JSValue
type be unconditionally flagged as [`IsIndirect()`] This flag is also used for
all types of outparameters.

When the `IsIndirect()` flag is set, it means that the actual data is stored in
the nsXPTCVariant's val field, and it sets the flag to tell the glue code to
instead pass the `ptr` field (which is always pointing to the `val` field for
[legacy reasons]) into the C++ code.

In contrast "dipper" is a different and super weird flag. Currently only the
string class types (nsACString & nsAString) are marked as "dipper". A "dipper"
type is always passed as an "in" type (and thus always passed "directly"), even
when it's actually an out parameter.

XPConnect treats these types as though they are pointer types (nsAString*). This
means that there is no space in the nsXPTCVariant to store the actual nsAString
types when passing from JS into C++, so these values have to be allocated by a
different mechanism (in the current code, there is a size 2 buffer for each
string type in the context and once that buffer is exceeded, we heap allocate
the nsString values).

In effect, the current state looks something like this:
+------------+---------------------+---------------------+
| type       | out (xpt/native)    | in (xpt/native)     |
+------------+---------------------+---------------------+
| TD_INT32   | indirect (int32_t*) | direct (int32_t)    |
+------------+---------------------+---------------------+
| TD_JSVAL   | indirect (JSValue*) | indirect (JSValue*) |
+------------+---------------------+---------------------+
| TD_ASTRING | direct (nsAString*) | direct (nsAString*) |
+------------+---------------------+---------------------+

This patch ensures there is enough space in the nsXPTCVariant to fit the
nsString value, and switches string class types to being unconditionally
indirect instead of using the dipper system. This allows us to delete a ton of
dipper-specific code, and unify the indirect and string class codepaths.

This only affects the size of nsXPTCVariant objects, and does not affect
nsXPTCMiniVariant objects. nsXPTCVariant objects are never allocated by the
platform-specific binding code, rather, they are allocated in an AutoTArray on
the stack as part of the CallMethodHelper object.

The size increase is a total of 1 word, so 4 bytes in 32-bit builds, and 8 bytes
in 64-bit builds, which is ignorable for stack allocated objects.

[nsXPTCMiniVariant]: https://searchfox.org/mozilla-central/rev/eb6c5214a63e20a3fff455e92c876287a8d2e188/xpcom/reflect/xptcall/xptcall.h#20-47
[`IsIndirect()`]: https://searchfox.org/mozilla-central/rev/c0d81882c7941c4ff13a50603e37095cdab0d1ea/xpcom/reflect/xptinfo/xptinfo.h#371
[legacy reasons]: https://searchfox.org/mozilla-central/rev/eb6c5214a63e20a3fff455e92c876287a8d2e188/xpcom/reflect/xptcall/xptcall.h#66-79
2018-05-14 17:55:55 -04:00
Nika Layzell
f20e777cdb Bug 1457972 - Part 2: Remove unused code paths in xpconnect, r=mccr8
Thanks to the changes in the previous patch, we had some unused code which we
can get rid of. This patch just cleans stuff up a bit.
2018-05-14 17:55:54 -04:00
Nika Layzell
73efb8abf3 Bug 1457972 - Part 1: Unify xpconnect cleanup codepaths, r=mccr8
It used to be that in XPConnect there were many different pieces of code for
each place where we may need to clean up some untyped values based on their
nsXPTType information. This was a mess, and meant that every time you needed to
add a new data type you'd have to find every one of these places and add support
for your new type to them.

In fact, this was bad enough that it appears that I missed some places when
adding my webidl support! Which means that in some edge cases we may clean up
one of these values incorrectly D:!

This patch adds a new unified method which performs the cleanup by looking at a
nsXPTType object. The idea is that this function takes a void* which is actually
a T* where T is a value of the nsXPTType parmaeter. It clears the value behind
the pointer to a valid state such that free-ing the memory would not cause any
leaks. e.g. it free(...)s owned pointers and sets the pointer to `nullptr`, and
truncates nsA[C]String values such that they reference the static empty string.

I also modify every one of these custom cleanup codepaths to instead call into
this unified cleanup method.

This also involved some simplification of helper methods in order to make the
implementation cleaner.
2018-05-14 17:55:54 -04:00
Nika Layzell
9c090cb316 Bug 1455217 - Part 2: Add support for promises to XPCConvert, r=mccr8 2018-05-14 17:55:53 -04:00
Narcis Beleuzu
932adad93d Merge inbound to mozilla-central. a=merge 2018-05-15 00:36:35 +03:00
Adrian Wielgosik
c501e3beb0 Bug 1460940 - Clean up most remaining C++-side uses of nsIDOMDocument. r=bz
MozReview-Commit-ID: LKRnyDPNlle

--HG--
extra : rebase_source : a48b7c72a0f7ede38c91149a04d5de53987736f1
2018-05-11 19:46:15 +02:00
André Bargull
00643f1030 Bug 1461339 - Don't sparsify dense elements eagerly in NativeDefineProperty. r=jandem 2018-05-14 07:21:29 -07:00
Benjamin Bouvier
ff6b74e16b Bug 1459633: Block addMarkObservers if wasm gc is enabled; r=jonco
--HG--
extra : rebase_source : 42b3ea7245cc1299cb35c65fc609bfb7c731f1ab
2018-05-14 16:37:02 +02:00
bobslept
2828b96d98 Bug 1440610 - Rename ArenaLists::placeholder to ArenaLists::emptySentinel. r=jonco
--HG--
extra : histedit_source : 457c71ed98df0af077abec7f1ba0bb4337941fae
2018-05-12 19:55:17 +02:00
Philip Chimento
35690640f2 Bug 1430438 - Remove ref argument from JS_NewExternalArrayBuffer(). r=jorendorff
We actually don't want to allow aliased array buffers at all, so this
removes the ref argument from JS_NewExternalArrayBuffer() and renames
"unref" to "free".

Adjusts some comments, and also adds tests to make sure buffers are not
aliased when cloning.
2018-05-02 23:20:26 -07:00
André Bargull
61bc728b61 Bug 1460436 - Add a separate type policy for MSign. r=jandem 2018-05-10 03:06:27 -07:00
Jon Coppeard
e057d51b4e Bug 1449033 - Set new group unknown flag on placeholder prototypes where necessary r=jandem 2018-05-13 14:20:48 +01:00
Jan de Mooij
83764e4a8a Bug 1455954 - Print to stderr in more-deterministic builds when irregexp overrecursion check fails. r=sfink 2018-05-13 12:30:40 +02:00
Jan de Mooij
92b06ceae5 Bug 1459225 - Enable asm.js and wasm when running TSan in automation. r=sfink 2018-05-13 12:29:36 +02:00
Jan de Mooij
bd1348d4fa Bug 1460381 - Add more tests. r=anba 2018-05-13 12:26:17 +02:00
Jan de Mooij
54b6bd6772 Bug 1461034 - Don't clear an OOM exception in FoldElement. r=jonco 2018-05-13 12:24:23 +02:00
Julian Seward
4e5f8a3e8e Bug 1459850 - Wasm baseline: BaseCompiler::load() for 8-bit loads on x86: remove use of scratch reg. r=lth.
For x86(32), BaseCompiler::load() loads indirectly via the scratch reg (ebx)
when the data size is 8 bits and the eventual destination is esi or edi.
This is pointless because the actual load created by |masm.wasmLoad(*access,
srcAddr, out);| is a mov{s,z}bl instruction and so is unconstrained as to
the output register.  This patch removes the indirection.

--HG--
extra : rebase_source : 55131b8b582fbde287b993f5aefa01730e6b42cf
2018-05-12 13:00:47 +02:00
Julian Seward
dace56804f Bug 1459940 - Spidermonkey bustage and Jit test failures in memory-bulk.js when Gecko 62 merges to Beta on 2018-06-14. r=luke.
Bug 1446930 added a basic implementation of Wasm memory.copy/fill, and
tests.  Unfortunately, as-is the tests run on all branches but the
implementation is ifdef'd so as only to be compiled into Nightly (as
present), which will cause breakage on Beta.  This patch fixes the tests by
conditionalising them in the same way that tests for other experimental Wasm
features have been conditionalised.

--HG--
extra : source : 98b2e9629ed4b831876b66299d59d4ef85e2b406
2018-05-11 17:19:19 +02:00
Jan de Mooij
f79ea5233f Bug 1460381 - Follow-up to fix test bustage and add some more tests. r=anba 2018-05-12 22:55:27 +02:00
Cosmin Sabou
cfbba0925f Backed out changeset 98b2e9629ed4 (bug 1459940) for Spidermonkey bustages on non262/Array/from_errors.js. 2018-05-12 16:07:50 +03:00
Julian Seward
3c39ea9414 Bug 1459940 - Spidermonkey bustage and Jit test failures in memory-bulk.js when Gecko 62 merges to Beta on 2018-06-14. r=luke.
Bug 1446930 added a basic implementation of Wasm memory.copy/fill, and
tests.  Unfortunately, as-is the tests run on all branches but the
implementation is ifdef'd so as only to be compiled into Nightly (as
present), which will cause breakage on Beta.  This patch fixes the tests by
conditionalising them in the same way that tests for other experimental Wasm
features have been conditionalised.

--HG--
extra : rebase_source : 160ad70799ac79f7ba660c371cb46585bd144d04
2018-05-11 17:19:19 +02:00
Brindusan Cristian
6c56b182d4 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-12 12:51:43 +03:00
Brindusan Cristian
1df25b391a Merge inbound to mozilla-central. a=merge 2018-05-12 12:47:14 +03:00
Jan de Mooij
2dc1aade91 Bug 1460381 - Support sealed and non-extensible dense elements on native objects. r=anba 2018-05-12 11:46:51 +02:00
André Bargull
a72259bbca Bug 1459285: Update tzdata in ICU data files to 2018e. r=Waldo 2018-05-09 01:12:01 -07:00
Markus Stange
73800e02dd Bug 1461053 - Treat SP marker frames as their own kind, instead of lumping them together with label frames. r=njn
MozReview-Commit-ID: 5nQEIgBY4SP

--HG--
extra : rebase_source : 9b59e41fdf62e86941104248d9c0cf08b73736f2
2018-05-14 23:30:32 -04:00
Markus Stange
818ad4ea69 Bug 1461053 - Rename Cpp frames to label frames in the ProfilingStack. r=njn
The name Cpp was confusing, because C++ functions are in the native stack, not
in the pseudo stack. The pseudo stack only contains frames for manually
instrumented code that uses AutoProfilerLabel, and JS frames.

MozReview-Commit-ID: 9ptfhREo0qy

--HG--
extra : rebase_source : 76a1a32acb4c946aeb2ad45e904e419c1c9e2ad1
2018-05-14 23:21:29 -04:00
Andrew McCreight
6c4a1d23f2 Bug 1460636 - Don't trace jsids on ObjectGroup in the cycle collector. r=jonco,sfink
For some reason, the CC spends a lot of time tracing jsids on
ObjectGroups when an addon is installed. This patch avoids that by
adding a canSkipJsids flag to JSTracer, and using it in
ObjectGroup::traceChildren. If this is true, then the tracer is free
to not report every jsid. This flag is set to true for the two CC
tracers.

MozReview-Commit-ID: CWFqQEr0SxV

--HG--
extra : rebase_source : cc31c22717f8990166454db191e0d40c145e09f0
2018-05-11 11:38:58 -07:00
Luke Wagner
e8b42871cc Bug 1459225 - Baldr: fix race in tier-2 initialization (r=bbouvier)
--HG--
extra : rebase_source : bad94fd55da9cbe9ef1d1a7493cd2e91cbd466b1
2018-05-10 18:48:56 -05:00
Narcis Beleuzu
25e3477b34 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-05-15 00:39:41 +03:00
Greg Tatum
596f2f4219 Bug 1426124 - Discard JIT frames from native stacks in the profiler; r=jandem,mstange
MozReview-Commit-ID: 9O92eRm5adW

--HG--
extra : rebase_source : ec4e2a5180f191b9c0946143f6e01eaf25028ce7
2018-04-25 10:08:38 -05:00
Steve Fink
42fb0058e5 Bug 1434783 - Remove extractString, r=jandem
--HG--
extra : topic : rm.extractString
extra : rebase_source : 6f234eb8c101dde71157e32cafd2450c8a74867c
2018-01-31 15:51:15 -08:00
Tom Schuster
01e9c257a6 Bug 1459607 - CallSiteObjects can only contain strings. r=jandem
--HG--
extra : rebase_source : daf441f2520867ba4594f06bb0937d70083cacce
2018-05-08 22:42:54 +02:00
Jon Coppeard
0924042900 Bug 1456774 - Remove linear search for finished parse task and type off thread parse token r=jandem r=baku 2018-05-10 14:51:14 +01:00
Eric Faust
87b900ebec Bug 1454352 - Add APIs for parallel decoding of BinAST data r=jonco 2018-05-10 13:26:16 +01:00
Tom Schuster
a08a710078 Bug 1401927 - Handle unboxed objects with no elements in CacheIR. r=tcampbell
--HG--
extra : rebase_source : 6599dbfe2e80b4b18bf53738699e9a590740a599
2018-05-02 13:00:37 +02:00
Csoregi Natalia
f034c0ab5d Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-10 12:52:31 +03:00
Jon Coppeard
934e03badb Bug 1457703 - Fix bad implicit conversion constructor errors r=me 2018-05-10 10:40:05 +01:00
Jon Coppeard
913f117401 Bug 1457703 - Use function pointers rather than virtual run method for GC parallel tasks r=sfink a=abillings 2018-05-10 10:09:31 +01:00
Jon Coppeard
b02132bedf Bug 1457703 - Don't fixup an associated object's shape when updating moved pointers in another object r=sfink a=abillings 2018-05-10 10:09:27 +01:00
Jon Coppeard
3a38aac2ae Bug 1457703 - Fix count of compacting update tasks started r=sfink a=abillings 2018-05-10 10:09:23 +01:00
Jon Coppeard
befc3a0e32 Bug 1459568 - Expose gray object on return from shell test function r=sfink a=abillings 2018-05-10 10:08:52 +01:00
Steve Fink
4723f0394a Bug 1442481 - Make nursery and tenured versions of representative test strings, r=jonco
--HG--
extra : topic : nursery.strings
extra : rebase_source : 5bb671d9ad8d685dfc6c13ca9d3656c4f782249e
2018-04-04 15:05:49 -07:00
Andrew McCreight
65d34faa5e Bug 1460385 - Don't trace propid in TraceCycleCollectorChildren. r=sfink
The propid is a jsid, and a jsid can never be anything the CC cares
about, so there's no reason to trace it. In at least one profile of
Google Inbox, tracing shape propids is taking the majority of time in
the CC and causing very long pauses.

MozReview-Commit-ID: HcjnawBHLx1

--HG--
extra : rebase_source : 3682b2ac84752b200be780401059c2907dc7d6af
2018-05-09 12:39:46 -07:00
Steve Fink
c78c05d0ce Bug 1442481 - Remove invariant that no longer is: ropes are not always tenured anymore, r=jonco
--HG--
extra : topic : nursery.strings
extra : rebase_source : bbee61bf12c75cb21f8bc9d69bbeb27fb4066786
2018-03-01 08:20:16 -08:00
Steve Fink
48a44fc0fb Bug 1442481 - Use whole cell buffer to post-barrier string -> string edges, r=jonco
--HG--
extra : topic : nursery.strings
extra : rebase_source : 6aa3ccd4b3143981ca4340f49ae21e3dfdca6216
2018-04-03 21:13:07 -07:00
Nathan Froyd
493330ae3f Bug 1460379 - remove --with-pthreads option; r=ted.mielczarek
This option does nothing if it's provided, and things will probably
break in some most peculiar manner if somebody uses --without-pthreads.
Given that neither outcome is useful, we should remove the option.
2018-05-09 17:26:31 -04:00
Nathan Froyd
c21c323370 Bug 1460373 - move --enable-valgrind to moz.configure; r=ted.mielczarek 2018-05-09 17:26:31 -04:00
Jeff Walden
5e431fccb9 Bug 1459384 - Allocate tokens only when the token's contents are fully determined, rather than early and sometimes over-eagerly. r=arai
--HG--
extra : rebase_source : 98b0a5d37e5d4dc9ad2380dd9300f27f7cc523cc
2018-05-03 23:29:28 -07:00
Jeff Walden
91bfb3f7a8 Bug 1459384 - Make TokenStreamAnyChars::cursor private, and interact with it only through accessors and mutator functions. r=arai
--HG--
extra : rebase_source : 066bf71943900dc9e5f81a02c9b0b5c3043a064d
2018-05-04 22:22:00 -07:00
Jeff Walden
114791d853 Bug 1459384 - Move the finishToken call into getStringOrTemplateToken. r=arai
--HG--
extra : rebase_source : c156be076a95518eb7ab45f8d1615e9c598ba4de
2018-05-03 22:02:33 -07:00
Jeff Walden
0c6a64819c Bug 1459384 - Make FinishToken into a member function, not a lambda. r=arai
--HG--
extra : rebase_source : b96aae0b3d04555edb03c772358f04bcfff217e7
2018-05-03 22:02:33 -07:00
Jeff Walden
1ff4a82056 Bug 1459384 - Explicitly pass to FinishToken the two non-|this| captures it currently has. r=arai
--HG--
extra : rebase_source : dbe004e4462031227eb6baf5a5fad9b5535fc5ae
2018-05-03 22:02:32 -07:00
Jeff Walden
5765e69ada Bug 1459384 - Make getDirectives handle calling badToken() itself if needed. r=arai
--HG--
extra : rebase_source : d53f767a78acf81b17ddb0aaf7a7e0c3585f5792
2018-05-03 22:02:32 -07:00
Jeff Walden
9abb884ca8 Bug 1459384 - Make decimalNumber handle calling badToken() itself if needed. r=arai
--HG--
extra : rebase_source : 2f75df57ace903a21ddcdda3dd0bb266d9d91d42
2018-05-03 22:02:32 -07:00
Jeff Walden
48097113d2 Bug 1459384 - Make identifierName handle calling badToken() itself if needed. r=arai
--HG--
extra : rebase_source : 5ea7b1c81f9a8fb90d5672348aa0693200cbf4a2
2018-05-03 22:02:32 -07:00
Jeff Walden
485008d787 Bug 1459384 - Make getStringOrTemplateToken handle calling badToken() itself if needed. r=arai
--HG--
extra : rebase_source : 77f11f6fbc6919450bda1e023068bf0a4ac46599
2018-05-03 22:02:32 -07:00
Jeff Walden
9243a26b70 Bug 1459384 - Eliminate the BadToken lambda in favor of pessimistically marking the outparam undefined to start, then using a MOZ_COLD badToken() function to handle failure code. r=arai
--HG--
extra : rebase_source : f7a6c7fd25db187d70a273ed748c0c259557ccd8
2018-05-03 22:02:32 -07:00
Jeff Walden
89c188ee0c Bug 1459384 - Make |newToken()| only get a Token*, and have it accept a start offset, not compute one. r=arai
--HG--
extra : rebase_source : 4e63211df0c2ca723e50687368c6d099ab589727
2018-05-03 22:02:31 -07:00
Jeff Walden
04c82dc514 Bug 1459384 - Pass |Token* tp| directly to |FinishToken| to eliminate another overshared local. r=arai
--HG--
extra : rebase_source : adbca4992b57a178310d71e237ead150043f1b5e
2018-05-03 22:02:31 -07:00
Jeff Walden
a7874ba6c0 Bug 1459384 - Merge a few declarations into their first assignments, now that that's possible. r=arai
--HG--
extra : rebase_source : 15f95c98fa4cda7a4ff870d0e16d41ca1c2ee044
2018-05-03 22:02:31 -07:00
Jeff Walden
3af48bd1a0 Bug 1459384 - Move decimal number tokenizing into a separate function and eliminate the final two labels from TokenStreamSpecific::getTokenInternal. r=arai
--HG--
extra : rebase_source : 4876163dca864162d0ae9a963e5551f93fbc923b
2018-05-01 19:06:27 -07:00
Jeff Walden
6308653d9f Bug 1459384 - Rename FirstCharKind's BasePrefix initializer to ZeroDigit for better understandability in the place where behavior diverges when that value is found. r=arai
--HG--
extra : rebase_source : 4c5e44adee8eb6cde25e8761dc60ab59775d6012
2018-05-01 14:47:25 -07:00
Jeff Walden
3be21c5482 Bug 1459384 - Move some overscoped variables inside the retry-for-comment loop. r=arai
--HG--
extra : rebase_source : 5fffc750cac3bb69031fd9b151dcb0fe340c0df7
2018-05-01 13:08:07 -07:00
Jeff Walden
213f86e0e2 Bug 1459384 - Eliminate the |retry| label in |TokenStreamSpecific::getTokenInternal| by converting the surrounding code to a loop and using |continue| instead. r=arai
--HG--
extra : rebase_source : 564a5fb6ec596bbda7a026a6baf8bc2a1c7e9c17
2018-05-01 13:03:23 -07:00
Jeff Walden
e279feea18 Bug 1459384 - Eliminate the |error| label from |TokenStreamSpecific::getTokenInternal|. r=arai
--HG--
extra : rebase_source : de489d1109a3993ae15aa6c163d6ad19ec23c1d8
2018-05-01 12:58:56 -07:00
Jeff Walden
97f6bc5aa0 Bug 1459384 - Eliminate the |out| label from |TokenStreamSpecific::getTokenInternal|. r=arai
--HG--
extra : rebase_source : bd2c6e0521709cdc00a1da49610ee97ce2037889
2018-05-01 12:58:35 -07:00
Jeff Walden
31367b15e9 Bug 1459384 - Eliminate the skipline label in TokenStreamSpecific::getTokenInternal in favor of a separate function. r=arai
--HG--
extra : rebase_source : 25e9c2fd307c3173caf3a7e4b794bea0da413d0f
2018-05-01 09:06:15 -07:00
Jeff Walden
c079a4b0d4 Use more-normal formatting of HashTableEntry member functions, now that the prior consistent pattern is no longer consistent. No bug, r=me as trivial
--HG--
extra : rebase_source : 3b31ce414354ff457b1abe23d43da6655419824a
2018-05-08 14:48:11 -07:00
Andi-Bogdan Postelnicu
c4f2c57166 Bug 1416666 - Avoid doing a memset on a non-POD structure. r=jwalden
--HG--
extra : rebase_source : c1e3c4fb42693e552e037a35a489d4bbff6d5f98
2018-05-08 15:35:29 +03:00
Jeff Walden
15fdcd59bb Bug 1459382 - Change SourceUnits::matchRawCharBackwards to SourceUnits::ungetOptionalCRBeforeLF to reflect narrower scope/be character-type-agnostic. r=arai
--HG--
extra : rebase_source : 111ed0c672540be5bbceb4b87f2133070f7e3a9b
2018-05-01 09:01:22 -07:00
Jeff Walden
3911ed3a21 Bug 1459382 - Rename yet more SourceUnits member functions to refer to code units. r=arai
--HG--
extra : rebase_source : 2d15d1ace733abce1f3c1b1e2f6cf6d1d90ae864
2018-04-23 13:52:36 -07:00
Jeff Walden
cbf66c51a2 Bug 1459382 - Rename various SourceUnits member functions to refer to code units, not "raw" chars. r=arai
--HG--
extra : rebase_source : 74825f45ff7ee63ffc5b9a3f20e457a98761fc72
2018-04-23 13:51:37 -07:00
Jeff Walden
9d7ffc413d Bug 1459382 - Rename TokenStreamCharsBase<CharT>::TokenBuf to SourceUnits<CharT> preparing for its being specialized for single/double-byte source code units. r=arai
--HG--
extra : rebase_source : 47ee24795112518d3aa2a80e9160cba4bcb29815
2018-04-23 13:50:57 -07:00
Margareta Eliza Balazs
6c97db61d4 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-09 12:40:18 +03:00
Margareta Eliza Balazs
eb6c5214a6 Merge inbound to mozilla-central. a=merge 2018-05-09 12:33:51 +03:00
André Bargull
1cfe9bcd18 Bug 1456118: Update helper scripts for Python 3 compatibility. r=anba 2018-05-09 00:50:57 -07:00
Luke Wagner
32cfdd4da0 Bug 1458029 - Baldr: update wasm frame stack format string to match WebAssembly Web API spec (r=yury,bbouvier,fitzgen)
--HG--
extra : rebase_source : 526aea59059ef5710aac88aabd1ee71ddbf7512d
2018-05-08 13:26:40 -05:00
Luke Wagner
e508e84004 Bug 1458029 - Baldr: tweak function display name interface (r=bbouvier)
--HG--
extra : rebase_source : 26c3f0c345155f8ed42764384b2acf16c37db001
2018-05-08 13:25:00 -05:00
André Bargull
59f1e53c7c Bug 1416289 - Part 3: Always use double values for Math functions which are inlined through MMathFunction. r=jandem 2018-05-08 05:41:19 -07:00
André Bargull
70715adb39 Bug 1416289 - Part 2: Add Ion-inline support for Math.sign. r=jandem 2018-05-08 05:41:18 -07:00
André Bargull
80a4563cec Bug 1416289 - Part 1: Add Ion-inline support for Math.trunc. r=jandem 2018-05-08 05:41:18 -07:00
André Bargull
5dfcfcd243 Bug 1459611 - Use NumberEqualsInt32 when negative and positive zero are treated the same. r=jandem 2018-05-07 09:28:12 -07:00
André Bargull
b8d8d911f6 Bug 1458646 - Replace JS_NewStringCopyZ with NewStringCopyZ in Intl code. r=Waldo 2018-05-02 11:37:28 -07:00
Ciure Andrei
de05fd66c8 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-05-09 02:02:05 +03:00
Mark Banner
9c03ace970 Bug 1458235 - Fix various cases where Assert.ok or Assert.equal have been called wrongly. r=Gijs
MozReview-Commit-ID: Br3lKpKNVQJ

--HG--
extra : rebase_source : 972c69ecf63bb522b0f368e3c388f4eff558bbe3
2018-05-01 22:15:43 +01:00
Jan de Mooij
8494c26563 Bug 1459225 - Add a gc() call to wasm/atomic.js test so TSan builds don't OOM. r=lth 2018-05-08 15:06:53 +02:00
Jan de Mooij
be1d10ec53 Bug 1459258 - Improve InlineMap OOM testing and fix some issues. r=jonco 2018-05-08 15:05:41 +02:00
Jan de Mooij
3a6641eae9 Bug 1437533 - Don't use memset to initialize JSFunction extended slots. Parts of this patch written by Waldo. r=jwalden 2018-05-08 11:29:32 +02:00
Tooru Fujisawa
48837f3950 Bug 1458973 - Rename {Rooted,Handle}ScriptSource to {Rooted,Handle}ScriptSourceObject. r=jimb 2018-05-08 14:52:43 +09:00
Chris Peterson
71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Stephen A Pohl
860c14b396 Bug 1366808: Properly detect buildID mismatches between parent and child processes and display about:restartrequired to prompt the user to restart Firefox before proceeding. r=jimm,felipe,bz 2018-05-08 10:31:44 -04:00
Ms2ger
4b3d35dfe2 Bug 1459880 - part g: Introduce a PathOptions class for included and excluded paths; r=jandem
Besides being somewhat more readable, it avoids a redundant call to
|_split_files_and_dirs|.
2018-05-08 16:15:32 +02:00
Ms2ger
a725ed1dab Bug 1459880 - part f: Use an iterative algorithm for |RefTestCase.prefix_command|; r=jandem
This should be somewhat more efficient, and will make it easier for me to make
a future change to add some additional paths.

It also removes the unused |filename| variable from |get_command|.
2018-05-08 16:15:32 +02:00
Ms2ger
2bd54e7a0b Bug 1459880 - part e: Merge the RefTest and RefTestCase classes; r=jandem
Only the RefTestCase subclass is ever used.
2018-05-08 16:15:32 +02:00
Ms2ger
5e8fc9889c Bug 1459880 - part d: Correct the documentation for |load_tests|; r=jandem 2018-05-08 16:15:32 +02:00
Ms2ger
5eebfa9a20 Bug 1459880 - part c: Consolidate the arguments to |_find_all_js_files|; r=jandem
We always pass the same value for the two arguments.
2018-05-08 16:15:32 +02:00
Ms2ger
cbf9724b1d Bug 1459880 - part b: Remove unused |reldir| argument from |load_reftests|; r=jandem 2018-05-08 16:15:31 +02:00
Ms2ger
728ff89739 Bug 1459880 - part a: Use a |with| statement to open exclusion files; r=jandem
This is somewhat simpler, and yields a clearer error message if the file can't
be opened. (In this case, an exception is thrown before |fp| is defined, and
the |fp.close()| call then throws another exception, hiding the first one.)
2018-05-08 16:15:31 +02:00
Matthew Gaudet
e2a8f73f32 Bug 1460895: Deduplicate MegamorphicLoadSlotResult using EmitLoadStubField r=jandem
Also rename helper method to match pre-existing spidermonkey style.

--HG--
extra : rebase_source : e620becd238c418e452c38dca940b860116c1c48
2018-01-30 14:35:30 -05:00
Luke Wagner
922e46b318 Bug 1459761 - Baldr: relax WebAssembly.Memory GC heuristic (r=lth,jonco) 2018-05-14 09:21:46 -05:00
André Bargull
2824b4a74f Bug 1415202: Always use the equivalent year to determine the time zone offset and name. r=Waldo 2017-11-08 03:23:41 -08:00
Ciure Andrei
a7fbf22348 Backed out 11 changesets (bug 1457560, bug 1366287) for causing Linux build bustages CLOSED TREE
Backed out changeset e71da1f3c048
Backed out changeset 971159738904 (bug 1366287)
Backed out changeset 68fae6784ebe (bug 1366287)
Backed out changeset a18120245eb7 (bug 1366287)
Backed out changeset 3bbd03d726e5 (bug 1366287)
Backed out changeset f80aac2c702a (bug 1366287)
Backed out changeset c834c0c12a7f (bug 1366287)
Backed out changeset dd19d38a2b1c (bug 1366287)
Backed out changeset 76fdbe405fbd (bug 1366287)
Backed out changeset b424782cd5d1 (bug 1366287)
Backed out changeset e4fd5393d398 (bug 1457560)
2018-05-12 08:00:13 +03:00
Jeff Walden
35847e1a96 Backed out changeset e4fd5393d398 for an "undesired" libstdc++ symbol dependency. r=bustage 2018-05-11 21:15:00 -07:00
Robin Templeton
6b3f331f8b bug 1366287 - Part 6: Implement boolean-to-BigInt conversion. r=jwalden 2018-05-11 20:02:05 -07:00
Robin Templeton
5d50985ff7 bug 1366287 - Part 5: Implement BigInt.prototype.toLocaleString. r=jwalden
This will have its behavior defined by ECMA-402 in the future; for now,
it returns the same result as the toString method (which is permitted by
the BigInt spec).
2018-05-11 19:47:17 -07:00
Robin Templeton
2d8d3572ab bug 1366287 - Part 4: Add Rust tests for is_bigint. r=Ms2ger 2018-05-11 19:44:33 -07:00
Robin Templeton
5483d5185c bug 1366287 - Part 3: Define the BigIntObject class for BigInt wrapper objects. r=jwalden 2018-05-11 19:43:45 -07:00
Robin Templeton
9b286536e0 bug 1366287 - Part 2.1: Track GMP memory allocation from XPCOM. r=njn
Based on similar functionality for ICU. Define a GMPReporter class and
use its methods for libgmp allocation.
2018-05-11 19:42:49 -07:00
Robin Templeton
9684972b62 bug 1366287 - Part 2.0: Use GMP integers to represent BigInt values. r=jwalden
Also link to libgmp and initialize it with custom memory allocation
functions.
2018-05-11 19:42:48 -07:00
Robin Templeton
80fba2c27a bug 1366287 - Part 1.2: Add a BigInt type to the Rust bindings. r=Ms2ger 2018-05-11 19:09:38 -07:00
Robin Templeton
906544d813 bug 1366287 - Part 1.1: Add a GDB printer for BigInt values. r=sfink 2018-05-11 19:09:38 -07:00
Robin Templeton
711a42ccd1 Bug 1366287 - Part 1.0: Define a new BigInt primitive type. (Disabled by default, implemented only incompletely, currently passing --enable-bigint will disable JITs, will be flipped on Eventually once every sub-aspect is in place, Don't Have A Cow, Man.) r=jwalden 2018-05-11 19:09:28 -07:00
Rick Waldron
f68eb85c0a Bug 1457560 - Expose $262.agent.monotonicNow() for Test262 use in testing Atomic operation timeouts. r=jwalden
--HG--
extra : rebase_source : c72e70df1cb7672bdfdb2e372d8f2ce5b413252b
2018-05-10 15:28:56 -07:00
Matthew Gaudet
7457c26a95 Bug 1348792: Lay down the infrastructure for sharing stub emission code when stub fields are involved r=tcampbell
This rephrases the stub field code in terms of a policy type.

--HG--
extra : rebase_source : 61a2cea84cde95eb3391c2a009ea6dafe9d7a15a
extra : amend_source : eb7fdc1095e47600ddd9a6caebfa91cf47a4346d
2018-01-30 14:03:00 -05:00
Jan de Mooij
d660ad143b Bug 1460341 - Give jsid a constructor that initializes it to a void id. r=jonco,bz 2018-05-11 12:01:32 +02:00
Julian Seward
53b356419e Bug 1459552 - Wasm: memory.fill and memory.copy: fix opcode assignments per recent committee decision. r=lth.
This patch:

(1) renames the NumericPrefix top level encoding byte to MiscPrefix, as
    somewhat vaguely implied by
    https://github.com/WebAssembly/bulk-memory-operations/issues/9, and uses
    the value 0xFC for it.

(2) installs the memory.copy/fill encodings as secondary opcodes of
    MiscPrefix, with values 0x40 and 0x41 respectively.  The 0x40 and 0x41
    values are our own choice and haven't yet been agreed more broadly.

This isn't entirely simple, because the uses of 'enum class NumericOp'
(which is renamed MiscOp) now have to be divided into two different
ifdef-guarded sections, rather than being an all-or-nothing thing.  As a
result, a number of switches that previously looked like this

          case uint16_t(Op::NumericPrefix): {
#ifdef ENABLE_WASM_SATURATING_TRUNC_OPS
            switch (op.b1) {
              case uint16_t(NumericOp::I32TruncSSatF32):
              case uint16_t(NumericOp::I32TruncUSatF32):
              default:
                return iter.unrecognizedOpcode(&op);
#else
              return iter.unrecognizedOpcode(&op);
#endif
            }

first have to be rearranged like this

          case uint16_t(Op::NumericPrefix): {
            switch (op.b1) {
#ifdef ENABLE_WASM_SATURATING_TRUNC_OPS
              case uint16_t(NumericOp::I32TruncSSatF32):
              case uint16_t(NumericOp::I32TruncUSatF32):
#endif
              default:
                break;
            }
            return iter.unrecognizedOpcode(&op);

(that is, have the ifdef pushed inwards to the inner |case| level, and have
the after-the-switch control flow fixed up) before it is possible to add
similarly guarded cases for memory.copy/fill.

I'm assuming that the degenerate configuration, where the innermost switch
has no active entries

            switch (op.b1) {
              default:
                break;
            }

is optimised away by the C++ compiler, so there's no perf loss.  This seems
reasonable to me.

--HG--
extra : rebase_source : 153590a84e802a1b0581f3061efa7caba081e7a4
2018-05-11 08:47:18 +02:00
Tooru Fujisawa
98053eb192 Bug 1459127 - Store ScriptSourceObject reference into LazyScript inside LazyScript. r=jimb 2018-05-11 14:03:56 +09:00
Tooru Fujisawa
ce4c3d8f2c Bug 1459220 - Add LazyScript::isEnclosingScriptLazy. r=jimb 2018-05-11 14:03:55 +09:00
Eric Faust
3b53239890 Bug 1459609 - Add missing null-check to ParserBase::setSourceMapInfo(). (r=Waldo)
--HG--
extra : rebase_source : 03defc47db1436913c249aecbde6e609d9274397
2018-05-07 15:33:03 -07:00
Julian Seward
20e9dd7d5c Bug 1446930 - Wasm: basic (OOL) implementation of memory.fill and memory.copy. r=lth.
This patch adds an initial implementation, along with test cases, for the
memory.fill and memory.copy instructions that form part of the
bulk-memory-operations proposal at
https://github.com/WebAssembly/bulk-memory-operations/blob/master/proposals/bulk-memory-operations/Overview.md.

This covers code generation for the baseline and optimising compilers, as
well as supporting infrastructure for conversion to/from binary and text
representations.

The implementation is simple in the sense that -- for both compilers -- it
is done by a call to a helper function, which eventually devolves to a call
to memset/memmove respectively.

Per subsequent clarification requests:

* https://github.com/WebAssembly/bulk-memory-operations/issues/8
  The arguments to these instructions are all interpreted as unsigned 32 bit
  ints.

* https://github.com/WebAssembly/bulk-memory-operations/issues/11
  Zero length fills/copies that have starting point offsets out of bounds
  trap rather than are treated as no-ops.

--HG--
extra : rebase_source : 79c74cbe467905f03b796428ee80b643c105ca72
2018-05-04 23:14:09 +02:00
Jeff Walden
8c0a4864c7 Bug 1458011 - Remove the TypedObject.storage function and |new TypedObject(buffer [, offset])| constructor overload because they're no longer planned to be part of standardization efforts in this area. r=sfink
--HG--
extra : rebase_source : cbeb0e62928d03c2ef06d2465168ccde4840638f
2018-04-19 11:47:55 +02:00
Jeff Walden
2690d2331a Bug 1457612 - Use BitwiseCast instead of direct bit-punning in jsdate.cpp:NowAsMillis. r=luke
--HG--
extra : rebase_source : 34fc0e7a08eaf3a971ed11984b2a979c7b8f39a5
2018-04-27 18:25:42 -07:00
Jan de Mooij
fabe2d7a86 Bug 1458456 part 9 - Stop skipping timeout tests when running TSan in automation. r=sfink
--HG--
rename : js/src/devtools/automation/tsan-sighandlers.txt => js/src/devtools/automation/tsan-slow.txt
2018-05-05 10:43:13 +02:00
Cosmin Sabou
2f93cbd6cb Merge mozilla-central to inbound. a=merge CLOSED TREE
--HG--
rename : testing/profiles/prefs_general.js => testing/profiles/common/user.js
extra : rebase_source : e56a2d784bd87af73d03cc5fcdca84d8156ed054
2018-05-04 21:07:31 +03:00
Cosmin Sabou
dc4e10c449 Merge inbound to mozilla-central. a=merge
--HG--
rename : testing/profiles/prefs_general.js => testing/profiles/common/user.js
2018-05-04 20:37:47 +03:00
Jan de Mooij
cfc5e634d1 Bug 1458456 part 4 - Discard JIT code before marking instead of sweeping during non-incremental GC. r=jonco
--HG--
extra : rebase_source : 6b1d5b3b550173e5180adc6c75a85d1aea364c0d
2018-05-04 15:31:18 +02:00
Jan de Mooij
abfe4ff25a Bug 1458456 part 3b - Stop helper threads before setting JIT compiler options. r=jonco
--HG--
extra : rebase_source : 62d7c47e4a5b7b7f5b1b66a2f2d40706d3bf6662
2018-05-04 15:29:40 +02:00
Luke Wagner
df164dd9df Bug 1458456 part 3a - Notify main thread after finishing wasm tasks to fix a race with waitForAllThreads. r=lth
--HG--
extra : rebase_source : 140c4c219fe2b8dbd28a46484afc0ffcef195ff0
2018-05-04 15:28:23 +02:00
Jan de Mooij
ed21f1eb5d Bug 1458456 part 8 - Fix remaining TSan races. r=jonco 2018-05-04 17:29:05 +02:00
Jan de Mooij
290905a7c8 Bug 1458456 part 7 - Make TSan jobs test --ion-eager with off-thread compilation enabled. r=jonco 2018-05-04 17:29:05 +02:00
Jan de Mooij
8071de3bdd Bug 1458456 part 6 - Some TSan automation changes. r=sfink 2018-05-04 17:29:05 +02:00
Jan de Mooij
2997a50ac8 Bug 1458456 part 5 - Add TemplateObject wrapper to expose a thread-safe interface. r=jonco 2018-05-04 17:29:05 +02:00
Jon Coppeard
387370688d Bug 1458961 - Re-add removed assertion to String_pad r=anba 2018-05-04 09:47:58 +01:00
Jon Coppeard
2744e7e84e Bug 1456536 - Fix OOM handling in shell grayRoot() function r=sfink 2018-05-04 09:47:58 +01:00
David Teller
44d4196991 Bug 1456609 - Expose a method readSkippableSubTree for BinTokenReader{Tester, Multipart} r=arai
MozReview-Commit-ID: 2jceBpJOOoS

--HG--
extra : rebase_source : 2839d78db25126a12983770fe289ec73d869a8f7
2018-04-24 22:29:19 +02:00
Ciure Andrei
82f7c496dc Merge inbound to mozilla-central. a=merge 2018-05-04 00:52:04 +03:00
Jon Coppeard
d4133481ca Bug 1458839 - Improve state assertions in GCParallelTask r=jandem 2018-05-03 17:51:58 +01:00
Jan de Mooij
fe71bd0d2f Bug 1458456 part 2 - Move NEW_SCRIPT_CLEARED flag from BaseShape to JSFunction. r=tcampbell 2018-05-03 16:18:37 +02:00
Jan de Mooij
e715d06b6f Bug 1458456 part 1 - Don't call JSFunction::needsSomeEnvironmentObject off-thread. r=jonco 2018-05-03 16:18:03 +02:00
Jan de Mooij
37e612ccea Bug 1458198 - Assert the frontend reported an exception if it fails to compile a script. r=jorendorff 2018-05-03 16:17:09 +02:00
Jan de Mooij
441f19d63f Bug 1458567 part 1 - Don't invoke interrupt callback and Debugger onStep hook for internal JS engine interrupts. r=luke 2018-05-03 16:01:01 +02:00
Benjamin Bouvier
de0dc7d191 Bug 1455610: Prevent nop fills from happening in jump tables; r=lth
--HG--
extra : rebase_source : 7597099d50710e0b095a06e064a76404f88e4ecc
extra : amend_source : 0b97b9f26872b921410a91d229c5ea6d3e76ac58
2018-04-24 16:16:34 +02:00
Gurzau Raul
295c747edd Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-03 00:08:38 +03:00
Gurzau Raul
30662c7545 Merge inbound to mozilla-central. a=merge 2018-05-03 00:04:54 +03:00
Steve Fink
d909fe8abb Bug 1458320 - Ignore Indexed DB stored scopes, as they can now be multiple incorrect values and we no longer need them for anything, r=jorendorff
--HG--
extra : rebase_source : 90629ac36d4229e7962ea46cec89c9e13ef4d350
2018-05-02 11:07:35 -07:00
André Bargull
efedb00226 Bug 1140152 - Copy elements' underlying bit patterns in TypedArray.prototype.slice. r=till 2018-05-02 09:52:05 -07:00