move apply_defs to just before the VM evaluates code
This commit is contained in:
parent
4761fd40ba
commit
2d1f49f78d
2 changed files with 7 additions and 4 deletions
|
@ -114,8 +114,6 @@ impl Haku {
|
|||
let chunk_id = self.system.add_chunk(chunk).context("too many chunks")?;
|
||||
self.brush = Some(chunk_id);
|
||||
|
||||
self.vm.apply_defs(&self.defs);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -124,6 +122,8 @@ impl Haku {
|
|||
.brush
|
||||
.ok_or_eyre("brush is not compiled and ready to be used")?;
|
||||
|
||||
self.vm.apply_defs(&self.defs);
|
||||
|
||||
let closure_id = self
|
||||
.vm
|
||||
.create_ref(Ref::Closure(Closure {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue