Commit graph

44 commits

Author SHA1 Message Date
thepassle
eaeafa0a82 feat(cli): exit codes
chore: remove foo.js

chore: review comments

chore: shut clippy up

chore: ran cargo fmt

chore: unnecessary return
2023-02-26 01:32:17 +08:00
Boshen
4f36f7d2ef
ci: attempt to fix miri with "-Zmiri-disable-isolation" 2023-02-26 00:49:19 +08:00
Boshen
4c2e57224b
ci: ignore miri for insta 2023-02-26 00:00:04 +08:00
Boshen
28916f96af feat(linter): setup tests 2023-02-25 23:45:03 +08:00
Boshen
f17bd87f65
fix: try disable miri with custom allocators 2023-02-25 21:04:52 +08:00
Boshen
bf76f6d8b6
chore: ignore miri on global allocators
error: unsupported operation: can't call foreign function `_rjem_malloc` on OS `linux`
   --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/jemallocator-0.5.0/src/lib.rs:104:13
    |
104 |             ffi::malloc(layout.size())
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't call foreign function `_rjem_malloc` on OS `linux`
    |
    = help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
    = note: BACKTRACE:
    = note: inside `<jemallocator::Jemalloc as std::alloc::GlobalAlloc>::alloc` at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/jemallocator-0.5.0/src/lib.rs:104:13: 104:39
note: inside `_::__rg_alloc`
   --> tasks/benchmark/src/main.rs:13:16
    |
12  | #[global_allocator]
    | ------------------- in this procedural macro expansion
13  | static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc;
    |                ^^^^^^^^^^^^^^^^^^^^^^
    = note: this error originates in the attribute macro `global_allocator` (in Nightly builds, run with -Z macro-backtrace for more info)
2023-02-25 20:45:38 +08:00
Boshen
636a974686
feat(benchmark): setup hyperfine benchmark
closes #25
2023-02-25 18:58:31 +08:00
Boshen
c86cca37a8 feat(linter): linter prototype 2023-02-25 16:56:10 +08:00
Boshen
abb2f8c949 feat(rust): use mimalloc on windows 2023-02-25 11:58:57 +08:00
Boshen
5f7a756229 feat(semantic): add semantic builder with untyped ast tree creation 2023-02-25 10:32:48 +08:00
Boshen
0de5020d07
fix(ast): s/span/node in visit 2023-02-25 10:21:23 +08:00
Boshen
9f3a8c12a9 feat(cli): initialize cli and directory traversal 2023-02-24 22:46:56 +08:00
Xuan
457e85b4a0 fix(oxc_parser): check ambiguous for await 2023-02-24 12:46:59 +08:00
Boshen
4684118c9e
fix: change example names so their binary names don't collide with each other 2023-02-23 21:46:39 +08:00
Xuan
65e81ce12c fix(oxc_parser): eat decorator for export 2023-02-23 12:28:34 +08:00
Boshen
4f4a9802b7 refactor(diagnostics,parser): move diagnostics to parser 2023-02-22 19:23:01 +08:00
Boshen
7a44a657e1 feat: add miette fancy report to examples 2023-02-22 19:23:01 +08:00
Boshen
5390d3e6b4 refactor(diagnostic): change Err type to miette::Error
This is the prerequisite for breaking up the large Diagnostic enum.
2023-02-22 11:08:21 +08:00
Boshen
4c6407b152 refactor(ast): s/node/span
This corrects the jargon for span. The term `node` came from `estree`,
which is a bit misleading here in Rust.

closes #9
2023-02-21 19:17:49 +08:00
Boshen
f3a7d5a026 feat(ast): add RegExpFlags bitflag for storing regex flags
This reduces `TokenValue` from 56 to 40 bytes, `Token` from 72 to 56 bytes.
2023-02-21 18:22:15 +08:00
Boshen
a733856536 refactor(ast,parser): use u32 for node spans
The next PR will fix the jargon where Node = Span.

relates to #9
2023-02-21 16:02:23 +08:00
Boshen
39a05030d7 refactor(ast,parser): box FormalParameters 2023-02-21 13:11:58 +08:00
Boshen
d57ab2f088 refactor(ast,parser): remove Node::ctx
This is adding too many bytes to the AST
2023-02-21 13:11:58 +08:00
Boshen
c640b4fb08 perf(ast): box PropertyKey enum 2023-02-21 13:11:58 +08:00
Boshen
cf278a2760 perf(parser): a few micro optimizations 2023-02-21 13:11:58 +08:00
Boshen
0bbbc7768f perf(oxc_parser): use u8 for offset 2023-02-21 13:11:58 +08:00
Boshen
73663f274c perf(parser): inline all methods on Context 2023-02-21 13:11:58 +08:00
Boshen
83c3f34af2 feat(lexer): use portable-SIMD to speed up multiline comment scanning 2023-02-20 21:58:08 +08:00
Boshen
4fc112f7dc feat(ast): add visitor 2023-02-20 20:45:14 +08:00
Boshen
ab68cea0b7 perf(lexer): use portable-SIMD to speed up whitespace scanning
closes #13
2023-02-20 19:03:15 +08:00
Boshen
457aa7d1be feat(printer): add printer example 2023-02-20 18:23:36 +08:00
Boshen
e4b07b7db9 feat(printer): Initialize printer
closes #21
2023-02-20 18:23:36 +08:00
Xuan
362c02f8e1 docs(oxc_parser): add header symbol for parser.unexpected 2023-02-18 09:06:56 +08:00
Boshen
a347e3993e
Revert "perf(lexer): use portable-SIMD to speed up multiline comment scanning"
This reverts commit a51c7f9ba2.
2023-02-17 14:50:42 +08:00
Boshen
a51c7f9ba2 perf(lexer): use portable-SIMD to speed up multiline comment scanning 2023-02-15 19:51:13 -08:00
Boshen
85955d7147
refactor(parser): clean up some lexer code 2023-02-12 21:34:19 +08:00
Boshen
d8fd23524a
feat(oxc_parser): allow filename as option in examples/simple.rs 2023-02-12 15:57:40 +08:00
Boshen
3daf5bcea9
chore(example): add an example for testing purposes 2023-02-12 11:11:35 +08:00
Boshen
a339ba3f92 feat(coverage): print parsing conformance for test262 (currently 100%) 2023-02-11 08:02:42 -08:00
Boshen
1fdc635638 feat(parser): add parser 2023-02-11 05:26:49 -08:00
Boshen
62a4f2b551 feat(ast): add ast 2023-02-11 04:27:34 -08:00
Boshen
4ae70b9592 feat(parser): add lexer 2023-02-11 02:29:54 -08:00
Boshen
664c37631e feat(allocator): add allocator 2023-02-11 01:05:07 -08:00
Boshen
d026e33343 chore: add rust-toolchain.toml and Cargo.toml 2023-02-11 13:03:40 +08:00