Commit Graph

16 Commits

Author SHA1 Message Date
kdex
eef69b9463 Substitute v8-profiler with v8-profiler-node8 (#2525)
Summary:
This commit addresses issue #2520. In brief, `v8-profiler` fails to build on recent node versions.
Pull Request resolved: https://github.com/facebook/prepack/pull/2525

Reviewed By: hermanventer

Differential Revision: D9689106

Pulled By: NTillmann

fbshipit-source-id: 9169321bdc23dfbfdf24b50fe7885dab36c5322e
2018-09-07 16:39:23 -07:00
Nikolai Tillmann
22b7e1eb53 Simplifying / fixing OperationDescriptorData (#2490)
Summary:
Release notes: None

- Fixing type of `quasis` in Babel and as field
- Instead of storing callTemplate as a derived function, store instead the source string (working towards having a human-readable generator intermediate format)
Pull Request resolved: https://github.com/facebook/prepack/pull/2490

Differential Revision: D9540696

Pulled By: NTillmann

fbshipit-source-id: d7ab8c68857d4b8b4e584894edb3781dce3db2b2
2018-08-28 10:10:57 -07:00
Nikolai Tillmann
6299ab8272 Some shallow cleanup of the operation descriptor. (#2471)
Summary:
Release notes: None
Pull Request resolved: https://github.com/facebook/prepack/pull/2471

Differential Revision: D9482778

Pulled By: NTillmann

fbshipit-source-id: 1eea1f3f0e6ddc383a2f214bfd53f5a99b7c1c4e
2018-08-23 11:54:45 -07:00
Nikolai Tillmann
9d02cbc575 Fixing fixup of source locations, mostly. (#2356)
Summary:
Release notes: Fixing source map support.

I kept getting seemingly garbage source locations in error messages, and looked into that.
I found various issues:
- We in-place update positions, but they are actually shared between locations, and thus we may revisit positions. When we do, we map them again, and so on...
- Locations are also shared between nodes, so we kept revisiting and rewriting yet again.
- The actual mapping doesn't pay attention to the filename, so we apply the wrong mapping altogether, especially in the presence of multiple input files. I am not fixing this, but added a TODO, and opened #2353.
- Another remaining but not blocking issue is that something goes wrong with end-positions: They are sometimes mapped to some seemingly random position in the right line. If anyone knows anything about this, please let me know...
Pull Request resolved: https://github.com/facebook/prepack/pull/2356

Differential Revision: D9141809

Pulled By: NTillmann

fbshipit-source-id: d765e99706d69e3c792fba4c553d4110963067eb
2018-08-06 18:54:38 -07:00
Dominic Gannaway
e170c37aaa Upgrade Prepack to Babel 7 (#2256)
Summary:
Release notes: upgrades Prepack to use Babel 7.0.0-beta.53

This is a big PR that updates all of Prepack to Babel 7. Babylon is now `babel/parser` and pretty much all of the the previous Babel packages are now located in scoped packages. I had to make a bunch of changes around Jest/Flow/Webpack to get this all working. The build times of building Prepack itself seem considerably faster (easily twice as fast locally). I followed most of the Babel 6 -> 7 upgrade guide from the Babel site in terms of changing nodes and type definitions to match the new ones.
Pull Request resolved: https://github.com/facebook/prepack/pull/2256

Differential Revision: D8850583

Pulled By: trueadm

fbshipit-source-id: 2d2aaec25c6a1ccd1ec0c08c5e7e2a71f78ac2d8
2018-07-14 09:55:18 -07:00
Andres Suarez
9964f35014 Remove kcheck and dedupe yarn.lock deps
Reviewed By: trueadm

Differential Revision: D8327228

fbshipit-source-id: 1e27d6fbc70cd2a55aa819ab4f7f555ea7e76d91
2018-06-08 07:39:42 -07:00
Nikolai Tillmann
287aab9bcd Replace expensive second babel-traverse pass with fast custom visitor.
Summary:
Release notes: Speeding up Prepack by 22%, saving 8% memory.

This closes #1812.

This completely refactors the `ClosureRefReplacer` into a new
standalone `ResidualFunctionInstantiator`.

By avoiding babel-traverse, this visitor implementation is way faster.
Also, it only clones those nodes which are being changes, preserving all others,
insteading of cloning an entire function if any node needs to change; in this way,
memory is saved as well.

On a large internal benchmark (27MB minified JavaScript bundle with 31MB sourcemaps file), this change reduces overall time from 200s down to 157s: 22% faster. This due to savings during serialization, which goes down from 71s to 23s (while making the visitor 6s slower due to additional work).

Also, overall memory usage goes down from 3582MB to 3307MB, a 8% savings. Again, mostly due to savings in serialization, where surviving allocations going down from 337MB to 51MB, while slightly increasing allocations in the visitor.
Closes https://github.com/facebook/prepack/pull/1947

Differential Revision: D7990897

Pulled By: NTillmann

fbshipit-source-id: 93ffa0a06e75566db1d5564924c3f840cc2262df
2018-05-14 11:59:51 -07:00
Nikolai Tillmann
d025cd20b8 Adding --cpuprofile option to prepack-cli
Summary:
Release notes: None

Adding ability to record CPU profile traces from node/v8.
Closes https://github.com/facebook/prepack/pull/1624

Differential Revision: D7343153

Pulled By: NTillmann

fbshipit-source-id: 0e64d752aa230ab01ee991708b2b41dc414bec8a
2018-03-21 12:09:17 -07:00
Nikolai Tillmann
50243775b1 Adding --repro command line option for easy reproducibility
Summary:
Release notes: New --repro command line option for easier bug reporting

This new option creates a handy .zip file with everything in it to reproduce an issue.
Closes https://github.com/facebook/prepack/pull/1499

Differential Revision: D7086115

Pulled By: NTillmann

fbshipit-source-id: be9e84ea246689dd1073a2fd713ec2599c98350c
2018-03-03 10:31:33 -08:00
Nikolai Tillmann
691769970e Using a custom Base62 encoding function.
Summary:
Release notes: Removing dependency on Base62 npm package which collects Google Analytics information at installation time.

Addressing #1503.
Closes https://github.com/facebook/prepack/pull/1504

Differential Revision: D7102527

Pulled By: NTillmann

fbshipit-source-id: 4aaa9fe6f4517dac5f418e546e7015741c2e368e
2018-02-27 13:53:56 -08:00
Jeffrey Tan
b6f3fd0a64 Avoid duplicate nested function body(Part1)
Summary:
Release Note: Avoid duplicate nested function body(Part1)
Avoids duplicating the nested function body with other residual functions. Currently the implementation has the following limitations:
1. Did not deal with the situation that nested function duplicates with a residual function did not use factory function.
2. Did not deal with function declaration

I will address these limitations in later PR.
Closes https://github.com/facebook/prepack/pull/1081

Differential Revision: D6078328

Pulled By: yinghuitan

fbshipit-source-id: 3a6b6dd0b99a5cdb8cffeeba85d257682c3db40e
2017-10-17 10:46:10 -07:00
Kevin Gibbons
93b6c3601f Trivial dead code elimination in residual functions
Summary:
Progress towards #632.

There's a lot more that can be done here - for example, we could also eliminate `if (0) foo()` - but presumably that should be done by partial evaluators in a less ad-hoc way.
Closes https://github.com/facebook/prepack/pull/1061

Differential Revision: D6012613

Pulled By: NTillmann

fbshipit-source-id: a7dd6b64a42be34dddf1a59f363ed101feefda64
2017-10-09 14:37:38 -07:00
Sebastian Markbåge
2e0ff63a69 Fix source maps output option in CLI (#536) 2017-05-04 18:09:07 -07:00
Christopher Blappert
1ef90a22e9 Break ecma deps (#400)
* Refactor realm constructor

* Refactor types.js to not depend on methods/

* Fix errors, add verifier to prevent cycles

* Fixed comments

* Fixing tests

* Fix merge bug
2017-04-14 15:09:34 -07:00
Nikolai Tillmann
37091e2a02 Flow-typed types for traverse. 2017-04-10 16:16:36 -07:00
Sebastian Markbage
8a1d196255 Initial commit 2017-03-28 20:52:41 -07:00