Don't run nest checks on every +call.

This commit is contained in:
Elliot Glaysher 2018-12-03 11:45:50 -08:00
parent cf96537aaa
commit 841b023671
4 changed files with 45 additions and 62 deletions

View File

@ -1227,20 +1227,15 @@
|% :: vane interface |% :: vane interface
++ call :: handle request ++ call :: handle request
|= $: hen=duct |= $: hen=duct
hic=(hypo (hobo task:able)) type=*
== wrapped-task=(hobo task:able)
=> %= . :: XX temporary
q.hic
^- task:able
?: ?=(%soft -.q.hic)
((hard task:able) p.q.hic)
?: (~(nest ut -:!>(*task:able)) | p.hic) q.hic
~& [%ames-call-flub (@tas `*`-.q.hic)]
((hard task:able) q.hic)
== ==
^- [(list move) _..^$] ^- [(list move) _..^$]
=^ duy ..knob =/ task=task:able
(knob hen q.hic) ?. ?=(%soft -.wrapped-task)
wrapped-task
((hard task:able) p.wrapped-task)
=^ duy ..knob (knob hen task)
[duy ..^$] [duy ..^$]
:: ::
++ load ++ load

View File

@ -152,20 +152,15 @@
^? ^?
|% :: poke+peek pattern |% :: poke+peek pattern
++ call :: handle request ++ call :: handle request
|= $: hen/duct |= $: hen=duct
hic/(hypo (hobo task:able)) type=*
wrapped-task=(hobo task:able)
== ==
=> %= . :: XX temporary ::
q.hic =/ req=task:able
^- task:able ?. ?=(%soft -.wrapped-task)
?: ?=($soft -.q.hic) wrapped-task
:: ~& [%behn-call-soft (,@tas `*`-.p.q.hic)] ((hard task:able) p.wrapped-task)
((hard task:able) p.q.hic)
?: (~(nest ut -:!>(*task:able)) | p.hic) q.hic
~& [%behn-call-flub (@tas `*`-.q.hic)]
((hard task:able) q.hic)
==
=* req q.hic
|- ^- [(list move) _..^^$] |- ^- [(list move) _..^^$]
:: ::
?: ?=(%born -.req) ?: ?=(%born -.req)

View File

