prepack/website
Nikolai Tillmann 7579c5fc0b Introducting new option --invariantLevel NUMBER and dropping --omitInvariants
Summary:
Release notes: Introducting new option --invariantLevel NUMBER and dropping --omitInvariants

The new default is invariant level 0, which corresponds to the old --omitInvariants.
Level 1 is roughly what we used to do: Check invariants on (derived) abstract values.
Level 2 implements #1180: Checking that all accesses to built-ins do what Prepack expects them to do, including checks for when properties on built-ins are absent.
Level 3 adds checks for internal consistency, basically an internal debug level.

The serializer tests now run with the highest invariant level by default. The added invariants found a few issues that got addressed, including:
- Prepack exposes a TypedArray prototype, which is not a real thing. It's now marked as `__refuseSerialization`, and no invariants are emitted for such things.
- Global variables / properties on the global object are special. Those are not yet handled at level 2.
- Accesses to Prepack magic functions that generally start with `__` should not produce invariant checks.
- Magic code generation for loops should not take into account objects that are `__refuseSerialization`.
- All invariant statements get a unique id to make it easier to locate them.
- I marked some test cases which depend on counting occurrences in the output as "// omit invariants", as the additional invariants increased some such counts.

As part of testing, I also found it necessary to make the --invariantMode more useful; it now also allows specifying nativeLoggingHook which is the preferred way of logging in React Native.

To reduce the number of checks by a few orders of magnitude in practice, each property is only checked on first access. This is tracked by a global variable `__checkedBindings`.

This pull requests incorporates all aspects of the #1709 (which I abandoned).
Closes https://github.com/facebook/prepack/pull/1724

Reviewed By: simonhj

Differential Revision: D7575091

Pulled By: NTillmann

fbshipit-source-id: 585cd224ce66882f8e5f27d88c1ad08afeb96ee1
2018-04-12 11:58:25 -07:00
..
css Fix website dropdowns 2017-12-27 09:58:58 -08:00
js Introducting new option --invariantLevel NUMBER and dropping --omitInvariants 2018-04-12 11:58:25 -07:00
scripts/prettier Make master/docs a single source of truth for gh-pages 2017-12-12 12:10:05 -08:00
static/images Display heap graph in website 2017-12-14 15:03:35 -08:00
.gitignore Make master/docs a single source of truth for gh-pages 2017-12-12 12:10:05 -08:00
circle.yml Make master/docs a single source of truth for gh-pages 2017-12-12 12:10:05 -08:00
CNAME Make master/docs a single source of truth for gh-pages 2017-12-12 12:10:05 -08:00
frequently-asked-questions.html Make master/docs a single source of truth for gh-pages 2017-12-12 12:10:05 -08:00
getting-started.html Make master/docs a single source of truth for gh-pages 2017-12-12 12:10:05 -08:00
index.html Make master/docs a single source of truth for gh-pages 2017-12-12 12:10:05 -08:00
package.json Make master/docs a single source of truth for gh-pages 2017-12-12 12:10:05 -08:00
README.md Make master/docs a single source of truth for gh-pages 2017-12-12 12:10:05 -08:00
repl.html Display heap graph in website 2017-12-14 15:03:35 -08:00
yarn.lock Make master/docs a single source of truth for gh-pages 2017-12-12 12:10:05 -08:00

prepack.io

This website lives at prepack.io.