godprotocol 1.0.7991 → 1.1.0

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 (88) hide show
  1. package/Executables/callables.js +131 -0
  2. package/Executables/executables.js +230 -0
  3. package/Executables/functions/adminstrator/adm_register.js +29 -0
  4. package/Executables/functions/adminstrator/native_components.js +10 -0
  5. package/Executables/functions/adminstrator/query_selectors.js +10 -0
  6. package/Executables/functions/adminstrator/render.js +24 -0
  7. package/Executables/functions/array_register.js +161 -0
  8. package/Executables/functions/assign.js +19 -0
  9. package/Executables/functions/display.js +55 -0
  10. package/Executables/functions/folder.js +95 -0
  11. package/Executables/functions/folder_register.js +87 -0
  12. package/Executables/functions/importcheck.js +13 -0
  13. package/Executables/functions/indices.js +56 -0
  14. package/Executables/functions/len.js +22 -0
  15. package/Executables/functions/methods/array.js +272 -0
  16. package/Executables/functions/methods/string.js +197 -0
  17. package/Executables/functions/methods/twain.js +148 -0
  18. package/Executables/functions/op.js +15 -0
  19. package/Executables/functions/price_register.js +30 -0
  20. package/Executables/functions/pricing.js +26 -0
  21. package/Executables/functions/servers/account.js +81 -0
  22. package/Executables/functions/servers/account_register.js +56 -0
  23. package/Executables/functions/servers/block.js +21 -0
  24. package/Executables/functions/servers/block_register.js +18 -0
  25. package/Executables/functions/servers/chain.js +42 -0
  26. package/Executables/functions/servers/chain_register.js +28 -0
  27. package/Executables/functions/set_error_catch.js +34 -0
  28. package/Executables/functions/string_register.js +130 -0
  29. package/Executables/functions/twain_register.js +56 -0
  30. package/Executables/functions/typecast.js +43 -0
  31. package/Executables/functions/utils.js +9 -0
  32. package/Executables/stack.js +53 -0
  33. package/Index.js +2 -7
  34. package/Loader_sequence/main.js +535 -119
  35. package/Loader_sequence/repository.js +33 -0
  36. package/Objects/Account.js +220 -54
  37. package/Objects/Block.js +46 -16
  38. package/Objects/Blockweb.js +14 -0
  39. package/Objects/Chain.js +163 -16
  40. package/Objects/Fee.js +33 -0
  41. package/Objects/Filesystem.js +100 -26
  42. package/Objects/Frame.js +10 -3
  43. package/Objects/Manager.js +272 -46
  44. package/Objects/Opcodes.js +60 -10
  45. package/Objects/Oracle.js +90 -5
  46. package/Objects/Protocol.js +5 -0
  47. package/Objects/Virtual_machine.js +145 -53
  48. package/Trinity.js +20 -0
  49. package/callables.js +172 -0
  50. package/framer.js +111 -52
  51. package/opcodes/add.js +6 -6
  52. package/opcodes/indices.js +82 -0
  53. package/opcodes/jmp.js +12 -11
  54. package/opcodes/std.js +7 -2
  55. package/opcodes.js +72 -14
  56. package/package.json +6 -5
  57. package/readme.md +1 -1
  58. package/starter_scripts/constants.seq +11 -0
  59. package/utils/create_server.js +34 -27
  60. package/utils/hash.js +2 -2
  61. package/utils/logger.js +79 -0
  62. package/utils/services.js +5 -3
  63. package/utils/type_coersion.js +3 -0
  64. package/utils/vm_utils.js +292 -0
  65. package/.babelrc +0 -3
  66. package/build/Account.js +0 -162
  67. package/build/Block.js +0 -65
  68. package/build/Blockweb.js +0 -36
  69. package/build/Chain.js +0 -119
  70. package/build/Explorer.js +0 -47
  71. package/build/Filesystem.js +0 -127
  72. package/build/Frame.js +0 -52
  73. package/build/Index.js +0 -15
  74. package/build/Manager.js +0 -99
  75. package/build/Opcodes.js +0 -39
  76. package/build/Oracle.js +0 -42
  77. package/build/Virtual_machine.js +0 -128
  78. package/build/add.js +0 -41
  79. package/build/create_server.js +0 -119
  80. package/build/framer.js +0 -57
  81. package/build/functions.js +0 -82
  82. package/build/hash.js +0 -14
  83. package/build/jmp.js +0 -19
  84. package/build/main.js +0 -283
  85. package/build/opcodes.js +0 -42
  86. package/build/privacy.js +0 -27
  87. package/build/services.js +0 -50
  88. package/build/std.js +0 -11
