Commit Graph

513 Commits

Author SHA1 Message Date
강동윤
0e1991f62d
Fix bugs (#394)
- Add a test case for #392
 - Add tests for #389
 - Fix #388
 - Fix #387 
 - Add tests for #392

swc_ecma_parser:
 - Make non-last rest paramters in object pattern error
 - `...` must be followed by an identifier
2019-06-03 21:54:09 +09:00
bors[bot]
6939492295 Merge #391
391: Simplify: `left.rhs * right` is only safe when operators are the same r=kdy1 a=erikdesjardins

Some counterexamples:
```js
var x = 2**32 - 1;
var y = x & ~3;

(x * 2) & 2; // 2
x * (2 & 2); // 8589934590

(y & 1) | 2; // 2
y & (1 | 2); // 0

(y | 1) & 2; // 0
y | (1 & 2); // -4
```

Co-authored-by: Erik Desjardins <erikdesjardins@users.noreply.github.com>
2019-05-18 13:26:05 +00:00
Erik Desjardins
07bf194e61 Simplify: left.rhs * right is only safe when operators are the same 2019-05-16 14:10:06 -04:00
강동윤
b5bbbc0cd6 publish atoms 2019-05-02 16:06:42 +09:00
강동윤
0b4f06027d Version 2019-05-02 16:02:45 +09:00
강동윤
aa06bb7cc9 Bump version 2019-05-02 15:52:39 +09:00
강동윤
ed64a60cb3 Publish ast / codegen /transforms 2019-05-02 15:50:21 +09:00
강동윤
2951546f77 Fix sourcemap.
Closes #349
2019-05-01 19:18:48 +09:00
bors[bot]
4fa1b8bf79 Merge #383
383: Fix #382 r=kdy1 a=kdy1



Co-authored-by: 강동윤 <kdy1@outlook.kr>
2019-04-30 13:41:21 +00:00
강동윤
786117c16c Fix #382 2019-04-30 22:32:06 +09:00
강동윤
b4dde98c09
Fix #380 (#381)
swc_ecma_parser:
 - fix parsing of dot after dynamic imports (#380)
 - fix parsing of dynamic imports on top level
2019-04-29 23:36:30 +09:00
강동윤
9b82fce07e Add backer 2019-04-28 15:14:06 +09:00
강동윤
0d52148dcd
Bugfixes (#375)
swc_ecma_transforms:
 - fix hygiene for decorators (#367)
 - add test for react with common js module (#351)

swc_ecma_parser:
  - add test for string escape problem (#350)
2019-04-28 14:58:52 +09:00
강동윤
b44da9dbe4
Fix #369, #370 (#373)
swc_common:
 - don't emit `loc` for dummy spans

swc_ecma_transforms:
 - prevent hygiene from changing key in object pattern (#369)
 - fix module tests (iteration order of FxHashSet is changed)

swc_ecma_parser:
 - fix parsing of arrow function (#370)
2019-04-27 16:28:34 +09:00
강동윤
a55c2c2f64 Add backers 2019-04-26 20:56:34 +09:00
강동윤
d40600fd46 Make span not optional 2019-04-26 20:33:34 +09:00
강동윤
b329d34632 Fix codegen of async method property 2019-04-26 18:01:36 +09:00
강동윤
d3ff16d496 Emit location while serializing 2019-04-13 20:55:38 +09:00
강동윤
fbbafc5712 fix lints 2019-04-13 20:55:28 +09:00
강동윤
0ffd075588 Strip bodyless functions.
Closes #357.
2019-04-11 21:20:50 +09:00
강동윤
9e333a153c Fix #366 2019-04-11 21:11:21 +09:00
강동윤
ca220342e0 Fix #365 2019-04-11 21:04:06 +09:00
강동윤
56be56acea Fix lints 2019-04-11 21:01:29 +09:00
bors[bot]
31a2af103d Merge #363
363: Don't emit octal escape for null character followed by digit r=kdy1 a=erikdesjardins

Fixes #361

Co-authored-by: Erik Desjardins <erikdesjardins@users.noreply.github.com>
2019-04-10 06:09:13 +00:00
Erik Desjardins
3cc2e3315d Don't emit octal escape for null character followed by digit 2019-04-09 19:37:43 -04:00
bors[bot]
48b2607b28 Merge #362
362: Fix #358 r=kdy1 a=kdy1

Fix #358

Co-authored-by: 강동윤 <kdy1@outlook.kr>
2019-04-07 14:10:29 +00:00
강동윤
fe451d5809 Fix #360 and update rustc 2019-04-05 12:19:18 +09:00
Jagannath Bhat
8905ea2cef Some proof-reading work (#359) 2019-03-25 15:43:17 +09:00
강동윤
adcc5954ee Fix #358 2019-03-25 12:11:15 +09:00
Michael Stewart
6f97012821 fix test imports for latest nightly (#355) 2019-03-23 13:18:55 +09:00
寧靜
84973890e7 Update util.rs (#352)
swc_ecma_parser:
 - handle unicode_xid properly
2019-03-19 21:51:12 +09:00
강동윤
5114dc9e95
Extract resolver pass (#344) 2019-03-14 15:54:33 +09:00
강동윤
8674a1dae9
Chores (#341)
- add tests for #340.
 - add backer
2019-03-12 17:24:51 +09:00
강동윤
13bf89d08c
Fix bugs (#339)
swc_ecma_parser:
 - fix parsing of type query (#338)
 - fix parsing of `in` in a let / const declaration (#337)

swc_ecma_transforms:
 - string literal is computed (#336)
 - modules: handle imports in lhs of assignment correctly (#335)
2019-03-11 20:33:15 +09:00
강동윤
2025f20e8c
Handle imported stuffs in shorthand property. (#333)
swc_ecma_transforms:
 - handle imported stuffs in shorthand property (#332)
2019-03-10 22:17:08 +09:00
강동윤
8a8aa6f0b2
Add backer (#331) 2019-03-09 14:33:28 +09:00
강동윤
a40518f667
v1.0.36 (#330)
swc_ecma_parser
 - decorator_before_export is true for typescript. (#325)
 - fix parsing of dynamic imports. (#328)
 - fix parsing of conditional expression. (#327)
2019-03-09 09:07:15 +09:00
강동윤
248a53ce7c
Make deserialization faster (#324)
swc_ecma_ast:
 - make deserialization faster
2019-03-08 11:36:23 +09:00
강동윤
dd5f17463e
hygiene now handles class name correctly (#323) 2019-03-07 22:42:16 +09:00
강동윤
a311f42acf
Bugs (#321)
swc_ecma_parser:
 - add a test to ensure that \r\n is lexed correctly (#316)

swc_ecma_transforms:
 - destructuring pass now handle variable exports correctly (#317)
 - es2017::async_to_generator now handles module items. Fix #319.
 - prevent hygiene pass from de-exporting class and funcrion (#315)
2019-03-07 15:48:45 +09:00
강동윤
ed100700f1
Make deserialization fast (#314)
swc_ecma_ast:
  - add deserialization benchmark

ast_node:
 - #[ast_node] on enum now implements faster deserialization
2019-03-05 23:16:45 +09:00
강동윤
b4a391b3a7
es2015::destructuring pass (#312)
swc_ecma_transforms:
 - es2015::destructuring pass now uses computed member if necessary. (#311)
2019-03-05 17:44:47 +09:00
강동윤
5f16412273
Fix class properties pass (#310)
swc_ecma_transforms:
  - Class properties pass handle nested scope correctly (#308)
2019-03-03 17:01:23 +09:00
강동윤
b5d3b9a7c7
Initialize var to undefined in loops (#306)
swc_ecma_transforms:
 - block_scoping: initialize var to undefined if it's declared in a loop (#305)
2019-03-02 16:19:19 +09:00
강동윤
5dc4ba181d
Improve fixer (#304)
swc_ecma_transforms:
 - fixer: handle member exprssion correctly
 - fixer: handle binary expression correctly
 - fixer: handle conditional expression correctly
 - fixer: handle unary expression correctly
2019-03-01 22:50:43 +09:00
강동윤
1a0f1108a1
Bugs (#303)
swc_ecma_transforms:
 - report error if jsx namespace is used (#301)
2019-03-01 18:18:57 +09:00
강동윤
a2144bbbf5 Handle escapes in jsx attributes. Fix #299. 2019-03-01 16:31:26 +09:00
강동윤
99e34ddbbd
Fix #295 (#298)
swc_ecma_transforms:
 - hygiene::operator now handles export correctly (#295)
 - make function hoisting respect directives
2019-03-01 14:02:33 +09:00
강동윤
21f3f792d1
Fixes (#294)
swc_ecma_transforms:
  - block_scoped_fn: don't fold self-modifing functions. (#288).
  - fixer: fix assignment in conditional expression (#293)
  - make resolver work with self modifying function (#292)
2019-02-28 23:07:31 +09:00
강동윤
f49fbea2af Update referenes 2019-02-28 19:30:58 +09:00