godprotocol 1.0.77 → 1.0.78

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 (71) hide show
  1. package/Index.js +0 -3
  2. package/Loader_sequence/main.js +250 -54
  3. package/Objects/Account.js +23 -20
  4. package/Objects/Block.js +4 -1
  5. package/Objects/Chain.js +8 -1
  6. package/Objects/Filesystem.js +11 -15
  7. package/Objects/Manager.js +15 -7
  8. package/Objects/Opcodes.js +5 -3
  9. package/Objects/Oracle.js +10 -0
  10. package/Objects/Virtual_machine.js +1 -7
  11. package/framer.js +2 -4
  12. package/opcodes/std.js +2 -1
  13. package/opcodes.js +6 -4
  14. package/package.json +17 -4
  15. package/readme.md +2 -2
  16. package/utils/services.js +1 -1
  17. package/.github/workflows/npm-publish-github-packages.yml +0 -36
  18. package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/0ee263de3fb9e3e08e7d5abe21db8c0fe66188829979996dcddd3533d855a817/30dc10d3485923c0c19083559094fe636f9491bff9c997306ffdbf3e1618a402/74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b +0 -1
  19. package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/0ee263de3fb9e3e08e7d5abe21db8c0fe66188829979996dcddd3533d855a817/4dc569813ce0a2f446a3eec01358f5774f8564641ef8d579ff5b6d94b4d031a7/74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b +0 -1
  20. package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/0ee263de3fb9e3e08e7d5abe21db8c0fe66188829979996dcddd3533d855a817/74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b +0 -1
  21. package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/0ee263de3fb9e3e08e7d5abe21db8c0fe66188829979996dcddd3533d855a817/a965464a6d9f981543ce3aede226bd0fb989d9300cd8468f41cd1fc0139c8f44/74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b +0 -1
  22. package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/12cd650efa4f63b7c61c3345db3daa0534f4c370a003ea6d8ae0d29a49f6f928/74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b +0 -1
  23. package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/3ff3661353ccadcaf9c6759a539d8d31e19c07ed0dd888170b9e55c7a18721da/74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b +0 -1
  24. package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/3ff3661353ccadcaf9c6759a539d8d31e19c07ed0dd888170b9e55c7a18721da/de551b5a493859e532316cbbf1e4a14eb06e0512556b1c1295ad60ffe07c185b/19270ea4f98808a63fbb99bc26a5ee6f0fe8df9c8182cf1d710b115d57250578 +0 -1
  25. package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/3ff3661353ccadcaf9c6759a539d8d31e19c07ed0dd888170b9e55c7a18721da/f8a165e3f556ca2ea189f4d4401d139b22a6f19d0b38329fe4a5f14599840634/4f52f1dc77e0233034c6566fc73c30234de85d2298ff90885a7c56502dffa0b2 +0 -1
  26. package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/3ff3661353ccadcaf9c6759a539d8d31e19c07ed0dd888170b9e55c7a18721da/f8a165e3f556ca2ea189f4d4401d139b22a6f19d0b38329fe4a5f14599840634/8d3c916f9c93a6f4c8be9c3f4493b1c02d3eb7516eac153a98320924b27739d8 +0 -1
  27. package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/f968ed8cf7958218d4604b3de0bf074f09bac7925e86f7d1f495f8b2c67f31a7/61bdf0593cd727752cb917ab968a08853d45142b8a8e4cdcd0fe03d1616f3586/74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b +0 -1
  28. package/Accounts/59eb3cb130074f7b1ddb99c8fe14f27e1dbca735bb3da82e1ff0305340a32419/f968ed8cf7958218d4604b3de0bf074f09bac7925e86f7d1f495f8b2c67f31a7/74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b +0 -1
  29. package/Loader_sequence/functions/parse_expression.js +0 -107
  30. package/Loader_sequence/functions/parse_to_obj.js +0 -38
  31. package/Loader_sequence/functions/parse_variable.js +0 -38
  32. package/Loader_sequence/functions/tokenise.js +0 -135
  33. package/Loader_sequence/functions/utils.js +0 -14
  34. package/Loader_sequence/keywords/parse.js +0 -23
  35. package/Loader_sequence/native_classes/Variable.js +0 -49
  36. package/Loader_sequence/native_classes/datatypes/Array.js +0 -56
  37. package/Loader_sequence/native_classes/datatypes/Boolean.js +0 -42
  38. package/Loader_sequence/native_classes/datatypes/Number.js +0 -42
  39. package/Loader_sequence/native_classes/datatypes/String.js +0 -42
  40. package/Loader_sequence/native_classes/datatypes/Twain.js +0 -65
  41. package/Loader_sequence/native_classes/datatypes/Void.js +0 -42
  42. package/Loader_sequence/native_classes/global.js +0 -48
  43. package/Loader_sequence/native_classes/native.js +0 -63
  44. package/Loader_sequence/native_classes/operators.js +0 -64
  45. package/Loader_sequence/native_classes/parse.js +0 -54
  46. package/Loader_sequence/utils/format_instructions.js +0 -52
  47. package/build/Account.js +0 -245
  48. package/build/Array.js +0 -142
  49. package/build/Block.js +0 -100
  50. package/build/Blockweb.js +0 -78
  51. package/build/Boolean.js +0 -128
  52. package/build/Chain.js +0 -198
  53. package/build/Explorer.js +0 -85
  54. package/build/Filesystem.js +0 -173
  55. package/build/Frame.js +0 -108
  56. package/build/Index.js +0 -31
  57. package/build/Manager.js +0 -167
  58. package/build/Number.js +0 -128
  59. package/build/Opcodes.js +0 -75
  60. package/build/Oracle.js +0 -70
  61. package/build/String.js +0 -128
  62. package/build/Twain.js +0 -151
  63. package/build/Variable.js +0 -135
  64. package/build/Virtual_machine.js +0 -220
  65. package/build/Void.js +0 -128
  66. package/build/format_instructions.js +0 -52
  67. package/build/framer.js +0 -90
  68. package/build/global.js +0 -134
  69. package/build/main.js +0 -83
  70. package/build/native.js +0 -101
  71. package/build/operators.js +0 -150
