diff --git a/Cargo.lock b/Cargo.lock index 59c0594d..f963fa1a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,9 +13,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.91" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "arrayvec" @@ -52,9 +52,9 @@ checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bstr" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" +checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22" dependencies = [ "memchr", "serde", @@ -74,9 +74,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfgrammar" -version = "0.13.7" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6026d8cd82ada8bbcfe337805dd1eb6afdc9e80fa4d57e977b3a36315e0c5525" +checksum = "6d621f687a04efa1f269f1cd13d8cfea9660852bdb3d1cd2c3c9fb6fdd34daf2" dependencies = [ "indexmap", "lazy_static", @@ -260,9 +260,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "hermit-abi" @@ -288,9 +288,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", "hashbrown", @@ -307,9 +307,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "lang_tester" @@ -335,9 +335,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.161" +version = "0.2.167" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" [[package]] name = "libredox" @@ -379,9 +379,9 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lrlex" -version = "0.13.7" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05863fdac293d1bc74f0cd91512933a5ab67e0cb607dc78ac4984be089456b49" +checksum = "6fe1e8741f737ba4b6d781f716051df6375ff0488d57ee23822a2cdba1c3dc7a" dependencies = [ "cfgrammar", "getopts", @@ -397,9 +397,9 @@ dependencies = [ [[package]] name = "lrpar" -version = "0.13.7" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b1ecae55cf667db308d3555e22b20bcc28eaeca0c95a09b37171673be157c71" +checksum = "19c61bcff4c1dd2deb9567ea868237828a8cd179c3f64106f6726656e372421d" dependencies = [ "bincode", "cactus", @@ -419,9 +419,9 @@ dependencies = [ [[package]] name = "lrtable" -version = "0.13.7" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d42d2752cb50a171efadda0cb6fa97432e8bf05accfff3eed320b87e80a2f69e" +checksum = "49e35162de3a5d91b380f8ebb31fc6c5e9a4618276465df4725ff1f88613312b" dependencies = [ "cfgrammar", "fnv", @@ -440,7 +440,7 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "natrob" version = "0.1.0" -source = "git+https://github.com/softdevteam/natrob#948d547f5f22f423d32eef14ed36cfbf27938aaa" +source = "git+https://github.com/softdevteam/natrob#512e9a098cd38e62b7b7bc0f760b13515604e0d2" dependencies = [ "quote 0.6.13", "syn 0.15.44", @@ -506,9 +506,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.89", + "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -567,9 +567,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -603,9 +603,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.89" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -625,7 +625,7 @@ version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ - "proc-macro2 1.0.89", + "proc-macro2 1.0.92", ] [[package]] @@ -654,9 +654,9 @@ checksum = "20145670ba436b55d91fc92d25e71160fbfbdd57831631c8d7d36377a476f1cb" [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -666,9 +666,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -722,9 +722,9 @@ dependencies = [ [[package]] name = "scc" -version = "2.2.2" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2c1f7fc6deb21665a9060dfc7d271be784669295a31babdcd4dd2c79ae8cbfb" +checksum = "66b202022bb57c049555430e11fc22fea12909276a80a4c3d368da36ac1d88ed" dependencies = [ "sdd", ] @@ -749,29 +749,29 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.213" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.213" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ - "proc-macro2 1.0.89", + "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] name = "serial_test" -version = "3.1.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b4b487fe2acf240a021cf57c6b2b4903b1e78ca0ecd862a71b71d2a51fed77d" +checksum = "1b258109f244e1d6891bf1053a55d63a5cd4f8f4c30cf9a1280989f80e7a1fa9" dependencies = [ "futures", "log", @@ -783,13 +783,13 @@ dependencies = [ [[package]] name = "serial_test_derive" -version = "3.1.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" +checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef" dependencies = [ - "proc-macro2 1.0.89", + "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -820,9 +820,9 @@ dependencies = [ [[package]] name = "sparsevec" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35df5d2e580b29f3f7ec5b4ed49b0ab3acf7f3624122b3e823cafb9630f293b8" +checksum = "91ef4657ebc254f6e84a863cb495c2feb60e5b48eba5141bf2bbbe202adb65b4" dependencies = [ "num-traits", "packedvec", @@ -849,11 +849,11 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.82" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ - "proc-macro2 1.0.89", + "proc-macro2 1.0.92", "quote 1.0.37", "unicode-ident", ] @@ -940,9 +940,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-width" diff --git a/src/lib/vm/objects/block.rs b/src/lib/vm/objects/block.rs index bb64dc59..61690d4d 100644 --- a/src/lib/vm/objects/block.rs +++ b/src/lib/vm/objects/block.rs @@ -74,14 +74,6 @@ pub struct Block { pub method_stack_base: usize, } -// The following impls are needed to allow the GC to finalise `Block`. By -// default, `Block` is not `FinalizerSafe` because it has fields to other `Gc`s. -// These fields would be unsound to access inside a `drop` method, so this -// explicit impl is needed to tell the compiler we are not doing that. The only -// time a `Block` is shared between threads is inside a finaliser, which is -// Sync-safe because we guarantee it will not be accessed at the same time as -// the main-thread. -unsafe impl FinalizerSafe for Block {} unsafe impl Sync for Block {} impl Obj for Block { diff --git a/src/lib/vm/objects/class.rs b/src/lib/vm/objects/class.rs index f44e74f8..4afcbb95 100644 --- a/src/lib/vm/objects/class.rs +++ b/src/lib/vm/objects/class.rs @@ -36,11 +36,6 @@ pub struct Class { inst_vars: UnsafeCell>, } -// This is safe because there is no non-GC'd shared ownership inside `Class`. -// This means that even though a finalizer will call its drop methods in another -// thread, it is guaranteed that the finalizer thread will be the only thread -// accessing its data. -unsafe impl FinalizerSafe for Class {} unsafe impl Sync for Class {} impl Obj for Class { diff --git a/src/lib/vm/objects/method.rs b/src/lib/vm/objects/method.rs index abdf4ebe..4c4c3f3f 100644 --- a/src/lib/vm/objects/method.rs +++ b/src/lib/vm/objects/method.rs @@ -17,11 +17,6 @@ pub struct Method { pub func: Function, } -// By default, `Method` is not `FinalizerSafe` because it contains a `Cell` -// field. Cell is `!Sync` so it would be unsound to access inside a `drop` -// method. This explicit impl is needed to tell the compiler we are not doing -// that. -unsafe impl FinalizerSafe for Method {} unsafe impl Sync for Method {} impl Obj for Method { diff --git a/src/lib/vm/objects/mod.rs b/src/lib/vm/objects/mod.rs index bd0895f8..b4d5d16e 100644 --- a/src/lib/vm/objects/mod.rs +++ b/src/lib/vm/objects/mod.rs @@ -80,7 +80,7 @@ impl ObjType { /// The main SOM Object trait. Notice that code should almost never call these functions directly: /// you should instead call the equivalent function in the `Val` struct. #[narrowable_alloy(ThinObj)] -pub trait Obj: std::fmt::Debug + Send + Sync + FinalizerSafe { +pub trait Obj: std::fmt::Debug + Send + Sync { /// What `ObjType` does this `Val` represent? fn dyn_objtype(self: Gc) -> ObjType; diff --git a/src/lib/vm/objects/string_.rs b/src/lib/vm/objects/string_.rs index a2d58f24..e17f627e 100644 --- a/src/lib/vm/objects/string_.rs +++ b/src/lib/vm/objects/string_.rs @@ -28,11 +28,6 @@ pub struct String_ { s: String, } -// This is safe because there is no non-GC'd shared ownership inside `String_`. -// This means that even though a finalizer will call its drop methods in another -// thread, it is guaranteed that the finalizer thread will be the only thread -// accessing its data. -unsafe impl FinalizerSafe for String_ {} unsafe impl Sync for String_ {} impl Obj for String_ {