@ -492,39 +492,34 @@
-- --
|% :: poke+peek pattern |% :: poke+peek pattern
++ call :: handle request ++ call :: handle request
|= $: hen/duct |= $: hen=duct
hic/(hypo (hobo task:able)) type=*
wrapped-task=(hobo task:able)
== ==
^+ [*(list move) ..^$] ^+ [*(list move) ..^$]
=> %= . :: XX temporary =/ task=task:able
q.hic ?. ?=(%soft -.wrapped-task)
^- task:able wrapped-task
?: ?=($soft -.q.hic) ((hard task:able) p.wrapped-task)
:: ~& [%dill-call-soft (@tas `*`-.p.q.hic)]
((hard task:able) p.q.hic)
?: (~(nest ut -:!>(*task:able)) | p.hic) q.hic
~& [%dill-call-flub (@tas `*`-.q.hic)]
((hard task:able) q.hic)
==
:: the boot event passes thru %dill for initial duct distribution :: the boot event passes thru %dill for initial duct distribution
:: ::
?: ?=(%boot -.q.hic) ?: ?=(%boot -.task)
?> ?=(?(%dawn %fake) -.p.q.hic) ?> ?=(?(%dawn %fake) -.p.task)
?> =(~ hey.all) ?> =(~ hey.all)
=. hey.all `hen =. hey.all `hen
=/ boot ((soft note-jael) p.q.hic) =/ boot ((soft note-jael) p.task)
?~ boot ?~ boot
~| invalid-boot-event+hen !! ~| invalid-boot-event+hen !!
:_(..^$ [hen %pass / %j u.boot]~) :_(..^$ [hen %pass / %j u.boot]~)
:: we are subsequently initialized. single-home :: we are subsequently initialized. single-home
:: ::
?: ?=(%init -.q.hic) ?: ?=(%init -.task)
?> =(~ dug.all) ?> =(~ dug.all)
?> =(~ ore.all) ?> =(~ ore.all)
=. ore.all `p.q.hic =. ore.all `p.task
:: configure new terminal, setup :hood and %clay :: configure new terminal, setup :hood and %clay
:: ::
=* our p.q.hic =* our p.task
=* duc (need hey.all) =* duc (need hey.all)
=/ app %hood =/ app %hood
=/ see (tuba "<awaiting {(trip app)}, this may take a few minutes>") =/ see (tuba "<awaiting {(trip app)}, this may take a few minutes>")
@ -534,17 +529,17 @@
[moz ..^$] [moz ..^$]
:: %flog tasks are unwrapped and sent back to us on our default duct :: %flog tasks are unwrapped and sent back to us on our default duct
:: ::
?: ?=(%flog -.q.hic) ?: ?=(%flog -.task)
?~ hey.all ?~ hey.all
[~ ..^$] [~ ..^$]
:: this lets lib/helm send %heft a la |mass :: this lets lib/helm send %heft a la |mass
:: ::
=/ not=note-dill =/ not=note-dill
?:(?=([%crud %hax-heft ~] p.q.hic) [%heft ~] p.q.hic) ?:(?=([%crud %hax-heft ~] p.task) [%heft ~] p.task)
[[u.hey.all %slip %d not]~ ..^$] [[u.hey.all %slip %d not]~ ..^$]
:: a %sunk notification from %jail comes in on an unfamiliar duct :: a %sunk notification from %jail comes in on an unfamiliar duct
:: ::
?: ?=(%sunk -.q.hic) ?: ?=(%sunk -.task)
[~ ..^$] [~ ..^$]
:: ::
=/ nus (ax hen) =/ nus (ax hen)
@ -552,11 +547,11 @@
:: we got this on an unknown duct or :: we got this on an unknown duct or
:: before %boot or %init (or one of those crashed) :: before %boot or %init (or one of those crashed)
:: ::
~& [%dill-call-no-flow hen -.q.hic] ~& [%dill-call-no-flow hen -.task]
=/ tan ?:(?=(%crud -.q.hic) q.q.hic ~) =/ tan ?:(?=(%crud -.task) q.task ~)
[((slog (flop tan)) ~) ..^$] [((slog (flop tan)) ~) ..^$]
:: ::
=^ moz all abet:(call:u.nus q.hic) =^ moz all abet:(call:u.nus task)
[moz ..^$] [moz ..^$]
:: ::
++ load :: trivial ++ load :: trivial

View File

@ -2245,20 +2245,18 @@
^? :: opaque core ^? :: opaque core
|% :: |% ::
++ call :: handle request ++ call :: handle request
|= $: hen/duct |= $: hen=duct
hic/(hypo (hobo task:able)) type=*
== wrapped-task=(hobo task:able)
=> %= . :: XX temporary
q.hic
^- task:able
?: ?=($soft -.q.hic)
((hard task:able) p.q.hic)
?: (~(nest ut -:!>(*task:able)) | p.hic) q.hic
~& [%eyre-call-flub (@tas `*`-.q.hic)]
((hard task:able) q.hic)
== ==
::
=/ task=task:able
?. ?=(%soft -.wrapped-task)
wrapped-task
((hard task:able) p.wrapped-task)
::
^+ [*(list move) ..^$] ^+ [*(list move) ..^$]
?: ?=($wegh -.q.hic) ?: ?=($wegh -.task)
:_ ..^$ :_ ~ :_ ..^$ :_ ~
:^ hen %give %mass :^ hen %give %mass
:- %eyre :- %eyre
@ -2275,7 +2273,7 @@
^+ [p=*(list move) q=..^$] ^+ [p=*(list move) q=..^$]
=. gub ?.(=(`@`0 gub) gub (cat 3 (rsh 3 1 (scot %p (end 6 1 eny))) '-')) =. gub ?.(=(`@`0 gub) gub (cat 3 (rsh 3 1 (scot %p (end 6 1 eny))) '-'))
=^ mos bol =^ mos bol
abet:(apex:~(adit ye [hen [now eny our sky] ~] bol) q.hic) abet:(apex:~(adit ye [hen [now eny our sky] ~] bol) task)
[mos ..^$] [mos ..^$]
:: ::
++ load :: take previous state ++ load :: take previous state