rename PrimOpPhase
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use fix_bytecode::{Const, InstructionPtr, Op, OperandType, PrimOpPhase};
|
||||
use fix_bytecode::{Const, InstructionPtr, Op, OperandType, Continuation};
|
||||
use fix_lang::{BUILTINS, StringId};
|
||||
use hashbrown::HashMap;
|
||||
use rnix::TextRange;
|
||||
@@ -80,7 +80,7 @@ impl<'a, Ctx: BytecodeContext> BytecodeEmitter<'a, Ctx> {
|
||||
InlineOperand::Const(Const::PrimOp {
|
||||
id,
|
||||
arity,
|
||||
dispatch_ip: PrimOpPhase::entry_for_builtin(id).ip(),
|
||||
dispatch_ip: Continuation::entry_for_builtin(id).ip(),
|
||||
})
|
||||
}
|
||||
BuiltinConst(id) => InlineOperand::BuiltinConst(id),
|
||||
|
||||
Reference in New Issue
Block a user