Commit Graph

248 Commits

Author SHA1 Message Date
Iain Ireland
79d0a81073 Bug 1568564: Nightly: Strengthen assertion in set/toPrivate r=luke
Differential Revision: https://phabricator.services.mozilla.com/D39251

--HG--
extra : moz-landing-system : lando
2019-07-24 23:19:57 +00:00
André Bargull
ace8a3d15b Bug 1543677 - Part 1: Support BigInt in NumberFormat and toLocaleString. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D27123

--HG--
extra : moz-landing-system : lando
2019-07-19 11:41:19 +00:00
Iain Ireland
28a1aa14d3 Bug 1505902: Clean up private Value representation r=djvj
Our previous representation of private values assumed that the private pointer was aligned, and did some bit twiddling to try to disguise it as a double. Since bug 1293313, it has been unnecessary to set the top bit for a double, so that bit twiddling is unnecessary. There are actual use cases where private values are unaligned, so we should fix this.

While cleaning this up, I also removed unboxPrivateValue, because its only use could be better written using loadPrivateValue directly.

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

--HG--
extra : moz-landing-system : lando
2019-07-16 19:10:30 +00:00
Sylvestre Ledru
131d0c6a02 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-07-06 08:18:28 +00:00
Iain Ireland
5cd03cc9d2 Bug 1559072: Revert to old boxing format r=djvj
Differential Revision: https://phabricator.services.mozilla.com/D35547

--HG--
extra : moz-landing-system : lando
2019-06-25 17:34:50 +00:00
Iain Ireland
dd43b90d94 Bug 1558179: Canonicalize all NaNs on hardware that does not generate canonical NaNs natively r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D34403

--HG--
extra : moz-landing-system : lando
2019-06-11 15:16:40 +00:00
Iain Ireland
98788f0b1c Bug 1401624: Part 8: Convert C-style macros to JS::detail constexprs r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D33503

--HG--
extra : moz-landing-system : lando
2019-06-12 17:49:52 +00:00
Iain Ireland
e68b24eb5b Bug 1548908: Remove IsCanonical and simplify StructuredCloneReader r=tcampbell
IsCanonical was only used in StructuredCloneReader::CheckDouble. Two of CheckDouble's three uses already canonicalized the double before checking it, and the third *should* have already done so.

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

--HG--
extra : moz-landing-system : lando
2019-06-03 15:59:29 +00:00
Iain Ireland
4bb0dc7bd0 Bug 1548908: Remove "well-known numbers" from JSRuntime r=tcampbell
Back when we first freed the lizard in 1998, it made sense to have copies of NaN/+Inf/-Inf living on the runtime, because Values didn't store doubles inline. That hasn't been true for a long time. This patch gets rid of those.

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

--HG--
extra : moz-landing-system : lando
2019-06-03 15:59:25 +00:00
Iain Ireland
00ae116a04 Bug 1548908: Add InfinityBits to FloatingPoint.h r=jwalden
We can't generate a constexpr uint64_t containing the bits for positive/negative infinity, because of a (very sensible) static_assert in SpecificNaNBits. This patch adds support to FloatingPoint.h for infinity. The next patch will use it to make JS::InfinityValue constexpr (to match JS::NaNValue).

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

--HG--
extra : moz-landing-system : lando
2019-06-03 15:59:21 +00:00
Iain Ireland
5a8c83aeaa Bug 1548908: Clean up JS::CanonicalizedDoubleValue r=tcampbell
1. CanonicalizedDoubleValue should reuse the logic in CanonicalizeNaN.
2. Places that call DoubleValue(CanonicalizeNaN(d)) should just use CanonicalizedDoubleValue(d).

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

--HG--
extra : moz-landing-system : lando
2019-06-03 15:59:17 +00:00
Iain Ireland
b4d7776503 Bug 1401624: Part 5: Change Value representation r=tcampbell,jwalden
This patch is where the actual changes to our value representation happens. A few notes:

1. We did some weird macro tricks to work around a GCC bug with enums in bitfields. Those bitfields were only useful for poking at values in gdb, and the trick no longer worked with object-biased nanboxing, so I removed it. I also got rid of asDouble_, because it's no longer possible to read the double value right out of the enum without unboxing.

2. In the previous boxing scheme, there was a mechanical conversion between a JSValueType and a JSValueTag. That's no longer true, which is why the big conversion switches exist.

3. Waldo, you were included as a reviewer specifically to look at Value.h and make sure that our gross bit twiddling is just gross and not undefined.

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

--HG--
extra : moz-landing-system : lando
2019-06-12 17:51:06 +00:00
Andreea Pavel
9eda2afac1 Backed out 7 changesets (bug 1401624) for build bustages at MacroAssembler-inl.h on a CLOSED TREE
Backed out changeset 46030572ffde (bug 1401624)
Backed out changeset bccc5a509ebe (bug 1401624)
Backed out changeset 1a488ead5ac5 (bug 1401624)
Backed out changeset caac1da9ae80 (bug 1401624)
Backed out changeset 8f02092ab0b4 (bug 1401624)
Backed out changeset 90a104231405 (bug 1401624)
Backed out changeset d5d97222de6f (bug 1401624)
2019-06-12 20:47:42 +03:00
Iain Ireland
ae7d6752b5 Bug 1401624: Part 5: Change Value representation r=tcampbell,jwalden
This patch is where the actual changes to our value representation happens. A few notes:

