about summary refs log tree commit diff stats
path: root/apps/mu.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-02-18 00:33:22 -0800
committerKartik Agaram <vc@akkartik.com>2020-02-18 00:37:37 -0800
commit54fc4d952df9d7a5abcc08c816fb8a694902e381 (patch)
tree60d49e3fa5a78bc19b3d4ae7e3f72aa39ae9bcb8 /apps/mu.subx
parent5c4eb680c0fafb403fdffa9f49c1d6424714c48c (diff)
downloadmu-54fc4d952df9d7a5abcc08c816fb8a694902e381.tar.gz
6022
Forgot to actually use the new type-dispatch in commit 6017.
Diffstat (limited to 'apps/mu.subx')
-rw-r--r--apps/mu.subx5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/mu.subx b/apps/mu.subx
index 85481d85..babdb68e 100644
--- a/apps/mu.subx
+++ b/apps/mu.subx
@@ -7320,7 +7320,7 @@ operand-matches-primitive?:  # var: (handle var), prim-var: (handle var) -> resu
     # edi = prim-var
     8b/-> *(ebp+0xc) 7/r32/edi
     # if (var->type != prim-var->type) return false
-    (type-equal? *(esi+4) *(edi+4))  # Var-type, Var-type => eax
+    (subx-type-equal? *(esi+4) *(edi+4))  # Var-type, Var-type => eax
     3d/compare-eax-and 0/imm32/false
     b8/copy-to-eax 0/imm32/false
     74/jump-if-= $operand-matches-primitive?:end/disp8
@@ -7391,6 +7391,9 @@ is-literal-type?:  # a: (handle tree type-id) -> result/eax: boolean
     #
     8b/-> *(ebp+8) 0/r32/eax
     8b/-> *eax 0/r32/eax  # Atom-value
+    3d/compare-eax-and 0/imm32/false
+    74/jump-if-equal $is-literal-type?:end/disp8
+    b8/copy-to-eax 1/imm32/true
 $is-literal-type?:end:
     # . epilogue
     89/<- %esp 5/r32/ebp