prepack
prepack copied to clipboard
A JavaScript bundle optimizer.
```js var n = __abstract('number', '(2)'); var i = 0; var obj = {0:'a', 1:'b', 2:'c'}; __makePartial(obj); __makeSimple(obj); do { result = obj['' + i]; i++; } while (i <...
```js var n = __abstract('number', '(3)'); var i = 0; var ii = 0; var obj = {} do { obj[i] = 5; obj[ii] = 6; obj[i + 1000] =...
```js (function () { var n = __abstract('number', '(5)'); var arr = {0: 'a', 1: 'b'}; var i = 2; do { arr[i] = 'x'; i++; } while(i < n);...
```js var c = __abstract('boolean', 'c'); var y = __abstract('object', 'y'); __makeSimple(y); var obj = Object.assign({}, y); has = 'anything' in obj; desc = Object.getOwnPropertyDescriptor(obj, 'anything'); ``` This doesn't define...
```js let x = __abstract("number", "(x)"); do { x++; } while (x < 3); ``` => ``` Invariant Violation: This is likely a bug in Prepack, not your code. Feel...
Currently, one must change multiple places in the codebase to change what built-ins are enabled based on a compatibility mode. See #2613. This is confusing and prone to error. We...
Currently all optimized functions are evaluated at the end of global initialization, possibly with any parent optimized functions' effects applied. This model works well for pure callbacks where we know...
Sometime between Oct 8, Oct 20, Prepack's heap usage almost doubled. Not many PRs happened in that time, but this commit looks like it could be the cause: 224ca4a0d094c40df482f971e7814a1ab7799442
In the ResidualHeapVisitor, there an interesting function called `_enqueueWithUnrelatedScope`. It really serves two purposes: 1) Enqueueing an item to be processed in an (unrelated) scope, for which certain effects need...
#2577 disables the generation of `.bind` calls; instead, that changes makes Prepack always generate full-blown wrapper functions. Bring back the original functionality, or explore other ways to bind local environments...