rename PrimOpPhase

This commit is contained in:
2026-07-12 21:11:38 +08:00
parent dde3052e2d
commit 7220b42024
14 changed files with 349 additions and 345 deletions
+4 -4
View File
@@ -1,5 +1,5 @@
use bumpalo::Bump;
use fix_bytecode::{Const, InstructionPtr, Op, PrimOpPhase};
use fix_bytecode::{Const, InstructionPtr, Op, Continuation};
use fix_error::{Error, Result, Source};
use fix_lang::{StringId, Symbol};
use fix_runtime::{StaticValue, VmCode, VmRuntimeCtx};
@@ -25,9 +25,9 @@ pub struct CodeState {
impl CodeState {
pub fn new(strings: &mut DefaultStringInterner) -> Self {
let global_env = crate::ir::new_global_env(strings);
let mut bytecode = Vec::with_capacity(PrimOpPhase::Illegal as usize * 2);
for phase in 0..=PrimOpPhase::Illegal as u8 {
bytecode.push(Op::DispatchPrimOp as u8);
let mut bytecode = Vec::with_capacity(Continuation::Illegal as usize * 2);
for phase in 0..=Continuation::Illegal as u8 {
bytecode.push(Op::DispatchCont as u8);
bytecode.push(phase);
}
Self {