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)
?& (~(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))
== ==
[~ ..park]

View File

@ -769,6 +769,10 @@
(mo-apply-sure dap routes deal)
::
%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
=/ yok (~(got by yokes.state) dap)
=/ =desk q.beak:?>(?=(%live -.yok) yok) ::TODO acceptable assertion?