Commit Graph

138 Commits

Author SHA1 Message Date
Andrea Marchesini
c4cb10712a Bug 1609990 - AgentCluster comparison in MessagePort and BroadcastChannel - part 3 - CloneDataPolicy, r=smaug,sfink,lth
Differential Revision: https://phabricator.services.mozilla.com/D60485

--HG--
extra : moz-landing-system : lando
2020-01-24 16:31:21 +00:00
André Bargull
980e63f88b Bug 1530372 - Part 4: Support nursery allocation for BigInt. r=sfink,jandem
Most of the code was copied from the String nursery allocation code paths and
then adjusted to work with BigInts. Where applicable, the newly added BigInt
functions were placed right next to the String functions, so it's easier to
compare them against each other. In a follow-up bug, we should try to reduce
these code duplications.

In contrast to Strings, nursery allocated BigInts will also try to nursery
allocate their heap digits, when needed, in the nursery. This works similar to
the slots and elements storage for objects, which can also be nursery
allocated. Supporting nursery allocation for BigInt digits is important when we
want to support nursery allocation of BigInts using heap digits, because it
avoids the extra overhead of registering malloc memory with nursery cells.

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

--HG--
extra : moz-landing-system : lando
2020-01-06 12:49:45 +00:00
Simon Giesecke
f3fc79d4ec Bug 1602514 - Build Rust SpiderMonkey bindings in C++17 mode. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D56697

--HG--
extra : moz-landing-system : lando
2019-12-11 21:24:05 +00:00
Jeff Walden
62a130ba0a Bug 1602882 - Move array operations to a new js/Array.h header. r=sfink,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D56595

--HG--
extra : moz-landing-system : lando
2019-12-11 06:17:44 +00:00
Jeff Walden
0960b032ac Bug 1602882 - Move AutoValueArray and HandleValueArray to a new ValueArray.h header. r=sfink
Depends on D56593

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

--HG--
extra : moz-landing-system : lando
2019-12-10 19:54:44 +00:00
Philip Chimento
13b367b72b Bug 1590907 - Remove obsolete macro JS_NO_JSVAL_JSID_STRUCT_TYPES. r=sfink
This macro is defined when building the Rust bindings, but it doesn't
actually affect anything.

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

--HG--
extra : moz-landing-system : lando
2019-11-12 22:00:55 +00:00
Jason Orendorff
fbc689a32a Bug 1448324 - Fix link in js/rust readme. r=jdm
Differential Revision: https://phabricator.services.mozilla.com/D49748

--HG--
extra : moz-landing-system : lando
2019-10-18 14:30:52 +00:00
Tom Tung
0adbc024e7 Bug 1583251 - P6 - Apply the change to sc.rs; r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D49755

--HG--
extra : moz-landing-system : lando
2019-10-23 07:21:05 +00:00
Jan de Mooij
6febd292ea Bug 1586683 - Remove flat strings from JSAPI. r=jwalden,bzbarsky
We want to remove flat strings (JSFlatString). With this patch we only expose
linear strings (JSLinearString) to API consumers.

This is very mechanical for the most part, because code typically only cares
about linear strings and not the null-termination aspect.

CTypes's Library.cpp has some Windows-specific code where we relied on null-terminated
strings. This patch adds JS_CopyStringCharsZ for that use case.

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

--HG--
extra : moz-landing-system : lando
2019-10-14 09:32:07 +00:00
Emilio Cobos Álvarez
ab7a52626a Bug 1587368 - Stop using -oldsyn bindgen version now that we pull newer syn and proc_macro versions anyway.
MANUAL PUSH: Cherry-picking upstream stuff, with reviewers that are not on phabricator.
2019-10-09 13:42:36 +02:00
Tom Ritter
5b875f2afd Bug 1576254 - Add isSystemOrAddonPrincipal to RustJSPrincipal r=luke
RustJSPrincipal is used in Servo; we just return the conservative value of 'false'.

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

