wip generators

This commit is contained in:
Andrew Morris
2023-05-31 17:29:11 +10:00
parent 81c613a836
commit ea4571fe82
27 changed files with 353 additions and 45 deletions

View File

@@ -13,6 +13,7 @@ use crate::vs_object::VsObject;
use crate::vs_value::ToVal;
use crate::vs_value::{LoadFunctionResult, Val, ValTrait};
#[derive(Clone)]
pub struct BytecodeStackFrame {
pub decoder: BytecodeDecoder,
pub registers: Vec<Val>,
@@ -24,6 +25,7 @@ pub struct BytecodeStackFrame {
pub catch_setting: Option<CatchSetting>,
}
#[derive(Clone)]
pub struct CatchSetting {
pub pos: usize,
pub register: Option<usize>,
@@ -592,6 +594,10 @@ impl StackFrameTrait for BytecodeStackFrame {
false
}
}
fn clone_to_stack_frame(&self) -> StackFrame {
Box::new(self.clone())
}
}
enum ThisArg {