porffor 0.60.13 → 0.60.14
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/date.ts +33 -44
- package/compiler/builtins_precompiled.js +36 -31
- package/compiler/codegen.js +7 -5
- package/foo.js +7 -1
- package/package.json +1 -1
- package/runtime/index.js +1 -1
@@ -1,5 +1,7 @@
|
|
1
1
|
import type {} from './porffor.d.ts';
|
2
2
|
|
3
|
+
export const __ecma262_Modulo = (x: number, y: number): number => x - Math.floor(x / y) * y;
|
4
|
+
|
3
5
|
// 21.4.1.3 Day (t)
|
4
6
|
// https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-day
|
5
7
|
// 1. Return 𝔽(floor(ℝ(t / msPerDay))).
|
@@ -8,20 +10,20 @@ export const __ecma262_Day = (t: number): number => Math.floor(t / 86400000);
|
|
8
10
|
// 21.4.1.4 TimeWithinDay (t)
|
9
11
|
// https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-day
|
10
12
|
// 1. Return 𝔽(ℝ(t) modulo ℝ(msPerDay)).
|
11
|
-
export const __ecma262_TimeWithinDay = (t: number): number => t
|
13
|
+
export const __ecma262_TimeWithinDay = (t: number): number => __ecma262_Modulo(t, 86400000);
|
12
14
|
|
13
15
|
// 21.4.1.5 DaysInYear (y)
|
14
16
|
// https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-daysinyear
|
15
17
|
export const __ecma262_DaysInYear = (y: number): number => {
|
16
18
|
// 1. Let ry be ℝ(y).
|
17
19
|
// 2. If (ry modulo 400) = 0, return 366𝔽.
|
18
|
-
if (y
|
20
|
+
if (__ecma262_Modulo(y, 400) == 0) return 366;
|
19
21
|
|
20
22
|
// 3. If (ry modulo 100) = 0, return 365𝔽.
|
21
|
-
if (y
|
23
|
+
if (__ecma262_Modulo(y, 100) == 0) return 365;
|
22
24
|
|
23
25
|
// 4. If (ry modulo 4) = 0, return 366𝔽.
|
24
|
-
if (y
|
26
|
+
if (__ecma262_Modulo(y, 4) == 0) return 366;
|
25
27
|
|
26
28
|
// 5. Return 365𝔽.
|
27
29
|
return 365;
|
@@ -158,27 +160,27 @@ export const __ecma262_DateFromTime = (t: number): number => {
|
|
158
160
|
// 21.4.1.13 WeekDay (t)
|
159
161
|
// https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-weekday
|
160
162
|
// 1. Return 𝔽(ℝ(Day(t) + 4𝔽) modulo 7).
|
161
|
-
export const __ecma262_WeekDay = (t: number): number => (__ecma262_Day(t) + 4
|
163
|
+
export const __ecma262_WeekDay = (t: number): number => __ecma262_Modulo(__ecma262_Day(t) + 4, 7);
|
162
164
|
|
163
165
|
// 21.4.1.14 HourFromTime (t)
|
164
166
|
// https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-hourfromtime
|
165
167
|
// 1. Return 𝔽(floor(ℝ(t / msPerHour)) modulo HoursPerDay).
|
166
|
-
export const __ecma262_HourFromTime = (t: number): number => Math.floor(t / 3600000)
|
168
|
+
export const __ecma262_HourFromTime = (t: number): number => __ecma262_Modulo(Math.floor(t / 3600000), 24);
|
167
169
|
|
168
170
|
// 21.4.1.15 MinFromTime (t)
|
169
171
|
// https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-minfromtime
|
170
172
|
// 1. Return 𝔽(floor(ℝ(t / msPerMinute)) modulo MinutesPerHour).
|
171
|
-
export const __ecma262_MinFromTime = (t: number): number => Math.floor(t / 60000)
|
173
|
+
export const __ecma262_MinFromTime = (t: number): number => __ecma262_Modulo(Math.floor(t / 60000), 60);
|
172
174
|
|
173
175
|
// 21.4.1.16 SecFromTime (t)
|
174
176
|
// https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-secfromtime
|
175
177
|
// 1. Return 𝔽(floor(ℝ(t / msPerSecond)) modulo SecondsPerMinute).
|
176
|
-
export const __ecma262_SecFromTime = (t: number): number => Math.floor(t / 1000)
|
178
|
+
export const __ecma262_SecFromTime = (t: number): number => __ecma262_Modulo(Math.floor(t / 1000), 60);
|
177
179
|
|
178
180
|
// 21.4.1.17 msFromTime (t)
|
179
181
|
// https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-msfromtime
|
180
182
|
// 1. Return 𝔽(ℝ(t) modulo ℝ(msPerSecond)).
|
181
|
-
export const __ecma262_msFromTime = (t: number): number => t
|
183
|
+
export const __ecma262_msFromTime = (t: number): number => __ecma262_Modulo(t, 1000);
|
182
184
|
|
183
185
|
// 21.4.1.25 LocalTime (t)
|
184
186
|
// https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-localtime
|
@@ -229,7 +231,7 @@ export const __ecma262_MakeDay = (year: number, month: number, date: number): nu
|
|
229
231
|
if (!Number.isFinite(ym)) return NaN;
|
230
232
|
|
231
233
|
// 7. Let mn be 𝔽(ℝ(m) modulo 12).
|
232
|
-
const mn: number = m
|
234
|
+
const mn: number = __ecma262_Modulo(m, 12);
|
233
235
|
|
234
236
|
// 8. Find a finite time value t such that YearFromTime(t) is ym, MonthFromTime(t) is mn, and DateFromTime(t) is 1𝔽;
|
235
237
|
// but if this is not possible (because some argument is out of range), return NaN.
|
@@ -946,11 +948,6 @@ export const __Date_prototype_setHours = (_this: any, hour: any, min: any, sec:
|
|
946
948
|
// 4. Let h be ? ToNumber(hour).
|
947
949
|
const h: number = ecma262.ToNumber(hour);
|
948
950
|
|
949
|
-
// we reorder the spec steps in this func for easier arg handling
|
950
|
-
|
951
|
-
// 8. If t is NaN, return NaN.
|
952
|
-
if (Number.isNaN(t)) return NaN;
|
953
|
-
|
954
951
|
// 9. Set t to LocalTime(t).
|
955
952
|
t = __ecma262_LocalTime(t);
|
956
953
|
|
@@ -972,6 +969,9 @@ export const __Date_prototype_setHours = (_this: any, hour: any, min: any, sec:
|
|
972
969
|
// 12. If ms is not present, let milli be msFromTime(t).
|
973
970
|
else milli = __ecma262_msFromTime(t);
|
974
971
|
|
972
|
+
// 8. If t is NaN, return NaN.
|
973
|
+
if (Number.isNaN(t)) return NaN;
|
974
|
+
|
975
975
|
// 13. Let date be MakeDate(Day(t), MakeTime(h, m, s, milli)).
|
976
976
|
const date: number = __ecma262_MakeDate(__ecma262_Day(t), __ecma262_MakeTime(h, m, s, milli));
|
977
977
|
|
@@ -1027,11 +1027,6 @@ export const __Date_prototype_setMinutes = (_this: any, min: any, sec: any, ms:
|
|
1027
1027
|
// 4. Let m be ? ToNumber(min).
|
1028
1028
|
const m: number = ecma262.ToNumber(min);
|
1029
1029
|
|
1030
|
-
// we reorder the spec steps in this func for easier arg handling
|
1031
|
-
|
1032
|
-
// 7. If t is NaN, return NaN.
|
1033
|
-
if (Number.isNaN(t)) return NaN;
|
1034
|
-
|
1035
1030
|
// 8. Set t to LocalTime(t).
|
1036
1031
|
t = __ecma262_LocalTime(t);
|
1037
1032
|
|
@@ -1047,6 +1042,9 @@ export const __Date_prototype_setMinutes = (_this: any, min: any, sec: any, ms:
|
|
1047
1042
|
// 10. If ms is not present, let milli be msFromTime(t).
|
1048
1043
|
else milli = __ecma262_msFromTime(t);
|
1049
1044
|
|
1045
|
+
// 7. If t is NaN, return NaN.
|
1046
|
+
if (Number.isNaN(t)) return NaN;
|
1047
|
+
|
1050
1048
|
// 11. Let date be MakeDate(Day(t), MakeTime(HourFromTime(t), m, s, milli)).
|
1051
1049
|
const date: number = __ecma262_MakeDate(__ecma262_Day(t), __ecma262_MakeTime(__ecma262_HourFromTime(t), m, s, milli));
|
1052
1050
|
|
@@ -1071,11 +1069,6 @@ export const __Date_prototype_setMonth = (_this: any, month: any, date: any) =>
|
|
1071
1069
|
// 4. Let m be ? ToNumber(month).
|
1072
1070
|
const m: number = ecma262.ToNumber(month);
|
1073
1071
|
|
1074
|
-
// we reorder the spec steps in this func for easier arg handling
|
1075
|
-
|
1076
|
-
// 6. If t is NaN, return NaN.
|
1077
|
-
if (Number.isNaN(t)) return NaN;
|
1078
|
-
|
1079
1072
|
// 7. Set t to LocalTime(t).
|
1080
1073
|
t = __ecma262_LocalTime(t);
|
1081
1074
|
|
@@ -1085,6 +1078,9 @@ export const __Date_prototype_setMonth = (_this: any, month: any, date: any) =>
|
|
1085
1078
|
// 8. If date is not present, let dt be DateFromTime(t).
|
1086
1079
|
else dt = __ecma262_DateFromTime(t);
|
1087
1080
|
|
1081
|
+
// 6. If t is NaN, return NaN.
|
1082
|
+
if (Number.isNaN(t)) return NaN;
|
1083
|
+
|
1088
1084
|
// 9. Let newDate be MakeDate(MakeDay(YearFromTime(t), m, dt), TimeWithinDay(t)).
|
1089
1085
|
const newDate: number = __ecma262_MakeDate(__ecma262_MakeDay(__ecma262_YearFromTime(t), m, dt), __ecma262_TimeWithinDay(t));
|
1090
1086
|
|
@@ -1109,10 +1105,6 @@ export const __Date_prototype_setSeconds = (_this: any, sec: any, ms: any) => {
|
|
1109
1105
|
// 4. Let s be ? ToNumber(sec).
|
1110
1106
|
const s: number = ecma262.ToNumber(sec);
|
1111
1107
|
|
1112
|
-
// we reorder the spec steps in this func for easier arg handling
|
1113
|
-
// 6. If t is NaN, return NaN.
|
1114
|
-
if (Number.isNaN(t)) return NaN;
|
1115
|
-
|
1116
1108
|
// 7. Set t to LocalTime(t).
|
1117
1109
|
t = __ecma262_LocalTime(t);
|
1118
1110
|
|
@@ -1122,6 +1114,9 @@ export const __Date_prototype_setSeconds = (_this: any, sec: any, ms: any) => {
|
|
1122
1114
|
// 8. If ms is not present, let milli be msFromTime(t).
|
1123
1115
|
else milli = __ecma262_msFromTime(t);
|
1124
1116
|
|
1117
|
+
// 6. If t is NaN, return NaN.
|
1118
|
+
if (Number.isNaN(t)) return NaN;
|
1119
|
+
|
1125
1120
|
// 9. Let date be MakeDate(Day(t), MakeTime(HourFromTime(t), MinFromTime(t), s, milli)).
|
1126
1121
|
const date: number = __ecma262_MakeDate(__ecma262_Day(t), __ecma262_MakeTime(__ecma262_HourFromTime(t), __ecma262_MinFromTime(t), s, milli));
|
1127
1122
|
|
@@ -1232,11 +1227,6 @@ export const __Date_prototype_setUTCHours = (_this: any, hour: any, min: any, se
|
|
1232
1227
|
// 4. Let h be ? ToNumber(hour).
|
1233
1228
|
const h: number = ecma262.ToNumber(hour);
|
1234
1229
|
|
1235
|
-
// we reorder the spec steps in this func for easier arg handling
|
1236
|
-
|
1237
|
-
// 8. If t is NaN, return NaN.
|
1238
|
-
if (Number.isNaN(t)) return NaN;
|
1239
|
-
|
1240
1230
|
// 5. If min is present, let m be ? ToNumber(min).
|
1241
1231
|
let m: number;
|
1242
1232
|
if (Porffor.type(min) != Porffor.TYPES.undefined) m = ecma262.ToNumber(min);
|
@@ -1255,6 +1245,9 @@ export const __Date_prototype_setUTCHours = (_this: any, hour: any, min: any, se
|
|
1255
1245
|
// 11. If ms is not present, let milli be msFromTime(t).
|
1256
1246
|
else milli = __ecma262_msFromTime(t);
|
1257
1247
|
|
1248
|
+
// 8. If t is NaN, return NaN.
|
1249
|
+
if (Number.isNaN(t)) return NaN;
|
1250
|
+
|
1258
1251
|
// 12. Let date be MakeDate(Day(t), MakeTime(h, m, s, milli)).
|
1259
1252
|
const date: number = __ecma262_MakeDate(__ecma262_Day(t), __ecma262_MakeTime(h, m, s, milli));
|
1260
1253
|
|
@@ -1307,11 +1300,6 @@ export const __Date_prototype_setUTCMinutes = (_this: any, min: any, sec: any, m
|
|
1307
1300
|
// 4. Let m be ? ToNumber(min).
|
1308
1301
|
const m: number = ecma262.ToNumber(min);
|
1309
1302
|
|
1310
|
-
// we reorder the spec steps in this func for easier arg handling
|
1311
|
-
|
1312
|
-
// 7. If t is NaN, return NaN.
|
1313
|
-
if (Number.isNaN(t)) return NaN;
|
1314
|
-
|
1315
1303
|
// 5. If sec is present, let s be ? ToNumber(sec).
|
1316
1304
|
let s: number;
|
1317
1305
|
if (Porffor.type(sec) != Porffor.TYPES.undefined) s = ecma262.ToNumber(sec);
|
@@ -1324,6 +1312,9 @@ export const __Date_prototype_setUTCMinutes = (_this: any, min: any, sec: any, m
|
|
1324
1312
|
// 9. If ms is not present, let milli be msFromTime(t).
|
1325
1313
|
else milli = __ecma262_msFromTime(t);
|
1326
1314
|
|
1315
|
+
// 7. If t is NaN, return NaN.
|
1316
|
+
if (Number.isNaN(t)) return NaN;
|
1317
|
+
|
1327
1318
|
// 10. Let date be MakeDate(Day(t), MakeTime(HourFromTime(t), m, s, milli)).
|
1328
1319
|
const date: number = __ecma262_MakeDate(__ecma262_Day(t), __ecma262_MakeTime(__ecma262_HourFromTime(t), m, s, milli));
|
1329
1320
|
|
@@ -1348,17 +1339,15 @@ export const __Date_prototype_setUTCMonth = (_this: any, month: any, date: any)
|
|
1348
1339
|
// 4. Let m be ? ToNumber(month).
|
1349
1340
|
const m: number = ecma262.ToNumber(month);
|
1350
1341
|
|
1351
|
-
// we reorder the spec steps in this func for easier arg handling
|
1352
|
-
|
1353
|
-
// 6. If t is NaN, return NaN.
|
1354
|
-
if (Number.isNaN(t)) return NaN;
|
1355
|
-
|
1356
1342
|
// 5. If date is present, let dt be ? ToNumber(date).
|
1357
1343
|
let dt: number;
|
1358
1344
|
if (Porffor.type(date) != Porffor.TYPES.undefined) dt = ecma262.ToNumber(date);
|
1359
1345
|
// 7. If date is not present, let dt be DateFromTime(t).
|
1360
1346
|
else dt = __ecma262_DateFromTime(t);
|
1361
1347
|
|
1348
|
+
// 6. If t is NaN, return NaN.
|
1349
|
+
if (Number.isNaN(t)) return NaN;
|
1350
|
+
|
1362
1351
|
// 8. Let newDate be MakeDate(MakeDay(YearFromTime(t), m, dt), TimeWithinDay(t)).
|
1363
1352
|
const newDate: number = __ecma262_MakeDate(__ecma262_MakeDay(__ecma262_YearFromTime(t), m, dt), __ecma262_TimeWithinDay(t));
|
1364
1353
|
|
@@ -1183,20 +1183,25 @@ params:[124,127,124,127,124,127,124,127],typedParams:1,returns:[124,127],jsLengt
|
|
1183
1183
|
locals:[124,127],localNames:["_this","_this#type","byteOffset","byteOffset#type","value","value#type","littleEndian","littleEndian#type","int","#last_type"],
|
1184
1184
|
usesTag:1
|
1185
1185
|
}
|
1186
|
+
x.__ecma262_Modulo={
|
1187
|
+
wasm:(_,{builtin})=>eval("[[32,0],[32,0],[32,2],[163],[16,builtin('__Math_floor')],[32,2],[162],[161],[15]]"),
|
1188
|
+
params:[124,127,124,127],typedParams:1,returns:[124],returnType:1,jsLength:2,
|
1189
|
+
locals:[],localNames:["x","x#type","y","y#type"]
|
1190
|
+
}
|
1186
1191
|
x.__ecma262_Day={
|
1187
1192
|
wasm:(_,{builtin})=>eval("[[32,0],[68,86400000],[163],[16,builtin('__Math_floor')],[15]]"),
|
1188
1193
|
params:[124,127],typedParams:1,returns:[124],returnType:1,jsLength:1,
|
1189
1194
|
locals:[],localNames:["t","t#type"]
|
1190
1195
|
}
|
1191
1196
|
x.__ecma262_TimeWithinDay={
|
1192
|
-
wasm:()=>eval("[[32,0],[
|
1197
|
+
wasm:(_,{builtin})=>eval("[[32,0],[65,1],[68,86400000],[65,1],[16,builtin('__ecma262_Modulo')],[15]]"),
|
1193
1198
|
params:[124,127],typedParams:1,returns:[124],returnType:1,jsLength:1,
|
1194
|
-
locals:[
|
1199
|
+
locals:[],localNames:["t","t#type"]
|
1195
1200
|
}
|
1196
1201
|
x.__ecma262_DaysInYear={
|
1197
|
-
wasm:()=>eval("[[32,0],[
|
1202
|
+
wasm:(_,{builtin})=>eval("[[32,0],[65,1],[68,400],[65,1],[16,builtin('__ecma262_Modulo')],[68,0],[97],[4,64],[68,366],[15],[26],[11],[32,0],[65,1],[68,100],[65,1],[16,builtin('__ecma262_Modulo')],[68,0],[97],[4,64],[68,365],[15],[26],[11],[32,0],[65,1],[68,4],[65,1],[16,builtin('__ecma262_Modulo')],[68,0],[97],[4,64],[68,366],[15],[26],[11],[68,365],[15]]"),
|
1198
1203
|
params:[124,127],typedParams:1,returns:[124],returnType:1,jsLength:1,
|
1199
|
-
locals:[
|
1204
|
+
locals:[],localNames:["y","y#type"]
|
1200
1205
|
}
|
1201
1206
|
x.__ecma262_DayFromYear={
|
1202
1207
|
wasm:(_,{builtin})=>eval("[[68,365],[32,0],[68,1970],[161],[162],[32,0],[68,1969],[161],[68,4],[163],[16,builtin('__Math_floor')],[160],[32,0],[68,1901],[161],[68,100],[163],[16,builtin('__Math_floor')],[161],[32,0],[68,1601],[161],[68,400],[163],[16,builtin('__Math_floor')],[160],[15]]"),
|
@@ -1234,29 +1239,29 @@ params:[124,127],typedParams:1,returns:[124],returnType:1,jsLength:1,
|
|
1234
1239
|
locals:[124,124,124],localNames:["t","t#type","inLeapYear","dayWithinYear","month"]
|
1235
1240
|
}
|
1236
1241
|
x.__ecma262_WeekDay={
|
1237
|
-
wasm:(_,{builtin})=>eval("[[32,0],[65,1],[16,builtin('__ecma262_Day')],[68,4],[160],[
|
1242
|
+
wasm:(_,{builtin})=>eval("[[32,0],[65,1],[16,builtin('__ecma262_Day')],[68,4],[160],[65,1],[68,7],[65,1],[16,builtin('__ecma262_Modulo')],[15]]"),
|
1238
1243
|
params:[124,127],typedParams:1,returns:[124],returnType:1,jsLength:1,
|
1239
|
-
locals:[
|
1244
|
+
locals:[],localNames:["t","t#type"]
|
1240
1245
|
}
|
1241
1246
|
x.__ecma262_HourFromTime={
|
1242
|
-
wasm:(_,{builtin})=>eval("[[32,0],[68,3600000],[163],[16,builtin('__Math_floor')],[
|
1247
|
+
wasm:(_,{builtin})=>eval("[[32,0],[68,3600000],[163],[16,builtin('__Math_floor')],[65,1],[68,24],[65,1],[16,builtin('__ecma262_Modulo')],[15]]"),
|
1243
1248
|
params:[124,127],typedParams:1,returns:[124],returnType:1,jsLength:1,
|
1244
|
-
locals:[
|
1249
|
+
locals:[],localNames:["t","t#type"]
|
1245
1250
|
}
|
1246
1251
|
x.__ecma262_MinFromTime={
|
1247
|
-
wasm:(_,{builtin})=>eval("[[32,0],[68,60000],[163],[16,builtin('__Math_floor')],[
|
1252
|
+
wasm:(_,{builtin})=>eval("[[32,0],[68,60000],[163],[16,builtin('__Math_floor')],[65,1],[68,60],[65,1],[16,builtin('__ecma262_Modulo')],[15]]"),
|
1248
1253
|
params:[124,127],typedParams:1,returns:[124],returnType:1,jsLength:1,
|
1249
|
-
locals:[
|
1254
|
+
locals:[],localNames:["t","t#type"]
|
1250
1255
|
}
|
1251
1256
|
x.__ecma262_SecFromTime={
|
1252
|
-
wasm:(_,{builtin})=>eval("[[32,0],[68,1000],[163],[16,builtin('__Math_floor')],[
|
1257
|
+
wasm:(_,{builtin})=>eval("[[32,0],[68,1000],[163],[16,builtin('__Math_floor')],[65,1],[68,60],[65,1],[16,builtin('__ecma262_Modulo')],[15]]"),
|
1253
1258
|
params:[124,127],typedParams:1,returns:[124],returnType:1,jsLength:1,
|
1254
|
-
locals:[
|
1259
|
+
locals:[],localNames:["t","t#type"]
|
1255
1260
|
}
|
1256
1261
|
x.__ecma262_msFromTime={
|
1257
|
-
wasm:()=>eval("[[32,0],[
|
1262
|
+
wasm:(_,{builtin})=>eval("[[32,0],[65,1],[68,1000],[65,1],[16,builtin('__ecma262_Modulo')],[15]]"),
|
1258
1263
|
params:[124,127],typedParams:1,returns:[124],returnType:1,jsLength:1,
|
1259
|
-
locals:[
|
1264
|
+
locals:[],localNames:["t","t#type"]
|
1260
1265
|
}
|
1261
1266
|
x.__ecma262_LocalTime={
|
1262
1267
|
wasm:()=>eval("[[32,0],[15]]"),
|
@@ -1274,9 +1279,9 @@ params:[124,127,124,127,124,127,124,127],typedParams:1,returns:[124],returnType:
|
|
1274
1279
|
locals:[],localNames:["hour","hour#type","min","min#type","sec","sec#type","ms","ms#type"]
|
1275
1280
|
}
|
1276
1281
|
x.__ecma262_MakeDay={
|
1277
|
-
wasm:(_,{builtin})=>eval("[[32,0],[16,builtin('__Number_isFinite')],[68,0],[97],[32,2],[16,builtin('__Number_isFinite')],[68,0],[97],[114],[32,4],[16,builtin('__Number_isFinite')],[68,0],[97],[114],[4,64],[68,\"NaN\"],[15],[26],[11],[32,0],[65,1],[16,builtin('__ecma262_ToIntegerOrInfinity')],[33,6],[32,2],[65,1],[16,builtin('__ecma262_ToIntegerOrInfinity')],[33,7],[32,4],[65,1],[16,builtin('__ecma262_ToIntegerOrInfinity')],[33,8],[32,6],[32,7],[68,12],[163],[16,builtin('__Math_floor')],[160],[34,9],[16,builtin('__Number_isFinite')],[68,0],[97],[4,64],[68,\"NaN\"],[15],[26],[11],[32,7],[
|
1282
|
+
wasm:(_,{builtin})=>eval("[[32,0],[16,builtin('__Number_isFinite')],[68,0],[97],[32,2],[16,builtin('__Number_isFinite')],[68,0],[97],[114],[32,4],[16,builtin('__Number_isFinite')],[68,0],[97],[114],[4,64],[68,\"NaN\"],[15],[26],[11],[32,0],[65,1],[16,builtin('__ecma262_ToIntegerOrInfinity')],[33,6],[32,2],[65,1],[16,builtin('__ecma262_ToIntegerOrInfinity')],[33,7],[32,4],[65,1],[16,builtin('__ecma262_ToIntegerOrInfinity')],[33,8],[32,6],[32,7],[68,12],[163],[16,builtin('__Math_floor')],[160],[34,9],[16,builtin('__Number_isFinite')],[68,0],[97],[4,64],[68,\"NaN\"],[15],[26],[11],[32,7],[65,1],[68,12],[65,1],[16,builtin('__ecma262_Modulo')],[34,10],[68,1],[101],[4,64],[32,9],[68,1],[161],[33,9],[11],[32,9],[68,0],[102],[4,124],[32,9],[65,1],[33,12],[5],[32,9],[68,399],[161],[65,1],[33,12],[11],[68,400],[163],[16,builtin('__Math_trunc')],[33,11],[32,9],[32,11],[68,400],[162],[161],[33,13],[68,153],[32,10],[32,10],[68,1],[100],[4,124],[68,-2],[65,1],[33,12],[5],[68,10],[65,1],[33,12],[11],[160],[162],[68,2],[160],[68,5],[163],[16,builtin('__Math_trunc')],[33,14],[32,13],[68,365],[162],[32,13],[68,4],[163],[16,builtin('__Math_trunc')],[160],[32,13],[68,100],[163],[16,builtin('__Math_trunc')],[161],[32,14],[160],[33,15],[32,11],[68,146097],[162],[32,15],[160],[68,719468],[161],[34,16],[32,8],[160],[68,1],[161],[15]]"),
|
1278
1283
|
params:[124,127,124,127,124,127],typedParams:1,returns:[124],returnType:1,jsLength:3,
|
1279
|
-
locals:[124,124,124,124,124,124,
|
1284
|
+
locals:[124,124,124,124,124,124,127,124,124,124,124],localNames:["year","year#type","month","month#type","date","date#type","y","m","dt","ym","mn","era","#last_type","yoe","doy","doe","day"]
|
1280
1285
|
}
|
1281
1286
|
x.__ecma262_MakeDate={
|
1282
1287
|
wasm:(_,{builtin})=>eval("[[32,0],[16,builtin('__Number_isFinite')],[68,0],[97],[32,2],[16,builtin('__Number_isFinite')],[68,0],[97],[114],[4,64],[68,\"NaN\"],[15],[26],[11],[32,0],[68,86400000],[162],[32,2],[160],[34,4],[16,builtin('__Number_isFinite')],[68,0],[97],[4,64],[68,\"NaN\"],[15],[26],[11],[32,4],[15]]"),
|
@@ -1447,7 +1452,7 @@ params:[124,127,124,127,124,127,124,127],typedParams:1,returns:[124,127],jsLengt
|
|
1447
1452
|
locals:[124,124,124,124,124,124,127],localNames:["_this","_this#type","year","year#type","month","month#type","date","date#type","t","y","m","dt","newDate","u","#last_type"]
|
1448
1453
|
}
|
1449
1454
|
x.__Date_prototype_setHours={
|
1450
|
-
wasm:(_,{builtin})=>eval("[[32,0],[32,1],[16,builtin('__Porffor_date_read')],[33,10],[32,2],[32,3],[16,builtin('__ecma262_ToNumber')],[33,11],[32,10],[
|
1455
|
+
wasm:(_,{builtin})=>eval("[[32,0],[32,1],[16,builtin('__Porffor_date_read')],[33,10],[32,2],[32,3],[16,builtin('__ecma262_ToNumber')],[33,11],[32,10],[65,1],[16,builtin('__ecma262_LocalTime')],[33,10],[32,5],[184],[68,0],[98],[4,64],[32,4],[32,5],[16,builtin('__ecma262_ToNumber')],[33,12],[5],[32,10],[65,1],[16,builtin('__ecma262_MinFromTime')],[33,12],[11],[32,7],[184],[68,0],[98],[4,64],[32,6],[32,7],[16,builtin('__ecma262_ToNumber')],[33,13],[5],[32,10],[65,1],[16,builtin('__ecma262_SecFromTime')],[33,13],[11],[32,9],[184],[68,0],[98],[4,64],[32,8],[32,9],[16,builtin('__ecma262_ToNumber')],[33,14],[5],[32,10],[65,1],[16,builtin('__ecma262_msFromTime')],[33,14],[11],[32,10],[16,builtin('__Number_isNaN')],[252,3],[4,64],[68,\"NaN\"],[65,1],[15],[26],[11],[32,10],[65,1],[16,builtin('__ecma262_Day')],[65,1],[32,11],[65,1],[32,12],[65,1],[32,13],[65,1],[32,14],[65,1],[16,builtin('__ecma262_MakeTime')],[65,1],[16,builtin('__ecma262_MakeDate')],[34,15],[65,1],[16,builtin('__ecma262_UTC')],[65,1],[16,builtin('__ecma262_TimeClip')],[33,16],[32,0],[32,1],[32,16],[65,1],[16,builtin('__Porffor_date_write')],[26],[26],[32,16],[65,1],[15]]"),
|
1451
1456
|
params:[124,127,124,127,124,127,124,127,124,127],typedParams:1,returns:[124,127],jsLength:4,
|
1452
1457
|
locals:[124,124,124,124,124,124,124,127],localNames:["_this","_this#type","hour","hour#type","min","min#type","sec","sec#type","ms","ms#type","t","h","m","s","milli","date","u","#last_type"]
|
1453
1458
|
}
|
@@ -1457,17 +1462,17 @@ params:[124,127,124,127],typedParams:1,returns:[124,127],jsLength:1,
|
|
1457
1462
|
locals:[124,124,124,124,127],localNames:["_this","_this#type","ms","ms#type","t","milli","time","u","#last_type"]
|
1458
1463
|
}
|
1459
1464
|
x.__Date_prototype_setMinutes={
|
1460
|
-
wasm:(_,{builtin})=>eval("[[32,0],[32,1],[16,builtin('__Porffor_date_read')],[33,8],[32,2],[32,3],[16,builtin('__ecma262_ToNumber')],[33,9],[32,8],[
|
1465
|
+
wasm:(_,{builtin})=>eval("[[32,0],[32,1],[16,builtin('__Porffor_date_read')],[33,8],[32,2],[32,3],[16,builtin('__ecma262_ToNumber')],[33,9],[32,8],[65,1],[16,builtin('__ecma262_LocalTime')],[33,8],[32,5],[184],[68,0],[98],[4,64],[32,4],[32,5],[16,builtin('__ecma262_ToNumber')],[33,10],[5],[32,8],[65,1],[16,builtin('__ecma262_SecFromTime')],[33,10],[11],[32,7],[184],[68,0],[98],[4,64],[32,6],[32,7],[16,builtin('__ecma262_ToNumber')],[33,11],[5],[32,8],[65,1],[16,builtin('__ecma262_msFromTime')],[33,11],[11],[32,8],[16,builtin('__Number_isNaN')],[252,3],[4,64],[68,\"NaN\"],[65,1],[15],[26],[11],[32,8],[65,1],[16,builtin('__ecma262_Day')],[65,1],[32,8],[65,1],[16,builtin('__ecma262_HourFromTime')],[65,1],[32,9],[65,1],[32,10],[65,1],[32,11],[65,1],[16,builtin('__ecma262_MakeTime')],[65,1],[16,builtin('__ecma262_MakeDate')],[34,12],[65,1],[16,builtin('__ecma262_UTC')],[65,1],[16,builtin('__ecma262_TimeClip')],[33,13],[32,0],[32,1],[32,13],[65,1],[16,builtin('__Porffor_date_write')],[26],[26],[32,13],[65,1],[15]]"),
|
1461
1466
|
params:[124,127,124,127,124,127,124,127],typedParams:1,returns:[124,127],jsLength:3,
|
1462
1467
|
locals:[124,124,124,124,124,124,127],localNames:["_this","_this#type","min","min#type","sec","sec#type","ms","ms#type","t","m","s","milli","date","u","#last_type"]
|
1463
1468
|
}
|
1464
1469
|
x.__Date_prototype_setMonth={
|
1465
|
-
wasm:(_,{builtin})=>eval("[[32,0],[32,1],[16,builtin('__Porffor_date_read')],[33,6],[32,2],[32,3],[16,builtin('__ecma262_ToNumber')],[33,7],[32,6],[16,builtin('
|
1470
|
+
wasm:(_,{builtin})=>eval("[[32,0],[32,1],[16,builtin('__Porffor_date_read')],[33,6],[32,2],[32,3],[16,builtin('__ecma262_ToNumber')],[33,7],[32,6],[65,1],[16,builtin('__ecma262_LocalTime')],[33,6],[32,5],[184],[68,0],[98],[4,64],[32,4],[32,5],[16,builtin('__ecma262_ToNumber')],[33,8],[5],[32,6],[65,1],[16,builtin('__ecma262_DateFromTime')],[33,8],[11],[32,6],[16,builtin('__Number_isNaN')],[252,3],[4,64],[68,\"NaN\"],[65,1],[15],[26],[11],[32,6],[65,1],[16,builtin('__ecma262_YearFromTime')],[65,1],[32,7],[65,1],[32,8],[65,1],[16,builtin('__ecma262_MakeDay')],[65,1],[32,6],[65,1],[16,builtin('__ecma262_TimeWithinDay')],[65,1],[16,builtin('__ecma262_MakeDate')],[34,9],[65,1],[16,builtin('__ecma262_UTC')],[65,1],[16,builtin('__ecma262_TimeClip')],[33,10],[32,0],[32,1],[32,10],[65,1],[16,builtin('__Porffor_date_write')],[26],[26],[32,10],[65,1],[15]]"),
|
1466
1471
|
params:[124,127,124,127,124,127],typedParams:1,returns:[124,127],jsLength:2,
|
1467
1472
|
locals:[124,124,124,124,124,127],localNames:["_this","_this#type","month","month#type","date","date#type","t","m","dt","newDate","u","#last_type"]
|
1468
1473
|
}
|
1469
1474
|
x.__Date_prototype_setSeconds={
|
1470
|
-
wasm:(_,{builtin})=>eval("[[32,0],[32,1],[16,builtin('__Porffor_date_read')],[33,6],[32,2],[32,3],[16,builtin('__ecma262_ToNumber')],[33,7],[32,6],[16,builtin('
|
1475
|
+
wasm:(_,{builtin})=>eval("[[32,0],[32,1],[16,builtin('__Porffor_date_read')],[33,6],[32,2],[32,3],[16,builtin('__ecma262_ToNumber')],[33,7],[32,6],[65,1],[16,builtin('__ecma262_LocalTime')],[33,6],[32,5],[184],[68,0],[98],[4,64],[32,4],[32,5],[16,builtin('__ecma262_ToNumber')],[33,8],[5],[32,6],[65,1],[16,builtin('__ecma262_msFromTime')],[33,8],[11],[32,6],[16,builtin('__Number_isNaN')],[252,3],[4,64],[68,\"NaN\"],[65,1],[15],[26],[11],[32,6],[65,1],[16,builtin('__ecma262_Day')],[65,1],[32,6],[65,1],[16,builtin('__ecma262_HourFromTime')],[65,1],[32,6],[65,1],[16,builtin('__ecma262_MinFromTime')],[65,1],[32,7],[65,1],[32,8],[65,1],[16,builtin('__ecma262_MakeTime')],[65,1],[16,builtin('__ecma262_MakeDate')],[34,9],[65,1],[16,builtin('__ecma262_UTC')],[65,1],[16,builtin('__ecma262_TimeClip')],[33,10],[32,0],[32,1],[32,10],[65,1],[16,builtin('__Porffor_date_write')],[26],[26],[32,10],[65,1],[15]]"),
|
1471
1476
|
params:[124,127,124,127,124,127],typedParams:1,returns:[124,127],jsLength:2,
|
1472
1477
|
locals:[124,124,124,124,124,127],localNames:["_this","_this#type","sec","sec#type","ms","ms#type","t","s","milli","date","u","#last_type"]
|
1473
1478
|
}
|
@@ -1488,7 +1493,7 @@ params:[124,127,124,127,124,127,124,127],typedParams:1,returns:[124,127],jsLengt
|
|
1488
1493
|
locals:[124,124,124,124,124,124,127],localNames:["_this","_this#type","year","year#type","month","month#type","date","date#type","t","y","m","dt","newDate","v","#last_type"]
|
1489
1494
|
}
|
1490
1495
|
x.__Date_prototype_setUTCHours={
|
1491
|
-
wasm:(_,{builtin})=>eval("[[32,0],[32,1],[16,builtin('__Porffor_date_read')],[33,10],[32,2],[32,3],[16,builtin('__ecma262_ToNumber')],[33,11],[32,
|
1496
|
+
wasm:(_,{builtin})=>eval("[[32,0],[32,1],[16,builtin('__Porffor_date_read')],[33,10],[32,2],[32,3],[16,builtin('__ecma262_ToNumber')],[33,11],[32,5],[184],[68,0],[98],[4,64],[32,4],[32,5],[16,builtin('__ecma262_ToNumber')],[33,12],[5],[32,10],[65,1],[16,builtin('__ecma262_MinFromTime')],[33,12],[11],[32,7],[184],[68,0],[98],[4,64],[32,6],[32,7],[16,builtin('__ecma262_ToNumber')],[33,13],[5],[32,10],[65,1],[16,builtin('__ecma262_SecFromTime')],[33,13],[11],[32,9],[184],[68,0],[98],[4,64],[32,8],[32,9],[16,builtin('__ecma262_ToNumber')],[33,14],[5],[32,10],[65,1],[16,builtin('__ecma262_msFromTime')],[33,14],[11],[32,10],[16,builtin('__Number_isNaN')],[252,3],[4,64],[68,\"NaN\"],[65,1],[15],[26],[11],[32,10],[65,1],[16,builtin('__ecma262_Day')],[65,1],[32,11],[65,1],[32,12],[65,1],[32,13],[65,1],[32,14],[65,1],[16,builtin('__ecma262_MakeTime')],[65,1],[16,builtin('__ecma262_MakeDate')],[34,15],[65,1],[16,builtin('__ecma262_TimeClip')],[33,16],[32,0],[32,1],[32,16],[65,1],[16,builtin('__Porffor_date_write')],[26],[26],[32,16],[65,1],[15]]"),
|
1492
1497
|
params:[124,127,124,127,124,127,124,127,124,127],typedParams:1,returns:[124,127],jsLength:4,
|
1493
1498
|
locals:[124,124,124,124,124,124,124,127],localNames:["_this","_this#type","hour","hour#type","min","min#type","sec","sec#type","ms","ms#type","t","h","m","s","milli","date","v","#last_type"]
|
1494
1499
|
}
|
@@ -1498,12 +1503,12 @@ params:[124,127,124,127],typedParams:1,returns:[124,127],jsLength:1,
|
|
1498
1503
|
locals:[124,124,124,124,127],localNames:["_this","_this#type","ms","ms#type","t","milli","time","v","#last_type"]
|
1499
1504
|
}
|
1500
1505
|
x.__Date_prototype_setUTCMinutes={
|
1501
|
-
wasm:(_,{builtin})=>eval("[[32,0],[32,1],[16,builtin('__Porffor_date_read')],[33,8],[32,2],[32,3],[16,builtin('__ecma262_ToNumber')],[33,9],[32,
|
1506
|
+
wasm:(_,{builtin})=>eval("[[32,0],[32,1],[16,builtin('__Porffor_date_read')],[33,8],[32,2],[32,3],[16,builtin('__ecma262_ToNumber')],[33,9],[32,5],[184],[68,0],[98],[4,64],[32,4],[32,5],[16,builtin('__ecma262_ToNumber')],[33,10],[5],[32,8],[65,1],[16,builtin('__ecma262_SecFromTime')],[33,10],[11],[32,7],[184],[68,0],[98],[4,64],[32,6],[32,7],[16,builtin('__ecma262_ToNumber')],[33,11],[5],[32,8],[65,1],[16,builtin('__ecma262_msFromTime')],[33,11],[11],[32,8],[16,builtin('__Number_isNaN')],[252,3],[4,64],[68,\"NaN\"],[65,1],[15],[26],[11],[32,8],[65,1],[16,builtin('__ecma262_Day')],[65,1],[32,8],[65,1],[16,builtin('__ecma262_HourFromTime')],[65,1],[32,9],[65,1],[32,10],[65,1],[32,11],[65,1],[16,builtin('__ecma262_MakeTime')],[65,1],[16,builtin('__ecma262_MakeDate')],[34,12],[65,1],[16,builtin('__ecma262_TimeClip')],[33,13],[32,0],[32,1],[32,13],[65,1],[16,builtin('__Porffor_date_write')],[26],[26],[32,13],[65,1],[15]]"),
|
1502
1507
|
params:[124,127,124,127,124,127,124,127],typedParams:1,returns:[124,127],jsLength:3,
|
1503
1508
|
locals:[124,124,124,124,124,124,127],localNames:["_this","_this#type","min","min#type","sec","sec#type","ms","ms#type","t","m","s","milli","date","v","#last_type"]
|
1504
1509
|
}
|
1505
1510
|
x.__Date_prototype_setUTCMonth={
|
1506
|
-
wasm:(_,{builtin})=>eval("[[32,0],[32,1],[16,builtin('__Porffor_date_read')],[33,6],[32,2],[32,3],[16,builtin('__ecma262_ToNumber')],[33,7],[32,
|
1511
|
+
wasm:(_,{builtin})=>eval("[[32,0],[32,1],[16,builtin('__Porffor_date_read')],[33,6],[32,2],[32,3],[16,builtin('__ecma262_ToNumber')],[33,7],[32,5],[184],[68,0],[98],[4,64],[32,4],[32,5],[16,builtin('__ecma262_ToNumber')],[33,8],[5],[32,6],[65,1],[16,builtin('__ecma262_DateFromTime')],[33,8],[11],[32,6],[16,builtin('__Number_isNaN')],[252,3],[4,64],[68,\"NaN\"],[65,1],[15],[26],[11],[32,6],[65,1],[16,builtin('__ecma262_YearFromTime')],[65,1],[32,7],[65,1],[32,8],[65,1],[16,builtin('__ecma262_MakeDay')],[65,1],[32,6],[65,1],[16,builtin('__ecma262_TimeWithinDay')],[65,1],[16,builtin('__ecma262_MakeDate')],[34,9],[65,1],[16,builtin('__ecma262_TimeClip')],[33,10],[32,0],[32,1],[32,10],[65,1],[16,builtin('__Porffor_date_write')],[26],[26],[32,10],[65,1],[15]]"),
|
1507
1512
|
params:[124,127,124,127,124,127],typedParams:1,returns:[124,127],jsLength:2,
|
1508
1513
|
locals:[124,124,124,124,124,127],localNames:["_this","_this#type","month","month#type","date","date#type","t","m","dt","newDate","v","#last_type"]
|
1509
1514
|
}
|
@@ -2905,12 +2910,6 @@ wasm:(_,{t,builtin})=>eval("[[32,1],[65,9],[71],[4,64],[65,25],[65,6],[65,0],[65
|
|
2905
2910
|
params:[127,127,127,127],typedParams:1,returns:[127,127],jsLength:2,
|
2906
2911
|
locals:[127,127,127,127,127,127],localNames:["regexp","regexp#type","input","input#type","#last_type","#logicinner_tmp_int","#typeswitch_tmp1","result","match","match#type"]
|
2907
2912
|
}
|
2908
|
-
x.__Porffor_regex_matchAll={
|
2909
|
-
wasm:(_,{t,builtin,internalThrow})=>eval("[[32,1],[65,9],[71],[4,64],[65,25],[65,6],[65,0],[65,7],[32,0],[32,1],[65,0],[65,0],[16,builtin('RegExp')],[33,0],[65,9],[33,1],[11],[32,3],[65,195],[71],[4,64],[32,2],[183],[32,3],[16,builtin('__ecma262_ToString')],[33,4],[252,2],[33,2],[32,4],[33,3],[11],[32,0],[32,1],[16,builtin('__RegExp_prototype_global$get')],[33,4],[33,5],[32,4],[33,6],[2,127],...t([67,195],()=>[[32,6],[65,67],[70],[32,6],[65,195],[70],[114],[4,64],[32,5],[40,1,0],[69],[12,1],[11]]),[32,5],[69],[11],[4,64],...internalThrow(_,'TypeError',`matchAll used with non-global RegExp`),[26],[11],[65,4096],[16,builtin('__Porffor_allocateBytes')],[33,7],[3,64],[32,0],[32,1],[32,2],[32,3],[65,0],[65,2],[16,builtin('__Porffor_regex_interpret')],[34,4],[33,9],[34,8],[4,64],[32,7],[183],[65,72],[32,8],[183],[32,9],[16,builtin('__Porffor_array_fastPush')],[252,2],[26],[12,1],[11],[11],[32,7],[65,72],[15]]"),
|
2910
|
-
params:[127,127,127,127],typedParams:1,returns:[127,127],jsLength:2,
|
2911
|
-
locals:[127,127,127,127,127,127],localNames:["regexp","regexp#type","input","input#type","#last_type","#logicinner_tmp","#typeswitch_tmp1","result","match","match#type"],
|
2912
|
-
usesTag:1
|
2913
|
-
}
|
2914
2913
|
x.__String_prototype_match={
|
2915
2914
|
wasm:(_,{builtin,internalThrow})=>eval("[[32,1],[65,67],[71],[4,64],[32,1],[69],[32,1],[65,7],[70],[32,0],[69],[113],[114],[4,64],...internalThrow(_,'TypeError',`String.prototype.match expects 'this' to be non-nullish`),[11],[32,0],[183],[32,1],[16,builtin('__ecma262_ToString')],[33,1],[252,2],[33,0],[32,1],[65,195],[70],[4,64],[32,0],[16,builtin('__Porffor_bytestringToString')],[33,0],[11],[11],[32,2],[32,3],[32,0],[65,67],[16,builtin('__Porffor_regex_match')],[34,4],[15]]"),
|
2916
2915
|
params:[127,127,127,127],typedParams:1,returns:[127,127],jsLength:1,
|
@@ -2922,6 +2921,12 @@ wasm:(_,{builtin})=>eval("[[32,2],[32,3],[32,0],[65,195],[16,builtin('__Porffor_
|
|
2922
2921
|
params:[127,127,127,127],typedParams:1,returns:[127,127],jsLength:1,
|
2923
2922
|
locals:[127],localNames:["_this","_this#type","regexp","regexp#type","#last_type"]
|
2924
2923
|
}
|
2924
|
+
x.__Porffor_regex_matchAll={
|
2925
|
+
wasm:(_,{t,builtin,internalThrow})=>eval("[[32,1],[65,9],[71],[4,64],[65,25],[65,6],[65,0],[65,7],[32,0],[32,1],[65,0],[65,0],[16,builtin('RegExp')],[33,0],[65,9],[33,1],[11],[32,3],[65,195],[71],[4,64],[32,2],[183],[32,3],[16,builtin('__ecma262_ToString')],[33,4],[252,2],[33,2],[32,4],[33,3],[11],[32,0],[32,1],[16,builtin('__RegExp_prototype_global$get')],[33,4],[33,5],[32,4],[33,6],[2,127],...t([67,195],()=>[[32,6],[65,67],[70],[32,6],[65,195],[70],[114],[4,64],[32,5],[40,1,0],[69],[12,1],[11]]),[32,5],[69],[11],[4,64],...internalThrow(_,'TypeError',`matchAll used with non-global RegExp`),[26],[11],[65,4096],[16,builtin('__Porffor_allocateBytes')],[33,7],[3,64],[32,0],[32,1],[32,2],[32,3],[65,0],[65,2],[16,builtin('__Porffor_regex_interpret')],[34,4],[33,9],[34,8],[4,64],[32,7],[183],[65,72],[32,8],[183],[32,9],[16,builtin('__Porffor_array_fastPush')],[252,2],[26],[12,1],[11],[11],[32,7],[65,72],[15]]"),
|
2926
|
+
params:[127,127,127,127],typedParams:1,returns:[127,127],jsLength:2,
|
2927
|
+
locals:[127,127,127,127,127,127],localNames:["regexp","regexp#type","input","input#type","#last_type","#logicinner_tmp","#typeswitch_tmp1","result","match","match#type"],
|
2928
|
+
usesTag:1
|
2929
|
+
}
|
2925
2930
|
x.__String_prototype_matchAll={
|
2926
2931
|
wasm:(_,{builtin,internalThrow})=>eval("[[32,1],[65,67],[71],[4,64],[32,1],[69],[32,1],[65,7],[70],[32,0],[69],[113],[114],[4,64],...internalThrow(_,'TypeError',`String.prototype.matchAll expects 'this' to be non-nullish`),[11],[32,0],[183],[32,1],[16,builtin('__ecma262_ToString')],[33,1],[252,2],[33,0],[32,1],[65,195],[70],[4,64],[32,0],[16,builtin('__Porffor_bytestringToString')],[33,0],[11],[11],[32,2],[32,3],[32,0],[65,67],[16,builtin('__Porffor_regex_matchAll')],[34,4],[15]]"),
|
2927
2932
|
params:[127,127,127,127],typedParams:1,returns:[127,127],jsLength:1,
|
@@ -5832,13 +5837,13 @@ locals:[127],localNames:["_this","_this#type","#last_type"],
|
|
5832
5837
|
usesTag:1
|
5833
5838
|
}
|
5834
5839
|
x.__WeakMap_prototype_getOrInsert={
|
5835
|
-
wasm:(_,{t,builtin,internalThrow})=>eval("[[32,1],[65,29],[71],[4,64],...internalThrow(_,'TypeError',`WeakMap.prototype.getOrInsert expects 'this' to be a WeakMap`),[11],[32,0],[65,29],[32,2],[32,3],[16,builtin('__WeakMap_prototype_has')],[33,6],[33,7],[32,6],[33,8],[2,124],...t([67,195],()=>[[32,8],[65,67],[70],[32,8],[65,195],[70],[114],[4,64],[32,7],[252,3],[40,1,0],[69],[184],[12,1],[11]]),[32,7],[68,0],[97],[184],[11],[252,3],[4,64],[32,0],[65,29],[32,2],[32,3],[32,4],[32,5],[16,builtin('__WeakMap_prototype_set')],[33,6],[26],[11],[68,0],[33,9],[65,0],[33,8],[2,124]
|
5840
|
+
wasm:(_,{t,builtin,internalThrow})=>eval("[[32,1],[65,29],[71],[4,64],...internalThrow(_,'TypeError',`WeakMap.prototype.getOrInsert expects 'this' to be a WeakMap`),[11],[32,0],[65,29],[32,2],[32,3],[16,builtin('__WeakMap_prototype_has')],[33,6],[33,7],[32,6],[33,8],[2,124],...t([67,195],()=>[[32,8],[65,67],[70],[32,8],[65,195],[70],[114],[4,64],[32,7],[252,3],[40,1,0],[69],[184],[12,1],[11]]),[32,7],[68,0],[97],[184],[11],[252,3],[4,64],[32,0],[65,29],[32,2],[32,3],[32,4],[32,5],[16,builtin('__WeakMap_prototype_set')],[33,6],[26],[11],[68,0],[33,9],[65,0],[33,8],[2,124],[32,8],[65,6],[70],[4,64],[65,2],[68,0],[65,0],[16,builtin('#get_WeakMap')],[184],[65,6],[32,0],[65,29],[32,2],[32,3],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[32,9],[252,3],[17,18,0],[33,6],[12,1],[11],...internalThrow(_,'TypeError',`WeakMap.prototype.get is not a function`),[68,0],[11],[32,6],[15]]"),
|
5836
5841
|
params:[124,127,124,127,124,127],typedParams:1,returns:[124,127],jsLength:2,
|
5837
5842
|
locals:[127,124,127,124],localNames:["_this","_this#type","key","key#type","value","value#type","#last_type","#logicinner_tmp","#typeswitch_tmp1","#indirect_1077_callee"],
|
5838
5843
|
table:1,usesTag:1
|
5839
5844
|
}
|
5840
5845
|
x.__WeakMap_prototype_getOrInsertComputed={
|
5841
|
-
wasm:(_,{t,builtin,internalThrow})=>eval("[[32,1],[65,29],[71],[4,64],...internalThrow(_,'TypeError',`WeakMap.prototype.getOrInsertComputed expects 'this' to be a WeakMap`),[11],[32,0],[65,29],[32,2],[32,3],[16,builtin('__WeakMap_prototype_has')],[33,6],[33,7],[32,6],[33,8],[2,124],...t([67,195],()=>[[32,8],[65,67],[70],[32,8],[65,195],[70],[114],[4,64],[32,7],[252,3],[40,1,0],[69],[184],[12,1],[11]]),[32,7],[68,0],[97],[184],[11],[252,3],[4,64],[32,0],[65,29],[32,2],[32,3],[32,4],[33,9],[32,5],[33,8],[2,124],...t([6],()=>[[32,8],[65,6],[70],[4,64],[65,1],[68,0],[65,0],[68,0],[65,0],[32,2],[32,3],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[32,9],[252,3],[17,18,0],[33,6],[12,1],[11]]),...internalThrow(_,'TypeError',`callbackFn is not a function`),[68,0],[11],[32,6],[16,builtin('__WeakMap_prototype_set')],[33,6],[26],[11],[68,0],[33,10],[65,0],[33,8],[2,124]
|
5846
|
+
wasm:(_,{t,builtin,internalThrow})=>eval("[[32,1],[65,29],[71],[4,64],...internalThrow(_,'TypeError',`WeakMap.prototype.getOrInsertComputed expects 'this' to be a WeakMap`),[11],[32,0],[65,29],[32,2],[32,3],[16,builtin('__WeakMap_prototype_has')],[33,6],[33,7],[32,6],[33,8],[2,124],...t([67,195],()=>[[32,8],[65,67],[70],[32,8],[65,195],[70],[114],[4,64],[32,7],[252,3],[40,1,0],[69],[184],[12,1],[11]]),[32,7],[68,0],[97],[184],[11],[252,3],[4,64],[32,0],[65,29],[32,2],[32,3],[32,4],[33,9],[32,5],[33,8],[2,124],...t([6],()=>[[32,8],[65,6],[70],[4,64],[65,1],[68,0],[65,0],[68,0],[65,0],[32,2],[32,3],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[32,9],[252,3],[17,18,0],[33,6],[12,1],[11]]),...internalThrow(_,'TypeError',`callbackFn is not a function`),[68,0],[11],[32,6],[16,builtin('__WeakMap_prototype_set')],[33,6],[26],[11],[68,0],[33,10],[65,0],[33,8],[2,124],[32,8],[65,6],[70],[4,64],[65,2],[68,0],[65,0],[16,builtin('#get_WeakMap')],[184],[65,6],[32,0],[65,29],[32,2],[32,3],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[68,0],[65,0],[32,10],[252,3],[17,18,0],[33,6],[12,1],[11],...internalThrow(_,'TypeError',`WeakMap.prototype.get is not a function`),[68,0],[11],[32,6],[15]]"),
|
5842
5847
|
params:[124,127,124,127,124,127],typedParams:1,returns:[124,127],jsLength:2,
|
5843
5848
|
locals:[127,124,127,124,124],localNames:["_this","_this#type","key","key#type","callbackFn","callbackFn#type","#last_type","#logicinner_tmp","#typeswitch_tmp1","#indirect_1078_callee","#indirect_1079_callee"],
|
5844
5849
|
table:1,usesTag:1
|
package/compiler/codegen.js
CHANGED
@@ -2197,20 +2197,22 @@ const createThisArg = (scope, decl) => {
|
|
2197
2197
|
if (name && name.startsWith('__')) {
|
2198
2198
|
let node = null;
|
2199
2199
|
|
2200
|
-
|
2200
|
+
// hack: default this value for primitives, do here instead of inside funcs via ToObject/etc
|
2201
|
+
// todo: Object should not be included
|
2202
|
+
const obj = name.slice(2, name.indexOf('_', 2));
|
2203
|
+
if (name.includes('_prototype_') && ['Object', 'String', 'Boolean', 'Number'].includes(obj)) {
|
2201
2204
|
node = {
|
2202
2205
|
type: 'NewExpression',
|
2203
2206
|
callee: {
|
2204
2207
|
type: 'Identifier',
|
2205
|
-
name:
|
2208
|
+
name: obj
|
2206
2209
|
},
|
2207
|
-
arguments: []
|
2208
|
-
_new: true
|
2210
|
+
arguments: []
|
2209
2211
|
};
|
2210
2212
|
} else {
|
2211
2213
|
node = {
|
2212
2214
|
type: 'Identifier',
|
2213
|
-
name:
|
2215
|
+
name: obj
|
2214
2216
|
};
|
2215
2217
|
|
2216
2218
|
if (ifIdentifierErrors(scope, node)) node = null;
|
package/foo.js
CHANGED
package/package.json
CHANGED