Commit Graph

234 Commits

Author SHA1 Message Date
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
Ryan VanderMeulen
38359cd40f Bug 1445105 - Remove various MSVC de-optimizations used to work around compiler bugs which are no longer needed. r=dmajor
This reverts the following bugs: 703135, 977538, 1274450, 1403220

--HG--
extra : rebase_source : c63585a915c5b9ea987fd035dbb5ecb21cb6246e
2018-03-19 12:42:01 -04:00
Jan de Mooij
3a631decc0 Bug 1445610 - Clean up some enums in Value.h. r=jwalden 2018-03-15 10:38:59 +01:00
Kannan Vijayan
627eb6ae9a Bug 1411415 - r=bz r=fitzgen 2018-03-05 19:27:02 -05:00
Jeff Walden
1e733f31c4 Bug 1440954 - Properly #ifdef a local variable only used in an assertion to avoid an unused-variable warning. r=sfink
--HG--
extra : rebase_source : aa18f74def6af9e303ed2e04daa7f57d6feca789
2018-02-27 11:29:47 -08:00
Steve Fink
97f8e4d9ab Bug 1366083 - Diagnostic assert for ObjectValue(nullptr), r=jonco
--HG--
extra : rebase_source : 796da9b227da9aecf84c9cc5680aa448e2c1319b
2017-11-21 17:04:22 -08:00
Jason Orendorff
a48654929c Bug 1439665 - Part 1: #include some headers directly in files that use them. r=sfink.
"Include what you use."

--HG--
extra : rebase_source : 2239a380029e0efbc9dd3042459222a67c38d70f
extra : amend_source : 4453c32cc469caa592049167205666997f1a1e7b
extra : histedit_source : a533edd4a4d3d0642b08989e93674661d27baa6a%2C37d27eeef9580381ccc0de8507f60166dabf1730
2018-02-20 11:28:12 -06:00
Nicolas B. Pierron
f37e8775a7 Bug 1433111 - Zero the payload if the Value tag does not match the expected tag. r=jandem 2018-02-09 16:49:30 +00:00
Jon Coppeard
779ba02591 Bug 1432794 - Skip prototype and constructor intialization for off-thread parsing r=jandem 2018-01-30 17:57:40 +00:00
Jan de Mooij
93e1e4e3d9 Bug 1432479 - Use XOR for Value unboxing on 64-bit to mitigate certain Spectre attacks. r=luke
--HG--
extra : rebase_source : e0825f48994b4556db2f71d04d3c0971de5275ac
2018-01-24 12:33:53 +01:00
Jon Coppeard
3a810c3d63 Bug 1259222 - Add more assertions to hopefully catch bad pointers when collecting the nursery r=sfink 2017-10-09 10:22:44 +01:00
Jon Coppeard
ae251056d7 Bug 1399944 - Check for valid GC cell pointers in various places r=sfink 2017-09-19 12:31:31 +01:00
Jon Coppeard
7a85529cdd Bug 1399933 - Replace use of ObjectValueCrashOnTouch with PoisonedObjectValue r=sfink 2017-09-15 11:04:40 +01:00
Jon Coppeard
eb3c9870bf Bug 1352430 - Add barrier to wrapper cache to clear dying objects that have not yet been finalized r=bz r=sfink
* * *
Code review followup

--HG--
extra : rebase_source : 10c1fd603c2dd1ac2ff5770ae9aec2e9131681ce
2017-04-26 11:18:39 +01:00
Michael Layzell
46ade67ada Bug 1331434 - Part 2: Add MOZ_MAY_CALL_AFTER_MUST_RETURN and MOZ_MUST_RETURN_FROM_CALLER annotations, r=ehsan
MozReview-Commit-ID: 1o2egvdhkqT
2017-03-07 19:06:48 -05:00