Skip to content

Commit

Permalink
codegen: 10 indirect wrapper args
Browse files Browse the repository at this point in the history
with this, richards.js no longer produces malformed Wasm (#204)

test262: 50.14% (-0.01) | πŸ§ͺ 48381 | 🀠 24260 (-1) | ❌ 6952 (+1) | πŸ’€ 15572 (-1) | πŸ—οΈ 152 | πŸ’₯ 331 | ⏰ 136 (+1) | πŸ“ 978
  • Loading branch information
CanadaHonk committed Oct 19, 2024
1 parent 1367288 commit 2e2a669
Show file tree
Hide file tree
Showing 5 changed files with 161 additions and 161 deletions.
312 changes: 156 additions & 156 deletions compiler/builtins_precompiled.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions compiler/codegen.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const funcRef = func => {
[ Opcodes.const, 'funcref', func.name ]
];

const wrapperArgc = Prefs.indirectWrapperArgc ?? 8;
const wrapperArgc = Prefs.indirectWrapperArgc ?? 10;
if (!func.wrapperFunc) {
const locals = {}, params = [];
for (let i = 0; i < wrapperArgc + 2; i++) {
Expand Down Expand Up @@ -2408,7 +2408,7 @@ const generateCall = (scope, decl, _global, _name, unusedValue = false) => {
funcs.table = true;
scope.table = true;

const wrapperArgc = Prefs.indirectWrapperArgc ?? 8;
const wrapperArgc = Prefs.indirectWrapperArgc ?? 10;
const underflow = wrapperArgc - args.length;
for (let i = 0; i < underflow; i++) args.push(DEFAULT_VALUE());

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "porffor",
"description": "a basic experimental wip aot optimizing js -> wasm engine/compiler/runtime in js",
"version": "0.49.4",
"version": "0.49.5",
"author": "CanadaHonk",
"license": "MIT",
"scripts": {},
Expand Down
2 changes: 1 addition & 1 deletion runner/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node
import fs from 'node:fs';
globalThis.version = '0.49.4';
globalThis.version = '0.49.5';

// deno compat
if (typeof process === 'undefined' && typeof Deno !== 'undefined') {
Expand Down
2 changes: 1 addition & 1 deletion test262/history.json

Large diffs are not rendered by default.

0 comments on commit 2e2a669

Please sign in to comment.