• Home
Name Date Size #Lines LOC

..--

scripts/12-May-2024-1,3751,106

src/12-May-2024-17,63313,912

templates/12-May-2024-796725

tests/12-May-2024-10,6778,094

tools/12-May-2024-223152

ts2abc/12-May-2024-2,2411,830

.gitignoreD12-May-202420 32

BUILD.gnD12-May-20246.4 KiB251219

README.mdD12-May-2024970 2320

package-lock.jsonD12-May-2024476.8 KiB12,02112,020

package.jsonD12-May-20241.5 KiB5251

ts2abc_config.gniD12-May-20246.7 KiB231198

tsconfig.jsonD12-May-2024719 3131

webpack.config.jsD12-May-20242.2 KiB7957

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