warpo 3.4.0 → 3.4.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.
@@ -344,14 +344,9 @@ function dateFromEpoch(ms: i64): i32 {
344
344
  let dm1 = <u32>u1 / 11758980;
345
345
  let n1 = 2141 * dm1 + 197913;
346
346
  let year = 100 * q0 + i32(u1 >>> 32);
347
- let mo = n1 >>> 16;
348
347
  _day = (n1 & 0xffff) / 2141 + 1; // [1, 31]
349
- if (dm1 >= 306) {
350
- mo -= 12;
351
- ++year;
352
- }
353
- _month = mo; // [1, 12]
354
- return year;
348
+ _month = (n1 >>> 16) - (dm1 >= 306 ? 12 : 0); // [1, 12]
349
+ return year + (dm1 >= 306 ? 1 : 0);
355
350
  }
356
351
 
357
352
  // http://howardhinnant.github.io/date_algorithms.html#days_from_civil
@@ -368,8 +363,9 @@ function daysSinceEpoch(y: i32, m: i32, d: i32): i64 {
368
363
  function dayOfWeek(year: i32, month: i32, day: i32): i32 {
369
364
  const tab = memory.data<u8>([0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]);
370
365
 
371
- year -= i32(month < 3);
372
- year += floorDiv(year, 4) - floorDiv(year, 100) + floorDiv(year, YEARS_PER_EPOCH);
366
+ year -= i32(month <= 2);
367
+ const cent = floorDiv(year >> 2, 100 >> 2);
368
+ year += (year >> 2) - cent + (cent >> 2);
373
369
  month = <i32>load<u8>(tab + month - 1);
374
370
  return euclidRem(year + month + day, 7);
375
371
  }
package/dist/asc.wasm ADDED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "warpo",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "description": "next generation AssemblyScript compiler with optimizations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -69,7 +69,7 @@
69
69
  "@types/tar-stream": "^3.1.4",
70
70
  "@types/vscode": "^1.80.0",
71
71
  "@vscode/debugadapter-testsupport": "^1.65.0",
72
- "@vscode/vsce": "^3.0.0",
72
+ "@vscode/vsce": "^4.1.0",
73
73
  "assemblyscript": "^0.28.9",
74
74
  "assemblyscript-prettier": "^3.0.4",
75
75
  "cspell": "^9.3.0",
@@ -84,7 +84,7 @@
84
84
  "eslint-plugin-unicorn": "^63.0.0",
85
85
  "eslint-plugin-unused-imports": "^4.4.1",
86
86
  "expect": "^30.2.0",
87
- "mermaid": "^11.13.0",
87
+ "mermaid": "^12.2.0",
88
88
  "prettier": "^3.8.1",
89
89
  "tsx": "^4.0.0",
90
90
  "typescript": "^5.8.3",
@@ -98,7 +98,7 @@
98
98
  "chalk": "^5.6.2",
99
99
  "commander": "^14.0.3",
100
100
  "fs-extra": "^11.3.3",
101
- "glob": "^13.0.0",
101
+ "glob": "^14.0.4",
102
102
  "https-proxy-agent": "^7.0.6",
103
103
  "ignore": "^7.0.5",
104
104
  "source-map": "^0.7.6",