Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
deps/ | 12-May-2024 | - | ||||
scripts/ | 12-May-2024 | - | 1,172 | 966 | ||
src/ | 12-May-2024 | - | 20,416 | 16,107 | ||
templates/ | 12-May-2024 | - | 829 | 759 | ||
tests/ | 12-May-2024 | - | 12,110 | 9,401 | ||
tools/ | 12-May-2024 | - | 224 | 153 | ||
ts2abc/ | 12-May-2024 | - | 2,897 | 2,422 | ||
.gitignore | D | 12-May-2024 | 20 | 3 | 2 | |
BUILD.gn | D | 12-May-2024 | 9.7 KiB | 346 | 301 | |
README.md | D | 12-May-2024 | 1,004 | 23 | 20 | |
package-lock.json | D | 12-May-2024 | 215.7 KiB | 4,891 | 4,890 | |
package.json | D | 12-May-2024 | 1.5 KiB | 52 | 51 | |
ts2abc_config.gni | D | 12-May-2024 | 5.7 KiB | 187 | 162 | |
tsconfig.json | D | 12-May-2024 | 719 | 31 | 31 | |
webpack.config.js | D | 12-May-2024 | 2.2 KiB | 79 | 57 |
README.md
1### ts2panda 2ts2panda aims to translate JavaScript source files into ARK bytecode which could be executed by the ARK runtime. 3 4The whole converter could be splited into several phases. 5* tsc(TypeScript compiler) automatically builds the AST for us 6* translate TypeScript AST into panda instruction arrays 7* apply several passes with the instruction arrays, including: 8 * [register allocator](doc/register_allocator.md) 9 * [intrinsic expander](doc/intrinsic_expander.md) 10 * [panda assembly dumper](doc/assembly_dumper.md) 11 * [panda binary dumper](doc/binary_dumper.md) 12 13### Run a case 14The whole ARK project needs to be built before running cases. 15#### dump panda binary 16``` 17node --expose-gc ../../out/release/clang_x64/arkcompiler/ets_frontend/build/src/index.js <your/path/to/case_jsFile> <--> <--output> <output-filename> 18``` 19#### dump panda assembly 20``` 21node --expose-gc ../../out/release/clang_x64/arkcompiler/ets_frontend/build/src/index.js <your/path/to/case_jsFile> --dump-assembly 22``` 23