Mercurial > repos > rhope
annotate dict.rhope @ 87:3c4325e6298f
Add First@Dictionary (need to find mem man bug)
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 30 Jul 2010 01:48:59 -0400 |
parents | 27bb051d631c |
children | c25d75c2440b |
rev | line source |
---|---|
83
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1 |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
2 Blueprint Empty Dictionary |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
3 { |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
4 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
5 |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
6 Blueprint Dictionary |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
7 { |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
8 Left |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
9 Right |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
10 Straight |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
11 Bits(UInt32,Naked) |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
12 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
13 |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
14 Dictionary[:out] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
15 { |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
16 out <- Build[Empty Dictionary()] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
17 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
18 |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
19 _Index@Empty Dictionary[dict,index,bits,bitindex:out,not found] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
20 { |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
21 not found <- dict |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
22 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
23 |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
24 Index@Empty Dictionary[dict,index:out,not found] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
25 { |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
26 not found <- dict |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
27 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
28 |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
29 _Terminal Node[val:out] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
30 { |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
31 out <- [[[[Build[Dictionary()] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
32 ]Left <<[Dictionary[]] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
33 ]Right <<[Dictionary[]] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
34 ]Straight <<[val] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
35 ]Bits <<[4294967295u32] //Maximum 32-bit unsigned int value |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
36 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
37 |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
38 _Set New[index,val,bits,bitindex:out] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
39 { |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
40 nbitindex <- [bitindex]+[1] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
41 [index]Dict Bits[nbitindex] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
42 { straight <- _Set New[index,val,~,nbitindex] } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
43 { straight <- _Terminal Node[val] } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
44 out <- [[[[Build[Dictionary()]]Left <<[Dictionary[]]]Right <<[Dictionary[]]]Straight <<[straight]]Bits <<[bits] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
45 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
46 |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
47 _Set@Empty Dictionary[dict,index,val,bits,bitindex:out] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
48 { |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
49 out <- _Set New[index,val,bits,bitindex] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
50 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
51 |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
52 Set@Empty Dictionary[dict,index,val:out] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
53 { |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
54 out <- _Set New[index,val, Dict Type ID[index], -1] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
55 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
56 |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
57 First@Empty Dictionary[dict:first,not found] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
58 { |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
59 not found <- dict |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
60 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
61 |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
62 Next@Empty Dictionary[dict,index:next,not found] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
63 { |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
64 not found <- dict |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
65 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
66 |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
67 |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
68 Index@Dictionary[dict,index:out,not found] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
69 { |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
70 out,not found <- [dict]_Index[index,Dict Type ID[index], -1] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
71 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
72 |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
73 _Index@Dictionary[dict,index,bits,bitindex:out,not found] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
74 { |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
75 If[[bits]=[[dict]Bits >>]] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
76 { |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
77 If[[bits]=[4294967295u32]] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
78 { |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
79 out <- Straight >>[dict] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
80 }{ |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
81 nbitindex <- [bitindex]+[1] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
82 nbits <- [index]Dict Bits[nbitindex] {} |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
83 { nbits <- 4294967295u32 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
84 out,not found <- [[dict]Straight >>]_Index[index,nbits,nbitindex] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
85 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
86 }{ |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
87 If[[bits]<[[dict]Bits >>]] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
88 { |
87
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
89 go <- Left >>[dict] |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
90 }{ |
83
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
91 go <- Right >>[dict] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
92 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
93 out,not found <- [go]_Index[index,bits,bitindex] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
94 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
95 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
96 |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
97 Set@Dictionary[dict,index,val:out] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
98 { |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
99 out <- [dict]_Set[index,val,Dict Type ID[index], -1] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
100 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
101 |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
102 _Set@Dictionary[dict,index,val,bits,bitindex:out] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
103 { |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
104 If[[bits]=[[dict]Bits >>]] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
105 { |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
106 If[[bits]=[4294967295u32]] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
107 { |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
108 out <- [dict]Straight <<[val] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
109 }{ |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
110 nbitindex <- [bitindex]+[1] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
111 nbits <- [index]Dict Bits[nbitindex] {} |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
112 { nbits <- 4294967295u32 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
113 out <- [dict]Straight <<[[[dict]Straight >>]_Set[index,val,nbits,nbitindex]] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
114 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
115 }{ |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
116 If[[bits]<[[dict]Bits >>]] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
117 { |
87
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
118 go <- Left >>[dict] |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
119 out <- [dict]Left <<[new] |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
120 }{ |
83
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
121 go <- Right >>[dict] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
122 out <- [dict]Right <<[new] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
123 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
124 new <- [go]_Set[index,val,bits,bitindex] |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
125 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
126 } |
27bb051d631c
Initial implementation of Dictionary
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
127 |
87
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
128 _First Type ID@Empty Dictionary[dict:typeid,node,none] |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
129 { |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
130 none <- dict |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
131 } |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
132 |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
133 _First Type ID@Dictionary[dict:typeid,node] |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
134 { |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
135 typeid,node <- [[dict]Left >>]_First Type ID {} {} |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
136 { |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
137 typeid <- [dict]Bits >> |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
138 node <- dict |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
139 } |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
140 } |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
141 |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
142 _First@Empty Dictionary[dict,keylist:keyout,none] |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
143 { |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
144 none <- dict |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
145 } |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
146 |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
147 _First@Dictionary[dict,keylist:keyout] |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
148 { |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
149 keyout <- [[dict]Left >>]_First[keylist] {} |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
150 { |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
151 If[[[dict]Bits >>] = [4294967295u32]] |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
152 { |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
153 keyout <- keylist |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
154 }{ |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
155 keyout <- [[dict]Straight >>]_First[[keylist]Append[[dict]Bits >>]] |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
156 } |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
157 } |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
158 } |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
159 |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
160 First@Dictionary[dict:out,none] |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
161 { |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
162 typeid, node <- [dict]_First Type ID |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
163 l <- List[] |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
164 rawkey <- [[node]Left >>]_First[l] {} |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
165 { |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
166 rawkey <- [[node]Straight >>]_First[l] |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
167 } |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
168 out <- [Build[Blueprint From ID[typeid]]]From Dict Key[rawkey] |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
169 } |
3c4325e6298f
Add First@Dictionary (need to find mem man bug)
Mike Pavone <pavone@retrodev.com>
parents:
83
diff
changeset
|
170 |