pr 20
This commit is contained in:
@@ -14,3 +14,8 @@ pub struct ConstId(pub u32);
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
#[serde(transparent)]
|
||||
pub struct TypeId(pub u32);
|
||||
|
||||
/// Unique identifier for a value (usually a local slot).
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
#[serde(transparent)]
|
||||
pub struct ValueId(pub u32);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use super::ids::{ConstId, FunctionId};
|
||||
use super::ids::{ConstId, FunctionId, TypeId, ValueId};
|
||||
|
||||
/// Instructions within a basic block.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
||||
@@ -33,8 +33,12 @@ pub enum Instr {
|
||||
Or,
|
||||
Not,
|
||||
/// HIP operations.
|
||||
Alloc,
|
||||
Free, // Not used in v0 but good to have in Core IR
|
||||
ReadGate,
|
||||
WriteGate,
|
||||
Alloc { ty: TypeId, slots: u32 },
|
||||
BeginPeek { gate: ValueId },
|
||||
BeginBorrow { gate: ValueId },
|
||||
BeginMutate { gate: ValueId },
|
||||
EndPeek,
|
||||
EndBorrow,
|
||||
EndMutate,
|
||||
Free,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user