prepack/src
Roman Khotsyn 6e60644e12 Function argument modeling (#2215)
Summary:
This change allows modeling of optimized function arguments in different way than regular environment modeling. The main point of this modeling is being able to determine what getter should be used at this particular GraphQL property access at compile time. To achieve this Prepack should know the shape of arguments used for optimizing functions and should be able to infer the shape of value when it is needed.
Shape information is attached to AbstractValue (to pass it around) and on every property access a new AbstractValue is returned with shape information specific to this property.
As an output of this process, every member access to modeled values is replaced by function call like prop_string(obj, "key").
Structure of the model can be found in `ShapeInformation.js`.
Pull Request resolved: https://github.com/facebook/prepack/pull/2215

Reviewed By: NTillmann

Differential Revision: D8874743

Pulled By: hotsnr

fbshipit-source-id: 9e1b2254ef54986229be7d1195c1586b95d9a4be
2018-07-18 04:09:03 -07:00
..
debugger Upgrade Prepack to Babel 7 (#2256) 2018-07-14 09:55:18 -07:00
domains Upgrade Prepack to Babel 7 (#2256) 2018-07-14 09:55:18 -07:00
evaluators Clone completions when they complete composed effects (#2258) 2018-07-16 13:56:10 -07:00
intrinsics Function argument modeling (#2215) 2018-07-18 04:09:03 -07:00
methods For abstract objects, look into values domain for IsCall (#2268) 2018-07-18 01:54:08 -07:00
partial-evaluators Clone completions when they complete composed effects (#2258) 2018-07-16 13:56:10 -07:00
react Clone completions when they complete composed effects (#2258) 2018-07-16 13:56:10 -07:00
serializer Function argument modeling (#2215) 2018-07-18 04:09:03 -07:00
utils Function argument modeling (#2215) 2018-07-18 04:09:03 -07:00
values Function argument modeling (#2215) 2018-07-18 04:09:03 -07:00
benchmarker.js Make more files flow strict 2018-05-31 12:44:05 -07:00
completions.js Clone completions when they complete composed effects (#2258) 2018-07-16 13:56:10 -07:00
construct_realm.js Debugger sourcemaps (#2154) 2018-06-29 20:24:59 -07:00
environment.js Upgrade Prepack to Babel 7 (#2256) 2018-07-14 09:55:18 -07:00
errors.js Upgrade Prepack to Babel 7 (#2256) 2018-07-14 09:55:18 -07:00
globals.js Make more files flow strict 2018-05-31 12:44:05 -07:00
initialize-singletons.js Distinguish leak from havoc 2018-03-01 11:12:28 -08:00
invariant.js Fix test runner and don't swallow invariant failures (#2155) 2018-06-25 18:41:59 -07:00
options.js Delete node-cli Option and all the Node.js intrinsics (#2267) 2018-07-16 13:09:59 -07:00
prepack-cli.js Upgrade Prepack to Babel 7 (#2256) 2018-07-14 09:55:18 -07:00
prepack-node.js Delete node-cli Option and all the Node.js intrinsics (#2267) 2018-07-16 13:09:59 -07:00
prepack-options.js Debugger sourcemaps (#2154) 2018-06-29 20:24:59 -07:00
prepack-standalone.js Make optimized functions produce compiler diagnostic on mutating non-… (#2175) 2018-07-10 12:10:41 -07:00
realm.js Move generators from PNC normal branches to joined normal effects (#2274) 2018-07-17 19:09:35 -07:00
repl-cli.js Adds JSX -> React.createElement serialization support 2017-12-16 08:09:07 -08:00
singletons.js Annotate exported function return types. (#2227) 2018-07-09 17:09:17 -07:00
statistics.js Manually type all exported class methods. (#2231) 2018-07-10 13:39:01 -07:00
types.js Function argument modeling (#2215) 2018-07-18 04:09:03 -07:00
utils.js Make more files flow strict 2018-05-31 12:44:05 -07:00