You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ante main.an
thread 'main' panicked at '- inst1 (v2, v3 = call fn0(v1, v0)): arg 1 (v0) has type i8, expected i32
', src/cranelift_backend/context.rs:193:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
The text was updated successfully, but these errors were encountered:
Thank you, looks like this is a codegen error translating an incorrect type for Range : i32 - i8 -> Range rather than i32 - i32 -> Range. Interestingly, it only fails in the cranelift pass (running with --backend llvm works) so it may be local to there.
Nevermind - this is from the lack of globals in the current codegen pass. In the future ante may need another design pass on how top-down evaluation is performed as a script and yet still allows use-before-declaration for functions/globals which may depend on other globals, but for now adding non-extern globals to codegen should alleviate most concerns. Llvm only compiles this code because it inlines the constant value without checking that it was actually local to a different function (main).
jfecher
changed the title
Incorrect defaulting to i8 during codegen
Codegen does not support true globals
Oct 14, 2022
I found an issue it seems to be a compiler bug.
A typing error is raised from the compiler for the following code.
Environment
Code
Error
The text was updated successfully, but these errors were encountered: