Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
scripts/ | 12-May-2024 | - | 1,375 | 1,106 | ||
src/ | 12-May-2024 | - | 17,633 | 13,912 | ||
templates/ | 12-May-2024 | - | 796 | 725 | ||
tests/ | 12-May-2024 | - | 10,677 | 8,094 | ||
tools/ | 12-May-2024 | - | 223 | 152 | ||
ts2abc/ | 12-May-2024 | - | 2,241 | 1,830 | ||
.gitignore | D | 12-May-2024 | 20 | 3 | 2 | |
BUILD.gn | D | 12-May-2024 | 6.4 KiB | 251 | 219 | |
README.md | D | 12-May-2024 | 970 | 23 | 20 | |
package-lock.json | D | 12-May-2024 | 476.8 KiB | 12,021 | 12,020 | |
package.json | D | 12-May-2024 | 1.5 KiB | 52 | 51 | |
ts2abc_config.gni | D | 12-May-2024 | 6.7 KiB | 231 | 198 | |
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/ark/ark/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/ark/ark/build/src/index.js <your/path/to/case_jsFile> --dump-assembly 22``` 23