Compare commits

...

2 Commits

Author SHA1 Message Date
57b5a5cce4 Increment versions 2025-07-28 01:15:17 +03:00
2a6aceb052 Apply same self-thing to all dot-syntaxes, actually 2025-07-28 01:10:27 +03:00
5 changed files with 15 additions and 15 deletions

4
Cargo.lock generated
View File

@ -78,7 +78,7 @@ checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a"
[[package]]
name = "reid"
version = "0.1.0"
version = "1.0.0-beta.1"
dependencies = [
"colored",
"reid-lib",
@ -87,7 +87,7 @@ dependencies = [
[[package]]
name = "reid-lib"
version = "0.1.0"
version = "1.0.0-beta.1"
dependencies = [
"llvm-sys",
"thiserror",

View File

@ -1,6 +1,6 @@
[package]
name = "reid-lib"
version = "0.1.0"
version = "1.0.0-beta.1"
edition = "2024"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -1,6 +1,6 @@
[package]
name = "reid"
version = "0.1.0"
version = "1.0.0-beta.1"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -14,6 +14,6 @@ color = ["colored"]
[dependencies]
## Make it easier to generate errors
thiserror = "1.0.44"
reid-lib = { path = "../reid-llvm-lib", version = "0.1.0" }
reid-lib = { path = "../reid-llvm-lib", version = "1.0.0-beta.1", registry="gitea-teascade" }
colored = {version = "3.0.0", optional = true}

View File

@ -209,7 +209,7 @@ impl TypeKind {
}
}
pub fn unroll_borrows(&self) -> TypeKind {
pub fn unroll_borrow(&self) -> TypeKind {
match self {
TypeKind::Borrow(type_kind, mut1) => match *type_kind.clone() {
TypeKind::Borrow(type_kind, mut2) => match (mut1, mut2) {

View File

@ -609,18 +609,18 @@ impl Expression {
Void,
first_param.1,
)
.unroll_borrows()
.resolve_ref(type_refs.types);
let backing_var = first_param.backing_var().expect("todo").1.clone();
*first_param = if backing_var == "self" {
if let TypeKind::Borrow(inner, _) = type_kind {
if let TypeKind::Borrow(..) = *inner.clone() {
*type_kind = type_kind.unroll_borrow();
let ExprKind::Borrow(val, _) = &first_param.0 else {
panic!()
};
*val.clone()
} else {
first_param.clone()
};
*first_param = *val.clone();
}
}
if let Some((mutable, _)) = type_refs.find_var(&backing_var) {
if !mutable {