summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Bernstein <[email protected]>2025-02-06 10:27:58 -0500
committerTakashi Kokubun <[email protected]>2025-04-18 21:52:55 +0900
commitdca2b1ddaf85e8751b76f74b044d0de279541c51 (patch)
tree25d1c8189286c4481348b6d07b49e85a96767156
parentd993307d4cf2eeac3c261d4fa4fa308ea3740830 (diff)
Sketch HIR
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13131
-rw-r--r--zjit/src/main.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/zjit/src/main.rs b/zjit/src/main.rs
index ec2311e448..e4fe75d2da 100644
--- a/zjit/src/main.rs
+++ b/zjit/src/main.rs
@@ -1,3 +1,24 @@
+#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
+pub struct InsnId(usize);
+#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
+pub struct BlockId(usize);
+
+enum Insn {
+ Param { idx: usize },
+}
+
+#[derive(Debug)]
+struct Block {
+ params: Vec<InsnId>,
+ insns: Vec<InsnId>,
+}
+
+#[derive(Debug)]
+struct Function {
+ name: String,
+ entry_block: BlockId,
+}
+
fn main() {
println!("zjit");
}