porffor 0.50.17 → 0.50.18
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/codegen.js +10 -5
- package/package.json +1 -1
- package/runner/index.js +1 -1
package/compiler/codegen.js
CHANGED
@@ -5193,11 +5193,16 @@ const generateThrow = (scope, decl) => {
|
|
5193
5193
|
];
|
5194
5194
|
}
|
5195
5195
|
|
5196
|
-
|
5197
|
-
|
5198
|
-
|
5199
|
-
|
5200
|
-
|
5196
|
+
const out = generate(scope, decl.argument);
|
5197
|
+
const lastOp = out.at(-1);
|
5198
|
+
if (lastOp[0] === Opcodes.local_set && lastOp[1] === scope.locals['#last_type']?.idx) {
|
5199
|
+
out.pop();
|
5200
|
+
} else {
|
5201
|
+
out.push(...getNodeType(scope, decl.argument));
|
5202
|
+
}
|
5203
|
+
|
5204
|
+
out.push([ Opcodes.throw, globalThis.precompile ? 1 : 0 ]);
|
5205
|
+
return out;
|
5201
5206
|
};
|
5202
5207
|
|
5203
5208
|
const generateTry = (scope, decl) => {
|
package/package.json
CHANGED