From f3cc4702b95708effb9575fa7b5112a851e26285 Mon Sep 17 00:00:00 2001 From: David Mak Date: Fri, 13 Sep 2024 11:11:05 +0800 Subject: [PATCH 1/2] [meta] Update dependencies --- Cargo.lock | 143 ++++++++++++++++++++++++++++-------------- nac3parser/Cargo.toml | 4 +- 2 files changed, 98 insertions(+), 49 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 20306b84..7e0d9f46 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -90,18 +90,18 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "bit-set" -version = "0.5.3" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +checksum = "f0481a0e032742109b1133a095184ee93d88f3dc9e0d28a5d033dc77a073f44f" dependencies = [ "bit-vec", ] [[package]] name = "bit-vec" -version = "0.6.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +checksum = "d2c54ff287cfc0a34f38a6b832ea1bd8e448a330b3e40a50859e6488bee07f22" [[package]] name = "bitflags" @@ -109,6 +109,15 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + [[package]] name = "byteorder" version = "1.5.0" @@ -117,9 +126,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "cc" -version = "1.1.16" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9d013ecb737093c0e86b151a7b837993cf9ec6c502946cfb44bedc392421e0b" +checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" dependencies = [ "shlex", ] @@ -188,6 +197,15 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "cpufeatures" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +dependencies = [ + "libc", +] + [[package]] name = "crossbeam" version = "0.8.4" @@ -245,10 +263,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] -name = "crunchy" -version = "0.2.2" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] [[package]] name = "dirs-next" @@ -329,6 +361,16 @@ dependencies = [ "byteorder", ] +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + [[package]] name = "getopts" version = "0.2.21" @@ -447,15 +489,6 @@ version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" -[[package]] -name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.13.0" @@ -472,32 +505,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] -name = "lalrpop" -version = "0.20.2" +name = "keccak" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lalrpop" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e56f323e2d610628d1f5bdd39168a774674ac7989ed67011963bb3f71edd797" dependencies = [ "ascii-canvas", "bit-set", "ena", - "itertools 0.11.0", + "itertools", "lalrpop-util", "petgraph", "pico-args", "regex", "regex-syntax", + "sha3", "string_cache", "term", - "tiny-keccak", "unicode-xid", "walkdir", ] [[package]] name = "lalrpop-util" -version = "0.20.2" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" +checksum = "108dc8f5dabad92c65a03523055577d847f5dcc00f3e7d3a68bc4d48e01d8fe1" dependencies = [ "regex-automata", ] @@ -594,7 +636,7 @@ dependencies = [ name = "nac3artiq" version = "0.1.0" dependencies = [ - "itertools 0.13.0", + "itertools", "nac3core", "nac3ld", "parking_lot", @@ -621,7 +663,7 @@ dependencies = [ "indoc", "inkwell", "insta", - "itertools 0.13.0", + "itertools", "nac3parser", "parking_lot", "rayon", @@ -929,9 +971,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" dependencies = [ "bitflags", ] @@ -985,9 +1027,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.36" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags", "errno", @@ -1031,18 +1073,18 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", @@ -1073,6 +1115,16 @@ dependencies = [ "yaml-rust", ] +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest", + "keccak", +] + [[package]] name = "shlex" version = "1.3.0" @@ -1232,13 +1284,10 @@ dependencies = [ ] [[package]] -name = "tiny-keccak" -version = "2.0.2" +name = "typenum" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unic-char-property" @@ -1294,9 +1343,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-width" @@ -1312,9 +1361,9 @@ checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "unicode_names2" -version = "1.2.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "addeebf294df7922a1164f729fb27ebbbcea99cc32b3bf08afab62757f707677" +checksum = "d1673eca9782c84de5f81b82e4109dcfb3611c8ba0d52930ec4a9478f547b2dd" dependencies = [ "phf", "unicode_names2_generator", @@ -1322,9 +1371,9 @@ dependencies = [ [[package]] name = "unicode_names2_generator" -version = "1.2.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f444b8bba042fe3c1251ffaca35c603f2dc2ccc08d595c65a8c4f76f3e8426c0" +checksum = "b91e5b84611016120197efd7dc93ef76774f4e084cd73c9fb3ea4a86c570c56e" dependencies = [ "getopts", "log", diff --git a/nac3parser/Cargo.toml b/nac3parser/Cargo.toml index 79e848db..e56c2403 100644 --- a/nac3parser/Cargo.toml +++ b/nac3parser/Cargo.toml @@ -8,11 +8,11 @@ license = "MIT" edition = "2021" [build-dependencies] -lalrpop = "0.20" +lalrpop = "0.21" [dependencies] nac3ast = { path = "../nac3ast" } -lalrpop-util = "0.20" +lalrpop-util = "0.21" log = "0.4" unic-emoji-char = "0.9" unic-ucd-ident = "0.9" -- 2.44.2 From 5e2e77a5008420fe9576aec36844a2dc16b5743f Mon Sep 17 00:00:00 2001 From: David Mak Date: Tue, 20 Aug 2024 20:16:36 +0800 Subject: [PATCH 2/2] [meta] Bump inkwell to v0.5 --- Cargo.lock | 8 ++++---- nac3artiq/src/codegen.rs | 8 ++++---- nac3artiq/src/timeline.rs | 10 +++++----- nac3core/Cargo.toml | 2 +- nac3core/src/codegen/expr.rs | 2 +- nac3core/src/codegen/llvm_intrinsics.rs | 4 ++-- nac3core/src/codegen/numpy.rs | 8 +++++--- 7 files changed, 22 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7e0d9f46..baf8960e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -446,9 +446,9 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "inkwell" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b597a7b2cdf279aeef6d7149071e35e4bc87c2cf05a5b7f2d731300bffe587ea" +checksum = "40fb405537710d51f6bdbc8471365ddd4cd6d3a3c3ad6e0c8291691031ba94b2" dependencies = [ "either", "inkwell_internals", @@ -460,9 +460,9 @@ dependencies = [ [[package]] name = "inkwell_internals" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fa4d8d74483041a882adaa9a29f633253a66dde85055f0495c121620ac484b2" +checksum = "9dd28cfd4cfba665d47d31c08a6ba637eed16770abca2eccbbc3ca831fef1e44" dependencies = [ "proc-macro2", "quote", diff --git a/nac3artiq/src/codegen.rs b/nac3artiq/src/codegen.rs index 1646c1c6..d16177fa 100644 --- a/nac3artiq/src/codegen.rs +++ b/nac3artiq/src/codegen.rs @@ -515,7 +515,7 @@ fn format_rpc_arg<'ctx>( ctx.builder.build_store(arg_slot, arg).unwrap(); ctx.builder - .build_bitcast(arg_slot, llvm_pi8, "rpc.arg") + .build_bit_cast(arg_slot, llvm_pi8, "rpc.arg") .map(BasicValueEnum::into_pointer_value) .unwrap() } @@ -662,7 +662,7 @@ fn format_rpc_ret<'ctx>( .unwrap(); let buffer = ctx .builder - .build_bitcast(buffer, llvm_pi8, "") + .build_bit_cast(buffer, llvm_pi8, "") .map(BasicValueEnum::into_pointer_value) .unwrap(); let buffer = ArraySliceValue::from_ptr_val(buffer, buffer_size, None); @@ -785,7 +785,7 @@ fn format_rpc_ret<'ctx>( _ => { let slot = ctx.builder.build_alloca(llvm_ret_ty, "rpc.ret.slot").unwrap(); - let slotgen = ctx.builder.build_bitcast(slot, llvm_pi8, "rpc.ret.ptr").unwrap(); + let slotgen = ctx.builder.build_bit_cast(slot, llvm_pi8, "rpc.ret.ptr").unwrap(); ctx.builder.build_unconditional_branch(head_bb).unwrap(); ctx.builder.position_at_end(head_bb); @@ -806,7 +806,7 @@ fn format_rpc_ret<'ctx>( let alloc_ptr = ctx.builder.build_array_alloca(llvm_pi8, alloc_size, "rpc.alloc").unwrap(); let alloc_ptr = - ctx.builder.build_bitcast(alloc_ptr, llvm_pi8, "rpc.alloc.ptr").unwrap(); + ctx.builder.build_bit_cast(alloc_ptr, llvm_pi8, "rpc.alloc.ptr").unwrap(); phi.add_incoming(&[(&alloc_ptr, alloc_bb)]); ctx.builder.build_unconditional_branch(head_bb).unwrap(); diff --git a/nac3artiq/src/timeline.rs b/nac3artiq/src/timeline.rs index 2f11e967..e9faf43a 100644 --- a/nac3artiq/src/timeline.rs +++ b/nac3artiq/src/timeline.rs @@ -31,7 +31,7 @@ impl TimeFns for NowPinningTimeFns64 { .unwrap_or_else(|| ctx.module.add_global(i64_type, None, "now")); let now_hiptr = ctx .builder - .build_bitcast(now, i32_type.ptr_type(AddressSpace::default()), "now.hi.addr") + .build_bit_cast(now, i32_type.ptr_type(AddressSpace::default()), "now.hi.addr") .map(BasicValueEnum::into_pointer_value) .unwrap(); @@ -80,7 +80,7 @@ impl TimeFns for NowPinningTimeFns64 { .unwrap_or_else(|| ctx.module.add_global(i64_type, None, "now")); let now_hiptr = ctx .builder - .build_bitcast(now, i32_type.ptr_type(AddressSpace::default()), "now.hi.addr") + .build_bit_cast(now, i32_type.ptr_type(AddressSpace::default()), "now.hi.addr") .map(BasicValueEnum::into_pointer_value) .unwrap(); @@ -109,7 +109,7 @@ impl TimeFns for NowPinningTimeFns64 { .unwrap_or_else(|| ctx.module.add_global(i64_type, None, "now")); let now_hiptr = ctx .builder - .build_bitcast(now, i32_type.ptr_type(AddressSpace::default()), "now.hi.addr") + .build_bit_cast(now, i32_type.ptr_type(AddressSpace::default()), "now.hi.addr") .map(BasicValueEnum::into_pointer_value) .unwrap(); @@ -207,7 +207,7 @@ impl TimeFns for NowPinningTimeFns { .unwrap_or_else(|| ctx.module.add_global(i64_type, None, "now")); let now_hiptr = ctx .builder - .build_bitcast(now, i32_type.ptr_type(AddressSpace::default()), "now.hi.addr") + .build_bit_cast(now, i32_type.ptr_type(AddressSpace::default()), "now.hi.addr") .map(BasicValueEnum::into_pointer_value) .unwrap(); @@ -258,7 +258,7 @@ impl TimeFns for NowPinningTimeFns { let time_lo = ctx.builder.build_int_truncate(time, i32_type, "time.lo").unwrap(); let now_hiptr = ctx .builder - .build_bitcast(now, i32_type.ptr_type(AddressSpace::default()), "now.hi.addr") + .build_bit_cast(now, i32_type.ptr_type(AddressSpace::default()), "now.hi.addr") .map(BasicValueEnum::into_pointer_value) .unwrap(); diff --git a/nac3core/Cargo.toml b/nac3core/Cargo.toml index 219c8ce9..e669d5c7 100644 --- a/nac3core/Cargo.toml +++ b/nac3core/Cargo.toml @@ -18,7 +18,7 @@ strum = "0.26" strum_macros = "0.26" [dependencies.inkwell] -version = "0.4" +version = "0.5" default-features = false features = ["llvm14-0-prefer-dynamic", "target-x86", "target-arm", "target-riscv", "no-libffi-linking"] diff --git a/nac3core/src/codegen/expr.rs b/nac3core/src/codegen/expr.rs index 6fdacf15..72b28d02 100644 --- a/nac3core/src/codegen/expr.rs +++ b/nac3core/src/codegen/expr.rs @@ -551,7 +551,7 @@ impl<'ctx, 'a> CodeGenContext<'ctx, 'a> { && val_ty.get_element_type().is_struct_type() } => { - self.builder.build_bitcast(*val, arg_ty, "call_arg_cast").unwrap() + self.builder.build_bit_cast(*val, arg_ty, "call_arg_cast").unwrap() } _ => *val, }) diff --git a/nac3core/src/codegen/llvm_intrinsics.rs b/nac3core/src/codegen/llvm_intrinsics.rs index c4a0d430..00bdee22 100644 --- a/nac3core/src/codegen/llvm_intrinsics.rs +++ b/nac3core/src/codegen/llvm_intrinsics.rs @@ -183,7 +183,7 @@ pub fn call_memcpy_generic<'ctx>( dest } else { ctx.builder - .build_bitcast(dest, llvm_p0i8, "") + .build_bit_cast(dest, llvm_p0i8, "") .map(BasicValueEnum::into_pointer_value) .unwrap() }; @@ -191,7 +191,7 @@ pub fn call_memcpy_generic<'ctx>( src } else { ctx.builder - .build_bitcast(src, llvm_p0i8, "") + .build_bit_cast(src, llvm_p0i8, "") .map(BasicValueEnum::into_pointer_value) .unwrap() }; diff --git a/nac3core/src/codegen/numpy.rs b/nac3core/src/codegen/numpy.rs index 41dad1f3..2463f9a0 100644 --- a/nac3core/src/codegen/numpy.rs +++ b/nac3core/src/codegen/numpy.rs @@ -942,7 +942,7 @@ fn call_ndarray_array_impl<'ctx, G: CodeGenerator + ?Sized>( .build_store( lst, ctx.builder - .build_bitcast(object.as_base_value(), llvm_plist_i8, "") + .build_bit_cast(object.as_base_value(), llvm_plist_i8, "") .unwrap(), ) .unwrap(); @@ -964,7 +964,7 @@ fn call_ndarray_array_impl<'ctx, G: CodeGenerator + ?Sized>( .builder .build_load(lst, "") .map(BasicValueEnum::into_pointer_value) - .map(|v| ctx.builder.build_bitcast(v, plist_plist_i8, "").unwrap()) + .map(|v| ctx.builder.build_bit_cast(v, plist_plist_i8, "").unwrap()) .map(BasicValueEnum::into_pointer_value) .unwrap(); let this_dim = ListValue::from_ptr_val(this_dim, llvm_usize, None); @@ -983,7 +983,9 @@ fn call_ndarray_array_impl<'ctx, G: CodeGenerator + ?Sized>( ctx.builder .build_store( lst, - ctx.builder.build_bitcast(next_dim, llvm_plist_i8, "").unwrap(), + ctx.builder + .build_bit_cast(next_dim, llvm_plist_i8, "") + .unwrap(), ) .unwrap(); -- 2.44.2