Commit Graph

12 Commits

Author SHA1 Message Date
강동윤
1d0c78de6c
More works (#66)
ecma_transforms:
 - implement es2015::instanceof
 - implement es2015::typeof_symbol
 - implement inline_globals pass

ecma_parser:
 - `PResult<T>` is now `Result<T, ()>` and `Err(())` means that an error is emitted.
 - add docs
2018-11-18 14:00:07 +09:00
강동윤
b3a9d1a264
Cleanup (#64)
- rename packages to be consistent
 - `swc_macros` is removed. Now macros are imported with `extern crate macro_name` instead of `extern crate swc_macros`.
 - manage atoms with words.txt file
2018-11-17 16:38:23 +09:00
강동윤
4f1dc24e40
Update deps (#59)
* constructor codegen

* Update string_cache to 0.7

* make swc_common not depend on sourcemap

* Remove unused dependencies

* update either to 1.5.0

* update rustc-ap crates to 297

* remove unused dependency (fnv)
2018-11-16 11:56:04 +09:00
강동윤
9a5de4beb6
More transcompilers (#49)
transforms:
 - implement String.length simplifier
 - implement more arithmetic operations
 - new Date() is side-effect free
 - implement left.rhs * right
 - optimize `SeqExpr` while creation
 
 - implement es3 - member expression literals pass
 - implement es2015 - classes pass

codegen: 
 - handle infinity correctly
 - disable comments for testing (it's buggy)

ast:
 - add methods about reserved words
2018-11-14 19:40:46 +09:00
강동윤
9d7af34aab
Initial release (#45)
common:
 - rename `Folder` to `Fold`
 - folder.then()
 - impl Fold for Box<F>
 - impl Fold<T> for &mut F where F: Fold<T>

transforms:
 - make Simplifier private
 - organize compat

codegen:
 - use `Mark` to avoid deoptimization

swc:
 - upgrade rayon and use global thread pool instead
2018-11-10 17:44:35 +09:00
강동윤
e12dcf0452
Compiler baseline
- Fix binary
 - Add base for transformers

This will be last large squash.
2018-11-03 16:56:43 +09:00
강동윤
0a5f3f4ab5
rustup to 2018-08-29\ (#39)
- libswc is broken
2018-09-16 20:25:41 +09:00
강동윤
5602c376e5 Implement error reporting for ecmascript parser
Passes all test262-identity tests and all fail tests.
2018-01-26 21:53:30 +09:00
강동윤
fd5b4d0dc0 Revert "Merge remote-tracking branch 'refs/remotes/origin/simplifier'"
This reverts commit 43fcbcbef2, reversing
changes made to 15fde7b5ff.
2018-01-14 14:00:01 +09:00
강동윤
8d62017d88 add atoms for transformers 2018-01-14 13:30:50 +09:00
강동윤
e949c40517
ECMAScript parser (#1)
- Parser and lexer for lastest ecma spec https://tc39.github.io/ecma262

  - Lexer is currently very inefficient

 - Use https://github.com/tc39/test262-parser-tests/ for testing.

 - Implement proc-macro based ast folder and assert_eq_ignore_span! based on it.

 - Some utilities for proc macro at /macros/common
2018-01-12 16:53:06 +09:00
강동윤
0f9532dd5d initial commit 2017-12-22 22:07:03 +09:00