porffor 0.37.25 → 0.37.26

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.
@@ -1174,6 +1174,10 @@ const getType = (scope, _name) => {
1174
1174
  return number(TYPES.undefined, Valtype.i32);
1175
1175
  }
1176
1176
 
1177
+ if (name === 'arguments' && scope.name !== 'main' && !scope.arrow) {
1178
+ return number(TYPES.array, Valtype.i32);
1179
+ }
1180
+
1177
1181
  if (Object.hasOwn(globals, name)) {
1178
1182
  if (globals[name]?.metadata?.type != null) return number(globals[name].metadata.type, Valtype.i32);
1179
1183
 
@@ -3624,7 +3628,7 @@ const generateAssign = (scope, decl, _global, _name, valueUnused = false) => {
3624
3628
  // default: internalThrow(scope, 'TypeError', `Cannot assign member with this type`)
3625
3629
  default: () => [
3626
3630
  ...objectWasm,
3627
- Opcodes.i32_to_u,
3631
+ Opcodes.i32_to,
3628
3632
  ...(op === '=' ? [] : [ [ Opcodes.local_tee, localTmp(scope, '#objset_object', Valtype.i32) ] ]),
3629
3633
  ...getNodeType(scope, object),
3630
3634
 
@@ -5636,7 +5640,7 @@ const generateMember = (scope, decl, _global, _name, _objectWasm = undefined) =>
5636
5640
  // default: internalThrow(scope, 'TypeError', 'Unsupported member expression object', true)
5637
5641
  default: () => [
5638
5642
  ...objectWasm,
5639
- Opcodes.i32_to_u,
5643
+ Opcodes.i32_to,
5640
5644
  ...getNodeType(scope, object),
5641
5645
 
5642
5646
  ...toPropertyKey(scope, propertyWasm, getNodeType(scope, property), decl.computed, true),
package/nova.comp.cjs ADDED
@@ -0,0 +1,3 @@
1
+ const uniq = [...new Set(require('../nova.json').pass.map(x => x.slice(5))).difference(new Set(require('./test262/results.json').passes))];
2
+ console.log([...uniq.reduce((acc, x) => { let k = x.split('/').slice(0, -1).join('/'); return acc.set(k, (acc.get(k) || 0) + 1); }, new Map()).entries()].sort((a, b) => a[1] - b[1]).slice(-20).map(x => x[0] + ': ' + x[1]).join('\n'));
3
+ console.log(uniq.filter(x => x.startsWith('built-ins/Object/defineProperty')).join('\n'))
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "porffor",
3
3
  "description": "a basic experimental wip aot optimizing js -> wasm engine/compiler/runtime in js",
4
- "version": "0.37.25+8558a306e",
4
+ "version": "0.37.26+4f2db33d1",
5
5
  "author": "CanadaHonk",
6
6
  "license": "MIT",
7
7
  "scripts": {},
package/runner/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import fs from 'node:fs';
3
- globalThis.version = '0.37.25+8558a306e';
3
+ globalThis.version = '0.37.26+4f2db33d1';
4
4
 
5
5
  // deno compat
6
6
  if (typeof process === 'undefined' && typeof Deno !== 'undefined') {