Tobias Koppers
416247102a
Merge pull request #6288 from ooflorent/fix_variable_hook
...
Fix VariableDeclaration visitors
2018-01-12 10:58:03 +01:00
Tobias Koppers
e6fb58d1fc
Merge pull request #6273 from ooflorent/fix-4857/unreachable_branches
...
Eliminate unreachable branches
2018-01-12 10:55:27 +01:00
Florent Cailhol
c9ff97fa7e
Eliminate unreachable branches
...
Webpack does not transpile unreachable branches leaving `import` expressions
in the code. This PR modifies `ConstPlugin` to remove the unreachable branch.
Before:
```js
if (true) { 1 } else { import("a") }
if (false) { import("a") } else { 1 }
true ? 1 : import("a");
false ? import("a") : 1;
```
After:
```js
if (true) { 1 } else {}
if (false) {} else { 1 }
true ? 1 : null;
false ? null : 1;
```
2018-01-11 19:35:24 +01:00
Florent Cailhol
e44ba306a0
Fix VariableDeclaration visitors
2018-01-11 15:56:41 +01:00
Florent Cailhol
bc05ee3f75
Fix parser hooks
2018-01-10 20:52:33 +01:00
Florent Cailhol
10490c947d
Remove unused methods
2018-01-04 13:55:26 +01:00
Florent Cailhol
5e616ec8de
Make enter calls static
2018-01-03 22:53:37 +01:00
Florent Cailhol
71f5abf7ae
Remove forEach closures to reduce GC
2018-01-03 22:44:17 +01:00
Tobias Koppers
8a38c4bd34
add support for empty catch clause
...
fixes #6220
2018-01-01 10:49:19 +01:00
Tobias Koppers
8a79c213e7
fix support for patterns in for in/of statements
...
add test case
2018-01-01 10:48:56 +01:00
Florent Cailhol
48b412453c
Make walk/prewalk calls static
2017-12-31 18:09:26 +01:00
Florent Cailhol
9669c9e013
Use Parser#hooks instead of Tapable#plugin
2017-12-21 09:08:10 +01:00
Cody Ogden
f5b57f4764
Extract TrackingSet class from the Parser.js module.
...
@TheLarkInn suggested this class be extracted from this file during the live stream tonight. A similar class was removed and placed in the directory.
- Created
2017-12-20 01:37:49 -06:00
Tobias Koppers
758f1eb464
Merge branch 'master' into next
2017-12-12 14:45:09 +01:00
Florent Cailhol
da08376fd9
Evaluate bitwise and exponential operations
2017-12-05 17:16:45 +01:00
Tobias Koppers
85951d33be
Merge branch 'master' into next
2017-12-05 09:03:45 +01:00
Nikhil Gaba
5ab6972634
Improve Parser to recognize 'new Foo(...)' type expressions
2017-12-01 16:43:39 -08:00
Tobias Koppers
dffedccc75
reduce memory usage
2017-11-29 12:08:52 +01:00
Tobias Koppers
c10da6c285
upgrade tapable from Parser
2017-11-28 10:25:48 +01:00
Tobias Koppers
5a4f0aca67
change imports of tapable to old version
...
prepare to migrate to new tapable version
2017-11-27 20:56:42 +01:00
Tobias Koppers
75f68a2635
fixes linting, remove not needed context arguments
2017-11-08 20:49:41 +01:00
Tobias Koppers
f7c2f8e470
Update code style to arrow functions
2017-11-08 11:56:01 +01:00
Tobias Koppers
9e42dd6c4a
allow to pass AST directly to webpack
2017-11-03 11:12:45 +01:00
Tobias Koppers
6a6cd57b26
Merge branch 'next' into import-context-filter
2017-10-16 13:55:54 +02:00
Landon Crapo
bc6c1be90c
refactoring filter to include and other requested changes
2017-10-13 15:41:44 -06:00
Tobias Koppers
65dfc15807
Merge branch 'master' into next
...
# Conflicts:
# test/statsCases/external/expected.txt
2017-09-22 19:52:31 +02:00
Logan Smyth
087b85a3b1
Support evaluating .concat on strings.
2017-09-14 16:12:43 -07:00
Logan Smyth
9f2639a9bb
Fix incorrect nesting of template literal eval plugins.
2017-09-14 10:02:34 -07:00
Tobias Koppers
66385458a6
use marker objects to support any value in StackedSetMap
2017-08-11 16:38:17 +02:00
Tobias Koppers
25805470c1
move StackedSetMap into separate file
2017-08-11 12:30:33 +02:00
Tobias Koppers
25b73bbcf6
bugfixes and test fixes
2017-08-11 12:28:04 +02:00
Tobias Koppers
2d9252c838
use more performant plugin methods
2017-08-11 12:28:04 +02:00
Tobias Koppers
d9e01d4a5f
use more efficient data structures
...
Parser.definitions and Parser.renames are using Maps now
2017-08-11 12:23:58 +02:00
Adam Thomann
15f4894ebe
Convert bind(this) to arrow functions
2017-08-11 01:52:25 -04:00
Tobias Koppers
991b360c90
fix useless-escape linting issues
2017-07-24 11:54:06 +02:00
Tobias Koppers
b9adfaaf76
rewrite code which uses unshift to push
2017-07-18 20:46:59 +02:00
Zhibin Liu
12a1352661
[Parser] rename `this` in `.call(this)`
2017-07-12 00:12:15 +08:00
Tobias Koppers
9ff3c7a6f6
Merge pull request #5076 from ljqx/parser-support-rename-this-for-iife
...
[Parser] Support rename this's property for IIFE
2017-07-01 17:44:31 +02:00
Remi Liu
cc2df2f978
add test
2017-06-23 11:03:34 +08:00
Tobias Koppers
8e4c8423b5
accept truthy/falsy value for not
...
fix #5100
2017-06-20 15:58:24 +02:00
Remi Liu
9bff9ac107
[Parser] Support rename this's property for IIFE
2017-06-16 19:40:53 +08:00
Tobias Koppers
d967a4623c
add `module.strictThisContextOnImports` option
...
to allow spec-comforming behavior this context on
called imported harmony functions
2017-05-21 09:23:35 +02:00
Tobias Koppers
4a25a17bb6
improvements from review
2017-05-21 09:15:42 +02:00
Tobias Koppers
cd6d08685b
fix missing pattern walk
2017-05-21 08:16:32 +02:00
Tobias Koppers
231a6383e2
fix parsing issue with patterns
2017-05-21 08:10:22 +02:00
Tobias Koppers
272c105f5c
support destructing on assignment
...
fixes #4870
2017-05-21 08:10:13 +02:00
Tobias Koppers
619cf318ec
prewalk a function declaration
...
fixes #4709
2017-04-14 15:23:27 +02:00
Tobias Koppers
e78745221e
Merge pull request #4700 from webpack/bug/future-var-declaration
...
add parser prewalking to capture scope
2017-04-13 15:23:48 +02:00
Tobias Koppers
52f2daf89f
add test cases and fix a bug
2017-04-13 14:52:49 +02:00
Tobias Koppers
3afe67d6fb
add parser prewalking to capture scope
...
fixes #4608
2017-04-13 09:05:29 +02:00