alexcrichton opened issue #3539:
Given this input:
(type u64 (primitive u64)) (decl imm (u64) u64) (rule (imm (classify_imm n)) n) (decl classify_imm (u64) u64) (extern extractor classify_imm classify_imm)
I get (running
islec
):$ cargo run -p islec -- input.isle Finished dev [unoptimized + debuginfo] target(s) in 0.08s Running `/home/acrichto/code/wasmtime/target/debug/islec input.isle` Error: × type error: Cannot use term 'classify_imm' that does not have a defined extractor in a left-hand side pattern ╭─[input.isle:3:1] 3 │ (decl imm (u64) u64) 4 │ (rule (imm (classify_imm n)) n) · ┬ · ╰── Cannot use term 'classify_imm' that does not have a defined extractor in a left-hand side pattern 5 │ ╰────
If, however, I change the input:
(type u64 (primitive u64)) (decl classify_imm (u64) u64) (extern extractor classify_imm classify_imm) (decl imm (u64) u64) (rule (imm (classify_imm n)) n)
the compile succeeds
alexcrichton labeled issue #3539:
Given this input:
(type u64 (primitive u64)) (decl imm (u64) u64) (rule (imm (classify_imm n)) n) (decl classify_imm (u64) u64) (extern extractor classify_imm classify_imm)
I get (running
islec
):$ cargo run -p islec -- input.isle Finished dev [unoptimized + debuginfo] target(s) in 0.08s Running `/home/acrichto/code/wasmtime/target/debug/islec input.isle` Error: × type error: Cannot use term 'classify_imm' that does not have a defined extractor in a left-hand side pattern ╭─[input.isle:3:1] 3 │ (decl imm (u64) u64) 4 │ (rule (imm (classify_imm n)) n) · ┬ · ╰── Cannot use term 'classify_imm' that does not have a defined extractor in a left-hand side pattern 5 │ ╰────
If, however, I change the input:
(type u64 (primitive u64)) (decl classify_imm (u64) u64) (extern extractor classify_imm classify_imm) (decl imm (u64) u64) (rule (imm (classify_imm n)) n)
the compile succeeds
github-actions[bot] commented on issue #3539:
Subscribe to Label Action
cc @cfallin, @fitzgen
<details>
This issue or pull request has been labeled: "isle"Thus the following users have been cc'd because of the following labels:
- cfallin: isle
- fitzgen: isle
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
fitzgen commented on issue #3539:
I suspect what is happening is that we are collecting extern extractor information and checking rule patterns in the same pass over the IR, when we need to collect all extern extractor info in one pass, and then do a second pass where we check rule patterns.
cfallin commented on issue #3539:
I think this was fixed recently by #4079; closing.
cfallin closed issue #3539:
Given this input:
(type u64 (primitive u64)) (decl imm (u64) u64) (rule (imm (classify_imm n)) n) (decl classify_imm (u64) u64) (extern extractor classify_imm classify_imm)
I get (running
islec
):$ cargo run -p islec -- input.isle Finished dev [unoptimized + debuginfo] target(s) in 0.08s Running `/home/acrichto/code/wasmtime/target/debug/islec input.isle` Error: × type error: Cannot use term 'classify_imm' that does not have a defined extractor in a left-hand side pattern ╭─[input.isle:3:1] 3 │ (decl imm (u64) u64) 4 │ (rule (imm (classify_imm n)) n) · ┬ · ╰── Cannot use term 'classify_imm' that does not have a defined extractor in a left-hand side pattern 5 │ ╰────
If, however, I change the input:
(type u64 (primitive u64)) (decl classify_imm (u64) u64) (extern extractor classify_imm classify_imm) (decl imm (u64) u64) (rule (imm (classify_imm n)) n)
the compile succeeds
Last updated: Dec 23 2024 at 12:05 UTC