prepack
prepack copied to clipboard
A JavaScript bundle optimizer.
Otherwise, it's a bit difficult to understand the sequence of events when stepping through the code.
The debugger currently breaks on compiler diagnostics, but not user-level exceptions. This is unusual. We could make it configurable, but definitively have an option to break on user-level exceptions.
... when the name is not defined in the "current scope", resulting in a `FatalError PP0001: This operation is not yet supported on global at extras`.
Make any spelling error, and you just get ``` Process exited (Prepack (Debugging)) Nuclide Debugger 2:08:38 PM ``` in the console. The Prepack CLI would produce a human-readable error message....
We need a more meaningful visualization of values. Also, if not already the case, the simplifier should run on abstract values to possibly reduce them.
And in the code, instead of `realm.instantRender.enabled`, check `realm.compatibility === "instantScript"`.
Prepack outputs invalid code without a diagnostic. Multiple returns under abstract conditions seem to cause incorrect output. ```js main(false, false, false); // Expected: false // Actual: true ``` ## Input...
This seems like a bug in simplification? ```js main(1); // Expected: true // Actual: 1 ``` ## Input ```js (function() { "use strict"; function main(a1) { if (a1) { return...
The following input throws an invariant violation which can be found here. After adding instrumentation I discovered that `completion` was an instance of `PossiblyNormalCompletion`. https://github.com/facebook/prepack/blob/1d04882b80027d0694bf2355ad4925c74252531d/src/realm.js#L1119-L1123 I couldn’t think of ways...