--HG--
extra : moz-landing-system : lando
2019-10-04 17:38:03 +00:00
Paul Bone
03339e515d Bug 1530251 - Remove nursery size parameter from GCRuntime::init r=jonco
Callers should use JS_SetGCParameter() instead.

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

--HG--
extra : moz-landing-system : lando
2019-10-03 05:52:54 +00:00
Emilio Cobos Álvarez
41ff579eac Bug 1583471 - Don't pull new syn / quote / etc. dependencies just yet. r=bbouvier
Transition to syn 1.0 is ongoing, but these take a long time to build.

Hopefully we already patch coreaudio-sys manually so all the crates dependent on
bindgen are effectively in-tree.

I published v0.51.1-oldsyn to avoid pulling all these dependencies for now.

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

--HG--
rename : third_party/rust/quote-0.6.11/tests/conditional/integer128.rs => third_party/rust/quote/tests/conditional/integer128.rs
rename : third_party/rust/unicode-xid-0.1.0/scripts/unicode.py => third_party/rust/unicode-xid/scripts/unicode.py
extra : moz-landing-system : lando
2019-09-25 09:50:10 +00:00
Benjamin Bouvier
e207459263 Bug 1583471: Update bindgen to 0.51.1 througout the tree; r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D46962

--HG--
rename : third_party/rust/quote/tests/conditional/integer128.rs => third_party/rust/quote-0.6.11/tests/conditional/integer128.rs
rename : third_party/rust/unicode-xid/scripts/unicode.py => third_party/rust/unicode-xid-0.1.0/scripts/unicode.py
extra : moz-landing-system : lando
2019-09-25 09:50:10 +00:00
Jon Coppeard
ad4df9ae33 Bug 1581574 - Remove Heap<T> write barrier and rely on existing read barrier to make incremental marking work r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D46133

--HG--
extra : moz-landing-system : lando
2019-09-20 10:09:19 +00:00
Bastien Orivel
3be4e0c3aa Bug 1580908 - Part 7: Update glob to 0.3. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D45715

--HG--
extra : moz-landing-system : lando
2019-09-12 21:46:17 +00:00
Bastien Orivel
67cd993dc5 Bug 1580908 - Part 4: Update num-traits to 0.2 in js to dedupe it. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D45713

--HG--
extra : moz-landing-system : lando
2019-09-12 21:46:09 +00:00
Bastien Orivel
c98f904a4d Bug 1580908 - Part 2: Update env_logger to 0.6. r=froydnj
This is one less dependency on regex 0.2

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

--HG--
extra : moz-landing-system : lando
2019-09-12 21:46:02 +00:00
Jon Coppeard
d4f47d27ad Bug 1573844 - Remove references to js::Class and remove the alias r=tcampbell
The final huge patch. This is a search-and-replace removal of js::Class followed by clang-format and removal of the alias from TypeDecls.h.

Depends on D41986

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

--HG--
extra : moz-landing-system : lando
2019-08-14 19:13:12 +00:00
Jon Coppeard
41d076b49e Bug 1573844 - Remove js::Jsvalify and js::Valueify r=tcampbell
Depends on D41984

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

--HG--
extra : moz-landing-system : lando
2019-08-14 17:18:54 +00:00
Jon Coppeard
66fc30ba53 Bug 1573844 - Remove js::Class definition and alias JSClass to it r=tcampbell,mccr8
JSClass contained void* members corresponding to the internal pointer members of js::Class. This stores the internal members in JSClass and removes js::Class.

This leaves js::Class aliased to JSClass while we remove references to it. I also aliased Jsvalify and Valueify into global scope temporarily to make this compile. These get removed in the following patches.

I had to remove a few functions which now don't compile with js::Class being the same type as JSClass.

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

--HG--
extra : moz-landing-system : lando
2019-08-15 08:32:22 +00:00
Nathan Froyd
08b51223a9 Bug 1560666 - turn off C++17 aligned allocation support; r=glandium
Just like C++14 sized deallocation support, we don't want to support
this.  We shouldn't be using `new` on over-aligned types anyway.

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

