mirror of
https://github.com/urbit/shrub.git
synced 2024-12-29 15:14:17 +03:00
ames: fix larval +load for fusion
This commit is contained in:
parent
e34a1a2e61
commit
05f0e47f68
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:23421b414b6f11d12368bb5bb5fc13d904b8dbe805d93e43115fa494788f74a8
|
||||
size 12995971
|
||||
oid sha256:688a6812958f5328ce0409b9808cb5f3479e3d01eaf467d97e0dca54902a749b
|
||||
size 12994298
|
||||
|
@ -14352,11 +14352,10 @@
|
||||
++ ride :: end-to-end compiler
|
||||
|= {typ/type txt/@}
|
||||
^- (pair type nock)
|
||||
~> %slog.[0 leaf/"ride-parsing"]
|
||||
~> %slog.[0 leaf/"ride: parsing"]
|
||||
=/ gen (ream txt)
|
||||
~> %slog.[0 leaf/"ride-compiling"]
|
||||
=- ~> %slog.[0 leaf/"ride-compiled"]
|
||||
-
|
||||
~> %slog.[0 leaf/"ride: compiling"]
|
||||
~< %slog.[0 leaf/"ride: compiled"]
|
||||
(~(mint ut typ) %noun gen)
|
||||
::
|
||||
:::: 5e: caching compiler
|
||||
|
@ -376,6 +376,16 @@
|
||||
veb=_veb-all-off
|
||||
==
|
||||
::
|
||||
+$ queued-event-1
|
||||
$% [%call =duct type=* wrapped-task=(hobo task-1)]
|
||||
[%take =wire =duct type=* =sign]
|
||||
==
|
||||
::
|
||||
+$ task-1
|
||||
$% [%wegh ~]
|
||||
task
|
||||
==
|
||||
::
|
||||
+$ ames-state-1
|
||||
$: peers=(map ship ship-state-1)
|
||||
=unix=duct
|
||||
@ -520,45 +530,81 @@
|
||||
:: lifecycle arms; mostly pass-throughs to the contained adult ames
|
||||
::
|
||||
++ scry scry:adult-core
|
||||
++ stay [%3 %larva queued-events ames-state.adult-gate]
|
||||
++ stay [%4 %larva queued-events ames-state.adult-gate]
|
||||
++ load
|
||||
|^
|
||||
|= $= old
|
||||
$% $: %3
|
||||
$% [%larva events=_queued-events state=_ames-state.adult-gate]
|
||||
$% $: %4
|
||||
$% $: %larva
|
||||
events=(qeu queued-event)
|
||||
state=_ames-state.adult-gate
|
||||
==
|
||||
[%adult state=_ames-state.adult-gate]
|
||||
== ==
|
||||
::
|
||||
$: %3
|
||||
$% $: %larva
|
||||
events=(qeu queued-event-1)
|
||||
state=_ames-state.adult-gate
|
||||
==
|
||||
[%adult state=_ames-state.adult-gate]
|
||||
== ==
|
||||
::
|
||||
$: %2
|
||||
$% [%larva events=_queued-events state=ames-state-2]
|
||||
$% [%larva events=(qeu queued-event-1) state=ames-state-2]
|
||||
[%adult state=ames-state-2]
|
||||
== ==
|
||||
::
|
||||
$% [%larva events=_queued-events state=ames-state-1]
|
||||
$% [%larva events=(qeu queued-event-1) state=ames-state-1]
|
||||
[%adult state=ames-state-1]
|
||||
== ==
|
||||
?- old
|
||||
[%4 %adult *] (load:adult-core %4 state.old)
|
||||
[%3 %adult *] (load:adult-core %3 state.old)
|
||||
[%2 %adult *] (load:adult-core %2 state.old)
|
||||
[%adult *] (load:adult-core %1 state.old)
|
||||
::
|
||||
[%3 %larva *]
|
||||
[%4 %larva *]
|
||||
~> %slog.1^leaf/"ames: larva: load"
|
||||
=. queued-events events.old
|
||||
=. adult-gate (load:adult-core %4 state.old)
|
||||
larval-gate
|
||||
::
|
||||
[%3 %larva *]
|
||||
~> %slog.1^leaf/"ames: larva: load"
|
||||
=. queued-events (queued-events-1-to-4 events.old)
|
||||
=. adult-gate (load:adult-core %3 state.old)
|
||||
larval-gate
|
||||
::
|
||||
[%2 %larva *]
|
||||
~> %slog.1^leaf/"ames: larva: load"
|
||||
=. queued-events events.old
|
||||
=. queued-events (queued-events-1-to-4 events.old)
|
||||
=. adult-gate (load:adult-core %2 state.old)
|
||||
larval-gate
|
||||
::
|
||||
[%larva *]
|
||||
~> %slog.0^leaf/"ames: larva: load"
|
||||
=. queued-events events.old
|
||||
=. queued-events (queued-events-1-to-4 events.old)
|
||||
=. adult-gate (load:adult-core %1 state.old)
|
||||
larval-gate
|
||||
==
|
||||
::
|
||||
++ queued-events-1-to-4
|
||||
|= events=(qeu queued-event-1)
|
||||
^- (qeu queued-event)
|
||||
%- ~(gas to *(qeu queued-event))
|
||||
^- (list queued-event)
|
||||
%+ murn ~(tap to events)
|
||||
|= e=queued-event-1
|
||||
^- (unit queued-event)
|
||||
?. ?=(%call -.e)
|
||||
`e
|
||||
?: ?=([%wegh ~] wrapped-task.e)
|
||||
~
|
||||
?: ?=([%soft %wegh ~] wrapped-task.e)
|
||||
~
|
||||
`e
|
||||
--
|
||||
--
|
||||
:: adult ames, after metamorphosis from larva
|
||||
::
|
||||
@ -633,7 +679,7 @@
|
||||
[moves ames-gate]
|
||||
:: +stay: extract state before reload
|
||||
::
|
||||
++ stay [%3 %adult ames-state]
|
||||
++ stay [%4 %adult ames-state]
|
||||
:: +load: load in old state after reload
|
||||
::
|
||||
++ load
|
||||
@ -641,13 +687,15 @@
|
||||
$% [%1 ames-state-1]
|
||||
[%2 ames-state-2]
|
||||
[%3 ^ames-state]
|
||||
[%4 ^ames-state]
|
||||
==
|
||||
|^ ^+ ames-gate
|
||||
::
|
||||
=? old-state ?=(%1 -.old-state) %2^(state-1-to-2 +.old-state)
|
||||
=? old-state ?=(%2 -.old-state) %3^(state-2-to-3 +.old-state)
|
||||
=? old-state ?=(%3 -.old-state) %4^+.old-state
|
||||
::
|
||||
?> ?=(%3 -.old-state)
|
||||
?> ?=(%4 -.old-state)
|
||||
ames-gate(ames-state +.old-state)
|
||||
::
|
||||
++ state-1-to-2
|
||||
|
Loading…
Reference in New Issue
Block a user