Skip to content

Commit

Permalink
Thinking about handwritten textual IR, but seems not feasible.
Browse files Browse the repository at this point in the history
  • Loading branch information
SLiV9 committed Apr 13, 2024
1 parent bc32e7e commit 4a0fd20
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion penne.todo
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,10 @@ Rewrite using Data-Oriented Compiler Design for 0.5.0:
- Everything above at 100KLOC/s for responsive language server

Development:
☐ Drop llvm-sys and generate LLVM BC and textual IR by hand
✘ Drop llvm-sys and generate textual LLVM IR by hand @cancelled (2024-04-13 21:44)
Requires calculating struct sizes by hand.
Means we lose constant folding.
Means we lose expression folding which means textual IR is much larger.
☐ Release 0.4.0
☐ Flesh out core and vendor/libc
☐ Add/check documentation for E359, E553
Expand Down
4 changes: 2 additions & 2 deletions src/expander.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub fn expand(modules: &mut [(std::path::PathBuf, Vec<Declaration>)])
}
}

/// Convenience method that calls [expand](expand) with a single module.
/// Convenience method that calls [expand] with a single module.
pub fn expand_one(
filename: &str,
declarations: Vec<Declaration>,
Expand Down Expand Up @@ -127,7 +127,7 @@ fn get_key_offset(
keys.iter().position(|x| x == filepath).or_else(|| {
path_of_includer
.parent()
.map(|path| path.join(filepath.clone()))
.map(|path| path.join(filepath))
.and_then(|path| keys.iter().position(|x| x == &path))
})
}
Expand Down
3 changes: 2 additions & 1 deletion src/resolved.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
pub use crate::builtin;
pub use crate::common::DeclarationFlag;
pub use crate::common::{BinaryOp, ComparisonOp, UnaryOp};
pub use crate::generator::GeneratorBuiltin;

pub(crate) use crate::generator::GeneratorBuiltin;

use crate::value_type;

Expand Down
2 changes: 1 addition & 1 deletion src/scoper/variable_references.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ impl Analyzer
.expect("containee must be predeclared");

// The same goes for the container.
let mut container = self
let container = self
.containers
.iter_mut()
.find(|x| x.identifier.resolution_id == container_id)
Expand Down

0 comments on commit 4a0fd20

Please sign in to comment.