about summary refs log tree commit diff stats
path: root/subx/apps
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-08 00:13:20 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-08 00:13:20 -0700
commit58b60a667e2fc4314332c901fc1d6c7ecd819b72 (patch)
tree0baf78e784ef86e11dbf766771e0fef4d19424ab /subx/apps
parent761833aa9285edf5f919f4da3a94afbd4a7f657c (diff)
downloadmu-58b60a667e2fc4314332c901fc1d6c7ecd819b72.tar.gz
.
style tweaks
Diffstat (limited to 'subx/apps')
-rwxr-xr-xsubx/apps/assortbin28699 -> 28723 bytes
-rwxr-xr-xsubx/apps/dquotesbin35008 -> 35032 bytes
-rwxr-xr-xsubx/apps/packbin43613 -> 43637 bytes
-rw-r--r--subx/apps/subx-common.subx22
4 files changed, 16 insertions, 6 deletions
diff --git a/subx/apps/assort b/subx/apps/assort
index c75fe6da..530ad9c6 100755
--- a/subx/apps/assort
+++ b/subx/apps/assort
Binary files differdiff --git a/subx/apps/dquotes b/subx/apps/dquotes
index 05a306d3..6483c2dd 100755
--- a/subx/apps/dquotes
+++ b/subx/apps/dquotes
Binary files differdiff --git a/subx/apps/pack b/subx/apps/pack
index 86fd31e9..08164496 100755
--- a/subx/apps/pack
+++ b/subx/apps/pack
Binary files differdiff --git a/subx/apps/subx-common.subx b/subx/apps/subx-common.subx
index 0e155515..83b37e07 100644
--- a/subx/apps/subx-common.subx
+++ b/subx/apps/subx-common.subx
@@ -1178,10 +1178,12 @@ compute-width-of-slice: # s : (address slice) -> EAX : int
     51/push-ECX
     # ECX = s
     8b/copy                         1/mod/*+disp8   5/rm32/EBP    .           .             .           1/r32/ECX   8/disp8         .                 # copy *(EBP+8) to ECX
-    # if has-metadata?(word, "imm32") or has-metadata?(word, "disp32"): return 4
+    # if (has-metadata?(word, "imm32")) return 4
     # . EAX = has-metadata?(word, "imm32")
+    # . . push args
     68/push  "imm32"/imm32
     51/push-ECX
+    # . . call
     e8/call  has-metadata?/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
@@ -1189,9 +1191,12 @@ compute-width-of-slice: # s : (address slice) -> EAX : int
     3d/compare-EAX-and  1/imm32
     b8/copy-to-EAX  4/imm32         # ZF is set, so we can overwrite EAX now
     74/jump-if-equal  $compute-width-of-slice:end/disp8
-    # . has-metadata?(word, "disp32")
+    # if (has-metadata?(word, "disp32")) return 4
+    # . EAX = has-metadata?(word, "disp32")
+    # . . push args
     68/push  "disp32"/imm32
     51/push-ECX
+    # . . call
     e8/call  has-metadata?/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
@@ -1199,10 +1204,12 @@ compute-width-of-slice: # s : (address slice) -> EAX : int
     3d/compare-EAX-and  1/imm32
     b8/copy-to-EAX  4/imm32         # ZF is set, so we can overwrite EAX now
     74/jump-if-equal  $compute-width-of-slice:end/disp8
-    # if has-metadata?(word, "imm16") or has-metadata?(word, "disp16"): return 2
-    # . has-metadata?(word, "imm16")
+    # if (has-metadata?(word, "imm16")) return 2
+    # . EAX = has-metadata?(word, "imm16")
+    # . . push args
     68/push  "imm16"/imm32
     51/push-ECX
+    # . . call
     e8/call  has-metadata?/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
@@ -1210,9 +1217,12 @@ compute-width-of-slice: # s : (address slice) -> EAX : int
     3d/compare-EAX-and  1/imm32
     b8/copy-to-EAX  2/imm32         # ZF is set, so we can overwrite EAX now
     74/jump-if-equal  $compute-width-of-slice:end/disp8
-    # . has-metadata?(word, "disp16")
+    # if (has-metadata?(word, "disp16")) return 2
+    # . EAX = has-metadata?(word, "disp16")
+    # . . push args
     68/push  "disp16"/imm32
     51/push-ECX
+    # . . call
     e8/call  has-metadata?/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
@@ -1220,7 +1230,7 @@ compute-width-of-slice: # s : (address slice) -> EAX : int
     3d/compare-EAX-and  1/imm32
     b8/copy-to-EAX  2/imm32         # ZF is set, so we can overwrite EAX now
     74/jump-if-equal  $compute-width-of-slice:end/disp8
-    # else: return 1
+    # otherwise return 1
     b8/copy-to-EAX  1/imm32
 $compute-width-of-slice:end:
     # . restore registers