porffor 0.25.4 → 0.25.5
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/compiler/builtins/promise.ts +59 -13
- package/compiler/builtins_precompiled.js +24 -6
- package/package.json +1 -1
- package/runner/index.js +1 -1
@@ -99,7 +99,6 @@ export const __Porffor_promise_resolve = (value: any): any => {
|
|
99
99
|
// todo: if value is own promise, reject with typeerror
|
100
100
|
|
101
101
|
if (__ecma262_IsPromise(value)) {
|
102
|
-
printStatic('todo res');
|
103
102
|
// todo
|
104
103
|
} else {
|
105
104
|
__ecma262_FulfillPromise(activePromise, value);
|
@@ -110,7 +109,6 @@ export const __Porffor_promise_resolve = (value: any): any => {
|
|
110
109
|
|
111
110
|
export const __Porffor_promise_reject = (reason: any): any => {
|
112
111
|
if (__ecma262_IsPromise(reason)) {
|
113
|
-
printStatic('todo rej');
|
114
112
|
// todo
|
115
113
|
} else {
|
116
114
|
__ecma262_RejectPromise(activePromise, reason);
|
@@ -141,6 +139,16 @@ export const __Porffor_promise_create = (): any[] => {
|
|
141
139
|
return obj;
|
142
140
|
};
|
143
141
|
|
142
|
+
export const __Porffor_promise_newReaction = (handler: Function, promise: any[], type: i32): any[] => {
|
143
|
+
// enum ReactionType { then = 0, finally = 1 }
|
144
|
+
const out: any[] = Porffor.allocateBytes(31); // 3 length
|
145
|
+
out[0] = handler;
|
146
|
+
out[1] = promise;
|
147
|
+
out[2] = type;
|
148
|
+
|
149
|
+
return out;
|
150
|
+
};
|
151
|
+
|
144
152
|
export const __Porffor_promise_runJobs = () => {
|
145
153
|
while (true) {
|
146
154
|
let x: any = jobQueue.shift();
|
@@ -149,11 +157,18 @@ export const __Porffor_promise_runJobs = () => {
|
|
149
157
|
const reaction: any[] = x[0];
|
150
158
|
const handler: Function = reaction[0];
|
151
159
|
const outPromise: any[] = reaction[1];
|
160
|
+
const type: i32 = reaction[2];
|
152
161
|
|
153
162
|
const value: any = x[1];
|
154
163
|
|
155
164
|
// todo: handle thrown errors in handler?
|
156
|
-
|
165
|
+
let outValue: any;
|
166
|
+
if (type == 0) { // 0: then reaction
|
167
|
+
outValue = handler(value);
|
168
|
+
} else { // 1: finally reaction
|
169
|
+
handler();
|
170
|
+
outValue = value;
|
171
|
+
}
|
157
172
|
|
158
173
|
// todo: should this be resolve or fulfill?
|
159
174
|
__ecma262_FulfillPromise(outPromise, outValue);
|
@@ -175,10 +190,9 @@ export const Promise = function (executor: any): Promise {
|
|
175
190
|
};
|
176
191
|
|
177
192
|
|
193
|
+
// 27.2.5.4 Promise.prototype.then (onFulfilled, onRejected)
|
194
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.then
|
178
195
|
export const __Promise_prototype_then = (_this: any, onFulfilled: any, onRejected: any) => {
|
179
|
-
// 27.2.5.4 Promise.prototype.then (onFulfilled, onRejected)
|
180
|
-
// https://tc39.es/ecma262/#sec-promise.prototype.then
|
181
|
-
|
182
196
|
// 1. Let promise be the this value.
|
183
197
|
// 2. If IsPromise(promise) is false, throw a TypeError exception.
|
184
198
|
if (!__ecma262_IsPromise(_this)) throw new TypeError('Promise.prototype.then called on non-Promise');
|
@@ -194,13 +208,8 @@ export const __Promise_prototype_then = (_this: any, onFulfilled: any, onRejecte
|
|
194
208
|
|
195
209
|
const outPromise: any[] = __Porffor_promise_create();
|
196
210
|
|
197
|
-
const fulfillReaction: any[] =
|
198
|
-
|
199
|
-
fulfillReaction[1] = outPromise;
|
200
|
-
|
201
|
-
const rejectReaction: any[] = Porffor.allocateBytes(22); // 2 length
|
202
|
-
rejectReaction[0] = onRejected;
|
203
|
-
rejectReaction[1] = outPromise;
|
211
|
+
const fulfillReaction: any[] = __Porffor_promise_newReaction(onFulfilled, outPromise, 0);
|
212
|
+
const rejectReaction: any[] = __Porffor_promise_newReaction(onRejected, outPromise, 0);
|
204
213
|
|
205
214
|
// 9. If promise.[[PromiseState]] is pending, then
|
206
215
|
if (state == 0) { // pending
|
@@ -239,6 +248,43 @@ export const __Promise_prototype_then = (_this: any, onFulfilled: any, onRejecte
|
|
239
248
|
return pro;
|
240
249
|
};
|
241
250
|
|
251
|
+
// 27.2.5.1 Promise.prototype.catch (onRejected)
|
252
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
253
|
+
export const __Promise_prototype_catch = (_this: any, onRejected: any): Promise => {
|
254
|
+
// 1. Let promise be the this value.
|
255
|
+
// 2. Return ? Invoke(promise, "then", « undefined, onRejected »).
|
256
|
+
return __Promise_prototype_then(_this, undefined, onRejected);
|
257
|
+
};
|
258
|
+
|
259
|
+
|
260
|
+
export const __Promise_prototype_finally = (_this: any, onFinally: any): Promise => {
|
261
|
+
// custom impl based on then but also not (sorry)
|
262
|
+
if (!__ecma262_IsPromise(_this)) throw new TypeError('Promise.prototype.then called on non-Promise');
|
263
|
+
|
264
|
+
if (Porffor.rawType(onFinally) != Porffor.TYPES.function) onFinally = __Porffor_promise_noop;
|
265
|
+
|
266
|
+
const promise: any[] = _this;
|
267
|
+
const state: i32 = promise[1];
|
268
|
+
|
269
|
+
const outPromise: any[] = __Porffor_promise_create();
|
270
|
+
|
271
|
+
const finallyReaction: any[] = __Porffor_promise_newReaction(onFinally, outPromise, 1);
|
272
|
+
|
273
|
+
if (state == 0) { // pending
|
274
|
+
const fulfillReactions: any[] = promise[2];
|
275
|
+
Porffor.fastPush(fulfillReactions, finallyReaction);
|
276
|
+
|
277
|
+
const rejectReactions: any[] = promise[3];
|
278
|
+
Porffor.fastPush(rejectReactions, finallyReaction);
|
279
|
+
} else { // fulfilled or rejected
|
280
|
+
const value: any = promise[0];
|
281
|
+
__ecma262_HostEnqueuePromiseJob(__ecma262_NewPromiseReactionJob(finallyReaction, value));
|
282
|
+
}
|
283
|
+
|
284
|
+
const pro: Promise = outPromise;
|
285
|
+
return pro;
|
286
|
+
};
|
287
|
+
|
242
288
|
export const __Promise_prototype_toString = (_this: any) => {
|
243
289
|
const str: bytestring = '[object Promise]';
|
244
290
|
return str;
|
@@ -1921,14 +1921,14 @@ export const BuiltinFuncs = function() {
|
|
1921
1921
|
locals: [], localNames: [],
|
1922
1922
|
};
|
1923
1923
|
this.__Porffor_promise_resolve = {
|
1924
|
-
wasm: (scope, {glbl,builtin}) => [[32,0],[32,1],[16, ...builtin('__ecma262_IsPromise')],[33,2],[33,3],[32,2],[33,4],[2,127],[32,4],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,3],[252,3],[40,1,0],[12,1],[11],[32,4],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,3],[252,3],[40,1,0],[12,1],[11],[32,3],[252,3],[11,"TYPESWITCH_end"],[4,64],[
|
1924
|
+
wasm: (scope, {glbl,builtin}) => [[32,0],[32,1],[16, ...builtin('__ecma262_IsPromise')],[33,2],[33,3],[32,2],[33,4],[2,127],[32,4],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,3],[252,3],[40,1,0],[12,1],[11],[32,4],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,3],[252,3],[40,1,0],[12,1],[11],[32,3],[252,3],[11,"TYPESWITCH_end"],[4,64],[5],...glbl(35, 'activePromise', 124),...glbl(35, 'activePromise#type', 127),[32,0],[32,1],[16, ...builtin('__ecma262_FulfillPromise')],[33,2],[26],[11],[68,0,0,0,0,0,0,0,0],[65,128,1],[15]],
|
1925
1925
|
params: [124,127], typedParams: 1,
|
1926
1926
|
returns: [124,127], typedReturns: 1,
|
1927
1927
|
locals: [127,124,127], localNames: ["value","value#type","#last_type","#logicinner_tmp","#typeswitch_tmp"],
|
1928
1928
|
globalInits: {jobQueue: (scope, {allocPage,glbl,loc}) => [...number(allocPage(scope, 'array: promise.ts/jobQueue', 'f64') * pageSize, 124),...glbl(36, 'jobQueue', 124),...glbl(35, 'jobQueue', 124),[252,3],[33,loc('#makearray_pointer_tmp', 127)],[32,loc('#makearray_pointer_tmp', 127)],[65,0],[54,1,0],[32,loc('#makearray_pointer_tmp', 127)],[68,0,0,0,0,0,0,0,0],[252,3],[54,1,0],[32,loc('#makearray_pointer_tmp', 127)],[26]]},
|
1929
1929
|
};
|
1930
1930
|
this.__Porffor_promise_reject = {
|
1931
|
-
wasm: (scope, {glbl,builtin}) => [[32,0],[32,1],[16, ...builtin('__ecma262_IsPromise')],[33,2],[33,3],[32,2],[33,4],[2,127],[32,4],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,3],[252,3],[40,1,0],[12,1],[11],[32,4],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,3],[252,3],[40,1,0],[12,1],[11],[32,3],[252,3],[11,"TYPESWITCH_end"],[4,64],[
|
1931
|
+
wasm: (scope, {glbl,builtin}) => [[32,0],[32,1],[16, ...builtin('__ecma262_IsPromise')],[33,2],[33,3],[32,2],[33,4],[2,127],[32,4],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,3],[252,3],[40,1,0],[12,1],[11],[32,4],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,3],[252,3],[40,1,0],[12,1],[11],[32,3],[252,3],[11,"TYPESWITCH_end"],[4,64],[5],...glbl(35, 'activePromise', 124),...glbl(35, 'activePromise#type', 127),[32,0],[32,1],[16, ...builtin('__ecma262_RejectPromise')],[33,2],[26],[11],[68,0,0,0,0,0,0,0,0],[65,128,1],[15]],
|
1932
1932
|
params: [124,127], typedParams: 1,
|
1933
1933
|
returns: [124,127], typedReturns: 1,
|
1934
1934
|
locals: [127,124,127], localNames: ["reason","reason#type","#last_type","#logicinner_tmp","#typeswitch_tmp"],
|
@@ -1940,11 +1940,17 @@ export const BuiltinFuncs = function() {
|
|
1940
1940
|
returns: [124,127], typedReturns: 1,
|
1941
1941
|
locals: [124,124,127,124,124,127,124,124], localNames: ["obj","#member_setter_val_tmp","#member_setter_ptr_tmp","#member_obj","#member_prop_assign","#swap","fulfillReactions","rejectReactions"],
|
1942
1942
|
};
|
1943
|
+
this.__Porffor_promise_newReaction = {
|
1944
|
+
wasm: (scope, {builtin}) => [[65,31],[16, ...builtin('__Porffor_allocateBytes')],[183],[34,6],[33,9],[68,0,0,0,0,0,0,0,0],[33,10],[32,9],[252,3],[32,10],[252,3],[65,9],[108],[106],[34,8],[32,0],[34,7],[57,0,4],[32,8],[65,6],[58,0,12],[32,6],[33,9],[68,0,0,0,0,0,0,240,63],[33,10],[32,9],[252,3],[32,10],[252,3],[65,9],[108],[106],[34,8],[32,2],[34,7],[57,0,4],[32,8],[65,208,0],[58,0,12],[32,6],[33,9],[68,0,0,0,0,0,0,0,64],[33,10],[32,9],[252,3],[32,10],[252,3],[65,9],[108],[106],[34,8],[32,4],[34,7],[57,0,4],[32,8],[65,1],[58,0,12],[32,6],[65,208,0],[15]],
|
1945
|
+
params: [124,127,124,127,124,127], typedParams: 1,
|
1946
|
+
returns: [124,127], typedReturns: 1,
|
1947
|
+
locals: [124,124,127,124,124,127], localNames: ["handler","handler#type","promise","promise#type","type","type#type","out","#member_setter_val_tmp","#member_setter_ptr_tmp","#member_obj","#member_prop_assign","#swap"],
|
1948
|
+
};
|
1943
1949
|
this.__Porffor_promise_runJobs = {
|
1944
|
-
wasm: (scope, {glbl,builtin,internalThrow}) => [[3,64],[65,1],[4,64],...glbl(35, 'jobQueue', 124),[252,3],[34,3],[40,1,0],[33,2],[2,124],[32,2],[69],[4,64],[68,0,0,0,0,0,0,0,0],[12,1],[11],[32,3],[32,2],[65,1],[107],[34,2],[54,1,0],[32,3],[43,0,4],[32,3],[45,0,12],[65,4],[32,3],[106],[65,13],[32,3],[106],[32,2],[65,9],[108],[252,10,0,0],[33,4],[11],[33,0],[32,4],[33,1],[32,0],[33,5],[32,1],[33,6],[2,127],[32,6],[65,0],[70],[4,64,"TYPESWITCH|empty"],[65,1],[12,1],[11],[32,6],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,5],[68,0,0,0,0,0,0,0,0],[97],[12,1],[11],[32,6],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],[65,1],[12,1],[11],[65,0],[11,"TYPESWITCH_end"],[4,64],[12,1],[11],[32,0],[33,8],[68,0,0,0,0,0,0,0,0],[33,9],[32,1],[33,6],[2,124],[32,6],[65,6],[70],[4,64,"TYPESWITCH|Function"],[32,8],[252,3],[32,1],[32,9],[65,1],[16, ...builtin('__ecma262_ToPropertyKey')],[33,12],[252,3],[32,12],[16, ...builtin('__Porffor_object_get')],[33,4],[12,1],[11],[32,6],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,8],[252,3],[32,1],[32,9],[65,1],[16, ...builtin('__ecma262_ToPropertyKey')],[33,12],[252,3],[32,12],[16, ...builtin('__Porffor_object_get')],[33,4],[12,1],[11],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[16, ...builtin('__Porffor_allocate')],[34,11],[65,1],[54,0,0],[32,11],[32,9],[252,3],[65,2],[108],[32,8],[252,3],[106],[47,0,4],[59,0,4],[32,11],[184],[65,195,0],[33,4],[12,1],[11],[32,6],[65,208,0],[70],[4,64,"TYPESWITCH|Array"],[32,9],[252,3],[65,9],[108],[32,8],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,4],[12,1],[11],[32,6],[65,216,0],[70],[4,64,"TYPESWITCH|Uint8Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[106],[45,0,4],[184],[65,1],[33,4],[12,1],[11],[32,6],[65,217,0],[70],[4,64,"TYPESWITCH|Int8Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[106],[44,0,4],[183],[65,1],[33,4],[12,1],[11],[32,6],[65,218,0],[70],[4,64,"TYPESWITCH|Uint8ClampedArray"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[106],[45,0,4],[184],[65,1],[33,4],[12,1],[11],[32,6],[65,219,0],[70],[4,64,"TYPESWITCH|Uint16Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,1],[33,4],[12,1],[11],[32,6],[65,220,0],[70],[4,64,"TYPESWITCH|Int16Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,1],[33,4],[12,1],[11],[32,6],[65,221,0],[70],[4,64,"TYPESWITCH|Uint32Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,1],[33,4],[12,1],[11],[32,6],[65,222,0],[70],[4,64,"TYPESWITCH|Int32Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,1],[33,4],[12,1],[11],[32,6],[65,223,0],[70],[4,64,"TYPESWITCH|Float32Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,1],[33,4],[12,1],[11],[32,6],[65,224,0],[70],[4,64,"TYPESWITCH|Float64Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,8],[108],[106],[43,0,4],[65,1],[33,4],[12,1],[11],[32,6],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],...internalThrow(scope, 'TypeError', `Cannot read property of undefined`),[68,0,0,0,0,0,0,0,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[16, ...builtin('__Porffor_allocate')],[34,11],[65,1],[54,0,0],[32,11],[32,9],[252,3],[32,8],[252,3],[106],[45,0,4],[58,0,4],[32,11],[184],[65,195,1],[33,4],[12,1],[11],[68,0,0,0,0,0,0,0,0],[65,128,1],[33,4],[11,"TYPESWITCH_end"],[34,7],[33,8],[68,0,0,0,0,0,0,0,0],[34,9],[252,3],[65,9],[108],[32,8],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[26],[33,13],[32,7],[33,8],[68,0,0,0,0,0,0,240,63],[34,9],[252,3],[65,9],[108],[32,8],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[26],[33,14],[32,0],[33,8],[68,0,0,0,0,0,0,240,63],[33,9],[32,1],[33,6],[2,124],[32,6],[65,6],[70],[4,64,"TYPESWITCH|Function"],[32,8],[252,3],[32,1],[32,9],[65,1],[16, ...builtin('__ecma262_ToPropertyKey')],[33,12],[252,3],[32,12],[16, ...builtin('__Porffor_object_get')],[33,4],[12,1],[11],[32,6],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,8],[252,3],[32,1],[32,9],[65,1],[16, ...builtin('__ecma262_ToPropertyKey')],[33,12],[252,3],[32,12],[16, ...builtin('__Porffor_object_get')],[33,4],[12,1],[11],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[16, ...builtin('__Porffor_allocate')],[34,11],[65,1],[54,0,0],[32,11],[32,9],[252,3],[65,2],[108],[32,8],[252,3],[106],[47,0,4],[59,0,4],[32,11],[184],[65,195,0],[33,4],[12,1],[11],[32,6],[65,208,0],[70],[4,64,"TYPESWITCH|Array"],[32,9],[252,3],[65,9],[108],[32,8],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,4],[12,1],[11],[32,6],[65,216,0],[70],[4,64,"TYPESWITCH|Uint8Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[106],[45,0,4],[184],[65,1],[33,4],[12,1],[11],[32,6],[65,217,0],[70],[4,64,"TYPESWITCH|Int8Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[106],[44,0,4],[183],[65,1],[33,4],[12,1],[11],[32,6],[65,218,0],[70],[4,64,"TYPESWITCH|Uint8ClampedArray"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[106],[45,0,4],[184],[65,1],[33,4],[12,1],[11],[32,6],[65,219,0],[70],[4,64,"TYPESWITCH|Uint16Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,1],[33,4],[12,1],[11],[32,6],[65,220,0],[70],[4,64,"TYPESWITCH|Int16Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,1],[33,4],[12,1],[11],[32,6],[65,221,0],[70],[4,64,"TYPESWITCH|Uint32Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,1],[33,4],[12,1],[11],[32,6],[65,222,0],[70],[4,64,"TYPESWITCH|Int32Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,1],[33,4],[12,1],[11],[32,6],[65,223,0],[70],[4,64,"TYPESWITCH|Float32Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,1],[33,4],[12,1],[11],[32,6],[65,224,0],[70],[4,64,"TYPESWITCH|Float64Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,8],[108],[106],[43,0,4],[65,1],[33,4],[12,1],[11],[32,6],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],...internalThrow(scope, 'TypeError', `Cannot read property of undefined`),[68,0,0,0,0,0,0,0,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[16, ...builtin('__Porffor_allocate')],[34,11],[65,1],[54,0,0],[32,11],[32,9],[252,3],[32,8],[252,3],[106],[45,0,4],[58,0,4],[32,11],[184],[65,195,1],[33,4],[12,1],[11],[68,0,0,0,0,0,0,0,0],[65,128,1],[33,4],[11,"TYPESWITCH_end"],[33,15],[32,4],[33,16],[32,13],[33,27],[32,15],[32,16],[33,19],[33,20],[68,0,0,0,0,0,0,0,0],[65,128,1],[33,21],[33,22],[68,0,0,0,0,0,0,0,0],[65,128,1],[33,23],[33,24],[32,27],[252,3],[34,25],[65,128,1],[108],[65,2],[106],[45,0,128,128,4,"read func lut"],[34,26],[65,2],[113],[69],[65,0],[113],[4,64],...internalThrow(scope, 'TypeError', `handler is not a constructor`),[11],[2,124],[2,64],[2,64],[2,64],[2,64],[32,25],[65,128,1],[108],[47,0,128,128,4,"read func lut"],[14,4,0,1,2,3,0],[11],[32,26],[65,1],[113],[4,124],[32,26],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,25],[17,2,0,"no_type_return"],[5],[32,25],[17,0,0,"no_type_return"],[11],[5],[32,26],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,25],[17,2,0],[33,4],[5],[32,25],[17,0,0],[33,4],[11],[11],[12,3],[11],[32,26],[65,1],[113],[4,124],[32,26],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,20],[32,19],[32,25],[17,3,0,"no_type_return"],[5],[32,20],[32,19],[32,25],[17,1,0,"no_type_return"],[11],[5],[32,26],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,20],[32,19],[32,25],[17,3,0],[33,4],[5],[32,20],[32,19],[32,25],[17,1,0],[33,4],[11],[11],[12,2],[11],[32,26],[65,1],[113],[4,124],[32,26],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,20],[32,19],[32,22],[32,21],[32,25],[17,4,0,"no_type_return"],[5],[32,20],[32,19],[32,22],[32,21],[32,25],[17,2,0,"no_type_return"],[11],[5],[32,26],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,20],[32,19],[32,22],[32,21],[32,25],[17,4,0],[33,4],[5],[32,20],[32,19],[32,22],[32,21],[32,25],[17,2,0],[33,4],[11],[11],[12,1],[11],[32,26],[65,1],[113],[4,124],[32,26],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,20],[32,19],[32,22],[32,21],[32,24],[32,23],[32,25],[17,5,0,"no_type_return"],[5],[32,20],[32,19],[32,22],[32,21],[32,24],[32,23],[32,25],[17,3,0,"no_type_return"],[11],[5],[32,26],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,20],[32,19],[32,22],[32,21],[32,24],[32,23],[32,25],[17,5,0],[33,4],[5],[32,20],[32,19],[32,22],[32,21],[32,24],[32,23],[32,25],[17,3,0],[33,4],[11],[11],[11],[33,17],[32,4],[33,18],[32,14],[65,208,0],[32,17],[32,18],[16, ...builtin('__ecma262_FulfillPromise')],[33,4],[26],[12,1],[11],[11],[68,0,0,0,0,0,0,0,0],[65,128,1],[15]],
|
1950
|
+
wasm: (scope, {glbl,builtin,internalThrow}) => [[3,64],[65,1],[4,64],...glbl(35, 'jobQueue', 124),[252,3],[34,3],[40,1,0],[33,2],[2,124],[32,2],[69],[4,64],[68,0,0,0,0,0,0,0,0],[12,1],[11],[32,3],[32,2],[65,1],[107],[34,2],[54,1,0],[32,3],[43,0,4],[32,3],[45,0,12],[65,4],[32,3],[106],[65,13],[32,3],[106],[32,2],[65,9],[108],[252,10,0,0],[33,4],[11],[33,0],[32,4],[33,1],[32,0],[33,5],[32,1],[33,6],[2,127],[32,6],[65,0],[70],[4,64,"TYPESWITCH|empty"],[65,1],[12,1],[11],[32,6],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,5],[68,0,0,0,0,0,0,0,0],[97],[12,1],[11],[32,6],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],[65,1],[12,1],[11],[65,0],[11,"TYPESWITCH_end"],[4,64],[12,1],[11],[32,0],[33,8],[68,0,0,0,0,0,0,0,0],[33,9],[32,1],[33,6],[2,124],[32,6],[65,6],[70],[4,64,"TYPESWITCH|Function"],[32,8],[252,3],[32,1],[32,9],[65,1],[16, ...builtin('__ecma262_ToPropertyKey')],[33,12],[252,3],[32,12],[16, ...builtin('__Porffor_object_get')],[33,4],[12,1],[11],[32,6],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,8],[252,3],[32,1],[32,9],[65,1],[16, ...builtin('__ecma262_ToPropertyKey')],[33,12],[252,3],[32,12],[16, ...builtin('__Porffor_object_get')],[33,4],[12,1],[11],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[16, ...builtin('__Porffor_allocate')],[34,11],[65,1],[54,0,0],[32,11],[32,9],[252,3],[65,2],[108],[32,8],[252,3],[106],[47,0,4],[59,0,4],[32,11],[184],[65,195,0],[33,4],[12,1],[11],[32,6],[65,208,0],[70],[4,64,"TYPESWITCH|Array"],[32,9],[252,3],[65,9],[108],[32,8],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,4],[12,1],[11],[32,6],[65,216,0],[70],[4,64,"TYPESWITCH|Uint8Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[106],[45,0,4],[184],[65,1],[33,4],[12,1],[11],[32,6],[65,217,0],[70],[4,64,"TYPESWITCH|Int8Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[106],[44,0,4],[183],[65,1],[33,4],[12,1],[11],[32,6],[65,218,0],[70],[4,64,"TYPESWITCH|Uint8ClampedArray"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[106],[45,0,4],[184],[65,1],[33,4],[12,1],[11],[32,6],[65,219,0],[70],[4,64,"TYPESWITCH|Uint16Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,1],[33,4],[12,1],[11],[32,6],[65,220,0],[70],[4,64,"TYPESWITCH|Int16Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,1],[33,4],[12,1],[11],[32,6],[65,221,0],[70],[4,64,"TYPESWITCH|Uint32Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,1],[33,4],[12,1],[11],[32,6],[65,222,0],[70],[4,64,"TYPESWITCH|Int32Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,1],[33,4],[12,1],[11],[32,6],[65,223,0],[70],[4,64,"TYPESWITCH|Float32Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,1],[33,4],[12,1],[11],[32,6],[65,224,0],[70],[4,64,"TYPESWITCH|Float64Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,8],[108],[106],[43,0,4],[65,1],[33,4],[12,1],[11],[32,6],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],...internalThrow(scope, 'TypeError', `Cannot read property of undefined`),[68,0,0,0,0,0,0,0,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[16, ...builtin('__Porffor_allocate')],[34,11],[65,1],[54,0,0],[32,11],[32,9],[252,3],[32,8],[252,3],[106],[45,0,4],[58,0,4],[32,11],[184],[65,195,1],[33,4],[12,1],[11],[68,0,0,0,0,0,0,0,0],[65,128,1],[33,4],[11,"TYPESWITCH_end"],[34,7],[33,8],[68,0,0,0,0,0,0,0,0],[34,9],[252,3],[65,9],[108],[32,8],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[26],[33,13],[32,7],[33,8],[68,0,0,0,0,0,0,240,63],[34,9],[252,3],[65,9],[108],[32,8],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[26],[33,14],[32,7],[33,8],[68,0,0,0,0,0,0,0,64],[34,9],[252,3],[65,9],[108],[32,8],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[26],[33,15],[32,0],[33,8],[68,0,0,0,0,0,0,240,63],[33,9],[32,1],[33,6],[2,124],[32,6],[65,6],[70],[4,64,"TYPESWITCH|Function"],[32,8],[252,3],[32,1],[32,9],[65,1],[16, ...builtin('__ecma262_ToPropertyKey')],[33,12],[252,3],[32,12],[16, ...builtin('__Porffor_object_get')],[33,4],[12,1],[11],[32,6],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,8],[252,3],[32,1],[32,9],[65,1],[16, ...builtin('__ecma262_ToPropertyKey')],[33,12],[252,3],[32,12],[16, ...builtin('__Porffor_object_get')],[33,4],[12,1],[11],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[16, ...builtin('__Porffor_allocate')],[34,11],[65,1],[54,0,0],[32,11],[32,9],[252,3],[65,2],[108],[32,8],[252,3],[106],[47,0,4],[59,0,4],[32,11],[184],[65,195,0],[33,4],[12,1],[11],[32,6],[65,208,0],[70],[4,64,"TYPESWITCH|Array"],[32,9],[252,3],[65,9],[108],[32,8],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,4],[12,1],[11],[32,6],[65,216,0],[70],[4,64,"TYPESWITCH|Uint8Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[106],[45,0,4],[184],[65,1],[33,4],[12,1],[11],[32,6],[65,217,0],[70],[4,64,"TYPESWITCH|Int8Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[106],[44,0,4],[183],[65,1],[33,4],[12,1],[11],[32,6],[65,218,0],[70],[4,64,"TYPESWITCH|Uint8ClampedArray"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[106],[45,0,4],[184],[65,1],[33,4],[12,1],[11],[32,6],[65,219,0],[70],[4,64,"TYPESWITCH|Uint16Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,1],[33,4],[12,1],[11],[32,6],[65,220,0],[70],[4,64,"TYPESWITCH|Int16Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,1],[33,4],[12,1],[11],[32,6],[65,221,0],[70],[4,64,"TYPESWITCH|Uint32Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,1],[33,4],[12,1],[11],[32,6],[65,222,0],[70],[4,64,"TYPESWITCH|Int32Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,1],[33,4],[12,1],[11],[32,6],[65,223,0],[70],[4,64,"TYPESWITCH|Float32Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,1],[33,4],[12,1],[11],[32,6],[65,224,0],[70],[4,64,"TYPESWITCH|Float64Array"],[32,8],[252,3],[40,0,4],[32,9],[252,3],[65,8],[108],[106],[43,0,4],[65,1],[33,4],[12,1],[11],[32,6],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],...internalThrow(scope, 'TypeError', `Cannot read property of undefined`),[68,0,0,0,0,0,0,0,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[16, ...builtin('__Porffor_allocate')],[34,11],[65,1],[54,0,0],[32,11],[32,9],[252,3],[32,8],[252,3],[106],[45,0,4],[58,0,4],[32,11],[184],[65,195,1],[33,4],[12,1],[11],[68,0,0,0,0,0,0,0,0],[65,128,1],[33,4],[11,"TYPESWITCH_end"],[33,16],[32,4],[33,17],[32,15],[68,0,0,0,0,0,0,0,0],[97],[4,64],[32,13],[33,28],[32,16],[32,17],[33,20],[33,21],[68,0,0,0,0,0,0,0,0],[65,128,1],[33,22],[33,23],[68,0,0,0,0,0,0,0,0],[65,128,1],[33,24],[33,25],[32,28],[252,3],[34,26],[65,128,1],[108],[65,2],[106],[45,0,128,128,4,"read func lut"],[34,27],[65,2],[113],[69],[65,0],[113],[4,64],...internalThrow(scope, 'TypeError', `handler is not a constructor`),[11],[2,124],[2,64],[2,64],[2,64],[2,64],[32,26],[65,128,1],[108],[47,0,128,128,4,"read func lut"],[14,4,0,1,2,3,0],[11],[32,27],[65,1],[113],[4,124],[32,27],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,26],[17,2,0,"no_type_return"],[5],[32,26],[17,0,0,"no_type_return"],[11],[5],[32,27],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,26],[17,2,0],[33,4],[5],[32,26],[17,0,0],[33,4],[11],[11],[12,3],[11],[32,27],[65,1],[113],[4,124],[32,27],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,21],[32,20],[32,26],[17,3,0,"no_type_return"],[5],[32,21],[32,20],[32,26],[17,1,0,"no_type_return"],[11],[5],[32,27],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,21],[32,20],[32,26],[17,3,0],[33,4],[5],[32,21],[32,20],[32,26],[17,1,0],[33,4],[11],[11],[12,2],[11],[32,27],[65,1],[113],[4,124],[32,27],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,21],[32,20],[32,23],[32,22],[32,26],[17,4,0,"no_type_return"],[5],[32,21],[32,20],[32,23],[32,22],[32,26],[17,2,0,"no_type_return"],[11],[5],[32,27],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,21],[32,20],[32,23],[32,22],[32,26],[17,4,0],[33,4],[5],[32,21],[32,20],[32,23],[32,22],[32,26],[17,2,0],[33,4],[11],[11],[12,1],[11],[32,27],[65,1],[113],[4,124],[32,27],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,21],[32,20],[32,23],[32,22],[32,25],[32,24],[32,26],[17,5,0,"no_type_return"],[5],[32,21],[32,20],[32,23],[32,22],[32,25],[32,24],[32,26],[17,3,0,"no_type_return"],[11],[5],[32,27],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,21],[32,20],[32,23],[32,22],[32,25],[32,24],[32,26],[17,5,0],[33,4],[5],[32,21],[32,20],[32,23],[32,22],[32,25],[32,24],[32,26],[17,3,0],[33,4],[11],[11],[11],[34,18],[32,4],[33,19],[26],[5],[32,13],[33,28],[68,0,0,0,0,0,0,0,0],[65,128,1],[33,20],[33,21],[68,0,0,0,0,0,0,0,0],[65,128,1],[33,22],[33,23],[68,0,0,0,0,0,0,0,0],[65,128,1],[33,24],[33,25],[32,28],[252,3],[34,26],[65,128,1],[108],[65,2],[106],[45,0,128,128,4,"read func lut"],[34,27],[65,2],[113],[69],[65,0],[113],[4,64],...internalThrow(scope, 'TypeError', `handler is not a constructor`),[11],[2,124],[2,64],[2,64],[2,64],[2,64],[32,26],[65,128,1],[108],[47,0,128,128,4,"read func lut"],[14,4,0,1,2,3,0],[11],[32,27],[65,1],[113],[4,124],[32,27],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,26],[17,2,0,"no_type_return"],[5],[32,26],[17,0,0,"no_type_return"],[11],[5],[32,27],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,26],[17,2,0],[33,4],[5],[32,26],[17,0,0],[33,4],[11],[11],[12,3],[11],[32,27],[65,1],[113],[4,124],[32,27],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,21],[32,20],[32,26],[17,3,0,"no_type_return"],[5],[32,21],[32,20],[32,26],[17,1,0,"no_type_return"],[11],[5],[32,27],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,21],[32,20],[32,26],[17,3,0],[33,4],[5],[32,21],[32,20],[32,26],[17,1,0],[33,4],[11],[11],[12,2],[11],[32,27],[65,1],[113],[4,124],[32,27],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,21],[32,20],[32,23],[32,22],[32,26],[17,4,0,"no_type_return"],[5],[32,21],[32,20],[32,23],[32,22],[32,26],[17,2,0,"no_type_return"],[11],[5],[32,27],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,21],[32,20],[32,23],[32,22],[32,26],[17,4,0],[33,4],[5],[32,21],[32,20],[32,23],[32,22],[32,26],[17,2,0],[33,4],[11],[11],[12,1],[11],[32,27],[65,1],[113],[4,124],[32,27],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,21],[32,20],[32,23],[32,22],[32,25],[32,24],[32,26],[17,5,0,"no_type_return"],[5],[32,21],[32,20],[32,23],[32,22],[32,25],[32,24],[32,26],[17,3,0,"no_type_return"],[11],[5],[32,27],[65,2],[113],[4,124],[68,0,0,0,0,0,0,0,0],[65,128,1],[16, ...builtin('#get_globalThis')],[184],[65,7],[32,21],[32,20],[32,23],[32,22],[32,25],[32,24],[32,26],[17,5,0],[33,4],[5],[32,21],[32,20],[32,23],[32,22],[32,25],[32,24],[32,26],[17,3,0],[33,4],[11],[11],[11],[26],[32,16],[34,18],[32,17],[33,19],[26],[11],[32,14],[65,208,0],[32,18],[32,19],[16, ...builtin('__ecma262_FulfillPromise')],[33,4],[26],[12,1],[11],[11],[68,0,0,0,0,0,0,0,0],[65,128,1],[15]],
|
1945
1951
|
params: [], typedParams: 1,
|
1946
1952
|
returns: [124,127], typedReturns: 1,
|
1947
|
-
locals: [124,127,127,127,127,124,127,124,124,124,127,127,127,124,124,124,127,124,127,127,124,127,124,127,124,127,127,124], localNames: ["x","x#type","__proto_length_cache","__proto_pointer_cache","#last_type","#logicinner_tmp","#typeswitch_tmp","reaction","#member_obj","#member_prop","#loadArray_offset","#member_allocd","#swap","handler","outPromise","value","value#type","outValue","outValue#type","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#indirect_flags","#indirect_callee"],
|
1953
|
+
locals: [124,127,127,127,127,124,127,124,124,124,127,127,127,124,124,124,124,127,124,127,127,124,127,124,127,124,127,127,124], localNames: ["x","x#type","__proto_length_cache","__proto_pointer_cache","#last_type","#logicinner_tmp","#typeswitch_tmp","reaction","#member_obj","#member_prop","#loadArray_offset","#member_allocd","#swap","handler","outPromise","type","value","value#type","outValue","outValue#type","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#indirect_flags","#indirect_callee"],
|
1948
1954
|
globalInits: {jobQueue: (scope, {allocPage,glbl,loc}) => [...number(allocPage(scope, 'array: promise.ts/jobQueue', 'f64') * pageSize, 124),...glbl(36, 'jobQueue', 124),...glbl(35, 'jobQueue', 124),[252,3],[33,loc('#makearray_pointer_tmp', 127)],[32,loc('#makearray_pointer_tmp', 127)],[65,0],[54,1,0],[32,loc('#makearray_pointer_tmp', 127)],[68,0,0,0,0,0,0,0,0],[252,3],[54,1,0],[32,loc('#makearray_pointer_tmp', 127)],[26]]},
|
1949
1955
|
table: 1,
|
1950
1956
|
};
|
@@ -1957,10 +1963,22 @@ export const BuiltinFuncs = function() {
|
|
1957
1963
|
table: 1, constr: 1,
|
1958
1964
|
};
|
1959
1965
|
this.__Promise_prototype_then = {
|
1960
|
-
wasm: (scope, {builtin,internalThrow}) => [[32,0],[32,1],[16, ...builtin('__ecma262_IsPromise')],[33,6],[33,7],[32,6],[33,8],[2,124],[32,8],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,7],[252,3],[40,1,0],[69],[184],[12,1],[11],[32,8],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,7],[252,3],[40,1,0],[69],[184],[12,1],[11],[32,7],[68,0,0,0,0,0,0,0,0],[97],[184],[11,"TYPESWITCH_end"],[252,3],[4,64],...internalThrow(scope, 'TypeError', `Promise.prototype.then called on non-Promise`),[11],[32,2],[32,3],[16, ...builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,24,64],[98],[4,64],[68,...builtin('__Porffor_promise_noop', true, true)],[34,2],[65,6],[33,3],[26],[11],[32,4],[32,5],[16, ...builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,24,64],[98],[4,64],[68,...builtin('__Porffor_promise_noop', true, true)],[34,4],[65,6],[33,5],[26],[11],[32,0],[34,9],[33,11],[68,0,0,0,0,0,0,240,63],[34,12],[252,3],[65,9],[108],[32,11],[252,3],[106],[34,13],[43,0,4],[32,13],[45,0,12],[26],[33,10],[16, ...builtin('__Porffor_promise_create')],[26],[33,16],[
|
1966
|
+
wasm: (scope, {builtin,internalThrow}) => [[32,0],[32,1],[16, ...builtin('__ecma262_IsPromise')],[33,6],[33,7],[32,6],[33,8],[2,124],[32,8],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,7],[252,3],[40,1,0],[69],[184],[12,1],[11],[32,8],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,7],[252,3],[40,1,0],[69],[184],[12,1],[11],[32,7],[68,0,0,0,0,0,0,0,0],[97],[184],[11,"TYPESWITCH_end"],[252,3],[4,64],...internalThrow(scope, 'TypeError', `Promise.prototype.then called on non-Promise`),[11],[32,2],[32,3],[16, ...builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,24,64],[98],[4,64],[68,...builtin('__Porffor_promise_noop', true, true)],[34,2],[65,6],[33,3],[26],[11],[32,4],[32,5],[16, ...builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,24,64],[98],[4,64],[68,...builtin('__Porffor_promise_noop', true, true)],[34,4],[65,6],[33,5],[26],[11],[32,0],[34,9],[33,11],[68,0,0,0,0,0,0,240,63],[34,12],[252,3],[65,9],[108],[32,11],[252,3],[106],[34,13],[43,0,4],[32,13],[45,0,12],[26],[33,10],[16, ...builtin('__Porffor_promise_create')],[26],[33,16],[32,2],[32,3],[32,16],[65,208,0],[68,0,0,0,0,0,0,0,0],[65,1],[16, ...builtin('__Porffor_promise_newReaction')],[26],[33,17],[32,4],[32,5],[32,16],[65,208,0],[68,0,0,0,0,0,0,0,0],[65,1],[16, ...builtin('__Porffor_promise_newReaction')],[26],[33,18],[32,10],[68,0,0,0,0,0,0,0,0],[97],[4,64],[32,9],[33,11],[68,0,0,0,0,0,0,0,64],[34,12],[252,3],[65,9],[108],[32,11],[252,3],[106],[34,13],[43,0,4],[32,13],[45,0,12],[26],[34,19],[65,208,0],[32,17],[65,208,0],[16, ...builtin('__Porffor_fastPush')],[33,6],[26],[32,9],[33,11],[68,0,0,0,0,0,0,8,64],[34,12],[252,3],[65,9],[108],[32,11],[252,3],[106],[34,13],[43,0,4],[32,13],[45,0,12],[26],[34,20],[65,208,0],[32,18],[65,208,0],[16, ...builtin('__Porffor_fastPush')],[33,6],[26],[5],[32,10],[68,0,0,0,0,0,0,240,63],[97],[4,64],[32,9],[33,11],[68,0,0,0,0,0,0,0,0],[34,12],[252,3],[65,9],[108],[32,11],[252,3],[106],[34,13],[43,0,4],[32,13],[45,0,12],[33,22],[33,21],[32,17],[65,208,0],[32,21],[32,22],[16, ...builtin('__ecma262_NewPromiseReactionJob')],[34,6],[16, ...builtin('__ecma262_HostEnqueuePromiseJob')],[33,6],[26],[5],[32,9],[33,11],[68,0,0,0,0,0,0,0,0],[34,12],[252,3],[65,9],[108],[32,11],[252,3],[106],[34,13],[43,0,4],[32,13],[45,0,12],[33,24],[33,23],[32,18],[65,208,0],[32,23],[32,24],[16, ...builtin('__ecma262_NewPromiseReactionJob')],[34,6],[16, ...builtin('__ecma262_HostEnqueuePromiseJob')],[33,6],[26],[11],[11],[32,16],[34,25],[65,36],[15]],
|
1961
1967
|
params: [124,127,124,127,124,127], typedParams: 1,
|
1962
1968
|
returns: [124,127], typedReturns: 1,
|
1963
|
-
locals: [127,124,127,124,124,124,124,127,127,127,124,124,124,
|
1969
|
+
locals: [127,124,127,124,124,124,124,127,127,127,124,124,124,124,124,124,127,124,127,124], localNames: ["_this","_this#type","onFulfilled","onFulfilled#type","onRejected","onRejected#type","#last_type","#logicinner_tmp","#typeswitch_tmp","promise","state","#member_obj","#member_prop","#loadArray_offset","#member_allocd","#swap","outPromise","fulfillReaction","rejectReaction","fulfillReactions","rejectReactions","value","value#type","reason","reason#type","pro"],
|
1970
|
+
};
|
1971
|
+
this.__Promise_prototype_catch = {
|
1972
|
+
wasm: (scope, {builtin}) => [[32,0],[32,1],[68,0,0,0,0,0,0,0,0],[65,128,1],[32,2],[32,3],[16, ...builtin('__Promise_prototype_then')],[34,4],[15]],
|
1973
|
+
params: [124,127,124,127], typedParams: 1,
|
1974
|
+
returns: [124,127], typedReturns: 1,
|
1975
|
+
locals: [127], localNames: ["_this","_this#type","onRejected","onRejected#type","#last_type"],
|
1976
|
+
};
|
1977
|
+
this.__Promise_prototype_finally = {
|
1978
|
+
wasm: (scope, {builtin,internalThrow}) => [[32,0],[32,1],[16, ...builtin('__ecma262_IsPromise')],[33,4],[33,5],[32,4],[33,6],[2,124],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[69],[184],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[69],[184],[12,1],[11],[32,5],[68,0,0,0,0,0,0,0,0],[97],[184],[11,"TYPESWITCH_end"],[252,3],[4,64],...internalThrow(scope, 'TypeError', `Promise.prototype.then called on non-Promise`),[11],[32,2],[32,3],[16, ...builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,24,64],[98],[4,64],[68,...builtin('__Porffor_promise_noop', true, true)],[34,2],[65,6],[33,3],[26],[11],[32,0],[34,7],[33,9],[68,0,0,0,0,0,0,240,63],[34,10],[252,3],[65,9],[108],[32,9],[252,3],[106],[34,11],[43,0,4],[32,11],[45,0,12],[26],[33,8],[16, ...builtin('__Porffor_promise_create')],[26],[33,14],[32,2],[32,3],[32,14],[65,208,0],[68,0,0,0,0,0,0,240,63],[65,1],[16, ...builtin('__Porffor_promise_newReaction')],[26],[33,15],[32,8],[68,0,0,0,0,0,0,0,0],[97],[4,64],[32,7],[33,9],[68,0,0,0,0,0,0,0,64],[34,10],[252,3],[65,9],[108],[32,9],[252,3],[106],[34,11],[43,0,4],[32,11],[45,0,12],[26],[34,16],[65,208,0],[32,15],[65,208,0],[16, ...builtin('__Porffor_fastPush')],[33,4],[26],[32,7],[33,9],[68,0,0,0,0,0,0,8,64],[34,10],[252,3],[65,9],[108],[32,9],[252,3],[106],[34,11],[43,0,4],[32,11],[45,0,12],[26],[34,17],[65,208,0],[32,15],[65,208,0],[16, ...builtin('__Porffor_fastPush')],[33,4],[26],[5],[32,7],[33,9],[68,0,0,0,0,0,0,0,0],[34,10],[252,3],[65,9],[108],[32,9],[252,3],[106],[34,11],[43,0,4],[32,11],[45,0,12],[33,19],[33,18],[32,15],[65,208,0],[32,18],[32,19],[16, ...builtin('__ecma262_NewPromiseReactionJob')],[34,4],[16, ...builtin('__ecma262_HostEnqueuePromiseJob')],[33,4],[26],[11],[32,14],[34,20],[65,36],[15]],
|
1979
|
+
params: [124,127,124,127], typedParams: 1,
|
1980
|
+
returns: [124,127], typedReturns: 1,
|
1981
|
+
locals: [127,124,127,124,124,124,124,127,127,127,124,124,124,124,124,127,124], localNames: ["_this","_this#type","onFinally","onFinally#type","#last_type","#logicinner_tmp","#typeswitch_tmp","promise","state","#member_obj","#member_prop","#loadArray_offset","#member_allocd","#swap","outPromise","finallyReaction","fulfillReactions","rejectReactions","value","value#type","pro"],
|
1964
1982
|
};
|
1965
1983
|
this.__Promise_prototype_toString = {
|
1966
1984
|
wasm: (scope, {allocPage}) => [...number(allocPage(scope, 'bytestring: __Promise_prototype_toString/str', 'i8') * pageSize, 124),[34,2],[65,195,1],[15]],
|
package/package.json
CHANGED