--HG--
extra : moz-landing-system : lando
2019-08-14 01:37:34 +00:00
Sylvestre Ledru
10390f6514 Bug 1562642 - Part 4 - Add missing MPL2 headers in js/ r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D37545

--HG--
extra : moz-landing-system : lando
2019-07-26 21:17:29 +00:00
Mike Hommey
bf3db9e84f Bug 1569331 - Update bindgen to 0.51. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D39580

--HG--
extra : moz-landing-system : lando
2019-07-27 00:36:18 +00:00
Jan de Mooij
93d6f816f0 Bug 1564349 part 1 - Convert Baseline/Ion/NativeRegExp prefs from ContextOptions to JitOptions. r=nbp,smaug
Using process-wide prefs is consistent with the other JIT options and is simpler
to work with (one place to initialize for all runtimes).

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

--HG--
extra : moz-landing-system : lando
2019-07-10 09:43:39 +00:00
Iain Ireland
29dc9fe2ea Bug 1559072: Revert Rust bindings to old boxing format r=djvj
Depends on D35547

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

--HG--
extra : moz-landing-system : lando
2019-06-25 17:11:15 +00:00
Ted Campbell
9b0fa42e1f Bug 1559275 - Avoid OwningCompileOptions accessors in js-rust glue. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D35260

--HG--
extra : moz-landing-system : lando
2019-06-19 00:50:43 +00:00
Iain Ireland
b1d0f80ddf Bug 1401624: Part 6: Update Rust bindings r=fitzgen
We are changing the representation of values on 64-bit. Part 5 of this patch stack has more details on the changes.

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

--HG--
extra : moz-landing-system : lando
2019-06-12 17:51:04 +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
40460c1e69 Bug 1401624: Part 6: Update Rust bindings r=fitzgen
We are changing the representation of values on 64-bit. Part 5 of this patch stack has more details on the changes.

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

