gall: don't reload if code is unchanged

This commit is contained in:
Philip Monk 2022-07-07 00:12:27 -07:00
parent a4aa835fe1
commit 1bc0d0cd8e
2 changed files with 27 additions and 15 deletions

View File

@ -4342,19 +4342,20 @@
|- ^+ sat |- ^+ sat
?~ sat ?~ sat
~ ~
:_ ^$(sat t.sat)
:: for each agent :: for each agent
:: ::
:- desk.i.sat
=/ bil bill.i.sat =/ bil bill.i.sat
|- ^- bill =^ this done
|- ^- [bill (set dude:gall)]
?~ bil ?~ bil
~ [~ done]
:: ::
?: (~(has in done) i.bil) ?: (~(has in done) i.bil)
$(bil t.bil) $(bil t.bil)
=. done (~(put in done) i.bil) =. done (~(put in done) i.bil)
[i.bil $(bil t.bil)] =^ next done $(bil t.bil)
[[i.bil next] done]
[[desk.i.sat this] $(sat t.sat)]
:: ::
++ sort-desks ++ sort-desks
|= [a=[=desk *] b=[=desk *]] |= [a=[=desk *] b=[=desk *]]
@ -4381,7 +4382,7 @@
=/ agent ~| [%building-app bill.i.sat] !<(agent:gall vase) =/ agent ~| [%building-app bill.i.sat] !<(agent:gall vase)
=^ lid nub.f $(bill.i.sat t.bill.i.sat) =^ lid nub.f $(bill.i.sat t.bill.i.sat)
[[[i.bill.i.sat [our desk.i.sat da+now] agent] lid] nub.f] [[[i.bill.i.sat [our desk.i.sat da+now] agent] lid] nub.f]
=. lad (weld new lad) =. lad (weld lad new)
$(sat t.sat) $(sat t.sat)
:: build-dais for each mark :: build-dais for each mark
:: ::
@ -4653,10 +4654,11 @@
[mos ..^$] [mos ..^$]
:: ::
[%rise =desk =dude:gall on=(unit ?)] [%rise =desk =dude:gall on=(unit ?)]
=^ mos ruf =^ m1 ruf
=/ den ((de now rof hen ruf) our desk.arg.req) =/ den ((de now rof hen ruf) our desk.arg.req)
abet:(rise:den dude.arg.req on.arg.req) abet:(rise:den dude.arg.req on.arg.req)
[mos ..^$] =^ m2 ruf abet:goad:(lu now rof hen ruf)
[(weld m1 m2) ..^$]
== ==
:: ::
%tomb (tomb-clue:tomb hen clue.req) %tomb (tomb-clue:tomb hen clue.req)

View File

@ -47,6 +47,7 @@
:: control-duct: TODO document :: control-duct: TODO document
:: stats: TODO document :: stats: TODO document
:: watches: incoming and outgoing subscription state :: watches: incoming and outgoing subscription state
:: code: most recently loaded code
:: agent: agent core :: agent: agent core
:: beak: compilation source :: beak: compilation source
:: marks: mark conversion requests :: marks: mark conversion requests
@ -56,6 +57,7 @@
nonce=@t nonce=@t
=stats =stats
=watches =watches
code=*
agent=(each agent vase) agent=(each agent vase)
=beak =beak
marks=(map duct mark) marks=(map duct mark)
@ -128,6 +130,7 @@
nonce=@t nonce=@t
=stats =stats
=watches =watches
code=~
old-state=[%| vase] old-state=[%| vase]
=beak =beak
marks=(map duct mark) marks=(map duct mark)
@ -199,8 +202,11 @@
~> %slog.[0 leaf+"gall: {tex} {<dap>}"] ~> %slog.[0 leaf+"gall: {tex} {<dap>}"]
:: ::
?^ yak ?^ yak
?: &(=(q.beak.u.yak q.bek) =(code.u.yak agent) =(-.agent.u.yak &))
mo-core
::
=. yokes.state =. yokes.state
(~(put by yokes.state) dap u.yak(beak bek)) (~(put by yokes.state) dap u.yak(beak bek, code agent))
=/ ap-core (ap-abed:ap dap `our) =/ ap-core (ap-abed:ap dap `our)
=. ap-core (ap-reinstall:ap-core agent) =. ap-core (ap-reinstall:ap-core agent)
=. mo-core ap-abet:ap-core =. mo-core ap-abet:ap-core
@ -211,6 +217,7 @@
%* . *yoke %* . *yoke
control-duct hen control-duct hen
beak bek beak bek
code agent
agent &+agent agent &+agent
nonce (scot %uw (end 5 (shas %yoke-nonce eny))) nonce (scot %uw (end 5 (shas %yoke-nonce eny)))
== ==
@ -1537,6 +1544,7 @@
:: ::
:: removed live :: removed live
:: changed old-state from (each vase vase) to [%| vase] :: changed old-state from (each vase vase) to [%| vase]
:: added code
:: ::
++ spore-8-to-9 ++ spore-8-to-9
|= old=spore-8 |= old=spore-8
@ -1546,7 +1554,8 @@
eggs eggs
%- ~(urn by eggs.old) %- ~(urn by eggs.old)
|= [a=term e=egg-8] |= [a=term e=egg-8]
e(|2 |3.e(old-state [%| p.old-state.e])) ^- egg
e(|2 |3.e(|2 `|5.e(old-state [%| p.old-state.e])))
== ==
-- --
:: +scry: standard scry :: +scry: standard scry
@ -1635,6 +1644,7 @@
|= =yoke |= =yoke
^- egg ^- egg
%= yoke %= yoke
code ~
agent agent
:- %| :- %|
?: ?=(%| -.agent.yoke) ?: ?=(%| -.agent.yoke)