@@ -6,54 +6,123 @@ class Virtual_machine extends Opcodes {
6
6
 
7
7
  this.account = context.account;
8
8
  this.contexts = [context];
9
- this.stack = new Array();
9
+ this.flags = {
10
+ neg: false,
11
+ equal: false,
12
+ zero: false,
13
+ void: false,
14
+ };
15
+
16
+ this.stacktrace = new Array()
17
+
18
+ this.error_manager = new Object()
10
19
  }
20
+
21
+ push_int = (name, payload)=>{
22
+ let stacks = this.error_manager[name]
23
+ if (!stacks){
24
+ stacks = new Array()
25
+ this.error_manager[name] = stacks;
26
+ }
11
27
 
12
- get_context = (index) => {
13
- return this.contexts.slice(index == null ? -1 : index)[0];
14
- };
28
+ stacks.push(payload)
29
+ }
15
30
 
16
- parse_arg = (arg, is_cursor) => {
17
- let context = this.get_context();
31
+ quit = (payload)=>{
32
+ let instruction = this.track.sequence[this.track.pointer-1]
33
+ if(instruction==='ret'){
34
+ this.account.buff({ret:payload.op0}, this.track.pid)
35
+ }
18
36
 
19
- let args = arg.split("/"),
20
- i = 0;
37
+ this.account.flush_buffer(this.track.pid, payload);
38
+ this.track.pointer = this.track.sequence.length;
39
+ this.pop_context()
40
+ }
21
41
 
22
- while (args[0] === "..") {
23
- i++;
42
+ stderr = (err_object)=>{
43
+ console.log(err_object)
44
+ let{name, message} = err_object;
24
45
 
25
- args.splice(0, 1);
46
+ if (!name){
47
+ return this.quit(err_object)
26
48
  }
27
49
 
28
- i = (i + 1) * -1;
29
- context = i ? this.get_context(i) : context;
50
+ let all = this.error_manager['*']
51
+ let stacks = this.error_manager[name]
52
+
53
+ if (!stacks){
54
+ if(all){
55
+ all = all.slice(-1)[0]
56
+ let object = this.read_chain(`${this.error_instance_address}/${name}_`)
57
+ stacks = [{object, metadata: all.metadata, catch_pointer: all.catch_pointer}]
58
+
59
+ if(!object)return this.quit({message: `Unknown Error instance - ${name}`})
60
+ }
61
+
62
+ if (!stacks)
63
+ return this.quit(err_object)
64
+ }else if(all){
65
+ // Check precedence within all and stacks name, how?
66
+ }
30
67
 
31
- arg = args.join("/");
68
+ let obj_payload, s;
69
+ for(s = this.stacktrace.length - 1; s >= 0; s--){
70
+ let trace = this.stacktrace[s]
71
+ let should_break;
32
72
 
33
- while (arg.includes("^")) {
34
- let blk = context.connections.slice(-1)[0];
35
- if (!blk) break;
36
- context = blk.chain;
37
- let i = arg.indexOf("^");
38
- arg = `${arg.slice(0, i)}${arg.slice(i + 1)}`;
73
+ for (let t = stacks.length-1; t >= 0; t--){
74
+ obj_payload = stacks[t]
75
+ if(obj_payload.metadata.namespace === trace){
76
+ should_break = true
77
+ break;
78
+ }
79
+ }
80
+ if (should_break) break;
39
81
  }
40
82
 
41
- if (arg.startsWith("{*") && is_cursor) {
42
- arg = context.explore(arg.slice(2, -1));
43
- } else if (arg.startsWith("{") && !is_cursor) {
44
- arg = context.explore(arg.slice(1, -1));
45
- }
46
83
 
47
- return arg;
48
- };
84
+ if (!obj_payload){
85
+ return this.quit(err_object)
86
+ }
49
87
 
50
- split_instruction = (instruction) => {
51
- let split = instruction.split(" ");
52
- let opcode = split[0],
53
- args = split.slice(1).join(" ");
88
+ if(obj_payload.metadata.alias){
89
+ // Instantiate error message as an aircode string object.
90
+ let message_string = `${obj_payload.metadata.namespace}/${this.id_hash(
91
+ message
92
+ )}`;
93
+ this.air_object(message, {
94
+ location: message_string,
95
+ callback: () => {
96
+ this.exec({
97
+ executable: obj_payload.object.set_message,
98
+ location: obj_payload.metadata.alias,
99
+ metadata: {
100
+ callback: () => {
101
+ this.slice_trace(s+1)
102
+
103
+ this.track = this.account.manager.set_track({account: this.account.name, physical_address: obj_payload.metadata.namespace, pointer: obj_payload.catch_pointer}, true)
104
+ },
105
+ },
106
+ arguments: {
107
+ argv: [
108
+ {
109
+ address: message_string,
110
+ position: 0,
111
+ },
112
+ ],
113
+ argc: 1,
114
+ },
115
+ });
116
+ },
117
+ });
118
+
119
+ }else {
120
+ this.slice_trace(s-3)
121
+
122
+ this.track = this.account.manager.set_track({account: this.account.name, physical_address: obj_payload.metadata.namespace, pointer: obj_payload.catch_pointer}, true)
54
123
 
55
- return { opcode, args };
56
- };
124
+ }
125
+ }
57
126
 
58
127
  execute = (instruction, track) => {
59
128
  this.track = track;
@@ -62,41 +131,47 @@ class Virtual_machine extends Opcodes {
62
131
 
63
132
  let { opcode, args } = this.split_instruction(instruction);
64
133
 
65
- let context = this.get_context();
134
+ let context = this.get_context(-1);
66
135
 
67
136
  if (!context) return;
68
137
 
69
138
  context.add_tx(instruction);
70
139
 
140
+ // console.log(`(${track.pointer}/${track.sequence.length})>> ${instruction}`)
141
+ // this.account.log_output(`>> ${instruction}`);
142
+
71
143
  let chain;
72
144
 
73
- args = this.parse_arg(args, opcode === "cursor");
145
+ args = this.parse_arg(args, opcode);
74
146
 
75
147
  switch (opcode) {
76
148
  case "chain":
77
- chain = context.account.add_chain(args, context);
78
- this.contexts.push(chain);
149
+ chain = this.handle_chain(args, context)
150
+
151
+ if(!chain)return this.stderr(`Chain error - ${args}`)
152
+
153
+ this.push_context(chain);
154
+
155
+ let dim = context.folder.config.dimensions;
156
+ if (!dim) {
157
+ dim = [];
158
+ context.folder.config.dimensions = dim;
159
+ }
160
+ !dim.find((d) => d === args) && dim.push(args);
79
161
 
80
162
  chain.append_buffer();
81
163
 
82
164
  break;
83
165
  case "link":
84
- chain = context.account.manager.web.get(args);
166
+ chain = this.handle_chain(args, context)
85
167
 
86
168
  if (!chain) {
87
- console.log(`LINKing Failed. - ${args}`);
88
- return;
169
+ return this.stderr(`LINKing Failed. - ${args}`)
89
170
  }
90
171
 
91
172
  chain.append_buffer();
92
173
 
93
- this.contexts.push(chain);
94
-
95
- break;
96
- case "mine":
97
- let bloc = context.mine(this, true);
98
-
99
- this.account.buff(bloc, this.track.pids.slice(-1)[0]);
174
+ this.push_context(chain);
100
175
 
101
176
  break;
102
177
  case "pop":
@@ -104,14 +179,31 @@ class Virtual_machine extends Opcodes {
104
179
  if (context.txs.length > 1) {
105
180
  blk = context.mine(this);
106
181
  } else {
107
- blk = context.get_latest_block();
108
- if (blk) this.get_context(-2).connections.push(blk);
109
-
110
- context.txs = [];
182
+ if (this.account.initiated&& this.account.is_datatype(context)){
183
+ blk= context.mine(this)
184
+ }else {
185
+ blk = context.get_latest_block();
186
+ if(!blk || context.datapath){
187
+ if(context.datapath){
188
+ blk = context.fabricate_datapath_block()
189
+ }else blk = this.get_voided_block()
190
+ }
191
+
192
+ if (blk){
193
+ if (blk.chain.physical_address!== `${this.account.physical_address}/Datatypes/Void`) this.flags.void = false
194
+
195
+ this.get_context(-2).connections.push(blk);
196
+ }
197
+
198
+ context.get_buffer()
199
+ context.txs = [];
200
+ }
201
+
111
202
  }
112
- blk && this.account.buff(blk, this.track.pids.slice(-1)[0]);
113
203
 
114
- this.contexts.pop();
204
+ blk && this.account.buff(blk, this.track.pid);
205
+
206
+ this.pop_context();
115
207
  break;
116
208
  case "cursor":
117
209
  context.set_cursor(args);
package/Trinity.js ADDED
@@ -0,0 +1,20 @@
1
+ import create_server from "./utils/create_server"
2
+ import Manager from "./Objects/Manager";
3
+
4
+ class Trinity{
5
+ constructor(){
6
+ this.manager = new Manager()
7
+ }
8
+
9
+ create_server = (app, settings)=>{
10
+ settings = settings||{}
11
+ create_server(app, {...settings, manager: this.manager})
12
+ }
13
+
14
+ account= name=>this.manager.get_account(name)
15
+
16
+ add_account = (name, meta) =>this.manager.add_account(name, meta)
17
+ }
18
+
19
+
20
+ export default Trinity
package/callables.js ADDED
@@ -0,0 +1,172 @@
1
+ import { get, set } from "./Executables/functions/indices";
2
+ import { display } from "./Executables/functions/display";
3
+ import typecast from "./Executables/functions/typecast";
4
+ import { ops } from "./opcodes/add";
5
+ import operation from "./Executables/functions/op";
6
+ import assign from "./Executables/functions/assign";
7
+ import importcheck from "./Executables/functions/importcheck";
8
+ import set_error_catch from "./Executables/functions/set_error_catch";
9
+ import string_register from "./Executables/functions/string_register";
10
+ import array_register from "./Executables/functions/array_register";
11
+ import twain_register from "./Executables/functions/twain_register";
12
+ import price_register from "./Executables/functions/price_register";
13
+ import folder_register from "./Executables/functions/folder_register";
14
+ import chain_register from "./Executables/functions/servers/chain_register";
15
+ import block_register from "./Executables/functions/servers/block_register";
16
+ import account_register from "./Executables/functions/servers/account_register";
17
+ import len from "./Executables/functions/len";
18
+ import { get_address, get_id } from "./Executables/functions/utils";
19
+ import adm_register from "./Executables/functions/adminstrator/adm_register";
20
+
21
+ const callables = account => {
22
+ let add_callable= account.vm.add_callable;
23
+
24
+ chain_register(account)
25
+ block_register(account)
26
+ account_register(account)
27
+ price_register(account)
28
+ folder_register(account)
29
+ string_register(account)
30
+ array_register(account)
31
+ twain_register(account)
32
+ adm_register(account)
33
+
34
+ add_callable('read_chain', {
35
+ callable:(args, vm, options)=> {
36
+ let res = account.vm.read_chain(args.address, args.options)
37
+
38
+ if (typeof options.location === 'string'){
39
+ vm.write_chain(res, options.location)
40
+ }
41
+ return res;
42
+ },
43
+ config: {
44
+ parameters: [
45
+ {name:'address', position:0,},
46
+ {name: 'options', position:1}
47
+ ]
48
+ }
49
+ })
50
+
51
+
52
+ add_callable('air_object', {
53
+ callable: (args, vm, options)=>{
54
+ vm.air_object(args.literal, options)
55
+ },
56
+ config:{
57
+ parameters: [
58
+ {name:'literal', position:0,}
59
+ ]
60
+ }
61
+ })
62
+
63
+ add_callable('display', {
64
+ callable: display,
65
+ config: {
66
+ parameters: [
67
+ {name:'data', position:0, spread: true}
68
+ ]
69
+ }
70
+ })
71
+
72
+ add_callable('importcheck', {
73
+ callable: importcheck,
74
+ config: {
75
+ parameters: [
76
+ {name:'address', position:0},
77
+ {name:'names', position:1, spread: true}
78
+ ]
79
+ }
80
+ })
81
+
82
+ add_callable('set_error_catch', {
83
+ callable: set_error_catch,
84
+ config: {
85
+ parameters: [
86
+ {name:'object', position:0},
87
+ {name:'metadata', position:1},
88
+ ]
89
+ }
90
+ })
91
+
92
+ add_callable('set', {
93
+ callable: set,
94
+ config: {
95
+ parameters: [
96
+ {name:'obj', position:0, },
97
+ {name:'prop', position:1, },
98
+ {name:'value', position:2, },
99
+ ]
100
+ }
101
+ })
102
+
103
+ add_callable('get', {
104
+ callable: get,
105
+ config: {
106
+ parameters: [
107
+ {name:'obj', position:0, },
108
+ {name:'prop', position:1, }
109
+ ]
110
+ }
111
+ })
112
+
113
+ add_callable('typecast', {
114
+ callable: typecast,
115
+ config: {
116
+ parameters: [
117
+ {name:'obj', position:0, },
118
+ {name:'type', position:1, }
119
+ ]
120
+ }
121
+ })
122
+
123
+ add_callable('assign', {
124
+ callable: assign,
125
+ config: {
126
+ parameters: [
127
+ {name:'value', position:0, }
128
+ ]
129
+ }
130
+ })
131
+
132
+ add_callable('get_address', {
133
+ callable: get_address,
134
+ config: {
135
+ parameters: [
136
+ {name:'object', position:0, }
137
+ ]
138
+ }
139
+ })
140
+
141
+ add_callable('get_id', {
142
+ callable: get_id,
143
+ config: {
144
+ parameters: [
145
+ {name:'object', position:0, }
146
+ ]
147
+ }
148
+ })
149
+
150
+ add_callable('len', {
151
+ callable: len,
152
+ config: {
153
+ parameters: [
154
+ {name:'object', position:0, }
155
+ ]
156
+ }
157
+ })
158
+
159
+ ops.map(op=>{
160
+ add_callable(`__${op.name}__`, {
161
+ callable: (args, vm, options)=> operation(args, vm, {...options, op: op.name}),
162
+ config: {
163
+ parameters: [
164
+ {name:'left', position:0},
165
+ {name:'right', position:1}
166
+ ]
167
+ }
168
+ })
169
+ })
170
+ }
171
+
172
+ export default callables;
package/framer.js CHANGED
@@ -1,65 +1,124 @@
1
1
  import Frame from "./Objects/Frame";
2
2
 
3
- const framer = (initiator) => {
4
- let frame = new Frame({
5
- Opcodes: {
6
- add: null,
7
- equal: null,
8
- multiply: null,
9
- subtract: null,
10
- divide: null,
11
- exp: null,
12
- equal: null,
13
- not_equal: null,
14
- greater_than: null,
15
- less_than: null,
16
- gte: null,
17
- lte: null,
3
+ let obj = {
4
+ Opcodes: {
5
+ add: null,
6
+ equal: null,
7
+ multiply: null,
8
+ subtract: null,
9
+ divide: null,
10
+ exp: null,
11
+ equal: null,
18
12
 
19
- send: null,
20
- readonly: null,
21
- socket_send: null,
13
+ send: null,
14
+ readonly: null,
15
+ socket_send: null,
22
16
 
23
- jmp: null,
24
- jmp_if: null,
25
- hold: null,
17
+ jmp: null,
26
18
 
27
- stdout: null,
28
- stdin: null,
19
+ stdout: null,
20
+ stdin: null,
29
21
 
30
- run: null,
31
- load: null,
32
- parse: null,
33
- create_account: null,
22
+ run: null,
23
+ load: null,
24
+ parse: null,
25
+ create_account: null,
26
+ },
27
+ Datatypes: {
28
+ Number: null,
29
+ String: null,
30
+ Twain: null,
31
+ Array: null,
32
+ Void: null,
33
+ Boolean: null,
34
+ },
35
+ Objects: {
36
+ Blockchain: {
37
+ Chain: null,
38
+ Block: null,
39
+ },
40
+ Folder: {
41
+ active_file: null,
42
+ folder: null,
43
+ file: null,
34
44
  },
35
- Datatypes: {
36
- Number: null,
37
- String: null,
38
- Twain: null,
39
- Array: null,
45
+ File: {
46
+ row: null,
47
+ parse: null,
48
+ column: null,
49
+ write: null,
40
50
  },
41
- Objects: {
42
- Blockchain: {
43
- Chain: null,
44
- Block: null,
45
- },
46
- Folder: {
47
- active_file: null,
48
- folder: null,
49
- file: null,
50
- },
51
- File: {
52
- row: null,
53
- parse: null,
54
- column: null,
55
- write: null,
56
- },
51
+ },
52
+ CONSTANTS:{
53
+ overload: {
54
+ __add__: {__type:'twain', value: {type:'string', static_value:'__add__'}},
55
+ __multiply__: {__type:'twain', value: {type:'string', static_value:'__multiply__'}},
56
+ __subtract__: {__type:'twain', value: {type:'string', static_value:'__subtract__'}},
57
+ __divide__: {__type:'twain', value: {type:'string', static_value:'__divide__'}},
58
+ __exp__: {__type:'twain', value: {type:'string', static_value:'__exp__'}},
59
+ __equal__: {__type:'twain', value: {type:'string', static_value:'__equal__'}},
60
+ // __not_equal__: {__type:'twain', value: {type:'string', static_value:'__not_equal__'}},
61
+ __lt__: {__type:'twain', value: {type:'string', static_value:'__lt__'}},
62
+ __lte__: {__type:'twain', value: {type:'string', static_value:'__lte__'}},
63
+ __gt__: {__type:'twain', value: {type:'string', static_value:'__gt__'}},
64
+ __gte__: {__type:'twain', value: {type:'string', static_value:'__gte__'}},
57
65
  },
58
- });
59
- frame.to_instruction();
60
- let instructions = frame.flatten_instructions();
66
+ types: {
67
+ instance: {__type: 'twain', value: {type:'string', __address__:`Accounts/initiator/CONSTANTS/types/instance`, static_value: 'instance'}},
68
+ function: {__type:'string', value: {type:'string', __address__:`Accounts/initiator/CONSTANTS/types/function`, static_value: 'function'}},
69
+ boolean: {__type:'string',value: {type:'string', __address__:`Accounts/initiator/CONSTANTS/types/boolean`, static_value: 'boolean'}},
70
+ array: {__type:'string',value: {type:'string', __address__:`Accounts/initiator/CONSTANTS/types/array`, static_value: 'array'}},
71
+ twain: {__type:'string',value: {type:'string', __address__:`Accounts/initiator/CONSTANTS/types/twain`, static_value: 'twain'}},
72
+ number: { __type:'string', value: {type:'string', __address__:`Accounts/initiator/CONSTANTS/types/number`, static_value: 'number'}},
73
+ string: {__type:'string', value: {type:'string', __address__:`Accounts/initiator/CONSTANTS/types/string`, static_value: 'string'}},
74
+ }
75
+ },
76
+ };
77
+
78
+ const framer = (initiator, cb) => {
79
+ let frame = new Frame(obj);
80
+ frame.account = initiator;
81
+ let start = Date.now();
82
+
83
+ let callback = (blks) => {
84
+ console.log(
85
+ `Account:${initiator.name} is ready in ${Date.now() - start}ms.`
86
+ );
87
+
88
+ initiator.initiated = true
89
+
90
+ cb&&cb(blks)
91
+ }
92
+
93
+ /* Quick due diligence */
94
+ let oracle = initiator.manager.oracle,
95
+ obj_hash = oracle.hash(obj),
96
+ globals = oracle.gds.folder('globals'),
97
+ quick_hashes = globals.readone({title:'quick_hashes'});
98
+
99
+ if(!quick_hashes){
100
+ quick_hashes = {title:"quick_hashes"}
101
+ let res = globals.write(quick_hashes)
102
+ quick_hashes._id = res._id
103
+ quick_hashes.created = res.created
104
+ }
105
+ if(quick_hashes.frame === obj_hash){
106
+ setTimeout(() => {
107
+ callback([])
108
+ }, 0);
109
+ }else {
110
+ frame.to_instruction();
111
+ let instructions = frame.flatten_instructions();
112
+
113
+ initiator.load({
114
+ program: { instructions },
115
+ callback,
116
+ });
117
+ globals.update({_id:quick_hashes._id}, {frame: obj_hash})
118
+ }
61
119
 
62
- initiator.load({ program: { instructions } });
120
+
63
121
  };
64
122
 
65
123
  export default framer;
124
+ export { obj };
package/opcodes/add.js CHANGED
@@ -4,12 +4,12 @@ let ops = [
4
4
  { name: "subtract", sign: "-" },
5
5
  { name: "divide", sign: "/" },
6
6
  { name: "exp", sign: "**" },
7
- { name: "equal", sign: "==" },
8
- { name: "not_equal", sign: "!=" },
9
- { name: "greater_than", sign: ">" },
10
- { name: "less_than", sign: "<" },
11
- { name: "gte", sign: ">=" },
12
- { name: "lte", sign: "<=" },
7
+ { name: "equal", sign: "==", jmp:true},
8
+ { name: "not_equal", sign: "!=", jmp:true},
9
+ { name: "gt", sign: ">",jmp:true },
10
+ { name: "lt", sign: "<", jmp:true },
11
+ { name: "lte", sign: "<=" , jmp:true},
12
+ { name: "gte", sign: ">=", jmp:true },
13
13
  ];
14
14
 
15
15
  export { ops };