package/build/Manager.js DELETED
@@ -1,167 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _Account = _interopRequireDefault(require("./Account"));
8
- var _Blockweb = _interopRequireDefault(require("./Blockweb"));
9
- var _Oracle = _interopRequireDefault(require("./Oracle"));
10
- function _interopRequireDefault(e) {
11
- return e && e.__esModule ? e : {
12
- "default": e
13
- };
14
- }
15
- function _typeof(o) {
16
- "@babel/helpers - typeof";
17
-
18
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
19
- return typeof o;
20
- } : function (o) {
21
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
22
- }, _typeof(o);
23
- }
24
- function _toConsumableArray(r) {
25
- return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
26
- }
27
- function _nonIterableSpread() {
28
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
29
- }
30
- function _unsupportedIterableToArray(r, a) {
31
- if (r) {
32
- if ("string" == typeof r) return _arrayLikeToArray(r, a);
33
- var t = {}.toString.call(r).slice(8, -1);
34
- return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
35
- }
36
- }
37
- function _iterableToArray(r) {
38
- if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
39
- }
40
- function _arrayWithoutHoles(r) {
41
- if (Array.isArray(r)) return _arrayLikeToArray(r);
42
- }
43
- function _arrayLikeToArray(r, a) {
44
- (null == a || a > r.length) && (a = r.length);
45
- for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
46
- return n;
47
- }
48
- function ownKeys(e, r) {
49
- var t = Object.keys(e);
50
- if (Object.getOwnPropertySymbols) {
51
- var o = Object.getOwnPropertySymbols(e);
52
- r && (o = o.filter(function (r) {
53
- return Object.getOwnPropertyDescriptor(e, r).enumerable;
54
- })), t.push.apply(t, o);
55
- }
56
- return t;
57
- }
58
- function _objectSpread(e) {
59
- for (var r = 1; r < arguments.length; r++) {
60
- var t = null != arguments[r] ? arguments[r] : {};
61
- r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
62
- _defineProperty(e, r, t[r]);
63
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
64
- Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
65
- });
66
- }
67
- return e;
68
- }
69
- function _defineProperties(e, r) {
70
- for (var t = 0; t < r.length; t++) {
71
- var o = r[t];
72
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
73
- }
74
- }
75
- function _createClass(e, r, t) {
76
- return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
77
- writable: !1
78
- }), e;
79
- }
80
- function _classCallCheck(a, n) {
81
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
82
- }
83
- function _defineProperty(e, r, t) {
84
- return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
85
- value: t,
86
- enumerable: !0,
87
- configurable: !0,
88
- writable: !0
89
- }) : e[r] = t, e;
90
- }
91
- function _toPropertyKey(t) {
92
- var i = _toPrimitive(t, "string");
93
- return "symbol" == _typeof(i) ? i : i + "";
94
- }
95
- function _toPrimitive(t, r) {
96
- if ("object" != _typeof(t) || !t) return t;
97
- var e = t[Symbol.toPrimitive];
98
- if (void 0 !== e) {
99
- var i = e.call(t, r || "default");
100
- if ("object" != _typeof(i)) return i;
101
- throw new TypeError("@@toPrimitive must return a primitive value.");
102
- }
103
- return ("string" === r ? String : Number)(t);
104
- }
105
- var Manager = /*#__PURE__*/_createClass(function Manager() {
106
- var _this = this;
107
- _classCallCheck(this, Manager);
108
- _defineProperty(this, "start_clock", function () {
109
- return _this.clock = setInterval(function () {
110
- for (var account in _this.tracks) {
111
- var track = _this.tracks[account];
112
- var instruction = track.sequence[track.pointer];
113
- track.account.vm.execute(instruction, track);
114
- track.pointer++;
115
- if (track.breakpoint.slice(-1)[0] === track.pointer) {
116
- track.account.flush_buffer(track.pid);
117
- track.pid = track.pids.splice(-1)[0];
118
- }
119
- if (track.pointer === track.sequence.length) {
120
- _this.running--;
121
- delete _this.tracks[account];
122
- }
123
- }
124
- !_this.running && clearInterval(_this.clock);
125
- }, Number(process.env.HERTS) || 10);
126
- });
127
- _defineProperty(this, "get_account", function (name) {
128
- return _this.accounts[name];
129
- });
130
- _defineProperty(this, "add_account", function (name, meta) {
131
- var account = _this.get_account(name);
132
- if (!account) {
133
- account = new _Account["default"](name, _objectSpread(_objectSpread({}, meta), {}, {
134
- manager: _this
135
- }));
136
- _this.accounts[name] = account;
137
- } else if (meta && meta["private"] && !account["private"]) {
138
- account["private"] = true;
139
- }
140
- return account;
141
- });
142
- _defineProperty(this, "push", function (program) {
143
- var track = _this.tracks[program.account.name];
144
- if (track) {
145
- var _track$sequence;
146
- track.breakpoint.push(track.pointer + 1);
147
- (_track$sequence = track.sequence).splice.apply(_track$sequence, [track.pointer + 1, 0].concat(_toConsumableArray(program.sequence)));
148
- track.pids.push(program.pid);
149
- } else {
150
- track = _objectSpread(_objectSpread({}, program), {}, {
151
- pointer: 0,
152
- pids: [program.pid],
153
- breakpoint: new Array()
154
- });
155
- _this.tracks[track.account.name] = track;
156
- _this.running++;
157
- _this.running === 1 && _this.start_clock();
158
- }
159
- });
160
- this.accounts = new Object();
161
- this.running = 0;
162
- this.tracks = new Object();
163
- this.web = new _Blockweb["default"](this);
164
- this.oracle = new _Oracle["default"](this);
165
- });
166
- var _default = Manager;
167
- exports["default"] = _default;
package/build/Number.js DELETED
@@ -1,128 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _native = _interopRequireDefault(require("../native"));
8
- function _interopRequireDefault(e) {
9
- return e && e.__esModule ? e : {
10
- "default": e
11
- };
12
- }
13
- function _typeof(o) {
14
- "@babel/helpers - typeof";
15
-
16
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
17
- return typeof o;
18
- } : function (o) {
19
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
20
- }, _typeof(o);
21
- }
22
- function _defineProperties(e, r) {
23
- for (var t = 0; t < r.length; t++) {
24
- var o = r[t];
25
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
26
- }
27
- }
28
- function _createClass(e, r, t) {
29
- return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
30
- writable: !1
31
- }), e;
32
- }
33
- function _classCallCheck(a, n) {
34
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
35
- }
36
- function _inherits(t, e) {
37
- if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
38
- t.prototype = Object.create(e && e.prototype, {
39
- constructor: {
40
- value: t,
41
- writable: !0,
42
- configurable: !0
43
- }
44
- }), Object.defineProperty(t, "prototype", {
45
- writable: !1
46
- }), e && _setPrototypeOf(t, e);
47
- }
48
- function _setPrototypeOf(t, e) {
49
- return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
50
- return t.__proto__ = e, t;
51
- }, _setPrototypeOf(t, e);
52
- }
53
- function _createSuper(t) {
54
- var r = _isNativeReflectConstruct();
55
- return function () {
56
- var e,
57
- o = _getPrototypeOf(t);
58
- if (r) {
59
- var s = _getPrototypeOf(this).constructor;
60
- e = Reflect.construct(o, arguments, s);
61
- } else e = o.apply(this, arguments);
62
- return _possibleConstructorReturn(this, e);
63
- };
64
- }
65
- function _possibleConstructorReturn(t, e) {
66
- if (e && ("object" == _typeof(e) || "function" == typeof e)) return e;
67
- if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
68
- return _assertThisInitialized(t);
69
- }
70
- function _assertThisInitialized(e) {
71
- if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
72
- return e;
73
- }
74
- function _isNativeReflectConstruct() {
75
- try {
76
- var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
77
- } catch (t) {}
78
- return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {
79
- return !!t;
80
- })();
81
- }
82
- function _getPrototypeOf(t) {
83
- return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
84
- return t.__proto__ || Object.getPrototypeOf(t);
85
- }, _getPrototypeOf(t);
86
- }
87
- function _defineProperty(e, r, t) {
88
- return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
89
- value: t,
90
- enumerable: !0,
91
- configurable: !0,
92
- writable: !0
93
- }) : e[r] = t, e;
94
- }
95
- function _toPropertyKey(t) {
96
- var i = _toPrimitive(t, "string");
97
- return "symbol" == _typeof(i) ? i : i + "";
98
- }
99
- function _toPrimitive(t, r) {
100
- if ("object" != _typeof(t) || !t) return t;
101
- var e = t[Symbol.toPrimitive];
102
- if (void 0 !== e) {
103
- var i = e.call(t, r || "default");
104
- if ("object" != _typeof(i)) return i;
105
- throw new TypeError("@@toPrimitive must return a primitive value.");
106
- }
107
- return ("string" === r ? String : Number)(t);
108
- }
109
- var Num = /*#__PURE__*/function (_Native) {
110
- _inherits(Num, _Native);
111
- var _super = _createSuper(Num);
112
- function Num(token) {
113
- var _this;
114
- _classCallCheck(this, Num);
115
- _this = _super.call(this);
116
- _defineProperty(_assertThisInitialized(_this), "generate_assembly", function (sequence) {
117
- sequence.push("link ".concat(_this.token.compiler.account.physical_address, "/Datatypes/Number"));
118
- sequence.push("write ".concat(_this.token.type ? _this.name : _this.token));
119
- sequence.push("pop Datatypes/Number");
120
- });
121
- _this.token = token;
122
- _this.name = _this.token.value;
123
- return _this;
124
- }
125
- return _createClass(Num);
126
- }(_native["default"]);
127
- var _default = Num;
128
- exports["default"] = _default;
package/build/Opcodes.js DELETED
@@ -1,75 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _functions = require("../utils/functions");
8
- function _typeof(o) {
9
- "@babel/helpers - typeof";
10
-
11
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
12
- return typeof o;
13
- } : function (o) {
14
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
15
- }, _typeof(o);
16
- }
17
- function _defineProperties(e, r) {
18
- for (var t = 0; t < r.length; t++) {
19
- var o = r[t];
20
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
21
- }
22
- }
23
- function _createClass(e, r, t) {
24
- return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
25
- writable: !1
26
- }), e;
27
- }
28
- function _classCallCheck(a, n) {
29
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
30
- }
31
- function _defineProperty(e, r, t) {
32
- return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
33
- value: t,
34
- enumerable: !0,
35
- configurable: !0,
36
- writable: !0
37
- }) : e[r] = t, e;
38
- }
39
- function _toPropertyKey(t) {
40
- var i = _toPrimitive(t, "string");
41
- return "symbol" == _typeof(i) ? i : i + "";
42
- }
43
- function _toPrimitive(t, r) {
44
- if ("object" != _typeof(t) || !t) return t;
45
- var e = t[Symbol.toPrimitive];
46
- if (void 0 !== e) {
47
- var i = e.call(t, r || "default");
48
- if ("object" != _typeof(i)) return i;
49
- throw new TypeError("@@toPrimitive must return a primitive value.");
50
- }
51
- return ("string" === r ? String : Number)(t);
52
- }
53
- var Opcodes = /*#__PURE__*/_createClass(function Opcodes() {
54
- var _this = this;
55
- _classCallCheck(this, Opcodes);
56
- _defineProperty(this, "set", function (opcode, circuit) {
57
- _this.opcodes[opcode] = circuit;
58
- });
59
- _defineProperty(this, "prepare_operation", function (opcode, context) {
60
- var circ = _this.opcodes[opcode];
61
- if (typeof circ !== "function") return;
62
- var buf = context.get_buffer();
63
- var res = circ(context.account.read(buf.inputs));
64
- _this.stdin(res);
65
- });
66
- _defineProperty(this, "stdin", function (object) {
67
- if (!object) return;
68
- var code_string = (0, _functions.transpile_object)(object);
69
- _this.account.compiler.run(code_string);
70
- // console.log(`Writing in: ${code_string}`);
71
- });
72
- this.opcodes = new Object();
73
- });
74
- var _default = Opcodes;
75
- exports["default"] = _default;
package/build/Oracle.js DELETED
@@ -1,70 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- function _typeof(o) {
8
- "@babel/helpers - typeof";
9
-
10
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
11
- return typeof o;
12
- } : function (o) {
13
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
14
- }, _typeof(o);
15
- }
16
- function _defineProperties(e, r) {
17
- for (var t = 0; t < r.length; t++) {
18
- var o = r[t];
19
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
20
- }
21
- }
22
- function _createClass(e, r, t) {
23
- return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
24
- writable: !1
25
- }), e;
26
- }
27
- function _classCallCheck(a, n) {
28
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
29
- }
30
- function _defineProperty(e, r, t) {
31
- return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
32
- value: t,
33
- enumerable: !0,
34
- configurable: !0,
35
- writable: !0
36
- }) : e[r] = t, e;
37
- }
38
- function _toPropertyKey(t) {
39
- var i = _toPrimitive(t, "string");
40
- return "symbol" == _typeof(i) ? i : i + "";
41
- }
42
- function _toPrimitive(t, r) {
43
- if ("object" != _typeof(t) || !t) return t;
44
- var e = t[Symbol.toPrimitive];
45
- if (void 0 !== e) {
46
- var i = e.call(t, r || "default");
47
- if ("object" != _typeof(i)) return i;
48
- throw new TypeError("@@toPrimitive must return a primitive value.");
49
- }
50
- return ("string" === r ? String : Number)(t);
51
- }
52
- var Oracle = /*#__PURE__*/_createClass(function Oracle(mgr) {
53
- var _this = this;
54
- _classCallCheck(this, Oracle);
55
- _defineProperty(this, "set", function (path, _ref) {
56
- var type = _ref.type,
57
- obj = _ref.obj;
58
- _this.datapaths[path] = {
59
- obj: obj,
60
- type: type
61
- };
62
- });
63
- _defineProperty(this, "get", function (path) {
64
- return _this.datapaths[path];
65
- });
66
- this.mgr = mgr;
67
- this.datapaths = new Object();
68
- });
69
- var _default = Oracle;
70
- exports["default"] = _default;
package/build/String.js DELETED
@@ -1,128 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _native = _interopRequireDefault(require("../native"));
8
- function _interopRequireDefault(e) {
9
- return e && e.__esModule ? e : {
10
- "default": e
11
- };
12
- }
13
- function _typeof(o) {
14
- "@babel/helpers - typeof";
15
-
16
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
17
- return typeof o;
18
- } : function (o) {
19
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
20
- }, _typeof(o);
21
- }
22
- function _defineProperties(e, r) {
23
- for (var t = 0; t < r.length; t++) {
24
- var o = r[t];
25
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
26
- }
27
- }
28
- function _createClass(e, r, t) {
29
- return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
30
- writable: !1
31
- }), e;
32
- }
33
- function _classCallCheck(a, n) {
34
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
35
- }
36
- function _inherits(t, e) {
37
- if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
38
- t.prototype = Object.create(e && e.prototype, {
39
- constructor: {
40
- value: t,
41
- writable: !0,
42
- configurable: !0
43
- }
44
- }), Object.defineProperty(t, "prototype", {
45
- writable: !1
46
- }), e && _setPrototypeOf(t, e);
47
- }
48
- function _setPrototypeOf(t, e) {
49
- return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
50
- return t.__proto__ = e, t;
51
- }, _setPrototypeOf(t, e);
52
- }
53
- function _createSuper(t) {
54
- var r = _isNativeReflectConstruct();
55
- return function () {
56
- var e,
57
- o = _getPrototypeOf(t);
58
- if (r) {
59
- var s = _getPrototypeOf(this).constructor;
60
- e = Reflect.construct(o, arguments, s);
61
- } else e = o.apply(this, arguments);
62
- return _possibleConstructorReturn(this, e);
63
- };
64
- }
65
- function _possibleConstructorReturn(t, e) {
66
- if (e && ("object" == _typeof(e) || "function" == typeof e)) return e;
67
- if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
68
- return _assertThisInitialized(t);
69
- }
70
- function _assertThisInitialized(e) {
71
- if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
72
- return e;
73
- }
74
- function _isNativeReflectConstruct() {
75
- try {
76
- var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
77
- } catch (t) {}
78
- return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {
79
- return !!t;
80
- })();
81
- }
82
- function _getPrototypeOf(t) {
83
- return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
84
- return t.__proto__ || Object.getPrototypeOf(t);
85
- }, _getPrototypeOf(t);
86
- }
87
- function _defineProperty(e, r, t) {
88
- return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
89
- value: t,
90
- enumerable: !0,
91
- configurable: !0,
92
- writable: !0
93
- }) : e[r] = t, e;
94
- }
95
- function _toPropertyKey(t) {
96
- var i = _toPrimitive(t, "string");
97
- return "symbol" == _typeof(i) ? i : i + "";
98
- }
99
- function _toPrimitive(t, r) {
100
- if ("object" != _typeof(t) || !t) return t;
101
- var e = t[Symbol.toPrimitive];
102
- if (void 0 !== e) {
103
- var i = e.call(t, r || "default");
104
- if ("object" != _typeof(i)) return i;
105
- throw new TypeError("@@toPrimitive must return a primitive value.");
106
- }
107
- return ("string" === r ? String : Number)(t);
108
- }
109
- var Str = /*#__PURE__*/function (_Native) {
110
- _inherits(Str, _Native);
111
- var _super = _createSuper(Str);
112
- function Str(token) {
113
- var _this;
114
- _classCallCheck(this, Str);
115
- _this = _super.call(this);
116
- _defineProperty(_assertThisInitialized(_this), "generate_assembly", function (sequence) {
117
- sequence.push("link ".concat(_this.token.compiler.account.physical_address, "/Datatypes/String"));
118
- sequence.push("write ".concat(_this.token.type ? _this.name : _this.token));
119
- sequence.push("pop Datatypes/String");
120
- });
121
- _this.token = token;
122
- _this.name = _this.token.value;
123
- return _this;
124
- }
125
- return _createClass(Str);
126
- }(_native["default"]);
127
- var _default = Str;
128
- exports["default"] = _default;