272 Commits

Author SHA1 Message Date
Logan Smyth
19b1032474 Hoist class inheritance call so it runs before prototype use - fixes #1972 2015-07-10 19:51:53 -07:00
Sebastian McKenzie
af7510adec fix some bugs in PathHoister - fixes babel-plugins/babel-plugin-react-constant-elements#1
- Don't hoist constant elements to the same function as their original paths function parent.
 - Push each violation paths ancestry to the breakOnScopePaths collection to avoid constant hoisting to nested paths.
2015-07-08 11:35:34 +01:00
Sebastian McKenzie
4d25b0d96a Merge branch 'master' of github.com:babel/babel 2015-07-07 11:12:42 +01:00
Sebastian McKenzie
babc9c90b4 fix tail call recursion on functions with less arguments than parameters - fixes #1938 2015-07-07 11:11:58 +01:00
Sebastian McKenzie
a262e99abd strip flow directives in flow transformer - fixes #1934 2015-07-07 10:52:43 +01:00
Logan Smyth
b518394a3f Only special-case for..on/of declaration hoisting - fixes #1929 2015-07-06 21:06:11 -07:00
Sebastian McKenzie
337c51df5c fixes out of bounds check to default parameter template - #1845 - cc @RReverser 2015-07-06 21:25:33 +01:00
Sebastian McKenzie
0509fb148f add out of bounds check to default parameter template - addresses #1845 - cc @RReverser 2015-07-06 20:12:10 +01:00
Logan Smyth
cdb8e3aefa Optimize export-from in System.register - fixes #1722 2015-07-05 11:40:33 -07:00
Logan Smyth
f47d17345c Ensure _blockHoist is set on function destructuring defaults - fixes #1908 2015-07-05 09:10:09 -07:00
Sebastian McKenzie
64903d0dcf Merge branch 'master' of github.com:babel/babel 2015-07-04 23:33:33 +02:00
Sebastian McKenzie
1fd0b1f741 delay this assignment when referencing this inside an arrow function pre-bare super in derived class constructors - fixes #1920 2015-07-04 23:32:11 +02:00
Sebastian McKenzie
cda2bfce38 enable do expression tests 2015-07-04 21:51:57 +02:00
Sebastian McKenzie
0e4bb5ee3f clean up verifyConstructor classes visitor and disallow super.* before super() in derived class constructors - fixes #1921 2015-07-04 21:38:22 +02:00
Conrad Zimmerman
224db29c05 Handle single child when using React inlining
Changes optimisation.react.inlineElements to handle a single child as the
value of the `children` property instead of wrapping it with an array.
This matches the behavior of `React.createElement`.
2015-07-03 18:55:38 -04:00
Logan Smyth
3f38a83600 Properly regenerate scope for replaced nodes - fixes #1773 2015-07-01 22:06:05 -07:00
Sebastian McKenzie
336c65fe2c restructure classes transformer, fix class name inference - #1877 2015-06-30 14:49:04 +01:00
Sebastian McKenzie
092d98fb27 add constructor to body in order that it was supplied in - fixes #1877 2015-06-30 10:10:52 +01:00
Sebastian McKenzie
e55ce575cd move up template literal simplification logic - fixes #1874 2015-06-29 23:36:06 +01:00
Sebastian McKenzie
0044100e3d perform function name inference on functions in properties before they're properly visited - fixes #1860 2015-06-29 00:20:47 +01:00
Sebastian McKenzie
54819b94e9 skip flow types when finding rest parameter references 2015-06-26 23:29:09 +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
4c233e88ff add use strict 2015-06-26 01:09:47 +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
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
128d3b5c91 add missing computed loose test - ref #1820 2015-06-25 04:11:32 +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
a096f6b1c5 fix noOptimise state being incorrect when recursing into multiple nested functions - fixes #1815 2015-06-24 13:45:14 +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
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
4b0f624fb3 turn method literal keys into assignments in loose mode - fixes #1797 2015-06-21 23:59:06 +01:00
Sebastian McKenzie
13d5c94b8b update transformation tests 2015-06-21 00:03:29 +01:00
Sebastian McKenzie
8f74e8068c fix generation tests to reflect acorn update 2015-06-20 23:35:02 +01:00
Sebastian McKenzie
4f08a77230 resync with upstream acorn 2015-06-20 23:28:49 +01:00
Sebastian McKenzie
4ac33d62af move spec.functionName transformer to builtin-basic - fixes #1743 2015-06-20 22:51:20 +01:00
Sebastian McKenzie
d3c30b669f update babel-plugin-runtime 2015-06-20 22:21:44 +01:00
Sebastian McKenzie
100317e0c8 split react displayName addition into a plugin - fixes #1761 2015-06-20 22:01:40 +01:00
Sebastian McKenzie
498297ce6b check for invalid binding identifiers when generating inferred method names - fixes #1794 2015-06-20 21:48:42 +01:00
Ingvar Stepanyan
09b334ad21 Add guard against non-ES5 integer literals. 2015-06-17 21:11:20 +03:00
Sebastian McKenzie
d647ede94b fix up raw number literal 2015-06-17 17:58:03 +01:00
Ingvar Stepanyan
fd4c0dae95 Generate original number representation when value was not changed. 2015-06-17 18:20:35 +03:00
Sebastian McKenzie
c7cac7aaba add deply nested smart insertion of rest parameter allocation 2015-06-17 02:34:42 +01:00
Sebastian McKenzie
b57a80ecae optimise rest parameters in spread element position and allocate rest array at the earliest common ancestor of all references - fixes #1768 2015-06-17 01:57:14 +01:00
Sebastian McKenzie
fb485567b9 support module live bindings in arbitary positions not in Program statement position - fixes #1760 2015-06-16 00:41:53 +01:00
Pierre-Yves Gerardy
4c1b4b6490 Add tests for IIFEs as default exports. 2015-06-15 19:28:17 +02:00
Sebastian McKenzie
e08d400b36 Merge pull request #1733 from hzoo/i-1732
remove empty strings from beginning of template - fixes #1732
2015-06-15 10:46:28 +01:00
Sebastian McKenzie
b9d066d953 add special case for null in get helper 2015-06-15 00:15:22 +01:00
Sebastian McKenzie
eba9f0ffbd clean up default constructor in derived classes - fixes #1748 2015-06-14 23:44:21 +01:00
Henry Zhu
98424f80af template-literals: remove unnecessary strings, only add "" to beginning if second node isn't a string - fixes #1732 2015-06-13 14:34:33 -04:00
Sebastian McKenzie
4b85b05839 use actual parameter reference for non-last default parameters - fixes #1690 2015-06-05 14:08:18 +01:00