Commit Graph

4 Commits

Author SHA1 Message Date
Dan Abramov
ec37b77b6e Run Prettier for serializer tests too (#2234)
Summary:
Follow-up to https://github.com/facebook/prepack/pull/2212.
Pull Request resolved: https://github.com/facebook/prepack/pull/2234

Differential Revision: D8788834

Pulled By: gaearon

fbshipit-source-id: 08937736bed3df0ea13d5e7a3925fb2f58633d5c
2018-07-11 03:55:11 -07:00
Chris Blappert
91847ea6ba Make optimized functions produce compiler diagnostic on mutating non-… (#2175)
Summary:
…local state

The logic was already there for the React Compiler's invocations of evaluatePure, this PR just generalizes it a little to be used for optmized functions as well.

Additionally, adds the ability to check for compiler info/warning logs in test-runner + updates test-error-handler.

See #1589
Pull Request resolved: https://github.com/facebook/prepack/pull/2175

Differential Revision: D8786744

Pulled By: cblappert

fbshipit-source-id: 110a4732dd6bd129b4d91047c3c9a24f5249a5e9
2018-07-10 12:10:41 -07:00
Dominic Gannaway
b389598bb5 Rename __registerAdditionalFunction -> __optimize
Summary:
Release notes: `__registerAdditionalFunction` is now `__optimize`

This PR renames `__registerAdditionalFunction` to `__optimize` and removes all tests that use the `// additional functions` logic in favor of declaratively using `__optimize`. Also the serializer option for `additionalFunctions` is removed too.
Closes https://github.com/facebook/prepack/pull/1561

Differential Revision: D7219751

Pulled By: trueadm

fbshipit-source-id: 7984496b3a68db3194fb3696839cb11fdd0b7843
2018-03-09 14:44:46 -08:00
Herman Venter
12555b9817 Detect read-write conflicts
Summary:
If one additional function reads a property that is written by another additional function, it becomes potentially dependent on the other function running before it does. Additional functions are supposed to be independent of each other, so we now detect this and report errors.
Closes https://github.com/facebook/prepack/pull/850

Differential Revision: D5529672

Pulled By: hermanventer

fbshipit-source-id: f810d27d1fbf03d6538d70e61a1d9e7c0fe55309
2017-07-31 13:28:20 -07:00