sol-dbg 0.9.16 → 0.9.18
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.
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export declare class ImmMap<KeyT, ValT> {
|
|
2
2
|
private innerM;
|
|
3
|
+
private deletedKeys;
|
|
3
4
|
private _next;
|
|
4
5
|
static fromEntries<K, V>(arg: Iterable<[K, V]>): ImmMap<K, V>;
|
|
5
|
-
static fromImmMap<K, V>(arg: ImmMap<K, V>): ImmMap<K, V>;
|
|
6
6
|
private constructor();
|
|
7
7
|
get(key: KeyT): ValT | undefined;
|
|
8
8
|
set(key: KeyT, val: ValT): this;
|
|
9
9
|
delete(key: KeyT): this;
|
|
10
10
|
setMany(entries: Iterable<[KeyT, ValT]>): this;
|
|
11
|
-
|
|
11
|
+
collectMap(untilParent?: ImmMap<KeyT, ValT> | undefined): Map<KeyT, ValT>;
|
|
12
12
|
collapseUntil(parent: ImmMap<KeyT, ValT>): this;
|
|
13
13
|
entries(): Iterable<[KeyT, ValT]>;
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"immutable_map.d.ts","sourceRoot":"","sources":["../../src/utils/immutable_map.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"immutable_map.d.ts","sourceRoot":"","sources":["../../src/utils/immutable_map.ts"],"names":[],"mappings":"AAEA,qBAAa,MAAM,CAAC,IAAI,EAAE,IAAI;IAC1B,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,WAAW,CAAY;IAC/B,OAAO,CAAC,KAAK,CAAmB;IAEhC,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;IAU7D,OAAO;IAMP,GAAG,CAAC,GAAG,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS;IAsBhC,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,GAAG,IAAI;IAQ/B,MAAM,CAAC,GAAG,EAAE,IAAI,GAAG,IAAI;IAMvB,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,IAAI;IAUvC,UAAU,CAAC,WAAW,GAAE,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,SAAqB,GAAG,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC;IA4B3F,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI;IAW/C,OAAO,IAAI,QAAQ,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;CAGpC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ImmMap = void 0;
|
|
4
|
+
const solc_typed_ast_1 = require("solc-typed-ast");
|
|
4
5
|
class ImmMap {
|
|
5
6
|
static fromEntries(arg) {
|
|
6
7
|
const res = new ImmMap(undefined);
|
|
@@ -9,14 +10,15 @@ class ImmMap {
|
|
|
9
10
|
}
|
|
10
11
|
return res;
|
|
11
12
|
}
|
|
12
|
-
static fromImmMap(arg) {
|
|
13
|
-
return new ImmMap(arg);
|
|
14
|
-
}
|
|
15
13
|
constructor(next = undefined) {
|
|
16
14
|
this.innerM = new Map();
|
|
17
15
|
this._next = next;
|
|
16
|
+
this.deletedKeys = new Set();
|
|
18
17
|
}
|
|
19
18
|
get(key) {
|
|
19
|
+
if (this.deletedKeys.has(key)) {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
20
22
|
if (this.innerM.has(key)) {
|
|
21
23
|
return this.innerM.get(key);
|
|
22
24
|
}
|
|
@@ -35,13 +37,8 @@ class ImmMap {
|
|
|
35
37
|
return newMap;
|
|
36
38
|
}
|
|
37
39
|
delete(key) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
const newInnerM = this.collectMap();
|
|
42
|
-
newInnerM.delete(key);
|
|
43
|
-
const res = new ImmMap(undefined);
|
|
44
|
-
res.innerM = newInnerM;
|
|
40
|
+
const res = new ImmMap(this);
|
|
41
|
+
res.deletedKeys.add(key);
|
|
45
42
|
return res;
|
|
46
43
|
}
|
|
47
44
|
setMany(entries) {
|
|
@@ -51,26 +48,34 @@ class ImmMap {
|
|
|
51
48
|
}
|
|
52
49
|
return newMap;
|
|
53
50
|
}
|
|
54
|
-
collectMap() {
|
|
55
|
-
|
|
51
|
+
collectMap(untilParent = undefined) {
|
|
52
|
+
let res;
|
|
53
|
+
if (untilParent === this) {
|
|
54
|
+
return new Map();
|
|
55
|
+
}
|
|
56
|
+
if (this._next === untilParent) {
|
|
57
|
+
res = new Map();
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
(0, solc_typed_ast_1.assert)(this._next !== undefined, `Error in collectMap chain tracking. Did you mix up your chains?`);
|
|
61
|
+
res = this._next.collectMap(untilParent);
|
|
62
|
+
}
|
|
56
63
|
for (const [key, val] of this.innerM) {
|
|
57
64
|
res.set(key, val);
|
|
58
65
|
}
|
|
66
|
+
for (const delKey of this.deletedKeys) {
|
|
67
|
+
res.delete(delKey);
|
|
68
|
+
}
|
|
59
69
|
return res;
|
|
60
70
|
}
|
|
61
71
|
collapseUntil(parent) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
while (m !== parent && m !== undefined) {
|
|
65
|
-
for (const [k, v] of m.innerM) {
|
|
66
|
-
if (newMap.innerM.has(k)) {
|
|
67
|
-
continue;
|
|
68
|
-
}
|
|
69
|
-
newMap.innerM.set(k, v);
|
|
70
|
-
}
|
|
71
|
-
m = m._next;
|
|
72
|
+
if (parent === this) {
|
|
73
|
+
return this;
|
|
72
74
|
}
|
|
73
|
-
|
|
75
|
+
const rawMap = this.collectMap(parent);
|
|
76
|
+
const res = new ImmMap(parent);
|
|
77
|
+
res.innerM = rawMap;
|
|
78
|
+
return res;
|
|
74
79
|
}
|
|
75
80
|
entries() {
|
|
76
81
|
return this.collectMap();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"immutable_map.js","sourceRoot":"","sources":["../../src/utils/immutable_map.ts"],"names":[],"mappings":";;;AAAA,MAAa,MAAM;
|
|
1
|
+
{"version":3,"file":"immutable_map.js","sourceRoot":"","sources":["../../src/utils/immutable_map.ts"],"names":[],"mappings":";;;AAAA,mDAAwC;AAExC,MAAa,MAAM;IAKf,MAAM,CAAC,WAAW,CAAO,GAAqB;QAC1C,MAAM,GAAG,GAAG,IAAI,MAAM,CAAO,SAAS,CAAC,CAAC;QAExC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC;YACvB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACzB,CAAC;QAED,OAAO,GAAG,CAAC;IACf,CAAC;IAED,YAAoB,OAAY,SAAS;QACrC,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,WAAW,GAAG,IAAI,GAAG,EAAE,CAAC;IACjC,CAAC;IAED,GAAG,CAAC,GAAS;QACT,IAAI,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5B,OAAO,SAAS,CAAC;QACrB,CAAC;QAED,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACvB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAChC,CAAC;QAED,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC3B,OAAO,SAAS,CAAC;QACrB,CAAC;QAED,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