@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/block-generator/index.js
CHANGED
|
@@ -12987,8 +12987,8 @@ function print(level, levelAndName, strings, data) {
|
|
|
12987
12987
|
return;
|
|
12988
12988
|
}
|
|
12989
12989
|
const lvlText = Level[level].padEnd(5);
|
|
12990
|
-
const val = strings.map((v, idx) => `${v}${
|
|
12991
|
-
const msg = `${lvlText} [${levelAndName[1]}] ${val
|
|
12990
|
+
const val = strings.map((v, idx) => `${v}${data[idx]}`);
|
|
12991
|
+
const msg = `${lvlText} [${levelAndName[1]}] ${val}`;
|
|
12992
12992
|
if (level === Level.WARN) {
|
|
12993
12993
|
console.warn(msg);
|
|
12994
12994
|
}
|
|
@@ -15478,17 +15478,6 @@ class page_range_PageRange {
|
|
|
15478
15478
|
}
|
|
15479
15479
|
return new page_range_PageRange(start, length);
|
|
15480
15480
|
}
|
|
15481
|
-
/** Returns true if the page range is wrapped (`start` >= `end`) and is not empty */
|
|
15482
|
-
isWrapped() {
|
|
15483
|
-
return this.start >= this.end && !this.isEmpty();
|
|
15484
|
-
}
|
|
15485
|
-
/** Checks if given page number is within the range */
|
|
15486
|
-
isInRange(page) {
|
|
15487
|
-
if (this.isWrapped()) {
|
|
15488
|
-
return page >= this.start || page < this.end;
|
|
15489
|
-
}
|
|
15490
|
-
return page >= this.start && page < this.end;
|
|
15491
|
-
}
|
|
15492
15481
|
/** Checks if a range is empty (`length === 0`) */
|
|
15493
15482
|
isEmpty() {
|
|
15494
15483
|
return this.length === 0;
|
|
@@ -15868,11 +15857,10 @@ class memory_builder_MemoryBuilder {
|
|
|
15868
15857
|
startHeapIndex (${startHeapIndex}) has to be less than or equal to endHeapIndex (${endHeapIndex})
|
|
15869
15858
|
`;
|
|
15870
15859
|
this.ensureNotFinalized();
|
|
15871
|
-
const
|
|
15872
|
-
const
|
|
15873
|
-
const
|
|
15874
|
-
|
|
15875
|
-
if (heapPagesRange.isInRange(pageNumber)) {
|
|
15860
|
+
const range = MemoryRange.fromStartAndLength(startHeapIndex, endHeapIndex - startHeapIndex);
|
|
15861
|
+
const pages = PageRange.fromMemoryRange(range);
|
|
15862
|
+
for (const pageNumber of pages) {
|
|
15863
|
+
if (this.initialMemory.has(pageNumber)) {
|
|
15876
15864
|
throw new IncorrectSbrkIndex();
|
|
15877
15865
|
}
|
|
15878
15866
|
}
|