diff options
author | Rickard Green <[email protected]> | 2015-08-26 19:47:10 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2015-11-12 15:25:47 +0100 |
commit | b21b604137c5cb5f5039a40994e429871e5b707b (patch) | |
tree | 9dacd474126fd82c022c5fb7881c3c9b685324ef /erts/emulator/beam/beam_load.c | |
parent | 7858ca939f8bf2db918396616fee13364d150a1e (diff) | |
download | otp-b21b604137c5cb5f5039a40994e429871e5b707b.tar.gz otp-b21b604137c5cb5f5039a40994e429871e5b707b.tar.bz2 otp-b21b604137c5cb5f5039a40994e429871e5b707b.zip |
Introduce literal tag
Diffstat (limited to 'erts/emulator/beam/beam_load.c')
-rw-r--r-- | erts/emulator/beam/beam_load.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c index 1c598601c6..7a1a563be2 100644 --- a/erts/emulator/beam/beam_load.c +++ b/erts/emulator/beam/beam_load.c @@ -4439,12 +4439,13 @@ freeze_code(LoaderState* stp) code_hdr->literals_start = ptr; code_hdr->literals_end = ptr + stp->total_literal_size; for (i = 0; i < stp->num_literals; i++) { - if (stp->literals[i].heap_frags) { - move_multi_frags(&ptr, &code_off_heap, stp->literals[i].heap_frags, - &stp->literals[i].term, 1); - ASSERT(erts_is_literal(ptr_val(stp->literals[i].term))); + if (is_not_immed(stp->literals[i].term)) { + erts_move_multi_frags(&ptr, &code_off_heap, + stp->literals[i].heap_frags, + &stp->literals[i].term, 1, 1); + ASSERT(erts_is_literal(stp->literals[i].term, + ptr_val(stp->literals[i].term))); } - else ASSERT(is_immed(stp->literals[i].term)); } code_hdr->literals_off_heap = code_off_heap.first; lp = stp->literal_patches; |