From ccbf4441de3e7e99a456f699d8c05c77e2dd2e51 Mon Sep 17 00:00:00 2001 From: Max Bernstein Date: Thu, 13 Feb 2025 09:17:41 -0500 Subject: [PATCH] Add comments for Test and Snapshot --- zjit/src/ir.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zjit/src/ir.rs b/zjit/src/ir.rs index 0002892530..7e552872c0 100644 --- a/zjit/src/ir.rs +++ b/zjit/src/ir.rs @@ -85,6 +85,8 @@ pub enum Insn { NewArray { count: usize }, ArraySet { idx: usize, val: Opnd }, ArrayDup { val: Opnd }, + // Check if the value is truthy and "return" a C boolean. In reality, we will likely fuse this + // with IfTrue/IfFalse in the backend to generate jcc. Test { val: Opnd }, Defined { op_type: usize, obj: VALUE, pushval: VALUE, v: Opnd }, GetConstantPath { ic: *const u8 }, @@ -93,6 +95,9 @@ pub enum Insn { //SetIvar {}, //GetIvar {}, + // Own a FrameState so that instructions can look up their dominating FrameState when + // generating deopt side-exits and frame reconstruction metadata. Does not directly generate + // any code. Snapshot { state: FrameState }, // Unconditional jump