diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-05-25 14:13:01 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-05-25 14:56:37 +0200 |
| commit | 30fdba4356683198a298eebb44e28cb8c191a0e1 (patch) | |
| tree | 3c702ca8ecd3240b25bb3bee9cc26e3b608baef0 /src/eval/machine.rs | |
| parent | c010cbc17dcbb2f0d6005d21530143bf57cb5871 (diff) | |
Move deps from context to VM
Diffstat (limited to 'src/eval/machine.rs')
| -rw-r--r-- | src/eval/machine.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/eval/machine.rs b/src/eval/machine.rs index 14633978..904a64c8 100644 --- a/src/eval/machine.rs +++ b/src/eval/machine.rs @@ -13,6 +13,8 @@ pub struct Machine<'a> { pub ctx: &'a mut Context, /// The route of source ids at which the machine is located. pub route: Vec<SourceId>, + /// The dependencies of the current evaluation process. + pub deps: Vec<(SourceId, usize)>, /// The stack of scopes. pub scopes: Scopes<'a>, /// A control flow event that is currently happening. @@ -22,7 +24,13 @@ pub struct Machine<'a> { impl<'a> Machine<'a> { /// Create a new virtual machine. pub fn new(ctx: &'a mut Context, route: Vec<SourceId>, scopes: Scopes<'a>) -> Self { - Self { ctx, route, scopes, flow: None } + Self { + ctx, + route, + deps: vec![], + scopes, + flow: None, + } } /// Resolve a user-entered path to be relative to the compilation |