1. We did some weird macro tricks to work around a GCC bug with enums in bitfields. Those bitfields were only useful for poking at values in gdb, and the trick no longer worked with object-biased nanboxing, so I removed it. I also got rid of asDouble_, because it's no longer possible to read the double value right out of the enum without unboxing.

2. In the previous boxing scheme, there was a mechanical conversion between a JSValueType and a JSValueTag. That's no longer true, which is why the big conversion switches exist.

3. Waldo, you were included as a reviewer specifically to look at Value.h and make sure that our gross bit twiddling is just gross and not undefined.

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

--HG--
extra : moz-landing-system : lando
2019-06-12 15:56:52 +00:00
Jon Coppeard
b425876903 Bug 1306008 - Give JS::Heap<T> pointer wrappers a pre-barrier r=sfink
This adds a pre write barrier to Heap<T> so that these can be uses as non-roots in the heap without breaking our snapshot at the beginning invariant if they are written to during an incremental GC. This makes it harder to misuse and allows us to take out manual barriers in at least one place.

Differential Revision: https://phabricator.services.mozilla.com/D25083
2019-03-27 16:26:09 +00:00
Nicolas B. Pierron
324a5a5901 Bug 1532599 - Force expected crashes on unexpected magic values. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D22120

--HG--
extra : moz-landing-system : lando
2019-03-06 20:23:43 +00:00
Tom Schuster
4d90baf832 Bug 1529939 - Remove JSVAL_TYPE_MISSING. r=bzbarsky,jandem
Differential Revision: https://phabricator.services.mozilla.com/D20936

--HG--
extra : moz-landing-system : lando
2019-02-26 08:48:01 +00:00
Tom Schuster
930bcc1969 Bug 1528931 - Introduce JS::ValueType and Value::type. r=jandem
I only converted a few low hanging fruits to the new API. Having to check for PrivateGCThing, which often can't even appear is a bit annoying, but I don't think we really need a different type.

I think next I can look into some of the extractNonDoubleType uses.

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

--HG--
extra : moz-landing-system : lando
2019-02-21 20:36:44 +00:00
Brindusan Cristian
4411b38ba6 Backed out changeset 7fc962a9fa04 (bug 1528931) for build bustages at Value.h. CLOSED TREE 2019-02-21 18:40:13 +02:00
Tom Schuster
da37ed2a7a Bug 1528931 - Introduce JS::ValueType and Value::type. r=jandem
I only converted a few low hanging fruits to the new API. Having to check for PrivateGCThing, which often can't even appear is a bit annoying, but I don't think we really need a different type.

I think next I can look into some of the extractNonDoubleType uses.

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

--HG--
extra : moz-landing-system : lando
2019-02-21 16:09:43 +00:00
Sylvestre Ledru
e0c61dafa5 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
Summary: # ignore-this-changeset

Reviewers: Ehsan

Reviewed By: Ehsan

Subscribers: emilio, jandem, bbouvier, jya

Bug #: 1519636

Differential Revision: https://phabricator.services.mozilla.com/D20062
2019-02-16 20:20:37 +01:00
Sylvestre Ledru
41d1d79094 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-02-15 08:15:57 +00:00
Andy Wingo
7d559ef8c3 Bug 1527860 - Remove ENABLE_BIGINT #ifdef r=jandem,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D19766

--HG--
extra : moz-landing-system : lando
2019-02-14 15:03:44 +00:00
Jon Coppeard
1aa258e905 Bug 1526375 - Replace DispatchTyped with MapGCThingTyped and use generic lambdas rather than separate functor classes r=sfink 2019-02-09 08:26:27 +00:00
Jon Coppeard
6e15e4b1f3 Bug 1525663 - Use return type deduction to remove complex decltype expressions r=sfink 2019-02-08 10:34:02 +00:00
Ehsan Akhgari
e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Jon Coppeard
6f81506124 Bug 1463462 - Make gray marking assertions call a JSAPI function r=sfink 2018-12-06 16:28:10 -05:00
Tooru Fujisawa
7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Benjamin Bouvier
a7f1d173a0 Bug 1511383: Update vim modelines after clang-format; r=sylvestre
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)

--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +01:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jeff Walden
5499a179ff Bug 1508725 - Adjust mozilla::FloatingPoint<T>'s definition so only the barest details are specified for floating-point encodings, with every other number, bit mask, &c. mathematically derived. Also add a bunch of documentation comments. r=froydnj
--HG--
extra : rebase_source : fe3e97b77945bcffd5f4415351541fcd5875bdbb
2018-06-07 13:25:12 -07:00
Steve Fink
da6839f947 Bug 1509985: Backout diagnostic bug 1366083 - slight slowdown, and it has not found any errors, r=jonco
--HG--
extra : topic : hazard
extra : rebase_source : 5cbcd285bfb0fde14225a84b9107178fb70d5470
extra : amend_source : 0ed3afa45b1e1a9777d0a6e05e1cec46e447eb89
2018-11-26 11:58:03 -08:00
Jan de Mooij
e39a94637e Bug 1509010 - Fix some clang-format comment issues in js/public. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D12535