--HG--
extra : moz-landing-system : lando
2019-06-03 15:57:43 +00:00
Steve Fink
995829d42a No bug. Reformat js/** to fix accumulated divergences.
# ignore-this-changeset

--HG--
extra : amend_source : 7b51d539061710bf4939e687b4ca4b74af757cf3
2019-05-24 11:57:18 -07:00
Tooru Fujisawa
66e25f6243 Bug 1549340 - Part 2: Use union instead of reinterpret_cast to initialize const char* with symbol for JSPropertySpec.name. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D30493

--HG--
extra : moz-landing-system : lando
2019-05-13 10:26:48 +00:00
Jon Coppeard
dd05bccccd Bug 1542184 - Use PersistentRooted for rooting vectors of GC things from rust code r=fitzgen?
This replaces the use of heap-alloced Rooted with PersistentRooted which is safe wrt destruction order.

I had to add PersistentRooted and StackGCVector to OPAQUE_TYPES to make this work... I'm not really sure what this does.

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

--HG--
extra : moz-landing-system : lando
2019-05-10 17:36:34 +00:00
Tooru Fujisawa
56585dc81e Bug 1543843 - Add constructors to JSPropertySpec and inner structs/unions. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D27277

--HG--
extra : moz-landing-system : lando
2019-04-26 01:01:15 +00:00
Yoshi Cheng-Hao Huang
8afaa93a25 Bug 1534967 - Part 2: Use RootedIdVector in rust binding. r=jonco,fitzgen
- Replace AutoIdVector with RootedIdVector.
- Replace JS::MutableHandleIdVector through rustbindgen in wrapper.hpp,
  otherwise MutableHandleIdVector will be converted to u8 in rust, and
  causes only 1 byte is passed to props in GetPropertyKeys.
- Add another glue function GetMutableHandleIdVector to get the object.

Differential Revision: https://phabricator.services.mozilla.com/D25360
2019-04-08 10:46:58 +08:00
Jeff Walden
5327fe7f3e Bug 1542120 - Add js/public/Warnings.h for warning-related JSAPI. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D26273

--HG--
rename : js/src/jsapi.h => js/public/Warnings.h
extra : moz-landing-system : lando
2019-04-05 22:52:04 +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
Emilio Cobos Álvarez
cfa6b9a741 Bug 1529681 - Update bindgen. r=bbouvier
This works around an LLVM bug and also pulls a fair amount of bugfixes and perf
improvements. None of the breaking changes affect either the style system or
cranelift stuff.

Changelog for convenience:

https://github.com/rust-lang/rust-bindgen/compare/v0.43.2...v0.49.0

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

--HG--
extra : moz-landing-system : lando
2019-03-27 14:39:41 +00:00
Cosmin Sabou
224fe6cff2 Merge mozilla-central to autoland. 2019-03-27 06:51:51 +02:00
Jeff Walden
9c165b28d3 Bug 1537536 - Forcibly generate Rust bindings for the JS::RootedValue typedef now that it happens the Rust bindings never themselves use the typedef. r=bustage
--HG--
extra : rebase_source : 171442f8da86a99ea0d6ad5b058825db2609705f
2019-03-26 16:32:42 -07:00
Yoshi Cheng-Hao Huang
de26884559 Bug 1521732 - Part 6: rust binding for RootedObjectVector. r=sfink
use RootedObjectVector in rust glue code.

Depends on D23186

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

--HG--
extra : moz-landing-system : lando
2019-03-25 06:39:30 +00:00
Yoshi Cheng-Hao Huang
813bbc9ed9 Bug 1521732 - Part 4: fix SM rust binging test. r=fitzgen
StackGCVector and RootedVector are partial template specialization and cause
cargo test failure. Bypass the classes by adding them to OPAQUE_TYPES.

Depends on D23184

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

--HG--
extra : moz-landing-system : lando
2019-03-25 06:39:25 +00:00
Jeff Walden
c40e81a2e9 Bug 1537536 - Move JS::ForOfIterator to its own header. r=arai,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D24257

--HG--
rename : js/src/jsapi.h => js/public/ForOfIterator.h
extra : moz-landing-system : lando
2019-03-26 17:10:44 +00:00
Jeff Walden
3f385ffa33 Bug 1532005 - Implement a new js/public/ArrayBuffer.h header to centralize functionality for creating and interacting with ArrayBuffers. r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D21827

--HG--
extra : rebase_source : 833bbfce12d90bcb92f7cd88ec65247e48c024c0
2019-03-04 15:19:16 -08:00
Razvan Maries
02d5932d51 Backed out changeset 9a345448aaa1 (bug 1532005) for causing perma fails and Spidermonkey fails. CLOSED TREE 2019-03-05 01:08:44 +02:00
Razvan Maries
65e4948ca0 Backed out 4 changesets (bug 1532005, bug 1531638) for causing perma fails and Spidermonkey fail. CLOSED TREE
Backed out changeset 4913d941de92 (bug 1532005)
Backed out changeset 9635abe5bf24 (bug 1532005)
Backed out changeset 738cf4b1126a (bug 1532005)
Backed out changeset e5d9f2ee7ac7 (bug 1531638)
2019-03-05 01:07:28 +02:00
Jeff Walden
c2cbf926cb Bug 1532005 - Adjust the names of two other functions somehow inexplicably missed in prior renaming. r=i-was-saying-boo-urns 2019-03-04 14:41:24 -08:00
Jeff Walden
3b2f22a772 Bug 1532005 - Don't prefix GetArrayBufferLengthAndData with JS:: in typedarray.rs, because the macro it's passed to wants ident, not expr. r=boo-urns
--HG--
extra : rebase_source : 58feb5561de0f941028de35262eb341d1927eae7
2019-03-04 14:08:24 -08:00
Jeff Walden
b7ac200b5d Bug 1532005 - Update the SpiderMonkey Rust bindings for the new ArrayBuffer.h header. r=bustage 2019-03-04 13:41:03 -08:00
Jeff Walden
ecb4e10bda Bug 1532005 - Implement a new js/public/ArrayBuffer.h header to centralize functionality for creating and interacting with ArrayBuffers. r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D21827

--HG--
extra : rebase_source : 36c43233ad6d804bd691c8c40d6a6984331c7162
2019-02-28 17:00:56 -08:00