feat(env): move env out of vm,
This commit is contained in:
@@ -10,8 +10,9 @@ use super::common::*;
|
||||
use super::public as p;
|
||||
|
||||
use crate::bytecode::OpCodes;
|
||||
use crate::env::VmEnv;
|
||||
use crate::error::*;
|
||||
use crate::vm::{VM, VmEnv};
|
||||
use crate::vm::VM;
|
||||
|
||||
mod attrset;
|
||||
mod func;
|
||||
@@ -231,7 +232,7 @@ impl<'jit, 'vm> Value<'jit, 'vm> {
|
||||
|
||||
pub fn lt(&mut self, other: Self) {
|
||||
use Const::*;
|
||||
*self = VmConst(Bool(match (&*self, other) {
|
||||
*self = VmConst(Bool(match (&*self, other) {
|
||||
(VmConst(Int(a)), VmConst(Int(b))) => *a < b,
|
||||
(VmConst(Int(a)), VmConst(Float(b))) => (*a as f64) < b,
|
||||
(VmConst(Float(a)), VmConst(Int(b))) => *a < b as f64,
|
||||
@@ -241,7 +242,7 @@ impl<'jit, 'vm> Value<'jit, 'vm> {
|
||||
(_, x @ Value::Catchable(_)) => {
|
||||
*self = x;
|
||||
return;
|
||||
},
|
||||
}
|
||||
_ => todo!(),
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user