about summary refs log tree commit diff stats
path: root/mu_instructions
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-11-15 23:13:23 -0800
committerKartik Agaram <vc@akkartik.com>2020-11-15 23:13:23 -0800
commit002f2609e91ed2e49c250202877290f58609a982 (patch)
tree079a758e20ff5137b197abc9ce535810351ae12e /mu_instructions
parent2715d377b6108b0a607d9322d470bedd77c9c717 (diff)
downloadmu-002f2609e91ed2e49c250202877290f58609a982.tar.gz
7248 - mu.subx: new primitive 'clear-object'
Diffstat (limited to 'mu_instructions')
-rw-r--r--mu_instructions3
1 files changed, 3 insertions, 0 deletions
diff --git a/mu_instructions b/mu_instructions
index 629ba3d1..f487d29a 100644
--- a/mu_instructions
+++ b/mu_instructions
@@ -384,6 +384,9 @@ populate-stream in: (addr handle stream T), num  # can be literal or variable on
 
 # Some miscellaneous helpers to avoid error-prone size computations
 
+clear x: (addr T)
+  => "(zero-out " s " " size-of(T) ")"
+
 read-from-stream s: (addr stream T), out: (addr T)
   => "(read-from-stream " s " " out " " size-of(T) ")"