diff options
| author | Mike Pall <mike> | 2024-01-31 14:39:50 +0100 |
|---|---|---|
| committer | Mike Pall <mike> | 2024-01-31 14:39:50 +0100 |
| commit | 9cc2e42b17148036d7d9ef36ab7afe52df345163 (patch) | |
| tree | b565805da59810c1e827e673d33e1ef9e0c089ad | |
| parent | 5e5d542c9970c4e55235930e7f9b7b9b4e022531 (diff) | |
| parent | 9cdd5a9479d2265f42dfefc17d068174969bbcff (diff) | |
| download | luajit-9cc2e42b17148036d7d9ef36ab7afe52df345163.tar.gz luajit-9cc2e42b17148036d7d9ef36ab7afe52df345163.tar.bz2 luajit-9cc2e42b17148036d7d9ef36ab7afe52df345163.zip | |
Merge branch 'master' into v2.1
| -rw-r--r-- | src/lj_bcwrite.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_bcwrite.c b/src/lj_bcwrite.c index c062dc49..ddfa46c5 100644 --- a/src/lj_bcwrite.c +++ b/src/lj_bcwrite.c | |||
| @@ -133,7 +133,7 @@ static void bcwrite_ktab_sorted_hash(BCWriteCtx *ctx, Node *node, MSize nhash) | |||
| 133 | TValue **heap = ctx->heap; | 133 | TValue **heap = ctx->heap; |
| 134 | MSize i = nhash; | 134 | MSize i = nhash; |
| 135 | for (;; node--) { /* Build heap. */ | 135 | for (;; node--) { /* Build heap. */ |
| 136 | if (!tvisnil(&node->val)) { | 136 | if (!tvisnil(&node->key)) { |
| 137 | bcwrite_ktabk_heap_insert(heap, --i, nhash, &node->key); | 137 | bcwrite_ktabk_heap_insert(heap, --i, nhash, &node->key); |
| 138 | if (i == 0) break; | 138 | if (i == 0) break; |
| 139 | } | 139 | } |
| @@ -163,7 +163,7 @@ static void bcwrite_ktab(BCWriteCtx *ctx, char *p, const GCtab *t) | |||
| 163 | MSize i, hmask = t->hmask; | 163 | MSize i, hmask = t->hmask; |
| 164 | Node *node = noderef(t->node); | 164 | Node *node = noderef(t->node); |
| 165 | for (i = 0; i <= hmask; i++) | 165 | for (i = 0; i <= hmask; i++) |
| 166 | nhash += !tvisnil(&node[i].val); | 166 | nhash += !tvisnil(&node[i].key); |
| 167 | } | 167 | } |
| 168 | /* Write number of array slots and hash slots. */ | 168 | /* Write number of array slots and hash slots. */ |
| 169 | p = lj_strfmt_wuleb128(p, narray); | 169 | p = lj_strfmt_wuleb128(p, narray); |
| @@ -184,7 +184,7 @@ static void bcwrite_ktab(BCWriteCtx *ctx, char *p, const GCtab *t) | |||
| 184 | } else { | 184 | } else { |
| 185 | MSize i = nhash; | 185 | MSize i = nhash; |
| 186 | for (;; node--) | 186 | for (;; node--) |
| 187 | if (!tvisnil(&node->val)) { | 187 | if (!tvisnil(&node->key)) { |
| 188 | bcwrite_ktabk(ctx, &node->key, 0); | 188 | bcwrite_ktabk(ctx, &node->key, 0); |
| 189 | bcwrite_ktabk(ctx, &node->val, 1); | 189 | bcwrite_ktabk(ctx, &node->val, 1); |
| 190 | if (--i == 0) break; | 190 | if (--i == 0) break; |
