clay: add fast-path for permissions check

This commit is contained in:
Philip Monk 2023-05-15 16:04:53 -07:00
parent 65fd1cc179
commit 48b10dcdc7
2 changed files with 7 additions and 1 deletions

View File

@ -4496,7 +4496,9 @@
:: ::
?. ?| =(0v0 tak) ?. ?| =(0v0 tak)
?& (~(has by hut.ran) tak) ?& (~(has by hut.ran) tak)
(~(has in (reachable-takos (aeon-to-tako:ze let.dom))) tak) ?| (~(any by hit.dom) |=(=tako =(tak tako))) :: fast-path
(~(has in (reachable-takos (aeon-to-tako:ze let.dom))) tak)
==
|(?=(~ for) (may-read u.for care.mun tak path.mun)) |(?=(~ for) (may-read u.for care.mun tak path.mun))
== == == ==
[~ ..park] [~ ..park]

View File

@ -769,6 +769,10 @@
(mo-apply-sure dap routes deal) (mo-apply-sure dap routes deal)
:: ::
%raw-poke %raw-poke
:: don't validate %noun pokes, for performance
::
?: =(%noun mark.deal)
(mo-apply-sure dap routes [%poke %noun %noun noun.deal])
=/ =case da+now =/ =case da+now
=/ yok (~(got by yokes.state) dap) =/ yok (~(got by yokes.state) dap)
=/ =desk q.beak:?>(?=(%live -.yok) yok) ::TODO acceptable assertion? =/ =desk q.beak:?>(?=(%live -.yok) yok) ::TODO acceptable assertion?