mirror of
https://github.com/facebookarchive/prepack.git
synced 2024-08-16 18:10:33 +03:00
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 |
||
---|---|---|
.. | ||
css | ||
js | ||
scripts/prettier | ||
static/images | ||
.gitignore | ||
circle.yml | ||
CNAME | ||
frequently-asked-questions.html | ||
getting-started.html | ||
index.html | ||
package.json | ||
README.md | ||
repl.html | ||
yarn.lock |
prepack.io
This website lives at prepack.io.