Skip to content

Commit

Permalink
update gc-arena
Browse files Browse the repository at this point in the history
  • Loading branch information
dragazo committed Nov 3, 2023
1 parent b0d90c8 commit e447cdb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ rustls-tls-webpki-roots = [

# core deps
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
gc-arena = { version = "=0.3.0", default-features = false }
gc-arena = { version = "=0.4.0", default-features = false }
netsblox-ast = { version = "=0.4.2", default-features = false }
# netsblox-ast = { path = "../netsblox-ast", default-features = false }
num-traits = { version = "0.2.17", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ type EnvArena<S> = Arena<Rootable![Env<'_, S>]>;

fn get_env<C: CustomTypes<StdSystem<C>>>(role: &ast::Role, system: Rc<StdSystem<C>>) -> Result<EnvArena<C>, FromAstError> {
let (bytecode, init_info, locs, _) = ByteCode::compile(role)?;
Ok(EnvArena::new(Default::default(), |mc| {
Ok(EnvArena::new(|mc| {
let proj = Project::from_init(mc, &init_info, Rc::new(bytecode), Settings::default(), system);
Env { proj: Gc::new(mc, RefLock::new(proj)), locs }
}))
Expand Down
2 changes: 1 addition & 1 deletion src/test/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fn get_running_proc<'a>(xml: &'a str, settings: Settings, system: Rc<StdSystem<C
let (code, init_info, ins_locs, locs) = ByteCode::compile(&ast.roles[0]).unwrap();
let main = locs.funcs.iter().chain(locs.entities[0].1.funcs.iter()).find(|x| x.0.trans_name.trim() == "main").expect("no main function/method");

(EnvArena::new(Default::default(), |mc| {
(EnvArena::new(|mc| {
let glob = GlobalContext::from_init(mc, &init_info, Rc::new(code), settings, system);
let entity = *glob.entities.iter().next().unwrap().1;
let glob = Gc::new(mc, RefLock::new(glob));
Expand Down
2 changes: 1 addition & 1 deletion src/test/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct Env<'gc> {
type EnvArena = Arena<Rootable![Env<'_>]>;

fn get_running_project(xml: &str, system: Rc<StdSystem<C>>) -> EnvArena {
EnvArena::new(Default::default(), |mc| {
EnvArena::new(|mc| {
let parser = ast::Parser::default();
let ast = parser.parse(xml).unwrap();
assert_eq!(ast.roles.len(), 1);
Expand Down

0 comments on commit e447cdb

Please sign in to comment.