hakuban 0.7.0 → 0.7.1
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/hakuban-with-wasm.js +122 -122
- package/hakuban-with-wasm.js.map +1 -1
- package/hakuban-with-wasm.min.js +1 -1
- package/hakuban-with-wasm.min.js.map +1 -1
- package/hakuban.js +121 -121
- package/hakuban.js.map +1 -1
- package/hakuban.min.js +1 -1
- package/hakuban.min.js.map +1 -1
- package/hakuban.wasm +0 -0
- package/package.json +7 -1
package/hakuban.js
CHANGED
|
@@ -1,39 +1,13 @@
|
|
|
1
1
|
let wasm;
|
|
2
2
|
|
|
3
|
-
const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
4
|
-
|
|
5
|
-
cachedTextDecoder.decode();
|
|
6
|
-
|
|
7
|
-
let cachedUint8Memory0 = new Uint8Array();
|
|
8
|
-
|
|
9
|
-
function getUint8Memory0() {
|
|
10
|
-
if (cachedUint8Memory0.byteLength === 0) {
|
|
11
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
12
|
-
}
|
|
13
|
-
return cachedUint8Memory0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function getStringFromWasm0(ptr, len) {
|
|
17
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
18
|
-
}
|
|
19
|
-
|
|
20
3
|
const heap = new Array(32).fill(undefined);
|
|
21
4
|
|
|
22
5
|
heap.push(undefined, null, true, false);
|
|
23
6
|
|
|
24
|
-
let heap_next = heap.length;
|
|
25
|
-
|
|
26
|
-
function addHeapObject(obj) {
|
|
27
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
28
|
-
const idx = heap_next;
|
|
29
|
-
heap_next = heap[idx];
|
|
30
|
-
|
|
31
|
-
heap[idx] = obj;
|
|
32
|
-
return idx;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
7
|
function getObject(idx) { return heap[idx]; }
|
|
36
8
|
|
|
9
|
+
let heap_next = heap.length;
|
|
10
|
+
|
|
37
11
|
function dropObject(idx) {
|
|
38
12
|
if (idx < 36) return;
|
|
39
13
|
heap[idx] = heap_next;
|
|
@@ -48,6 +22,15 @@ function takeObject(idx) {
|
|
|
48
22
|
|
|
49
23
|
let WASM_VECTOR_LEN = 0;
|
|
50
24
|
|
|
25
|
+
let cachedUint8Memory0 = new Uint8Array();
|
|
26
|
+
|
|
27
|
+
function getUint8Memory0() {
|
|
28
|
+
if (cachedUint8Memory0.byteLength === 0) {
|
|
29
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
30
|
+
}
|
|
31
|
+
return cachedUint8Memory0;
|
|
32
|
+
}
|
|
33
|
+
|
|
51
34
|
const cachedTextEncoder = new TextEncoder('utf-8');
|
|
52
35
|
|
|
53
36
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -114,6 +97,23 @@ function getInt32Memory0() {
|
|
|
114
97
|
return cachedInt32Memory0;
|
|
115
98
|
}
|
|
116
99
|
|
|
100
|
+
const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
101
|
+
|
|
102
|
+
cachedTextDecoder.decode();
|
|
103
|
+
|
|
104
|
+
function getStringFromWasm0(ptr, len) {
|
|
105
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function addHeapObject(obj) {
|
|
109
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
110
|
+
const idx = heap_next;
|
|
111
|
+
heap_next = heap[idx];
|
|
112
|
+
|
|
113
|
+
heap[idx] = obj;
|
|
114
|
+
return idx;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
117
|
function debugString(val) {
|
|
118
118
|
// primitive types
|
|
119
119
|
const type = typeof val;
|
|
@@ -183,41 +183,62 @@ function debugString(val) {
|
|
|
183
183
|
* @param {number} descriptor
|
|
184
184
|
* @returns {number}
|
|
185
185
|
*/
|
|
186
|
-
function
|
|
187
|
-
const ret = wasm.
|
|
186
|
+
function hakuban_tag_expose_contract_new(local_exchange, descriptor) {
|
|
187
|
+
const ret = wasm.hakuban_tag_expose_contract_new(local_exchange, descriptor);
|
|
188
188
|
return ret;
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
/**
|
|
192
|
-
* @param {number}
|
|
192
|
+
* @param {number} tag_expose_contract_pointer
|
|
193
193
|
*/
|
|
194
|
-
function
|
|
195
|
-
wasm.
|
|
194
|
+
function hakuban_tag_expose_contract_drop(tag_expose_contract_pointer) {
|
|
195
|
+
wasm.hakuban_tag_expose_contract_drop(tag_expose_contract_pointer);
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
/**
|
|
199
|
-
* @param {number}
|
|
199
|
+
* @param {number} tag_expose_pointer
|
|
200
200
|
*/
|
|
201
|
-
function
|
|
202
|
-
wasm.
|
|
201
|
+
function hakuban_tag_expose_contract_terminate(tag_expose_pointer) {
|
|
202
|
+
wasm.hakuban_tag_expose_contract_terminate(tag_expose_pointer);
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
/**
|
|
206
|
-
* @param {number}
|
|
206
|
+
* @param {number} tag_expose_pointer
|
|
207
207
|
* @returns {number}
|
|
208
208
|
*/
|
|
209
|
-
function
|
|
210
|
-
const ret = wasm.
|
|
209
|
+
function hakuban_tag_expose_contract_next(tag_expose_pointer) {
|
|
210
|
+
const ret = wasm.hakuban_tag_expose_contract_next(tag_expose_pointer);
|
|
211
211
|
return ret;
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
+
let cachedUint32Memory0 = new Uint32Array();
|
|
215
|
+
|
|
216
|
+
function getUint32Memory0() {
|
|
217
|
+
if (cachedUint32Memory0.byteLength === 0) {
|
|
218
|
+
cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
|
|
219
|
+
}
|
|
220
|
+
return cachedUint32Memory0;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
function getArrayU32FromWasm0(ptr, len) {
|
|
224
|
+
return getUint32Memory0().subarray(ptr / 4, ptr / 4 + len);
|
|
225
|
+
}
|
|
214
226
|
/**
|
|
215
|
-
* @param {number}
|
|
216
|
-
* @returns {
|
|
227
|
+
* @param {number} tag_expose_pointer
|
|
228
|
+
* @returns {Uint32Array}
|
|
217
229
|
*/
|
|
218
|
-
function
|
|
219
|
-
|
|
220
|
-
|
|
230
|
+
function hakuban_tag_expose_contract_ready(tag_expose_pointer) {
|
|
231
|
+
try {
|
|
232
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
233
|
+
wasm.hakuban_tag_expose_contract_ready(retptr, tag_expose_pointer);
|
|
234
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
235
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
236
|
+
var v0 = getArrayU32FromWasm0(r0, r1).slice();
|
|
237
|
+
wasm.__wbindgen_free(r0, r1 * 4);
|
|
238
|
+
return v0;
|
|
239
|
+
} finally {
|
|
240
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
241
|
+
}
|
|
221
242
|
}
|
|
222
243
|
|
|
223
244
|
/**
|
|
@@ -253,18 +274,6 @@ function hakuban_tag_observe_contract_next(tag_observe_pointer) {
|
|
|
253
274
|
return ret;
|
|
254
275
|
}
|
|
255
276
|
|
|
256
|
-
let cachedUint32Memory0 = new Uint32Array();
|
|
257
|
-
|
|
258
|
-
function getUint32Memory0() {
|
|
259
|
-
if (cachedUint32Memory0.byteLength === 0) {
|
|
260
|
-
cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
|
|
261
|
-
}
|
|
262
|
-
return cachedUint32Memory0;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
function getArrayU32FromWasm0(ptr, len) {
|
|
266
|
-
return getUint32Memory0().subarray(ptr / 4, ptr / 4 + len);
|
|
267
|
-
}
|
|
268
277
|
/**
|
|
269
278
|
* @param {number} tag_observe_pointer
|
|
270
279
|
* @returns {Uint32Array}
|
|
@@ -364,54 +373,14 @@ function hakuban_object_descriptor_tags(descriptor_pointer) {
|
|
|
364
373
|
}
|
|
365
374
|
|
|
366
375
|
/**
|
|
367
|
-
* @param {
|
|
368
|
-
* @param {number} descriptor
|
|
369
|
-
* @returns {number}
|
|
370
|
-
*/
|
|
371
|
-
function hakuban_tag_expose_contract_new(local_exchange, descriptor) {
|
|
372
|
-
const ret = wasm.hakuban_tag_expose_contract_new(local_exchange, descriptor);
|
|
373
|
-
return ret;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* @param {number} tag_expose_contract_pointer
|
|
378
|
-
*/
|
|
379
|
-
function hakuban_tag_expose_contract_drop(tag_expose_contract_pointer) {
|
|
380
|
-
wasm.hakuban_tag_expose_contract_drop(tag_expose_contract_pointer);
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
/**
|
|
384
|
-
* @param {number} tag_expose_pointer
|
|
385
|
-
*/
|
|
386
|
-
function hakuban_tag_expose_contract_terminate(tag_expose_pointer) {
|
|
387
|
-
wasm.hakuban_tag_expose_contract_terminate(tag_expose_pointer);
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* @param {number} tag_expose_pointer
|
|
376
|
+
* @param {string} default_log_level
|
|
392
377
|
* @returns {number}
|
|
393
378
|
*/
|
|
394
|
-
function
|
|
395
|
-
const
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
/**
|
|
400
|
-
* @param {number} tag_expose_pointer
|
|
401
|
-
* @returns {Uint32Array}
|
|
402
|
-
*/
|
|
403
|
-
function hakuban_tag_expose_contract_ready(tag_expose_pointer) {
|
|
404
|
-
try {
|
|
405
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
406
|
-
wasm.hakuban_tag_expose_contract_ready(retptr, tag_expose_pointer);
|
|
407
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
408
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
409
|
-
var v0 = getArrayU32FromWasm0(r0, r1).slice();
|
|
410
|
-
wasm.__wbindgen_free(r0, r1 * 4);
|
|
411
|
-
return v0;
|
|
412
|
-
} finally {
|
|
413
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
414
|
-
}
|
|
379
|
+
function hakuban_logger_initialize(default_log_level) {
|
|
380
|
+
const ptr0 = passStringToWasm0(default_log_level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
381
|
+
const len0 = WASM_VECTOR_LEN;
|
|
382
|
+
const ret = wasm.hakuban_logger_initialize(ptr0, len0);
|
|
383
|
+
return ret >>> 0;
|
|
415
384
|
}
|
|
416
385
|
|
|
417
386
|
let cachedBigUint64Memory0 = new BigUint64Array();
|
|
@@ -686,17 +655,6 @@ function hakuban_future_returning_nothing_drop(future) {
|
|
|
686
655
|
wasm.hakuban_future_returning_nothing_drop(future);
|
|
687
656
|
}
|
|
688
657
|
|
|
689
|
-
/**
|
|
690
|
-
* @param {string} default_log_level
|
|
691
|
-
* @returns {number}
|
|
692
|
-
*/
|
|
693
|
-
function hakuban_logger_initialize(default_log_level) {
|
|
694
|
-
const ptr0 = passStringToWasm0(default_log_level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
695
|
-
const len0 = WASM_VECTOR_LEN;
|
|
696
|
-
const ret = wasm.hakuban_logger_initialize(ptr0, len0);
|
|
697
|
-
return ret >>> 0;
|
|
698
|
-
}
|
|
699
|
-
|
|
700
658
|
/**
|
|
701
659
|
* @param {number} object_state_sink_pointer
|
|
702
660
|
* @returns {number}
|
|
@@ -836,6 +794,48 @@ function hakuban_object_expose_contract_ready(object_expose_pointer) {
|
|
|
836
794
|
return WasmResultWithPointer.__wrap(ret);
|
|
837
795
|
}
|
|
838
796
|
|
|
797
|
+
/**
|
|
798
|
+
* @param {number} local_exchange
|
|
799
|
+
* @param {number} descriptor
|
|
800
|
+
* @returns {number}
|
|
801
|
+
*/
|
|
802
|
+
function hakuban_object_observe_contract_new(local_exchange, descriptor) {
|
|
803
|
+
const ret = wasm.hakuban_object_observe_contract_new(local_exchange, descriptor);
|
|
804
|
+
return ret;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* @param {number} object_ptr
|
|
809
|
+
*/
|
|
810
|
+
function hakuban_object_observe_contract_drop(object_ptr) {
|
|
811
|
+
wasm.hakuban_object_observe_contract_drop(object_ptr);
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* @param {number} object_observe_pointer
|
|
816
|
+
*/
|
|
817
|
+
function hakuban_object_observe_contract_terminate(object_observe_pointer) {
|
|
818
|
+
wasm.hakuban_object_observe_contract_terminate(object_observe_pointer);
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
/**
|
|
822
|
+
* @param {number} object_observe_pointer
|
|
823
|
+
* @returns {number}
|
|
824
|
+
*/
|
|
825
|
+
function hakuban_object_observe_contract_next(object_observe_pointer) {
|
|
826
|
+
const ret = wasm.hakuban_object_observe_contract_next(object_observe_pointer);
|
|
827
|
+
return ret;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* @param {number} object_observe_pointer
|
|
832
|
+
* @returns {WasmResultWithPointer}
|
|
833
|
+
*/
|
|
834
|
+
function hakuban_object_observe_contract_ready(object_observe_pointer) {
|
|
835
|
+
const ret = wasm.hakuban_object_observe_contract_ready(object_observe_pointer);
|
|
836
|
+
return WasmResultWithPointer.__wrap(ret);
|
|
837
|
+
}
|
|
838
|
+
|
|
839
839
|
function handleError(f, args) {
|
|
840
840
|
try {
|
|
841
841
|
return f.apply(this, args);
|
|
@@ -966,10 +966,6 @@ async function load(module, imports) {
|
|
|
966
966
|
function getImports() {
|
|
967
967
|
const imports = {};
|
|
968
968
|
imports.wbg = {};
|
|
969
|
-
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
970
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
971
|
-
return addHeapObject(ret);
|
|
972
|
-
};
|
|
973
969
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
974
970
|
takeObject(arg0);
|
|
975
971
|
};
|
|
@@ -981,6 +977,14 @@ function getImports() {
|
|
|
981
977
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
982
978
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
983
979
|
};
|
|
980
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
981
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
982
|
+
return addHeapObject(ret);
|
|
983
|
+
};
|
|
984
|
+
imports.wbg.__wbg_now_8172cd917e5eda6b = function(arg0) {
|
|
985
|
+
const ret = getObject(arg0).now();
|
|
986
|
+
return ret;
|
|
987
|
+
};
|
|
984
988
|
imports.wbg.__wbg_debug_f15cb542ea509609 = function(arg0) {
|
|
985
989
|
console.debug(getObject(arg0));
|
|
986
990
|
};
|
|
@@ -996,10 +1000,6 @@ function getImports() {
|
|
|
996
1000
|
imports.wbg.__wbg_warn_58110c4a199df084 = function(arg0) {
|
|
997
1001
|
console.warn(getObject(arg0));
|
|
998
1002
|
};
|
|
999
|
-
imports.wbg.__wbg_now_8172cd917e5eda6b = function(arg0) {
|
|
1000
|
-
const ret = getObject(arg0).now();
|
|
1001
|
-
return ret;
|
|
1002
|
-
};
|
|
1003
1003
|
imports.wbg.__wbg_newnoargs_b5b063fc6c2f0376 = function(arg0, arg1) {
|
|
1004
1004
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
1005
1005
|
return addHeapObject(ret);
|