summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2025-11-18 18:47:31 -0500
committerAlan Wu <XrXr@users.noreply.github.com>2025-11-19 17:38:53 -0500
commitd487e396bdeb33d0069bab2475103aa9b7109607 (patch)
tree63c911c64f98640dc012e9719ab376f6ddab4ce3
parentba2b97a9440d92e78d519fbcbdecc25b72a42705 (diff)
ZJIT: [DOC] Comment copy-editing
-rw-r--r--zjit/src/hir.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/zjit/src/hir.rs b/zjit/src/hir.rs
index 982400db50..8e6241f0da 100644
--- a/zjit/src/hir.rs
+++ b/zjit/src/hir.rs
@@ -1485,8 +1485,7 @@ fn can_direct_send(function: &mut Function, block: BlockId, iseq: *const rb_iseq
return false;
}
- // Check argument count against callee's parameters. Note that correctness for this calculation
- // relies on rejecting features above.
+ // Because we exclude e.g. post parameters above, they are also excluded from the sum below.
let lead_num = unsafe { get_iseq_body_param_lead_num(iseq) };
let opt_num = unsafe { get_iseq_body_param_opt_num(iseq) };
can_send = c_int::try_from(args.len())
@@ -4545,8 +4544,8 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
let jit_entry_insns = jit_entry_insns(iseq);
let BytecodeInfo { jump_targets, has_blockiseq } = compute_bytecode_info(iseq, &jit_entry_insns);
- // Make all empty basic blocks. The ordering of the BBs matters as it is taken as a schedule
- // in the backend without a scheduling pass. TODO: Higher quality scheduling during lowering.
+ // Make all empty basic blocks. The ordering of the BBs matters for getting fallthrough jumps
+ // in good places, but it's not necessary for correctness. TODO: Higher quality scheduling during lowering.
let mut insn_idx_to_block = HashMap::new();
// Make blocks for optionals first, and put them right next to their JIT entrypoint
for insn_idx in jit_entry_insns.iter().copied() {