7 Commits
Author SHA1 Message Date
Nicolò RibaudoandGitHub a7e4db14ab Mark transpiled JSX elements as pure (#11126)
* Mark transpiled JSX elements as pure

* Avoid duble annotation

* Add "pure" option to the React preset

* Fix generator indentation

* Update tests

* Add tests for the "pure" option

* Update windows fixtures
2020-03-19 15:43:54 +01:00
Nicolò RibaudoandBrian Ng a1c0d724ae Remove old expected.{js,json} files (#7187) 2018-01-09 13:10:30 -06:00
Raja SekarandNicolò Ribaudo 4b5e34de4e Renamed files 2018-01-09 15:36:42 +01:00
Henry ZhuandGitHub 551b23548c Newlines in fixtures (#6044)
* write newlines for fixtures

* rerun fixtures
2017-08-02 15:35:29 -04:00
Ben Alpert d1b8db1532 React inlining: Refactor to reduce parsing cost
- Have the `jsx` helper do the `defaultProps` work instead of calling `defaultProps` inline.
- Put `key` after `props` and make it optional.
- Inline `children` as rest args instead of in the object.
- Rename `createRawReactElement` to `jsx`. I wish I was kidding.

Most of these are silly microoptimizations. In my test file (based off an internal RN app), this reduces the parsing overhead of inlining from around 1% to 0.1% in JSC and from 0.6% to 0.0% in V8 (compared to element inlining before this commit).

Once parsed, the initial render with inlining is the same speed as not inlining in JSC and ~1% slower in V8. A second initial render in the same context (reusing the function objects, JIT, etc) is 2.0% faster in JSC and 5.5% faster in V8.
2015-11-12 18:05:57 -08:00
Ben Alpert 3cad287233 Use a helper function for React "inlining"
Either due to lower parsing costs or better type inference, this seems
to perform better than direct object inlining. (All along, the main win
was skipping a loop through props, not avoiding a function call.)
2015-11-10 21:10:06 -08:00
Sebastian McKenzie 15969a0904 move all plugin tests out of babel-core and into their appropriate folders 2015-11-08 23:04:10 -08:00