diff --git a/integration-test/integration_test.py b/integration-test/integration_test.py index eb52e64..ca6fae7 100755 --- a/integration-test/integration_test.py +++ b/integration-test/integration_test.py @@ -33,6 +33,7 @@ def color_diff(diff): command = ["./target/debug/come", "-i", "{}{}/{}.come".format(CASE_DIR, casename, casename), "-o", "{}{}/{}.asm".format(CASE_DIR, casename, casename), + "-t", "riscv", "--emit-ir", "{}{}/{}.cmir".format(CASE_DIR, casename, casename)] if path.exists("{}{}/road.json".format(CASE_DIR, casename, casename)): road = json.load( diff --git a/rust-toolchain.toml b/rust-toolchain.toml index f28e14f..c5b3b9f 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "nightly-2023-06-15" \ No newline at end of file +channel = "nightly-2024-05-02" diff --git a/src/backend/riscv/mod.rs b/src/backend/riscv/mod.rs index b3bc08e..8b3b98e 100644 --- a/src/backend/riscv/mod.rs +++ b/src/backend/riscv/mod.rs @@ -220,7 +220,7 @@ fn parse_single_section( .push(index); } } - pending_symbols.drain_filter(|name, indexes| { + pending_symbols.extract_if(|name, indexes| { if let Some(symbol_offset_bytes) = all_symbols.get(name) { for index in indexes { simple_instructions[*index].decide_symbol(&Symbol { diff --git a/src/lib.rs b/src/lib.rs index f1eb088..9f4b6f1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,9 +1,8 @@ #![feature(lazy_cell)] #![feature(if_let_guard)] #![feature(let_chains)] -#![feature(hash_drain_filter)] +#![feature(hash_extract_if)] #![feature(exact_size_is_empty)] -// #![feature(arbitrary_self_types)] #![feature(assert_matches)] /// Definitions of AST nodes and their parser. pub mod ast;