pdf.js/external/builder/fixtures_esprima
Nicolò Ribaudo a352f28785
Fix transform of unary expression in Babel plugin
All of our static evaluation & dead-code elimination transforms need to
happen in post-order, transforming inner nodes first. This is so that
in complex nested cases all transforms see the simplified version of
their inner nodes.

For example:
  async getNimbusExperimentData() {
    if (!PDFJSDev.test("GECKOVIEW")) { return null; }
    // other code
  }
-> [evaluation of PDFJSDev.*]
  async getNimbusExperimentData() {
    if (!false) { return null; }
    // other code
  }
-> [!false -> true]
  async getNimbusExperimentData() {
    if (true) { return null; }
    // other code
  }
-> [if (true) -> replace with the if branch]
  async getNimbusExperimentData() {
    return null;
    // other code
  }
-> [early return -> remove dead code]
  async getNimbusExperimentData() {
    return null;
    // other code
  }

This was done correctly in all cases except for our `UnaryExpression`
transform, which was happening in pre-order.
2024-01-29 11:53:17 +01:00
..
blocks-expected.js Replace the webpack+acorn transform with a Babel plugin 2024-01-23 16:00:59 +01:00
blocks.js Adds esprima-based preprocessor. 2016-10-14 08:33:22 -05:00
comments-expected.js Replace the webpack+acorn transform with a Babel plugin 2024-01-23 16:00:59 +01:00
comments.js Fix duplicated function name in the Esprima fixtures 2018-08-25 16:23:20 +02:00
constants-expected.js Replace the webpack+acorn transform with a Babel plugin 2024-01-23 16:00:59 +01:00
constants.js Adds esprima-based preprocessor. 2016-10-14 08:33:22 -05:00
deadcode-expected.js Replace the webpack+acorn transform with a Babel plugin 2024-01-23 16:00:59 +01:00
deadcode.js Replace the webpack+acorn transform with a Babel plugin 2024-01-23 16:00:59 +01:00
evals-expected.js Fix transform of unary expression in Babel plugin 2024-01-29 11:53:17 +01:00
evals.js Fix transform of unary expression in Babel plugin 2024-01-29 11:53:17 +01:00
evals.json Replace the webpack+acorn transform with a Babel plugin 2024-01-23 16:00:59 +01:00
ifs-expected.js Replace the webpack+acorn transform with a Babel plugin 2024-01-23 16:00:59 +01:00
ifs.js Adds esprima-based preprocessor. 2016-10-14 08:33:22 -05:00
importalias-expected.js Replace the webpack+acorn transform with a Babel plugin 2024-01-23 16:00:59 +01:00
importalias.js Removes last UMDs from the modules. 2017-05-31 07:14:17 -05:00