Skip to content

Commit

Permalink
document various v8 bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlamsl committed Mar 20, 2021
1 parent b89cc84 commit f1ae41d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1296,3 +1296,16 @@ To allow for better optimizations, the compiler makes various assumptions:
// SyntaxError: Identifier 'e' has already been declared
```
UglifyJS may modify the input which in turn may suppress those errors.
- Some versions of Chrome and Node.js will give incorrect results with the
following:
```javascript
console.log({
...{
set 42(v) {},
42: "PASS",
},
});
// Expected: { '42': 'PASS' }
// Actual: { '42': undefined }
```
UglifyJS may modify the input which in turn may suppress those errors.
2 changes: 1 addition & 1 deletion test/compress/classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ unused_await: {
(() => console.log(await))();
})();
}
expect_stdout: "PASS"
expect_stdout: true
node_version: ">=12"
}

Expand Down
5 changes: 1 addition & 4 deletions test/compress/loops.js
Original file line number Diff line number Diff line change
Expand Up @@ -836,10 +836,7 @@ for_of: {
console.log(async);
}
expect_exact: 'var async=["PASS",42];async.p="FAIL";for(async of(null,async))console.log(async);'
expect_stdout: [
"PASS",
"42",
]
expect_stdout: true
node_version: ">=0.12"
}

Expand Down
3 changes: 3 additions & 0 deletions test/ufuzz/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2401,6 +2401,9 @@ if (SUPPORT.destructuring && typeof sandbox.run_code("console.log([ 1 ], {} = 2)
o.output.v8 = true;
});
}
if (SUPPORT.exponentiation && sandbox.run_code("console.log(10 ** 100 === Math.pow(10, 100));") !== "true\n") {
SUPPORT.exponentiation = false;
}
beautify_options = JSON.stringify(beautify_options);
minify_options = minify_options.map(JSON.stringify);
var original_code, original_result, errored;
Expand Down

0 comments on commit f1ae41d

Please sign in to comment.