mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-04-18 03:00:27 -04:00
Add args param
This commit is contained in:
@@ -14,12 +14,12 @@ mod stack_frame;
|
||||
mod string_methods;
|
||||
mod todo_fn;
|
||||
mod virtual_machine;
|
||||
mod vs_array;
|
||||
pub mod vs_array;
|
||||
mod vs_class;
|
||||
mod vs_function;
|
||||
mod vs_object;
|
||||
pub mod vs_object;
|
||||
mod vs_pointer;
|
||||
mod vs_value;
|
||||
pub mod vs_value;
|
||||
|
||||
pub use virtual_machine::VirtualMachine;
|
||||
pub use vs_value::{LoadFunctionResult, ValTrait};
|
||||
|
||||
@@ -44,7 +44,7 @@ impl VirtualMachine {
|
||||
pub fn run_with_limit(
|
||||
&mut self,
|
||||
bytecode: &Rc<Vec<u8>>,
|
||||
params: &[String],
|
||||
params: &[Val],
|
||||
step_limit: usize,
|
||||
) -> Result<Val, Val> {
|
||||
let mut bd = BytecodeDecoder {
|
||||
@@ -60,7 +60,7 @@ impl VirtualMachine {
|
||||
};
|
||||
|
||||
for p in params {
|
||||
frame.write_param(Val::String(Rc::new(p.clone())));
|
||||
frame.write_param(p.clone());
|
||||
}
|
||||
|
||||
self.push(frame);
|
||||
|
||||
Reference in New Issue
Block a user