diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2018-07-27 19:03:20 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2018-07-27 22:44:14 +0200 |
commit | 1c0941ffc016a9b9b833b13ca96bbf8cde4df438 (patch) | |
tree | 30cabc5b2abadea8c0687bd2ce69c39f8bc5bdc1 | |
parent | 65df9cb73a26db2c61100ee8f1ecd13c6a80e225 (diff) | |
download | servo-1c0941ffc016a9b9b833b13ca96bbf8cde4df438.tar.gz servo-1c0941ffc016a9b9b833b13ca96bbf8cde4df438.zip |
Use the packed_simd crate instead of std::simd
`std::simd` was removed in https://github.com/rust-lang/rust/pull/52535.
https://crates.io/crates/packed_simd is in the rust-lang-nursery org.
-rw-r--r-- | Cargo.lock | 47 | ||||
-rw-r--r-- | components/gfx/Cargo.toml | 3 | ||||
-rw-r--r-- | components/gfx/lib.rs | 3 | ||||
-rw-r--r-- | components/gfx/text/glyph.rs | 4 |
4 files changed, 36 insertions, 21 deletions
diff --git a/Cargo.lock b/Cargo.lock index c952ad7a3c6..5d67aab91de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -570,7 +570,7 @@ dependencies = [ "procedural-masquerade 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -903,7 +903,7 @@ name = "fallible" version = "0.0.1" dependencies = [ "hashglobe 0.1.0", - "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1031,6 +1031,7 @@ dependencies = [ "malloc_size_of 0.0.1", "net_traits 0.0.1", "new-ordered-float 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "packed_simd 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "range 0.0.1", "serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)", "servo-fontconfig 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1038,7 +1039,7 @@ dependencies = [ "servo_arc 0.1.1", "servo_atoms 0.0.1", "servo_url 0.0.1", - "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", "truetype 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1111,7 +1112,7 @@ dependencies = [ "wayland-client 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "winit 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", - "x11-dl 2.18.0 (registry+https://github.com/rust-lang/crates.io-index)", + "x11-dl 2.18.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1431,7 +1432,7 @@ dependencies = [ "servo_geometry 0.0.1", "servo_url 0.0.1", "size_of_test 0.0.1", - "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", "style_traits 0.0.1", "unicode-bidi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1656,7 +1657,7 @@ dependencies = [ "serde_bytes 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)", "servo_arc 0.1.1", "smallbitvec 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2166,6 +2167,14 @@ dependencies = [ ] [[package]] +name = "packed_simd" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "parking_lot" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2181,7 +2190,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2397,7 +2406,7 @@ dependencies = [ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2595,7 +2604,7 @@ dependencies = [ "servo_geometry 0.0.1", "servo_rand 0.0.1", "servo_url 0.0.1", - "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", "style_traits 0.0.1", "swapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2706,7 +2715,7 @@ dependencies = [ "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", "precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "servo_arc 0.1.1", - "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2981,8 +2990,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "smallvec" -version = "0.6.0" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "smithay-client-toolkit" @@ -3085,7 +3097,7 @@ dependencies = [ "servo_config 0.0.1", "servo_url 0.0.1", "smallbitvec 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "style_derive 0.0.1", "style_traits 0.0.1", @@ -3564,7 +3576,7 @@ dependencies = [ "ron 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "thread_profiler 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", "webrender_api 0.57.2 (git+https://github.com/servo/webrender)", @@ -3680,7 +3692,7 @@ dependencies = [ "smithay-client-toolkit 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "wayland-client 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "x11-dl 2.18.0 (registry+https://github.com/rust-lang/crates.io-index)", + "x11-dl 2.18.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3736,7 +3748,7 @@ dependencies = [ [[package]] name = "x11-dl" -version = "2.18.0" +version = "2.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3960,6 +3972,7 @@ dependencies = [ "checksum osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88cfece6e95d2e717e0872a7f53a8684712ad13822a7979bc760b9c77ec0013b" "checksum ovr-mobile-sys 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a69b517feac6fc640f0679625defa0998bbcb32871a6901e63063c2abf9c4cbe" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" +"checksum packed_simd 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "896127ce3177896dac9d26ff64d5efe607d1d6993ad141f8e314377dbedda40d" "checksum parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "69376b761943787ebd5cc85a5bc95958651a22609c5c1c2b65de21786baec72b" "checksum parking_lot_core 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "538ef00b7317875071d5e00f603f24d16f0b474c1a5fc0ccb8b454ca72eafa79" "checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" @@ -4017,7 +4030,7 @@ dependencies = [ "checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537" "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" "checksum smallbitvec 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c63726029f0069f88467873e47f392575f28f9f16b72ac65465263db4b3a13c" -"checksum smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44db0ecb22921ef790d17ae13a3f6d15784183ff5f2a01aa32098c7498d2b4b9" +"checksum smallvec 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "26df3bb03ca5eac2e64192b723d51f56c1b1e0860e7c766281f4598f181acdc8" "checksum smithay-client-toolkit 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "428d6c019bb92753be9670367e3f483e4fcef396180a9b59e813b69b20014881" "checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b" "checksum string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "25d70109977172b127fe834e5449e5ab1740b9ba49fa18a2020f509174f25423" @@ -4084,7 +4097,7 @@ dependencies = [ "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum x11 2.17.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e5c4ac579b5d324dc4add02312b5d0e3e0218521e2d5779d526ac39ee4bb171" "checksum x11-clipboard 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2e7374c7699210cca7084ca61d57e09640fc744d1391808cb9ae2fe4ca9bd1df" -"checksum x11-dl 2.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "931d8584b49771143af0c422f372d8aef4280afd5920dad39b0a95a8e51df1e9" +"checksum x11-dl 2.18.1 (registry+https://github.com/rust-lang/crates.io-index)" = "966f78e9291e51d573bd3dd9287b285c0265daa8aa9fbe74c370467baa360c4e" "checksum xcb 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5e917a3f24142e9ff8be2414e36c649d47d6cc2ba81f16201cdef96e533e02de" "checksum xi-unicode 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "12ea8eda4b1eb72f02d148402e23832d56a33f55d8c1b2d5bcdde91d79d47cb1" "checksum xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c1cb601d29fe2c2ac60a2b2e5e293994d87a1f6fa9687a31a15270f909be9c2" diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml index 97bd80a97ca..bf28a533a55 100644 --- a/components/gfx/Cargo.toml +++ b/components/gfx/Cargo.toml @@ -13,7 +13,7 @@ test = false doctest = false [features] -unstable = [] +unstable = ["packed_simd"] [dependencies] app_units = "0.6" @@ -30,6 +30,7 @@ log = "0.4" malloc_size_of = { path = "../malloc_size_of" } net_traits = {path = "../net_traits"} new-ordered-float = "1.0" +packed_simd = {version = "0.1", optional = true} range = {path = "../range"} serde = "1.0" servo_arc = {path = "../servo_arc"} diff --git a/components/gfx/lib.rs b/components/gfx/lib.rs index 5a697f47c0d..a1b72e4e0c9 100644 --- a/components/gfx/lib.rs +++ b/components/gfx/lib.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#![cfg_attr(feature = "unstable", feature(stdsimd))] #![deny(unsafe_code)] extern crate app_units; @@ -43,6 +42,8 @@ extern crate log; extern crate malloc_size_of; extern crate net_traits; extern crate ordered_float; +#[cfg(all(feature = "unstable", any(target_feature = "sse2", target_feature = "neon")))] +extern crate packed_simd; extern crate range; #[macro_use] extern crate serde; extern crate servo_arc; diff --git a/components/gfx/text/glyph.rs b/components/gfx/text/glyph.rs index 66864d3db31..78f02881058 100644 --- a/components/gfx/text/glyph.rs +++ b/components/gfx/text/glyph.rs @@ -4,11 +4,11 @@ use app_units::Au; use euclid::Point2D; +#[cfg(all(feature = "unstable", any(target_feature = "sse2", target_feature = "neon")))] +use packed_simd::u32x4; use range::{self, EachIndex, Range, RangeIndex}; use std::{fmt, mem, u16}; use std::cmp::{Ordering, PartialOrd}; -#[cfg(all(feature = "unstable", any(target_feature = "sse2", target_feature = "neon")))] -use std::simd::u32x4; use std::vec::Vec; pub use gfx_traits::ByteIndex; |