Skip to content

Commit

Permalink
Merge pull request #655 from Raku/nqp-js-S23
Browse files Browse the repository at this point in the history
Serialization format 23 for nqp-JS
  • Loading branch information
jnthn authored Aug 20, 2020
2 parents c852175 + daf8df6 commit dc1839b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/vm/js/nqp-runtime/deserialization.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,11 @@ class BinaryCursor {
const objectIndex = this.int32();
entry.codeObj = this.sc.deps[objectScId].rootObjects[objectIndex];
} else {
// we're packed along a 24-byte alignment
// we're packed along a 28-byte alignment
this.int32();
this.int32();
}
entry.name = this.str32();
return entry;
}

Expand Down Expand Up @@ -540,7 +541,7 @@ class BinaryCursor {

this.sc = sc;

if (version != 22) {
if (version != 23) {
throw 'Unsupported serialization format version: ' + version;
}

Expand Down
3 changes: 2 additions & 1 deletion src/vm/js/nqp-runtime/serialization.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const globalContext = require('./global-context.js');
const op = {};
exports.op = op;

const CURRENT_VERSION = 22;
const CURRENT_VERSION = 23;
const OBJECTS_TABLE_ENTRY_SC_IDX_MAX = 0x000FFFFF;
const OBJECTS_TABLE_ENTRY_SC_MAX = 0x7FE;
const OBJECTS_TABLE_ENTRY_SC_SHIFT = 20;
Expand Down Expand Up @@ -758,6 +758,7 @@ class SerializationWriter {
this.closures.int32(0);
this.closures.int32(0);
}
this.closures.str32(this.name);

/* Increment count of closures in the table. */
this.numClosures++;
Expand Down

0 comments on commit dc1839b

Please sign in to comment.