Use SharedVector for Value::Array instead of Vec

That will make it more efficient to pass data into the interpreter in the future,
especially from C++.
This commit is contained in:
Simon Hausmann 2021-03-15 10:19:35 +01:00
parent fdeca052cb
commit 41f77b2a27
3 changed files with 4 additions and 4 deletions

View file

@ -11,7 +11,7 @@ use core::cell::RefCell;
use neon::prelude::*;
use rand::RngCore;
use sixtyfps_compilerlib::langtype::Type;
use sixtyfps_corelib::ImageReference;
use sixtyfps_corelib::{ImageReference, SharedVector};
use std::rc::Rc;
@ -198,7 +198,7 @@ fn to_eval_value<'cx>(
Ok(Value::Array(
vec.into_iter()
.map(|i| to_eval_value(i, (*a).clone(), cx, persistent_context))
.collect::<Result<Vec<_>, _>>()?,
.collect::<Result<SharedVector<_>, _>>()?,
))
}
Err(_) => {