floats iter 4.1: codegen primitive registration + Float literal hex-double lowering
This commit is contained in:
@@ -18,6 +18,7 @@ pub(crate) fn llvm_type(t: &Type) -> Result<String> {
|
||||
"Bool" => Ok("i1".into()),
|
||||
"Unit" => Ok("i8".into()),
|
||||
"Str" => Ok("ptr".into()),
|
||||
"Float" => Ok("double".into()),
|
||||
// All other type names are treated as ADT (boxed).
|
||||
// If the typechecker didn't reject this earlier, it's
|
||||
// intentional — otherwise `ptr` would mask a wrong value.
|
||||
@@ -207,6 +208,7 @@ pub(crate) fn type_descriptor(t: &Type) -> String {
|
||||
"Bool" => "B".into(),
|
||||
"Unit" => "U".into(),
|
||||
"Str" => "S".into(),
|
||||
"Float" => "Fl".into(),
|
||||
other => format!("F{other}"),
|
||||
};
|
||||
if args.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user