diff options
Diffstat (limited to 'src/lj_ir.c')
-rw-r--r-- | src/lj_ir.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lj_ir.c b/src/lj_ir.c index b4087aa7..6a1ecc13 100644 --- a/src/lj_ir.c +++ b/src/lj_ir.c | |||
@@ -204,12 +204,12 @@ typedef struct K64Array { | |||
204 | void lj_ir_k64_freeall(jit_State *J) | 204 | void lj_ir_k64_freeall(jit_State *J) |
205 | { | 205 | { |
206 | K64Array *k; | 206 | K64Array *k; |
207 | for (k = mref(J->k64, K64Array); k; ) { | 207 | for (k = mref(J->k64p, K64Array); k; ) { |
208 | K64Array *next = mref(k->next, K64Array); | 208 | K64Array *next = mref(k->next, K64Array); |
209 | lj_mem_free(J2G(J), k, sizeof(K64Array)); | 209 | lj_mem_free(J2G(J), k, sizeof(K64Array)); |
210 | k = next; | 210 | k = next; |
211 | } | 211 | } |
212 | setmref(J->k64, NULL); | 212 | setmref(J->k64p, NULL); |
213 | } | 213 | } |
214 | 214 | ||
215 | /* Get new 64 bit constant slot. */ | 215 | /* Get new 64 bit constant slot. */ |
@@ -223,7 +223,7 @@ static TValue *ir_k64_add(jit_State *J, K64Array *kp, uint64_t u64) | |||
223 | if (kp) | 223 | if (kp) |
224 | setmref(kp->next, kn); /* Chain to the end of the list. */ | 224 | setmref(kp->next, kn); /* Chain to the end of the list. */ |
225 | else | 225 | else |
226 | setmref(J->k64, kn); /* Link first array. */ | 226 | setmref(J->k64p, kn); /* Link first array. */ |
227 | kp = kn; | 227 | kp = kn; |
228 | } | 228 | } |
229 | ntv = &kp->k[kp->numk++]; /* Add to current array. */ | 229 | ntv = &kp->k[kp->numk++]; /* Add to current array. */ |
@@ -237,7 +237,7 @@ cTValue *lj_ir_k64_find(jit_State *J, uint64_t u64) | |||
237 | K64Array *k, *kp = NULL; | 237 | K64Array *k, *kp = NULL; |
238 | MSize idx; | 238 | MSize idx; |
239 | /* Search for the constant in the whole chain of arrays. */ | 239 | /* Search for the constant in the whole chain of arrays. */ |
240 | for (k = mref(J->k64, K64Array); k; k = mref(k->next, K64Array)) { | 240 | for (k = mref(J->k64p, K64Array); k; k = mref(k->next, K64Array)) { |
241 | kp = k; /* Remember previous element in list. */ | 241 | kp = k; /* Remember previous element in list. */ |
242 | for (idx = 0; idx < k->numk; idx++) { /* Search one array. */ | 242 | for (idx = 0; idx < k->numk; idx++) { /* Search one array. */ |
243 | TValue *tv = &k->k[idx]; | 243 | TValue *tv = &k->k[idx]; |
@@ -254,7 +254,7 @@ TValue *lj_ir_k64_reserve(jit_State *J) | |||
254 | K64Array *k, *kp = NULL; | 254 | K64Array *k, *kp = NULL; |
255 | lj_ir_k64_find(J, 0); /* Intern dummy 0 to protect the reserved slot. */ | 255 | lj_ir_k64_find(J, 0); /* Intern dummy 0 to protect the reserved slot. */ |
256 | /* Find last K64Array, if any. */ | 256 | /* Find last K64Array, if any. */ |
257 | for (k = mref(J->k64, K64Array); k; k = mref(k->next, K64Array)) kp = k; | 257 | for (k = mref(J->k64p, K64Array); k; k = mref(k->next, K64Array)) kp = k; |
258 | return ir_k64_add(J, kp, 0); /* Set to 0. Final value is set later. */ | 258 | return ir_k64_add(J, kp, 0); /* Set to 0. Final value is set later. */ |
259 | } | 259 | } |
260 | 260 | ||