310 Commits

Author SHA1 Message Date
zenparsing
26e79c5433 Implement support for async generator functions and for-await statements 2016-09-27 17:37:21 -04:00
Kay J
4dcc981d6a Removed unnecessary 'return' statements. (#3653)
* Removed unnecessary 'return' statements.

Returning a 'Promise' value in 'promise.then()' makes promise chains.
Used memory and promises are not garbage collected
until finishing 'helpers.asyncToGenerator'.

* Update test
2016-09-25 13:57:59 -07:00
Alberto Piai
8f6d4ae5cf Fix typeof Symbol.prototype (#3686)
* formatting

* fix `typeof Symbol.prototype`

Babel uses a helper function to return the correct value for `typeof
obj` when obj is a Symbol and support for Symbol has been polyfilled.

This function assumes that `obj.constructor === Symbol` implies `typeof
obj === 'symbol'`.

This isn't true when obj is `Symbol.prototype`. In that case (REPL from
node 6, the same holds in Firefox):

```
> Symbol.prototype.constructor === Symbol
true
> typeof Symbol.prototype
'object'
>
```

AFAICS, that's the only case where the assumption doesn't hold.

The test added by this patch fails only on node 0.10, as 0.12 already
has a native implementation of Symbol and the polyfill code doesn't run.

This caused a problem in core-js when it's compiled with babel (the
issue was isolated by @skozin here:
https://github.com/zloirock/core-js/issues/189#issuecomment-209864582).
2016-09-20 12:19:09 -04:00
Henry Zhu
05bf216339 v6.8.0 2016-05-02 19:43:49 -04:00
Henry Zhu
4c23b01798 change plugins to use babel-runtime 6 2016-04-24 20:06:23 -04:00
Henry Zhu
f34e6518ff v6.6.0 2016-02-29 16:12:12 -05:00
Sebastian McKenzie
5b89849f43 Switch to klint, fix some lint rules 2016-02-14 23:25:14 +00:00
Henry Zhu
f9f8ad6eff v6.5.0 2016-02-06 19:06:41 -05:00
Henry Zhu
e152e7044e v6.4.5 2016-01-19 18:02:31 -05:00
Sebastian McKenzie
99a224efd9 add missing returns to async to generator helper 2016-01-18 02:02:08 +00:00
Henry Zhu
8cac20d845 v6.4.0 2016-01-06 15:34:12 -05:00
John-David Dalton
d9bf5da460 Defer to built-in typeof if built-in support for symbols exists. 2015-12-27 22:50:48 -06:00
Sebastian McKenzie
7b36967416 v6.3.13 2015-12-04 22:56:51 +11:00
Sebastian McKenzie
ae831c2270 v6.3.12 2015-12-04 22:56:13 +11:00
Amjad Masad
2f5b953066 v6.3.0 2015-11-30 14:58:30 -08:00
Nook Scheel
a81e11c4ae Use arguments with #apply 2015-11-29 21:47:04 +03:00
Nook Scheel
b2ff128e94 Unnecessary #call 2015-11-29 21:28:14 +03:00
Nook Scheel
8c7a81d317 Optimizations for asyncToGenerator
Never use a bind!
Never use arguments as an array!
2015-11-29 21:25:09 +03:00
Sebastian McKenzie
5b6a39f227 v6.1.20 2015-11-13 03:38:54 -08: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
Sebastian McKenzie
4b5a284efb fix unknown helper message - fixes #3025 2015-11-12 14:24:26 -08:00
Sebastian McKenzie
4a1e5c17b4 v6.1.18 2015-11-12 13:46:30 -08:00
Sebastian McKenzie
23fd185590 v6.1.17 2015-11-12 13:40:25 -08:00
Sebastian McKenzie
c4c66687ea v6.1.16 2015-11-12 13:33:20 -08:00
Sebastian McKenzie
9c91b555f9 v6.1.15 2015-11-12 12:15:47 -08:00
Sebastian McKenzie
f127f81cb7 v6.1.14 2015-11-12 12:01:18 -08:00
Sebastian McKenzie
548d973d12 v6.1.13 2015-11-12 11:57:45 -08:00
Sebastian McKenzie
af208e8acb v6.1.12 2015-11-12 00:47:51 -08:00
Sebastian McKenzie
8fb4d55687 v6.1.11 2015-11-11 23:58:22 -08:00
Sebastian McKenzie
98b3dda500 v6.1.10 2015-11-11 23:52:57 -08:00
Sebastian McKenzie
15baf2afb5 v6.1.9 2015-11-11 23:46:00 -08:00
Sebastian McKenzie
e018723c7e v6.1.8 2015-11-11 23:40:20 -08:00
Sebastian McKenzie
8dcf4aedc0 v6.1.7 2015-11-11 23:37:19 -08:00
Sebastian McKenzie
97443eada6 v6.1.6 2015-11-11 23:32:43 -08:00
Sebastian McKenzie
803f58f7ad v6.1.5 2015-11-11 23:30:14 -08:00
Sebastian McKenzie
caff1e72a5 v6.1.10 2015-11-11 23:28:53 -08:00
Sebastian McKenzie
541e547848 v6.1.9 2015-11-11 23:27:56 -08:00
Sebastian McKenzie
26e56bc966 v6.1.5 2015-11-11 22:48:30 -08:00
Sebastian McKenzie
fe5aff09a4 fix remaining babel helper issues 2015-11-11 22:45:50 -08:00
Sebastian McKenzie
ca1ca2055d Merge branch 'development' 2015-11-11 22:11:55 -08:00
Sebastian McKenzie
74a1b7fce6 make helper names more predictable - fixes #2986 2015-11-11 20:57:56 -08:00
Sebastian McKenzie
26abba9880 Merge pull request #2972 from spicyj/inline2
Use a helper function for React "inlining"
2015-11-11 12:39:54 -08:00
Sebastian McKenzie
03383bdf31 v6.1.4 2015-11-11 02:04:26 -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
bcd639672d add defineEnumerableProperties helper 2015-11-08 05:33:42 -08:00
Sebastian McKenzie
f2215915ff v6.1.2 2015-11-05 11:10:22 +00:00
Sebastian McKenzie
a9ac3b0c94 move instanceof functionality to separate plugin - fixes #2745 2015-11-03 19:22:51 +00:00
Sebastian McKenzie
9bc95258e6 v6.0.17 2015-11-02 19:53:45 +00:00
Sebastian McKenzie
31a6cb9c57 add Symbol existence check to typeof helper - closes #2745 2015-11-02 19:26:49 +00:00
Sebastian McKenzie
c865cb4bf9 v6.0.15 2015-11-01 22:07:03 +00:00