Skip to content

Commit

Permalink
codegen: more compliant private identifiers
Browse files Browse the repository at this point in the history
test262: 55.47% (+0.03) | πŸ§ͺ 50259 (+2) | 🀠 27880 (+18) | ❌ 7115 (-17) | πŸ’€ 14045 (+1) | πŸ—οΈ 32 | πŸ’₯ 177 | ⏰ 11 | πŸ“ 999
  • Loading branch information
CanadaHonk committed Jan 6, 2025
1 parent 5747f0c commit d696513
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions compiler/codegen.js
Original file line number Diff line number Diff line change
Expand Up @@ -3512,12 +3512,7 @@ const generateVar = (scope, decl) => {
return out;
};

const privateIDName = name => '.#.' + name;
const privateIdentifierToIdentifier = decl => ({
type: 'Identifier',
name: privateIDName(decl.name)
});

const privateIDName = name => '__#' + name;
const getProperty = (decl, forceValueStr = false) => {
const prop = decl.property ?? decl.key;
if (decl.computed) return prop;
Expand Down
2 changes: 1 addition & 1 deletion test262/history.json

Large diffs are not rendered by default.

0 comments on commit d696513

Please sign in to comment.