Skip to content

Commit

Permalink
codegen: run objectHack on eval/Function literals
Browse files Browse the repository at this point in the history
test262: 55.55% (+0.08) | πŸ§ͺ 50259 | 🀠 27920 (+40) | ❌ 7203 (+88) | πŸ’€ 13917 (-128) | πŸ—οΈ 32 | πŸ’₯ 177 | ⏰ 11 | πŸ“ 999
  • Loading branch information
CanadaHonk committed Jan 6, 2025
1 parent d696513 commit 9a70d63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions compiler/codegen.js
Original file line number Diff line number Diff line change
Expand Up @@ -2045,7 +2045,7 @@ const generateCall = (scope, decl, _global, _name, unusedValue = false) => {

let parsed;
try {
parsed = parse(code);
parsed = objectHack(parse(code));
} catch (e) {
if (e.name === 'SyntaxError') {
// throw syntax errors of evals at runtime instead
Expand Down Expand Up @@ -2075,7 +2075,7 @@ const generateCall = (scope, decl, _global, _name, unusedValue = false) => {

let parsed;
try {
parsed = parse(`(function(){${code}})`);
parsed = objectHack(parse(`(function(){${code}})`));
} catch (e) {
if (e.name === 'SyntaxError') {
// throw syntax errors of evals at runtime instead
Expand Down
2 changes: 1 addition & 1 deletion test262/history.json

Large diffs are not rendered by default.

0 comments on commit 9a70d63

Please sign in to comment.