diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-05-12 14:20:52 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-02 14:23:21 +0000 |
| commit | b41a406ab7f56cc33aca594fb38b60c67d4130ce (patch) | |
| tree | faf683fef2ee2b700b3f0d688e0f4727fc64ab0e /alv/rtnode.moon | |
| parent | make EvtStreams carry a single value (diff) | |
| download | alive-b41a406ab7f56cc33aca594fb38b60c67d4130ce.tar.gz alive-b41a406ab7f56cc33aca594fb38b60c67d4130ce.zip | |
RTNode constifies constant SigStreams
Diffstat (limited to 'alv/rtnode.moon')
| -rw-r--r-- | alv/rtnode.moon | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/alv/rtnode.moon b/alv/rtnode.moon index b10f9a1..23cffa5 100644 --- a/alv/rtnode.moon +++ b/alv/rtnode.moon @@ -45,7 +45,7 @@ class RTNode -- should be called once per frame on the root, right before tick. poll_io: => for result, input in pairs @side_inputs - result\poll! if input.io + result\poll! if input.mode == 'io' --- in depth-first order, tick all Ops which have dirty Inputs. -- @@ -120,13 +120,15 @@ class RTNode is_child[child.result] = true if @op - for input in @op\all_inputs! - continue if input.result.metatype == '=' - if input.io or not is_child[input.result] - @side_inputs[input.result] = input - - if @result and @result.metatype == '=' - assert not (next @side_inputs), "Const result has side_inputs" + for i in @op\all_inputs! + if i.mode == 'io' or (i.mode == 'hot' and not is_child[i.result]) + @side_inputs[i.result] = i + + if @result + if next @side_inputs + assert @result.metatype != '=', "Const result has side_inputs" + elseif @result.metatype == '~' + @result = @result.type\mk_const @result\unwrap! { :RTNode |
