@quenk/potoo 4.0.12 → 4.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.
Files changed (74) hide show
  1. package/lib/actor/address.d.ts +5 -1
  2. package/lib/actor/address.js +7 -2
  3. package/lib/actor/address.js.map +1 -1
  4. package/lib/actor/system/vm/allocator/index.d.ts +9 -2
  5. package/lib/actor/system/vm/allocator/map.d.ts +2 -1
  6. package/lib/actor/system/vm/allocator/map.js +30 -23
  7. package/lib/actor/system/vm/allocator/map.js.map +1 -1
  8. package/lib/actor/system/vm/event/dispatcher.d.ts +4 -4
  9. package/lib/actor/system/vm/event/dispatcher.js +9 -9
  10. package/lib/actor/system/vm/event/dispatcher.js.map +1 -1
  11. package/lib/actor/system/vm/event/index.d.ts +1 -1
  12. package/lib/actor/system/vm/event/index.js +1 -1
  13. package/lib/actor/system/vm/index.d.ts +16 -9
  14. package/lib/actor/system/vm/index.js +17 -9
  15. package/lib/actor/system/vm/index.js.map +1 -1
  16. package/lib/actor/system/vm/runtime/error.d.ts +0 -42
  17. package/lib/actor/system/vm/runtime/error.js +1 -61
  18. package/lib/actor/system/vm/runtime/error.js.map +1 -1
  19. package/lib/actor/system/vm/thread/collector.d.ts +35 -0
  20. package/lib/actor/system/vm/thread/collector.js +52 -0
  21. package/lib/actor/system/vm/thread/collector.js.map +1 -0
  22. package/lib/actor/system/vm/thread/factory.js +2 -2
  23. package/lib/actor/system/vm/thread/factory.js.map +1 -1
  24. package/lib/actor/system/vm/thread/index.d.ts +5 -0
  25. package/lib/actor/system/vm/thread/index.js.map +1 -1
  26. package/lib/actor/system/vm/thread/process.d.ts +4 -2
  27. package/lib/actor/system/vm/thread/process.js +4 -3
  28. package/lib/actor/system/vm/thread/process.js.map +1 -1
  29. package/lib/actor/system/vm/thread/runner.d.ts +31 -0
  30. package/lib/actor/system/vm/thread/runner.js +60 -0
  31. package/lib/actor/system/vm/thread/runner.js.map +1 -0
  32. package/lib/actor/system/vm/thread/shared/js.d.ts +4 -3
  33. package/lib/actor/system/vm/thread/shared/js.js +18 -6
  34. package/lib/actor/system/vm/thread/shared/js.js.map +1 -1
  35. package/lib/actor/template.d.ts +0 -5
  36. package/lib/actor/template.js +1 -13
  37. package/lib/actor/template.js.map +1 -1
  38. package/package.json +1 -1
  39. package/lib/actor/system/vm/frame.d.ts +0 -228
  40. package/lib/actor/system/vm/frame.js +0 -233
  41. package/lib/actor/system/vm/frame.js.map +0 -1
  42. package/lib/actor/system/vm/object/foreign.d.ts +0 -9
  43. package/lib/actor/system/vm/object/foreign.js +0 -13
  44. package/lib/actor/system/vm/object/foreign.js.map +0 -1
  45. package/lib/actor/system/vm/object/index.d.ts +0 -5
  46. package/lib/actor/system/vm/object/index.js +0 -3
  47. package/lib/actor/system/vm/object/index.js.map +0 -1
  48. package/lib/actor/system/vm/object/list.d.ts +0 -8
  49. package/lib/actor/system/vm/object/list.js +0 -12
  50. package/lib/actor/system/vm/object/list.js.map +0 -1
  51. package/lib/actor/system/vm/op/actor.d.ts +0 -69
  52. package/lib/actor/system/vm/op/actor.js +0 -118
  53. package/lib/actor/system/vm/op/actor.js.map +0 -1
  54. package/lib/actor/system/vm/op/base.d.ts +0 -142
  55. package/lib/actor/system/vm/op/base.js +0 -242
  56. package/lib/actor/system/vm/op/base.js.map +0 -1
  57. package/lib/actor/system/vm/op/index.d.ts +0 -106
  58. package/lib/actor/system/vm/op/index.js +0 -232
  59. package/lib/actor/system/vm/op/index.js.map +0 -1
  60. package/lib/actor/system/vm/op/object.d.ts +0 -31
  61. package/lib/actor/system/vm/op/object.js +0 -78
  62. package/lib/actor/system/vm/op/object.js.map +0 -1
  63. package/lib/actor/system/vm/registry.d.ts +0 -126
  64. package/lib/actor/system/vm/registry.js +0 -191
  65. package/lib/actor/system/vm/registry.js.map +0 -1
  66. package/lib/actor/system/vm/script/index.d.ts +0 -49
  67. package/lib/actor/system/vm/script/index.js +0 -29
  68. package/lib/actor/system/vm/script/index.js.map +0 -1
  69. package/lib/actor/system/vm/script/info.d.ts +0 -279
  70. package/lib/actor/system/vm/script/info.js +0 -256
  71. package/lib/actor/system/vm/script/info.js.map +0 -1
  72. package/lib/actor/system/vm/type.d.ts +0 -90
  73. package/lib/actor/system/vm/type.js +0 -29
  74. package/lib/actor/system/vm/type.js.map +0 -1
