1060 Commits

Author SHA1 Message Date
Sebastian McKenzie
54819b94e9 skip flow types when finding rest parameter references 2015-06-26 23:29:09 +01:00
Sebastian McKenzie
50ca6b1018 clean up inType tracking in flow parser plugin 2015-06-26 23:26:32 +01:00
Sebastian McKenzie
571b6a4cd7 check parent node alongside path in shadow functions 2015-06-26 11:39:10 +01:00
Sebastian McKenzie
41cf942391 clean up shadow functions findParent logic - fixes #1846 2015-06-26 11:34:13 +01:00
Sebastian McKenzie
6359675a4f make shadowed function findParent target finder more reliable 2015-06-26 02:38:14 +01:00
Sebastian McKenzie
a265c3f25c add missing semi 2015-06-26 02:25:46 +01:00
Sebastian McKenzie
29eb99ee93 rejigger shadowd function findParent logic 2015-06-26 02:24:42 +01:00
Sebastian McKenzie
0c5c1ff989 remove unused variable 2015-06-26 02:22:10 +01:00
Sebastian McKenzie
c0fd4c1f9e merge es6.parameters.rest and es6.parameters.default transformers
This is necessary in order to retain correct function arity and to have
completely correct semantics. Sometimes features are tied together so much
that they would require so much desugaring to retain the correct semantics
that they'd be equivalent to... the normal transpiled output.
2015-06-26 02:20:16 +01:00
Sebastian McKenzie
e4083fbbd7 add support for trailing commas in arrow function parameter lists - fixes #1841 2015-06-26 00:37:33 +01:00
Sebastian McKenzie
19adcfae4d add type import 2015-06-25 23:22:42 +01:00
Sebastian McKenzie
bbcb889a49 Merge branch 'master' of github.com:babel/babel 2015-06-25 23:04:24 +01:00
Sebastian McKenzie
c87f85815b used filter rather than setting init properties to null in properties.computed transformer - fixes #1831 2015-06-25 23:04:17 +01:00
Sebastian McKenzie
48d0df17d0 Merge pull request #1832 from Mark-Simulacrum/path-exists
Use path-exists module instead of fs.exists.
2015-06-25 22:57:27 +01:00
Sebastian McKenzie
01b243347f add NodePath#baseTypeStrictlyMatches method 2015-06-25 22:55:46 +01:00
Sebastian McKenzie
45a5cbf72f use capitalised builder method 2015-06-25 22:55:35 +01:00
Sebastian McKenzie
05efae1c58 complete t.createTypeAnnotationBasedOnTypeof 2015-06-25 22:55:25 +01:00
Sebastian McKenzie
c08fff4b44 add node builder for normal AST node type 2015-06-25 22:55:12 +01:00
Sebastian McKenzie
13e910ea83 force spaces for binary expressions - fixes #1835 2015-06-25 22:55:00 +01:00
Mark-Simulacrum
b308602098 Use path-exists instead of fs.exists.
fs.exists is being deprecated, see: https://github.com/nodejs/io.js/issues/103.
2015-06-25 12:39:39 -06:00
Sebastian McKenzie
560a044d8f Merge pull request #1821 from kpdecker/destructure-performance
Avoid deopt in iterable destructure template
2015-06-25 15:23:53 +01:00
Sebastian McKenzie
619fbe4c3b Merge pull request #1830 from kpdecker/avoid-define-property
Avoid defineProperty when not needed
2015-06-25 15:23:39 +01:00
kpdecker
1d83ad6cce Avoid defineProperty when not needed
This lets us use the fast path for most object literal assignments and then utilizes the defineProperty path when there is a chance that we could hit the setter issue described in #357.

