about summary refs log tree commit diff stats
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
parent5c4eb680c0fafb403fdffa9f49c1d6424714c48c (diff)
downloadmu-54fc4d952df9d7a5abcc08c816fb8a694902e381.tar.gz
6022
Forgot to actually use the new type-dispatch in commit 6017.
-rwxr-xr-xapps/mubin144681 -> 144693 bytes
-rw-r--r--apps/mu.subx5
2 files changed, 4 insertions, 1 deletions
diff --git a/apps/mu b/apps/mu
index 77f0198a..9b3249c3 100755
--- a/apps/mu
+++ b/apps/mu
Binary files differdiff --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
.sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#ifndef HASHTABLE_H
#define HASHTABLE_H

#include "common.h"

typedef struct HashTable HashTable;

HashTable* HashTable_create(uint32 capacity);
void HashTable_destroy(HashTable* hashTable);
BOOL HashTable_search(HashTable* hashTable, uint32 key, uint32* value);
BOOL HashTable_insert(HashTable* hashTable, uint32 key, uint32 data);
BOOL HashTable_remove(HashTable* hashTable, uint32 key);

#endif // HASHTABLE_H