@@ -1,232 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toLog = exports.toName = exports.handlers = exports.opcodes = exports.ARELM = exports.ARLENGTH = exports.GETPROP = exports.STOP = exports.SELF = exports.MAILDQ = exports.MAILCOUNT = exports.RECVCOUNT = exports.RECV = exports.SEND = exports.ALLOC = exports.IFNEQJMP = exports.IFEQJMP = exports.IFNZJMP = exports.IFZJMP = exports.JMP = exports.RAISE = exports.CALL = exports.ADDUI32 = exports.CEQ = exports.LOAD = exports.STORE = exports.DUP = exports.LDN = exports.LDS = exports.PUSHUI32 = exports.PUSHUI16 = exports.PUSHUI8 = exports.NOP = exports.MAX_INSTRUCTION = exports.OPERAND_RANGE_END = exports.OPERAND_RANGE_START = exports.OPCODE_RANGE_END = exports.OPCODE_RANGE_START = exports.OPERAND_MASK = exports.OPCODE_MASK = exports.OP_CODE_RANGE_STEP = exports.OP_CODE_RANGE_HIGH = exports.OP_CODE_RANGE_LOW = void 0;
4
- const base = require("./base");
5
- const actor = require("./actor");
6
- const obj = require("./object");
7
- const record_1 = require("@quenk/noni/lib/data/record");
8
- const frame_1 = require("../frame");
9
- exports.OP_CODE_RANGE_LOW = 0x1000000;
10
- exports.OP_CODE_RANGE_HIGH = 0xff000000;
11
- exports.OP_CODE_RANGE_STEP = 0x1000000;
12
- exports.OPCODE_MASK = 0xff000000;
13
- exports.OPERAND_MASK = 0x00ffffff;
14
- exports.OPCODE_RANGE_START = 0x1000000;
15
- exports.OPCODE_RANGE_END = 0xff000000;
16
- exports.OPERAND_RANGE_START = 0x0;
17
- exports.OPERAND_RANGE_END = 0xffffff;
18
- exports.MAX_INSTRUCTION = 0xffffffff;
19
- //NOTE: these can only be one of the highest byte in a 32 bit number.
20
- exports.NOP = exports.OP_CODE_RANGE_STEP;
21
- exports.PUSHUI8 = exports.OP_CODE_RANGE_STEP * 2;
22
- exports.PUSHUI16 = exports.OP_CODE_RANGE_STEP * 3;
23
- exports.PUSHUI32 = exports.OP_CODE_RANGE_STEP * 4;
24
- exports.LDS = exports.OP_CODE_RANGE_STEP * 5;
25
- exports.LDN = exports.OP_CODE_RANGE_STEP * 6;
26
- exports.DUP = exports.OP_CODE_RANGE_STEP * 15;
27
- exports.STORE = exports.OP_CODE_RANGE_STEP * 16;
28
- exports.LOAD = exports.OP_CODE_RANGE_STEP * 20;
29
- exports.CEQ = exports.OP_CODE_RANGE_STEP * 42;
30
- exports.ADDUI32 = exports.OP_CODE_RANGE_STEP * 52;
31
- exports.CALL = exports.OP_CODE_RANGE_STEP * 62;
32
- exports.RAISE = exports.OP_CODE_RANGE_STEP * 63;
33
- exports.JMP = exports.OP_CODE_RANGE_STEP * 72;
34
- exports.IFZJMP = exports.OP_CODE_RANGE_STEP * 73;
35
- exports.IFNZJMP = exports.OP_CODE_RANGE_STEP * 80;
36
- exports.IFEQJMP = exports.OP_CODE_RANGE_STEP * 81;
37
- exports.IFNEQJMP = exports.OP_CODE_RANGE_STEP * 82;
38
- exports.ALLOC = exports.OP_CODE_RANGE_STEP * 92;
39
- exports.SEND = exports.OP_CODE_RANGE_STEP * 94;
40
- exports.RECV = exports.OP_CODE_RANGE_STEP * 95;
41
- exports.RECVCOUNT = exports.OP_CODE_RANGE_STEP * 96;
42
- exports.MAILCOUNT = exports.OP_CODE_RANGE_STEP * 97;
43
- exports.MAILDQ = exports.OP_CODE_RANGE_STEP * 98;
44
- exports.SELF = exports.OP_CODE_RANGE_STEP * 99;
45
- exports.STOP = exports.OP_CODE_RANGE_STEP * 101;
46
- exports.GETPROP = exports.OP_CODE_RANGE_STEP * 110;
47
- exports.ARLENGTH = exports.OP_CODE_RANGE_STEP * 111;
48
- exports.ARELM = exports.OP_CODE_RANGE_STEP * 112;
49
- /**
50
- * opcodes
51
- */
52
- exports.opcodes = {
53
- [exports.NOP]: {
54
- name: 'nop',
55
- handler: base.nop,
56
- log: () => ['nop']
57
- },
58
- [exports.PUSHUI8]: {
59
- name: 'pushui8',
60
- handler: base.pushui8,
61
- log: (_, __, oper) => ['pushui8', oper]
62
- },
63
- [exports.PUSHUI16]: {
64
- name: 'pushui16',
65
- handler: base.pushui16,
66
- log: (_, __, oper) => ['pushui16', oper]
67
- },
68
- [exports.PUSHUI32]: {
69
- name: 'pushui32',
70
- handler: base.pushui32,
71
- log: (_, __, oper) => ['pushui32', oper]
72
- },
73
- [exports.LDS]: {
74
- name: 'lds',
75
- handler: base.lds,
76
- log: (_, f, oper) => [
77
- 'lds',
78
- oper,
79
- eToLog(f.resolve(frame_1.DATA_TYPE_STRING | oper))
80
- ]
81
- },
82
- [exports.LDN]: {
83
- name: 'ldn',
84
- handler: base.ldn,
85
- log: (_, f, oper) => [
86
- 'ldn',
87
- oper,
88
- eToLog(f.resolve(frame_1.DATA_TYPE_INFO | oper))
89
- ]
90
- },
91
- [exports.DUP]: {
92
- name: 'dup',
93
- handler: base.dup,
94
- log: (_, __, ___) => ['dup']
95
- },
96
- [exports.STORE]: {
97
- name: 'store',
98
- handler: base.store,
99
- log: (_, __, oper) => ['store', oper]
100
- },
101
- [exports.LOAD]: {
102
- name: 'load',
103
- handler: base.load,
104
- log: (_, f, oper) => [
105
- 'load',
106
- oper,
107
- eToLog(f.resolve(frame_1.DATA_TYPE_LOCAL | oper))
108
- ]
109
- },
110
- [exports.CEQ]: {
111
- name: 'ceq',
112
- handler: base.ceq,
113
- log: (_, __, ___) => ['ceq']
114
- },
115
- [exports.ADDUI32]: {
116
- name: 'addui32',
117
- handler: base.addui32,
118
- log: (_, __, ___) => ['addui32']
119
- },
120
- [exports.CALL]: {
121
- name: 'call',
122
- handler: base.call,
123
- log: (_, __, ___) => ['call']
124
- },
125
- [exports.RAISE]: {
126
- name: 'raise',
127
- handler: base.raise,
128
- log: (_, __, ___) => ['raise']
129
- },
130
- [exports.JMP]: {
131
- name: 'jmp',
132
- handler: base.jmp,
133
- log: (_, __, oper) => ['jmp', oper]
134
- },
135
- [exports.IFZJMP]: {
136
- name: 'ifzjmp',
137
- handler: base.ifzjmp,
138
- log: (_, __, oper) => ['ifzjmp', oper]
139
- },
140
- [exports.IFNZJMP]: {
141
- name: 'ifnzjmp',
142
- handler: base.ifnzjmp,
143
- log: (_, __, oper) => ['ifnzjmp', oper]
144
- },
145
- [exports.IFEQJMP]: {
146
- name: 'ifeqjmp',
147
- handler: base.ifeqjmp,
148
- log: (_, __, oper) => ['ifeqjmp', oper]
149
- },
150
- [exports.IFNEQJMP]: {
151
- name: 'ifneqjmp',
152
- handler: base.ifneqjmp,
153
- log: (_, __, oper) => ['ifneqjmp', oper]
154
- },
155
- [exports.ALLOC]: {
156
- name: 'alloc',
157
- handler: actor.alloc,
158
- log: (_, __, ___) => ['alloc']
159
- },
160
- [exports.SEND]: {
161
- name: 'send',
162
- handler: actor.send,
163
- log: (_, __, ___) => ['send']
164
- },
165
- [exports.RECV]: {
166
- name: 'recv',
167
- handler: actor.recv,
168
- log: (_, f, oper) => [
169
- 'recv',
170
- oper,
171
- eToLog(f.resolve(frame_1.DATA_TYPE_INFO | oper))
172
- ]
173
- },
174
- [exports.RECVCOUNT]: {
175
- name: 'recvcount',
176
- handler: actor.recvcount,
177
- log: (_, __, ___) => ['recvcount']
178
- },
179
- [exports.MAILCOUNT]: {
180
- name: 'mailcount',
181
- handler: actor.mailcount,
182
- log: (_, __, ___) => ['mailcount']
183
- },
184
- [exports.MAILDQ]: {
185
- name: 'maildq',
186
- handler: actor.maildq,
187
- log: (_, __, ___) => ['maildq']
188
- },
189
- [exports.SELF]: {
190
- name: 'self',
191
- handler: actor.self,
192
- log: (_, __, ___) => ['self']
193
- },
194
- [exports.STOP]: {
195
- name: 'stop',
196
- handler: actor.stop,
197
- log: (_, __, ___) => ['stop']
198
- },
199
- [exports.GETPROP]: {
200
- name: 'getprop',
201
- handler: obj.getprop,
202
- log: (_, __, oper) => ['getprop', oper]
203
- },
204
- [exports.ARELM]: {
205
- name: 'arelm',
206
- handler: obj.arelm,
207
- log: (_, __, oper) => ['arelm', oper]
208
- },
209
- [exports.ARLENGTH]: {
210
- name: 'arlength',
211
- handler: obj.arlength,
212
- log: (_, __, ___) => ['arlength']
213
- }
214
- };
215
- const eToLog = (e) => e.isLeft() ? e.takeLeft().message : e.takeRight();
216
- /**
217
- * handlers maps opcode numbers to their handler
218
- */
219
- exports.handlers = (0, record_1.map)(exports.opcodes, i => i.handler);
220
- /**
221
- * toName converts an opcode to it's mnemonic.
222
- */
223
- const toName = (op) => exports.opcodes.hasOwnProperty(op) ? exports.opcodes[op].name : '<unknown>';
224
- exports.toName = toName;
225
- /**
226
- * toLog provides a log line for an op.
227
- *
228
- * If the op is invalid an empty line is produced.
229
- */
230
- const toLog = (op, r, f, oper) => exports.opcodes.hasOwnProperty(op) ? exports.opcodes[op].log(r, f, oper) : [];
231
- exports.toLog = toLog;
232
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/actor/system/vm/op/index.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,iCAAiC;AACjC,gCAAgC;AAEhC,wDAA0D;AAM1D,oCAKkB;AAGL,QAAA,iBAAiB,GAAG,SAAS,CAAC;AAC9B,QAAA,kBAAkB,GAAG,UAAU,CAAC;AAChC,QAAA,kBAAkB,GAAG,SAAS,CAAC;AAE/B,QAAA,WAAW,GAAG,UAAU,CAAC;AACzB,QAAA,YAAY,GAAG,UAAU,CAAC;AAC1B,QAAA,kBAAkB,GAAG,SAAS,CAAC;AAC/B,QAAA,gBAAgB,GAAG,UAAU,CAAC;AAC9B,QAAA,mBAAmB,GAAG,GAAG,CAAC;AAC1B,QAAA,iBAAiB,GAAG,QAAQ,C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AAE,EAAE,CAAC,CAAC,UAAU,CAAC;KAC9D;CACJ,CAAC;AAEF,MAAM,MAAM,GAAG,CAAC,CAAuB,EAAE,EAAE,CACvC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;AAEtD;;GAEG;AACU,QAAA,QAAQ,GAAmB,IAAA,YAAG,EAAC,eAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AAErE;;GAEG;AACI,MAAM,MAAM,GAAG,CAAC,EAAU,EAAE,EAAE,CACjC,eAAO,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,eAAO,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC;AADnD,QAAA,MAAM,UAC6C;AAEhE;;;;GAIG;AACI,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,CAAW,EAAE,CAAQ,EAAE,IAAa,EAAE,EAAE,CACtE,eAAO,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,eAAO,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AADrD,QAAA,KAAK,SACgD"}
@@ -1,31 +0,0 @@
1
- import { JSThread } from '../thread/shared/js';
2
- import { Frame } from '../frame';
3
- import { Operand } from '.';
4
- /**
5
- * getprop retrieves a property from an object.
6
- *
7
- * Stack:
8
- * <objectref> -> <value>
9
- */
10
- export declare const getprop: (_r: JSThread, f: Frame, _idx: Operand) => void;
11
- /**
12
- * arlength pushes the length of an array on the top of the stack onto
13
- * the stack.
14
- *
15
- * If the reference at the top of the stack is not an array the value will
16
- * always be zero.
17
- *
18
- * Stack:
19
- * <arrayref> -> <uint32>
20
- */
21
- export declare const arlength: (r: JSThread, f: Frame, _: Operand) => Promise<void> | undefined;
22
- /**
23
- * arelm provides the array element at the specified index.
24
- *
25
- * If the element is not a primitive it will be placed on the heap.
26
- *
27
- * Stack:
28
- *
29
- * <arrayref>,<index> -> <element>
30
- */
31
- export declare const arelm: (_r: JSThread, f: Frame, _: Operand) => void;
@@ -1,78 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.arelm = exports.arlength = exports.getprop = void 0;
4
- /**
5
- * getprop retrieves a property from an object.
6
- *
7
- * Stack:
8
- * <objectref> -> <value>
9
- */
10
- const getprop = (_r, f, _idx) => {
11
- // TODO: This needs to be re-implemented to support user space objects.
12
- //This should really push the void value instead of 0.
13
- f.push(0);
14
- /*
15
- let eobj = f.popObject();
16
-
17
- if (eobj.isLeft()) return r.raise(eobj.takeLeft());
18
-
19
- let obj = eobj.takeRight();
20
-
21
- let mval = obj.get(idx);
22
-
23
- if (mval.isJust()) {
24
- f.push(r.vm.objects.intern(f, mval.get()));
25
- } else {
26
- //TODO: This is a null reference!
27
- f.push(0);
28
- }*/
29
- };
30
- exports.getprop = getprop;
31
- /**
32
- * arlength pushes the length of an array on the top of the stack onto
33
- * the stack.
34
- *
35
- * If the reference at the top of the stack is not an array the value will
36
- * always be zero.
37
- *
38
- * Stack:
39
- * <arrayref> -> <uint32>
40
- */
41
- const arlength = (r, f, _) => {
42
- let eobj = f.popObject();
43
- if (eobj.isLeft())
44
- return r.raise(eobj.takeLeft());
45
- // let obj = eobj.takeRight();
46
- // TODO: Implement this.
47
- f.push(0);
48
- };
49
- exports.arlength = arlength;
50
- /**
51
- * arelm provides the array element at the specified index.
52
- *
53
- * If the element is not a primitive it will be placed on the heap.
54
- *
55
- * Stack:
56
- *
57
- * <arrayref>,<index> -> <element>
58
- */
59
- const arelm = (_r, f, _) => {
60
- //TOOO: Same as getprop.
61
- f.push(0);
62
- /*
63
- let earr = f.popObject();
64
-
65
- if (earr.isLeft()) return r.raise(earr.takeLeft());
66
-
67
- let arr = earr.takeRight();
68
-
69
- let melm = arr.get(f.pop());
70
-
71
- if (melm.isJust()) {
72
- f.push(r.vm.heap.intern(f, melm.get()));
73
- } else {
74
- f.push(0);
75
- }*/
76
- };
77
- exports.arelm = arelm;
78
- //# sourceMappingURL=object.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"object.js","sourceRoot":"","sources":["../../../../../src/actor/system/vm/op/object.ts"],"names":[],"mappings":";;;AAIA;;;;;GAKG;AACI,MAAM,OAAO,GAAG,CAAC,EAAY,EAAE,CAAQ,EAAE,IAAa,EAAE,EAAE;IAC7D,uEAAuE;IAEvE,sDAAsD;IACtD,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAEV;;;;;;;;;;;;;;OAcG;AACP,CAAC,CAAC;AArBW,QAAA,OAAO,WAqBlB;AAEF;;;;;;;;;GASG;AACI,MAAM,QAAQ,GAAG,CAAC,CAAW,EAAE,CAAQ,EAAE,CAAU,EAAE,EAAE;IAC1D,IAAI,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,CAAC;IAEzB,IAAI,IAAI,CAAC,MAAM,EAAE;QAAE,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEnD,gCAAgC;IAEhC,wBAAwB;IACxB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACd,CAAC,CAAC;AATW,QAAA,QAAQ,YASnB;AAEF;;;;;;;;GAQG;AACI,MAAM,KAAK,GAAG,CAAC,EAAY,EAAE,CAAQ,EAAE,CAAU,EAAE,EAAE;IACxD,wBAAwB;IACxB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACV;;;;;;;;;;;;;OAaG;AACP,CAAC,CAAC;AAjBW,QAAA,KAAK,SAiBhB"}
@@ -1,126 +0,0 @@
1
- import { Maybe } from '@quenk/noni/lib/data/maybe';
2
- import { PTObject } from './object';
3
- import { PTString, PTValue } from './type';
4
- /**
5
- * RegistryType indicates the type of the registry.
6
- */
7
- export declare enum RegistryType {
8
- string = 134217728,
9
- object = 150994944
10
- }
11
- /**
12
- * RefCount is a number indicating how many Frames are aware of an object.
13
- *
14
- * A zero value indicates the object is dead and can be removed from the
15
- * registry.
16
- */
17
- export type RefCount = number;
18
- /**
19
- * RegistryAddress is the address of an object in the registry.
20
- */
21
- export type RegistryAddress = number;
22
- /**
23
- * RegistrySet is a container for all the registries used by the VM.
24
- */
25
- export declare class RegistrySet {
26
- strings: Registry<string>;
27
- objects: Registry<PTObject>;
28
- constructor(strings?: Registry<string>, objects?: Registry<PTObject>);
29
- /**
30
- * isRegistryAddress tests whether a number is a valid registry address.
31
- *
32
- * This does not test whether the address can be dereferenced.
33
- */
34
- isRegistryAddress(addr: number): boolean;
35
- /**
36
- * addString to the registry.
37
- */
38
- addString(value: PTString): RegistryAddress;
39
- /**
40
- * addObject to the registry.
41
- */
42
- addObject(value: PTObject): RegistryAddress;
43
- /**
44
- * getString returns a string from the registry given its address.
45
- */
46
- getString(addr: RegistryAddress): Maybe<PTString>;
47
- /**
48
- * getObject returns an object from the registry given its address.
49
- */
50
- getObject(addr: RegistryAddress): Maybe<PTObject>;
51
- /**
52
- * increment the ref count for a registry address.
53
- */
54
- increment(addr: RegistryAddress): void;
55
- /**
56
- * decrement the ref count for a registry address.
57
- */
58
- decrement(addr: RegistryAddress): void;
59
- /**
60
- * deref an object from the registry.
61
- *
62
- * This attempts to retrieve an object from the relevant registry given its
63
- * address.
64
- */
65
- deref(addr: RegistryAddress): Maybe<PTValue>;
66
- /**
67
- * flush all the internal registries.
68
- */
69
- flush(): void;
70
- }
71
- /**
72
- * Registry serves as a container for objects used by the VM.
73
- *
74
- * This interface allows for a naive reference counting system for objects
75
- * created by the VM and foreign objects the VM is aware of. It does not yet
76
- * take cyclical references into account.
77
- *
78
- * The tracking here is needed so that we know when an object can be removed
79
- * from the container and allow the JS engine's own garbage collection to get
80
- * rid of it.
81
- *
82
- * Each instance handles one specific type of data indicated by the "type"
83
- * parameter. This value is used when generating the address of the object that
84
- * can be used for its retrieval.
85
- */
86
- export declare class Registry<T> {
87
- type: RegistryType;
88
- values: Map<RegistryAddress, T>;
89
- refCounts: Map<RegistryAddress, RefCount>;
90
- deadValues: RegistryAddress[];
91
- constructor(type: RegistryType, values?: Map<RegistryAddress, T>, refCounts?: Map<RegistryAddress, RefCount>, deadValues?: RegistryAddress[]);
92
- /**
93
- * add an object to the registry.
94
- *
95
- * Each time an object is added to the registry we initialize its counter
96
- * to 0. The idea is for the VM opcodes to increment/decrement this value
97
- * as needed.
98
- */
99
- add(value: T): RegistryAddress;
100
- /**
101
- * get an object from the registry.
102
- */
103
- get(addr: RegistryAddress): Maybe<T>;
104
- /**
105
- * increment the ref count for an object.
106
- *
107
- * This should be done anytime an object is used in a new Frame.
108
- */
109
- increment(addr: RegistryAddress): void;
110
- /**
111
- * decrement the ref count for an object.
112
- *
113
- * This should be done whenever a frame that "knows" about the object is
114
- * popped off the stack. When the ref count reaches 0, the object is
115
- * considered dead and will be marked for removal.
116
- */
117
- decrement(addr: RegistryAddress): void;
118
- /**
119
- * flush all dead objects from the registry.
120
- *
121
- * When called, this method will remove all objects marked as dead from the
122
- * registry. Determining the right time to call this method is left up to the
123
- * VM.
124
- */
125
- flush(): void;
126
- }
@@ -1,191 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Registry = exports.RegistrySet = exports.RegistryType = void 0;
4
- const maybe_1 = require("@quenk/noni/lib/data/maybe");
5
- const type_1 = require("./type");
6
- /**
7
- * RegistryType indicates the type of the registry.
8
- */
9
- var RegistryType;
10
- (function (RegistryType) {
11
- RegistryType[RegistryType["string"] = 134217728] = "string";
12
- RegistryType[RegistryType["object"] = 150994944] = "object";
13
- })(RegistryType || (exports.RegistryType = RegistryType = {}));
14
- /**
15
- * RegistrySet is a container for all the registries used by the VM.
16
- */
17
- class RegistrySet {
18
- constructor(strings = new Registry(RegistryType.string), objects = new Registry(RegistryType.object)) {
19
- this.strings = strings;
20
- this.objects = objects;
21
- }
22
- /**
23
- * isRegistryAddress tests whether a number is a valid registry address.
24
- *
25
- * This does not test whether the address can be dereferenced.
26
- */
27
- isRegistryAddress(addr) {
28
- let type = addr & type_1.TYPE_MASK;
29
- return (type === type_1.TYPE_STRING || type === type_1.TYPE_OBJECT || type === type_1.TYPE_LIST);
30
- }
31
- /**
32
- * addString to the registry.
33
- */
34
- addString(value) {
35
- return this.strings.add(value);
36
- }
37
- /**
38
- * addObject to the registry.
39
- */
40
- addObject(value) {
41
- return this.objects.add(value);
42
- }
43
- /**
44
- * getString returns a string from the registry given its address.
45
- */
46
- getString(addr) {
47
- return this.strings.get(addr);
48
- }
49
- /**
50
- * getObject returns an object from the registry given its address.
51
- */
52
- getObject(addr) {
53
- return this.objects.get(addr);
54
- }
55
- /**
56
- * increment the ref count for a registry address.
57
- */
58
- increment(addr) {
59
- switch (addr & type_1.TYPE_MASK) {
60
- case type_1.TYPE_STRING:
61
- this.strings.increment(addr);
62
- break;
63
- case type_1.TYPE_OBJECT:
64
- case type_1.TYPE_LIST:
65
- this.objects.increment(addr);
66
- break;
67
- }
68
- }
69
- /**
70
- * decrement the ref count for a registry address.
71
- */
72
- decrement(addr) {
73
- switch (addr & type_1.TYPE_MASK) {
74
- case type_1.TYPE_STRING:
75
- this.strings.decrement(addr);
76
- break;
77
- case type_1.TYPE_OBJECT:
78
- case type_1.TYPE_LIST:
79
- this.objects.decrement(addr);
80
- break;
81
- }
82
- }
83
- /**
84
- * deref an object from the registry.
85
- *
86
- * This attempts to retrieve an object from the relevant registry given its
87
- * address.
88
- */
89
- deref(addr) {
90
- switch (addr & type_1.TYPE_MASK) {
91
- case type_1.TYPE_STRING:
92
- return this.strings.get(addr);
93
- case type_1.TYPE_OBJECT:
94
- case type_1.TYPE_LIST:
95
- return this.objects.get(addr);
96
- default:
97
- return maybe_1.Maybe.nothing();
98
- }
99
- }
100
- /**
101
- * flush all the internal registries.
102
- */
103
- flush() {
104
- this.strings.flush();
105
- this.objects.flush();
106
- }
107
- }
108
- exports.RegistrySet = RegistrySet;
109
- /**
110
- * Registry serves as a container for objects used by the VM.
111
- *
112
- * This interface allows for a naive reference counting system for objects
113
- * created by the VM and foreign objects the VM is aware of. It does not yet
114
- * take cyclical references into account.
115
- *
116
- * The tracking here is needed so that we know when an object can be removed
117
- * from the container and allow the JS engine's own garbage collection to get
118
- * rid of it.
119
- *
120
- * Each instance handles one specific type of data indicated by the "type"
121
- * parameter. This value is used when generating the address of the object that
122
- * can be used for its retrieval.
123
- */
124
- class Registry {
125
- constructor(type, values = new Map(), refCounts = new Map(), deadValues = []) {
126
- this.type = type;
127
- this.values = values;
128
- this.refCounts = refCounts;
129
- this.deadValues = deadValues;
130
- }
131
- /**
132
- * add an object to the registry.
133
- *
134
- * Each time an object is added to the registry we initialize its counter
135
- * to 0. The idea is for the VM opcodes to increment/decrement this value
136
- * as needed.
137
- */
138
- add(value) {
139
- let addr = (this.values.size + 1) | this.type;
140
- this.values.set(addr, value);
141
- this.refCounts.set(addr, 0);
142
- return addr;
143
- }
144
- /**
145
- * get an object from the registry.
146
- */
147
- get(addr) {
148
- return maybe_1.Maybe.fromNullable(this.values.get(addr));
149
- }
150
- /**
151
- * increment the ref count for an object.
152
- *
153
- * This should be done anytime an object is used in a new Frame.
154
- */
155
- increment(addr) {
156
- if (this.values.has(addr))
157
- this.refCounts.set(addr, (this.refCounts.get(addr) || 0) + 1);
158
- }
159
- /**
160
- * decrement the ref count for an object.
161
- *
162
- * This should be done whenever a frame that "knows" about the object is
163
- * popped off the stack. When the ref count reaches 0, the object is
164
- * considered dead and will be marked for removal.
165
- */
166
- decrement(addr) {
167
- if (!this.values.has(addr))
168
- return;
169
- let oldCount = this.refCounts.get(addr) || 0;
170
- let newCount = oldCount <= 0 ? 0 : oldCount - 1;
171
- this.refCounts.set(addr, newCount);
172
- if (newCount === 0)
173
- this.deadValues.push(addr);
174
- }
175
- /**
176
- * flush all dead objects from the registry.
177
- *
178
- * When called, this method will remove all objects marked as dead from the
179
- * registry. Determining the right time to call this method is left up to the
180
- * VM.
181
- */
182
- flush() {
183
- this.deadValues.forEach(addr => {
184
- this.values.delete(addr);
185
- this.refCounts.delete(addr);
186
- });
187
- this.deadValues = [];
188
- }
189
- }
190
- exports.Registry = Registry;
191
- //# sourceMappingURL=registry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/actor/system/vm/registry.ts"],"names":[],"mappings":";;;AAAA,sDAAmD;AAGnD,iCAOgB;AAEhB;;GAEG;AACH,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,2DAAoB,CAAA;IACpB,2DAAoB,CAAA;AACxB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAeD;;GAEG;AACH,MAAa,WAAW;IACpB,YACW,UAAU,IAAI,QAAQ,CAAW,YAAY,CAAC,MAAM,CAAC,EACrD,UAAU,IAAI,QAAQ,CAAW,YAAY,CAAC,MAAM,CAAC;QADrD,YAAO,GAAP,OAAO,CAA8C;QACrD,YAAO,GAAP,OAAO,CAA8C;IAC7D,CAAC;IAEJ;;;;OAIG;IACH,iBAAiB,CAAC,IAAY;QAC1B,IAAI,IAAI,GAAG,IAAI,GAAG,gBAAS,CAAC;QAC5B,OAAO,CACH,IAAI,KAAK,kBAAW,IAAI,IAAI,KAAK,kBAAW,IAAI,IAAI,KAAK,gBAAS,CACrE,CAAC;IACN,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,KAAe;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,KAAe;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,IAAqB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CA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