10x performance boosts seen for the six-speed test case, going from 200k operations/sec to 2M ops/sec.
2015-06-25 09:22:03 -05:00
kpdecker
5353ccd773 Move slice iterator helper out of primary call
Avoids overhead of instantiating the helper on each call to the slice to array helper.
2015-06-25 09:18:12 -05:00
Sebastian McKenzie
95d830fde0 don't output comma separator for decorator list and output Property decorators - fixes #1811 2015-06-25 12:23:45 +01:00
Sebastian McKenzie
31c1286a3c protect internal files from hotlinking 2015-06-25 12:10:22 +01:00
kpdecker
1b0e5b3ed1 Avoid deopt in iterable destructure template
The try/catch was forcing deoptimization under most engines. This roughly doubles throughput under V8 and 7x increases were seen under Firefox.

Performance numbers based on https://github.com/kpdecker/six-speed/tree/master/tests/destructuring
2015-06-24 22:42:13 -05:00
Sebastian McKenzie
c1a080d0ca supress duplicate deprecation messages 2015-06-25 04:11:13 +01:00
Sebastian McKenzie
0b1ce6c9a4 always coerce leading computed property initialisers into the init object - fixes #1820 2015-06-25 04:10:56 +01:00
Sebastian McKenzie
a6f04055c0 fix block scoping transformer 2015-06-25 04:10:32 +01:00
Sebastian McKenzie
c3219e8b88 deprecate returning source strings from visitor methods 2015-06-25 03:51:25 +01:00
Sebastian McKenzie
6f862a4c45 actually push for left declaration to the returned block scoping body - fixes #1819 2015-06-25 03:48:29 +01:00
Sebastian McKenzie
031a61515b add labels, and inX properties to lookahead getState 2015-06-24 23:26:59 +01:00
Sebastian McKenzie
d3884fd53b add inType assignment in flow parse declare method 2015-06-24 23:26:48 +01:00
Sebastian McKenzie
25be0a974d fixing linting errors 2015-06-24 23:20:03 +01:00
Sebastian McKenzie
7ccd135e83 fix isKeyword flow overload 2015-06-24 23:18:21 +01:00
Sebastian McKenzie
4fc1bbeb60 acorn resync 2015-06-24 23:15:27 +01:00
Sebastian McKenzie
32a4d7172b optimise generator for compact mode 2015-06-24 23:15:22 +01:00
Sebastian McKenzie
aa25903c05 parse void as an identifier when inside a type annotation to avoid setting void keyword token - cc @DmitrySoshnikov 2015-06-24 23:15:00 +01:00
Sebastian McKenzie
737abca3a9 use this.space() instead of manually pushing 2015-06-24 13:45:56 +01:00
Sebastian McKenzie
9db43ca7a9 clean up t.isReferenced 2015-06-24 13:45:48 +01:00
Sebastian McKenzie
25b0683316 add Path#couldBeBaseType 2015-06-24 13:45:32 +01:00
Sebastian McKenzie
a096f6b1c5 fix noOptimise state being incorrect when recursing into multiple nested functions - fixes #1815 2015-06-24 13:45:14 +01:00
Sebastian McKenzie
2910d4f82c fix Program can only be replaced with another Program error 2015-06-22 20:36:34 +01:00
Sebastian McKenzie
4b6c954f5e add ParenthesizedExpression node type for plugins to generate 2015-06-22 20:36:12 +01:00
Sebastian McKenzie
8e1f134635 fix rest parameter array allocation loop being incorrectly aliased - fixes #1800 2015-06-22 11:54:57 +01:00
Sebastian McKenzie
0364519869 remove unused import 2015-06-22 00:06:43 +01:00
Sebastian McKenzie
58cda35831 log spread element rest parameter as a candidate instead of replacing it in place - fixes #1796 2015-06-22 00:06:03 +01:00
Sebastian McKenzie
ebaa06f4a2 add ensureBlock path method 2015-06-21 23:59:14 +01:00
Sebastian McKenzie
4b0f624fb3 turn method literal keys into assignments in loose mode - fixes #1797 2015-06-21 23:59:06 +01:00