@typeberry/jam 0.1.2-3178190 → 0.1.2-753d258
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/README.md +0 -1
- package/block-generator/index.js +15 -34
- package/block-generator/index.js.map +1 -1
- package/importer/index.js +19 -40
- package/importer/index.js.map +1 -1
- package/index.js +19 -40
- package/index.js.map +1 -1
- package/jam-network/index.js +11 -18
- package/jam-network/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/block-generator/index.js
CHANGED
|
@@ -3575,7 +3575,6 @@ var GpVersion;
|
|
|
3575
3575
|
GpVersion["V0_6_7"] = "0.6.7";
|
|
3576
3576
|
GpVersion["V0_7_0"] = "0.7.0";
|
|
3577
3577
|
GpVersion["V0_7_1"] = "0.7.1-preview";
|
|
3578
|
-
GpVersion["V0_7_2"] = "0.7.2-preview";
|
|
3579
3578
|
})(GpVersion || (GpVersion = {}));
|
|
3580
3579
|
var TestSuite;
|
|
3581
3580
|
(function (TestSuite) {
|
|
@@ -3583,7 +3582,7 @@ var TestSuite;
|
|
|
3583
3582
|
TestSuite["JAMDUNA"] = "jamduna";
|
|
3584
3583
|
})(TestSuite || (TestSuite = {}));
|
|
3585
3584
|
const DEFAULT_SUITE = TestSuite.W3F_DAVXY;
|
|
3586
|
-
const ALL_VERSIONS_IN_ORDER = [GpVersion.V0_6_7, GpVersion.V0_7_0, GpVersion.V0_7_1
|
|
3585
|
+
const ALL_VERSIONS_IN_ORDER = [GpVersion.V0_6_7, GpVersion.V0_7_0, GpVersion.V0_7_1];
|
|
3587
3586
|
const env = typeof process === "undefined" ? {} : process.env;
|
|
3588
3587
|
const DEFAULT_VERSION = GpVersion.V0_7_0;
|
|
3589
3588
|
let CURRENT_VERSION = parseCurrentVersion(env.GP_VERSION) ?? DEFAULT_VERSION;
|
|
@@ -3592,26 +3591,20 @@ function parseCurrentVersion(env) {
|
|
|
3592
3591
|
if (env === undefined) {
|
|
3593
3592
|
return undefined;
|
|
3594
3593
|
}
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
case GpVersion.V0_7_1:
|
|
3599
|
-
case GpVersion.V0_7_2:
|
|
3600
|
-
return env;
|
|
3601
|
-
default:
|
|
3602
|
-
throw new Error(`Configured environment variable GP_VERSION is unknown: '${env}'. Use one of: ${ALL_VERSIONS_IN_ORDER}`);
|
|
3594
|
+
const version = env;
|
|
3595
|
+
if (!Object.values(GpVersion).includes(version)) {
|
|
3596
|
+
throw new Error(`Configured environment variable GP_VERSION is unknown: '${env}'. Use one of: ${ALL_VERSIONS_IN_ORDER}`);
|
|
3603
3597
|
}
|
|
3598
|
+
return version;
|
|
3604
3599
|
}
|
|
3605
3600
|
function parseCurrentSuite(env) {
|
|
3606
3601
|
if (env === undefined)
|
|
3607
3602
|
return undefined;
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
return env;
|
|
3612
|
-
default:
|
|
3613
|
-
throw new Error(`Configured environment variable TEST_SUITE is unknown: '${env}'. Use one of: ${Object.values(TestSuite)}`);
|
|
3603
|
+
const val = env;
|
|
3604
|
+
if (!Object.values(TestSuite).includes(val)) {
|
|
3605
|
+
throw new Error(`Configured environment variable TEST_SUITE is unknown: '${env}'. Use one of: ${Object.values(TestSuite)}`);
|
|
3614
3606
|
}
|
|
3607
|
+
return val;
|
|
3615
3608
|
}
|
|
3616
3609
|
class Compatibility {
|
|
3617
3610
|
static override(version) {
|
|
@@ -12987,8 +12980,8 @@ function print(level, levelAndName, strings, data) {
|
|
|
12987
12980
|
return;
|
|
12988
12981
|
}
|
|
12989
12982
|
const lvlText = Level[level].padEnd(5);
|
|
12990
|
-
const val = strings.map((v, idx) => `${v}${
|
|
12991
|
-
const msg = `${lvlText} [${levelAndName[1]}] ${val
|
|
12983
|
+
const val = strings.map((v, idx) => `${v}${data[idx]}`);
|
|
12984
|
+
const msg = `${lvlText} [${levelAndName[1]}] ${val}`;
|
|
12992
12985
|
if (level === Level.WARN) {
|
|
12993
12986
|
console.warn(msg);
|
|
12994
12987
|
}
|
|
@@ -15478,17 +15471,6 @@ class page_range_PageRange {
|
|
|
15478
15471
|
}
|
|
15479
15472
|
return new page_range_PageRange(start, length);
|
|
15480
15473
|
}
|
|
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
15474
|
/** Checks if a range is empty (`length === 0`) */
|
|
15493
15475
|
isEmpty() {
|
|
15494
15476
|
return this.length === 0;
|
|
@@ -15868,11 +15850,10 @@ class memory_builder_MemoryBuilder {
|
|
|
15868
15850
|
startHeapIndex (${startHeapIndex}) has to be less than or equal to endHeapIndex (${endHeapIndex})
|
|
15869
15851
|
`;
|
|
15870
15852
|
this.ensureNotFinalized();
|
|
15871
|
-
const
|
|
15872
|
-
const
|
|
15873
|
-
const
|
|
15874
|
-
|
|
15875
|
-
if (heapPagesRange.isInRange(pageNumber)) {
|
|
15853
|
+
const range = MemoryRange.fromStartAndLength(startHeapIndex, endHeapIndex - startHeapIndex);
|
|
15854
|
+
const pages = PageRange.fromMemoryRange(range);
|
|
15855
|
+
for (const pageNumber of pages) {
|
|
15856
|
+
if (this.initialMemory.has(pageNumber)) {
|
|
15876
15857
|
throw new IncorrectSbrkIndex();
|
|
15877
15858
|
}
|
|
15878
15859
|
}
|