--HG--
extra : moz-landing-system : lando
2018-11-21 18:12:57 +00:00
Jan de Mooij
bccfe7c569 Bug 1508065 - Change JS_PUBLIC_{API,DATA} and JS_FRIEND_{API,DATA} to be more like similar macros to avoid confusing clang-format. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D12256

--HG--
extra : moz-landing-system : lando
2018-11-19 17:02:47 +00:00
Steve Fink
b5b78d5525 Bug 1321014 - Respect MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_TEMPLATE_ARGS for the purpose of identifying GC types and pointers, r=jonco
--HG--
extra : topic : hazard
extra : rebase_source : bdaf0ae60a6b45c9d44294aa9c2bc31a8811bdbd
extra : source : c7b32ffa822e353b5479b6224194e3cdfd135e65
2018-07-20 18:36:20 -07:00
Jan de Mooij
ab644b087f Bug 1488698 - Always use braces for if/for/while statements in js/public. r=jandem
--HG--
extra : rebase_source : 075f0747c9256fee67925853b501b7a3549cebba
2018-09-06 12:11:07 +02:00
Tooru Fujisawa
6d85c982d8 Bug 1317481 - Optimize away Generator/Promise handling for await in the topmost JS frame with already resolved/rejected Promise. r=anba,smaug 2018-08-02 16:11:57 +09:00
Jeff Walden
83a1c5a302 Fully privatize the contents of the JS::Value union now that it cannot be POD because it has a non-trivial default constructor. No bug, r=me as trivial
--HG--
extra : rebase_source : 222290ba211e2fbe1693498a42d43a2064af45b8
2018-06-26 16:18:55 -07:00
Ted Campbell
ab67c3fb81 Bug 1471272 - Add [SMDOC] tags for in-source documentation. r=jandem,nbp
MozReview-Commit-ID: I038aYgvwe4
2018-06-28 15:23:25 -04:00
Emilio Cobos Álvarez
1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Jon Coppeard
d3bd086af9 Bug 1460341 - Replace GCPolicy<T>::initial() with SafelyInitialized<T>() r=Waldo 2018-05-25 10:01:25 +01:00
Robin Templeton
de41c625dd Bug 1366287 - Part 1.0: Define a new BigInt primitive type, with a GDB prettyprinter, Rust binding support, and a new out-of-line TraceKind. (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, r=Ms2ger, r=sfink
--HG--
extra : rebase_source : aa13bd94bc6157ff8134894e3ba2e7a2b53e28d9
2018-05-24 11:26:09 -07:00
Jeff Walden
04d21ccac0 Bug 1451248. r=jorendorff, r=bz
--HG--
extra : rebase_source : e26439a5954162bdaf332fbd63d623a3810e19e0
2018-04-25 19:40:09 -07:00
André Bargull
942f79e6e4 Bug 1447442 - Part 9: Remove unused JSWhyMagic constants. r=jorendorff
--HG--
extra : rebase_source : 6686176dbf004249a44f357d3c33cc17545dcb2d
2018-04-13 02:26:01 -07:00
Jeff Walden
a675e51266 Remove unused JS::Value::get{Int32,Double}Ref member functions. No bug, r=me as trivial
--HG--
extra : rebase_source : 3c32ceef0657739f07994929d3cdd3c32df7cf55
2018-04-05 20:45:57 -07:00
Jeff Walden
ca78e29895 Bug 1449051 - Move JS::Value::layout's members into JS::Value, make JS::Value a union, and apply correct code style to the union fields. r=sfink
--HG--
extra : rebase_source : 6a13e636b90c06419b89942b2848be92b21c4020
2018-03-27 20:20:43 -07:00
Jeff Walden
e5512cfdf4 Bug 1449051 - Further minifications to JS::Value's internal structure. r=jandem
--HG--
extra : rebase_source : c6bdffdf5ac4dabd19d44092fdc40887495aa0ba
2018-03-27 17:13:08 -07:00
Jeff Walden
7434b2e835 Bug 1449051 - Consolidate the definition of JS::Value::layout to be more readable/understandable and to common up the parts that are common across endianness/word size. r=jandem
--HG--
extra : rebase_source : d0f10087ed1c8e98403966ea3070da720adc6300
2018-03-27 12:26:10 -07:00
shindli
1e7274100e Backed out 2 changesets (bug 1449051, bug 1447475) for MnH and en-US failures on a CLOSED TREE
Backed out changeset d9a446d356da (bug 1449051)
Backed out changeset 851ed02cdac1 (bug 1447475)
2018-03-28 02:05:38 +03:00
Jeff Walden
6ed5e3b56d Bug 1449051 - Consolidate the definition of JS::Value::layout to be more readable/understandable and to common up the parts that are common across endianness/word size. r=jandem 2018-03-27 12:26:10 -07:00