17 Commits

Author SHA1 Message Date
Pranav Prakash
e98bb3dc60 Use new Array instead of Array for V8 optimization (#6250)
* Use new Array instead of Array for V8 optimization

* fix spacing [skip ci]

* Remove extraneous use strict clauses
2017-09-18 14:14:46 -04:00
Ruben Verborgh
6560a29c36 Redeclaring a variable counts as a modification (#6219)
* Redeclaring a variable counts as a modification.

Fixes #6217.

* Remove "existing" logic from Binding.

Was added in #5745, but no longer triggered since 6536e605a.
2017-09-08 23:02:26 -04:00
Artem Yavorsky
b2b3d7944a Spec compatibility for iteratorClose condition. (#6094)
* for-of: IteratorClose spec compatibility.

See #3:
https://tc39.github.io/ecma262/#sec-iteratorclose

* Update spec fixtures for for-of.

* Fix IteratorClose case for remap-async-to-generator.

* Fix IteratorClose case for async-generator-function test output.

* Modify few tests according to iteratorClose fix.

* Fix iteratorClose for helpers.slicedToArray also.

* Update iteratorClose fixture for commonjs.
2017-08-28 13:39:02 -06:00
Henry Zhu
0f823beeb1 Newlines in fixtures (#6044)
* write newlines for fixtures

* rerun fixtures
2017-08-02 15:35:29 -04:00
Daniel Tschinder
b3372a572d Remove whitespace generation (#5833)
* Remove whitespace generation and rely on default printing

Changes to printing:
* Add newline after last empty SwitchCase
* Add newlines around block comments if they are non-flow comments or contain newlines

* Fix a few more fixtures
2017-06-27 21:57:02 -05:00
Karl Cheng
0667160b11 Fix optimisation of shadowed rest parameters
The arguments of a function would be unnecessarily copied if there was
a nested function that had a parameter with the same identifier as the
rest parameter for the outer function. This checks the scope of the
parameter is correct before deoptimising.

Fixes: https://github.com/babel/babel/issues/5656
Refs: https://github.com/babel/babel/issues/2091
2017-05-16 22:39:13 +10:00
Justin Ridgewell
823ffbd87c Fix error in rest parameter length optimization (#3573)
If there aren’t enough arguments to get to the offset index, we would
return an negative length.
2016-07-12 21:12:45 -04:00
Jesse McCarthy
8419be1afc Add postfix update expression fixtures.
(Failing.)
2016-02-25 17:11:19 -05:00
Jesse McCarthy
5f98d22b6d Add for-of fixture.
(Failing.)
2016-02-25 17:11:19 -05:00
Victor Felder
183fbab967 Fix some rest optimization errors.
Commit message edited by @jmm.
2016-02-25 17:11:19 -05:00
Jesse McCarthy
6ca07974c9 Add array destruct w/o [rest[0]] on RHS fixture.
(Failing.)
2016-02-25 17:11:19 -05:00
Jesse McCarthy
0be3a58dd2 Add expected fixtures for new actuals.
(Failing.)
2016-02-25 17:11:18 -05:00
Ben Newman
a82bf11e2a Add rest deoptimization fixtures.
(Failing.)

Commit message edited by @jmm.
2016-02-25 17:11:18 -05:00
Jesse McCarthy
49728be8b6 Test for no-opt of assign to rest param element.
That is, do not attempt to optimize assignments as opposed to reads.

(Failing.)
2016-01-14 13:21:40 -05:00
Fabio M. Costa
699868ed2a [fix][babel-plugin-transform-es2015-parameters] arguments.length optimization bugfix 2015-12-28 21:56:49 -08:00
Fabio M. Costa
3868d36e31 [babel-plugin-transform-es2015-parameters] more oportunities for optimisations 2015-12-17 10:50:56 -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