Add comments
This commit is contained in:
parent
8d5d5b34cf
commit
139102b24a
Notes:
git
2025-04-18 13:49:51 +00:00
@ -21,6 +21,14 @@ enum Insn {
|
|||||||
|
|
||||||
// Control flow instructions
|
// Control flow instructions
|
||||||
Return { val: Opnd },
|
Return { val: Opnd },
|
||||||
|
|
||||||
|
// Unconditional jump
|
||||||
|
// Jump { target: BlockId },
|
||||||
|
|
||||||
|
// TODO:
|
||||||
|
// Conditional branch instructions
|
||||||
|
// IfTrue { val: Opnd, target: BlockId, }
|
||||||
|
// IfFalse { val: Opnd, target: BlockId, }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default, Debug, PartialEq)]
|
#[derive(Default, Debug, PartialEq)]
|
||||||
@ -34,6 +42,9 @@ impl Block {
|
|||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
struct Function {
|
struct Function {
|
||||||
|
// TODO:
|
||||||
|
// ISEQ this function refers to
|
||||||
|
|
||||||
entry_block: BlockId,
|
entry_block: BlockId,
|
||||||
insns: Vec<Insn>,
|
insns: Vec<Insn>,
|
||||||
blocks: Vec<Block>,
|
blocks: Vec<Block>,
|
||||||
@ -65,7 +76,7 @@ enum RubyOpcode {
|
|||||||
struct FrameState {
|
struct FrameState {
|
||||||
// TODO:
|
// TODO:
|
||||||
// Ruby bytecode instruction pointer
|
// Ruby bytecode instruction pointer
|
||||||
// pc:
|
// pc: *mut VALUE,
|
||||||
|
|
||||||
stack: Vec<Opnd>,
|
stack: Vec<Opnd>,
|
||||||
locals: Vec<Opnd>,
|
locals: Vec<Opnd>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user