@typeberry/jam 0.1.2-dd9b0e2 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/block-generator/index.js +6 -18
- package/block-generator/index.js.map +1 -1
- package/importer/index.js +6 -18
- package/importer/index.js.map +1 -1
- package/index.js +6 -18
- package/index.js.map +1 -1
- package/jam-network/index.js +2 -2
- package/jam-network/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -35190,8 +35190,8 @@ function print(level, levelAndName, strings, data) {
|
|
|
35190
35190
|
return;
|
|
35191
35191
|
}
|
|
35192
35192
|
const lvlText = Level[level].padEnd(5);
|
|
35193
|
-
const val = strings.map((v, idx) => `${v}${
|
|
35194
|
-
const msg = `${lvlText} [${levelAndName[1]}] ${val
|
|
35193
|
+
const val = strings.map((v, idx) => `${v}${data[idx]}`);
|
|
35194
|
+
const msg = `${lvlText} [${levelAndName[1]}] ${val}`;
|
|
35195
35195
|
if (level === Level.WARN) {
|
|
35196
35196
|
console.warn(msg);
|
|
35197
35197
|
}
|
|
@@ -42027,17 +42027,6 @@ class PageRange {
|
|
|
42027
42027
|
}
|
|
42028
42028
|
return new PageRange(start, length);
|
|
42029
42029
|
}
|
|
42030
|
-
/** Returns true if the page range is wrapped (`start` >= `end`) and is not empty */
|
|
42031
|
-
isWrapped() {
|
|
42032
|
-
return this.start >= this.end && !this.isEmpty();
|
|
42033
|
-
}
|
|
42034
|
-
/** Checks if given page number is within the range */
|
|
42035
|
-
isInRange(page) {
|
|
42036
|
-
if (this.isWrapped()) {
|
|
42037
|
-
return page >= this.start || page < this.end;
|
|
42038
|
-
}
|
|
42039
|
-
return page >= this.start && page < this.end;
|
|
42040
|
-
}
|
|
42041
42030
|
/** Checks if a range is empty (`length === 0`) */
|
|
42042
42031
|
isEmpty() {
|
|
42043
42032
|
return this.length === 0;
|
|
@@ -42417,11 +42406,10 @@ class MemoryBuilder {
|
|
|
42417
42406
|
startHeapIndex (${startHeapIndex}) has to be less than or equal to endHeapIndex (${endHeapIndex})
|
|
42418
42407
|
`;
|
|
42419
42408
|
this.ensureNotFinalized();
|
|
42420
|
-
const
|
|
42421
|
-
const
|
|
42422
|
-
const
|
|
42423
|
-
|
|
42424
|
-
if (heapPagesRange.isInRange(pageNumber)) {
|
|
42409
|
+
const range = MemoryRange.fromStartAndLength(startHeapIndex, endHeapIndex - startHeapIndex);
|
|
42410
|
+
const pages = PageRange.fromMemoryRange(range);
|
|
42411
|
+
for (const pageNumber of pages) {
|
|
42412
|
+
if (this.initialMemory.has(pageNumber)) {
|
|
42425
42413
|
throw new IncorrectSbrkIndex();
|
|
42426
42414
|
}
|
|
42427
42415
|
}
|