| /arkcompiler/ets_runtime/docs/ |
| D | overview.md | 3 …and configurable multi-language compilation and runtime platform of OpenHarmony. It contains core … 5 ArkCompiler JS Runtime consists of two parts: JS compiler toolchain and JS runtime. The JS compiler… 22 …anguage-irrelevant runtime libraries, including ArkCompiler File, Tooling, and ArkCompiler Base. A… 26 …ecutes bytecodes, inline caching that stores hidden classes, and Profiler that analyzes and record… 30 … of the Stub compiler, optimized compilation framework based on the Circuit IR, and code generator. 35 …emory management: object allocator and garbage collector (CMS-GC and Partial-Compressing-GC for co… 36 - Analysis tools: DFX tool and CPU and heap profiling tool 38 …- Standard library: standard library defined by ECMAScript, efficient container library, and objec… 39 …- Others: asynchronous work queues, TypeScript (TS) type loading, and JS native APIs (JSNAPIs) for… 45 …and security, ArkCompiler JS Runtime statically pre-compiles JS/TS programs into ArkCompiler bytec… [all …]
|
| /arkcompiler/ets_runtime/ |
| D | LICENSE | 6 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 10 "License" shall mean the terms and conditions for use, reproduction, 11 and distribution as defined by Sections 1 through 9 of this document. 16 "Legal Entity" shall mean the union of the acting entity and all 29 source, and configuration files. 34 and conversions to other media types. 42 form, that is based on (or derived from) the Work and for which the 47 the Work and Derivative Works thereof. 50 the original version of the Work and any modifications or additions 58 and issue tracking systems that are managed by, or on behalf of, the [all …]
|
| /arkcompiler/toolchain/ |
| D | LICENSE | 6 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 10 "License" shall mean the terms and conditions for use, reproduction, 11 and distribution as defined by Sections 1 through 9 of this document. 16 "Legal Entity" shall mean the union of the acting entity and all 29 source, and configuration files. 34 and conversions to other media types. 42 form, that is based on (or derived from) the Work and for which the 47 the Work and Derivative Works thereof. 50 the original version of the Work and any modifications or additions 58 and issue tracking systems that are managed by, or on behalf of, the [all …]
|
| /arkcompiler/runtime_core/ |
| D | LICENSE | 6 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 10 "License" shall mean the terms and conditions for use, reproduction, 11 and distribution as defined by Sections 1 through 9 of this document. 16 "Legal Entity" shall mean the union of the acting entity and all 29 source, and configuration files. 34 and conversions to other media types. 42 form, that is based on (or derived from) the Work and for which the 47 the Work and Derivative Works thereof. 50 the original version of the Work and any modifications or additions 58 and issue tracking systems that are managed by, or on behalf of, the [all …]
|
| D | README.md | 15 …ibraries, including ArkCompiler File, Tooling, Base and ISA. ArkCompiler File provides bytecodes a… 26 … format (*.abc). For details about the format, see docs/assembly_format.md and docs/file_format.md. 28 …# Cmake script that contains the toolchain files and common cmake functions used to define the bui… 29 ├── compiler # Compiler including IR(intermediate representation) and passes for byt… 32 ├── docs # Language frontend, ARK file format, and runtime design documents. 34 ├── gn # GN templates and configuration files. 36 ├── isa # Bytecode ISA description file YAML, Ruby scripts and templates. 39 …c ArkCompiler runtime library, including logs, synchronization primitives, and common data structu… 41 ├── libziparchive # Provides APIs for reading and using zip files implemented by zlib. 49 …lates # Ruby templates and scripts used to process command line options, loggers, er… [all …]
|
| /arkcompiler/ets_frontend/ |
| D | LICENSE | 6 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 10 "License" shall mean the terms and conditions for use, reproduction, 11 and distribution as defined by Sections 1 through 9 of this document. 16 "Legal Entity" shall mean the union of the acting entity and all 29 source, and configuration files. 34 and conversions to other media types. 42 form, that is based on (or derived from) the Work and for which the 47 the Work and Derivative Works thereof. 50 the original version of the Work and any modifications or additions 58 and issue tracking systems that are managed by, or on behalf of, the [all …]
|
| /arkcompiler/runtime_core/docs/ |
| D | ir_format.md | 4 * Possibility to implement various optimizations and analyses 5 * Support all the features and instructions of Panda bytecode 8 * Be able to convert to other IR and back 10 ## Optimizations and analyses 12 …nality for various code transformations and analyses. The structure of the IR should be as clear a… 13 Also in the compilation process, the order of execution of optimizations and analyses is very impor… 14 The first goal of the Panda IR to be able to change the order of the passes, add and delete passes(… 58 !NOTE It is possible to write other optimizations based on the specifics of the language and VM 62 …n an arbitrary order. Some restrictions will still be: register allocation and code generation at … 66 * Using profile information for IFC and speculative optimizations [all …]
|
| D | 2022-08-18-isa-changelog.md | 6 * Function Kind and Header index 7 * MethodId, StringId and LiteralArrayId 11 The bytecode size and runtime performance have been suffering for a long time as the all the 12 ecmascript specific bytecode are prefixed and their opcode were encoded with two bytes. 13 1. We delete all original java specific opcodes and delete java specific opcode prefix. 15 3. We add prefix "deprecated" and keep the many old isa as "deprecated"-prefixed opcodes (for compa… 16 4. We add prefix "throw" and make all throwing opcodes be prefixed by "throw". 18 6. We adjust the format of some opcodes (about immediate number and accumulator), so that the bytec… 22 ## Function Kind and Header index 26 We reuse the field 32-bit field `access_flags_` to encode Function Kind and Header index. [all …]
|
| D | rationale-for-bytecode.md | 5 This document sets up some context about bytecode design principles and provides rationales for 14 somewhere in memory and executes corresponding _operations_ on operation's arguments, 19 is used for storing local variables along with function arguments and doing function calls. 23 that the number and purpose of registers differs, too. Some nuances of working with stack may also 24 vary across CPUs and/or different operating systems. 29 commands (or bytecode) and execute them. Of course, this implies additional performance overhead 31 abstract from CPU limitations and run our program wherever our interpreter runs. Tooling 36 hardware world: the terms "operations", "operands", "registers" and "stack" have the same meaning. 37 In case there is a chance for ambiguity, the terms "virtual registers" and "virtual stack" are used 38 to distinguish between an abstract system and the hardware. [all …]
|
| D | design-of-interpreter.md | 5 This document outlines the key design decisions in the interpreter and its companion components: 21 and all related components of the platform: 40 1. Bytecode is register-based: all arguments and variables are mapped to virtual registers, 41 and most of bytecodes encode virtual registers as operands. 43 bytecodes and shared across all function frames during runtime. 45 code and documentation generation. 54 a bunch of C/C++ headers is very fragile and error-prone. At the same time, 62 definitions were defined and used, different parts of instruction description doesn't contradict 73 1. All entities in the executable file should be encoded and stored compactly to avoid bloating 81 1. The entire code of the application (excluding frameworks and external libraries) fits into a [all …]
|
| D | glossary.md | 6 development of compilers and interpreters is confusing in some cases. This document describes what 11 * **AOT** stands for **Ahead-Of-Time**. In compilers, terms "ahead-of-time compilation" and "AOT 14 native machine code to reduce runtime overhead from reading and compiling bytecode. 17 * **Compiler** is a tool that performs source code or bytecode translation, optimization and 20 used to represent input program and usually designed for analysis and optimization. 22 * **ISA** stands for **Instruction Set Architecture**. See **Panda Bytecode** and 24 * **JIT** stands for **Just-In-Time**. In compilers, terms "just-in-time compilation" and "JIT 32 correspondence between the instructions in the language and **Panda Bytecode** instructions. 37 compactness and efficient execution by Panda Runtime. See https://en.wikipedia.org/wiki/Bytecode. 42 * **Allocator** is a part of the system that servicing allocation and deallocation requests. [all …]
|
| D | panda-runtime.md | 3 Panda Runtime is a multi-language runtime designed to run on microcontrollers and mobile devices. 7 * Simple and portable design 8 * Minimalistic and lightweight implementation 9 * Documented design, rationales, and public API 10 * Buildable and tested master 11 * Explicit maintenance and development process 32 # Development Process and Coding Guidelines
|
| /arkcompiler/runtime_core/tests/cts-generator/cts-template/ |
| D | and.yaml | 11 # See the License for the specific language governing permissions and 16 - file-name: "and" 19 description: Perform specified binary operation on two registers and store result 27 - sig: and v1:in:i32, v2:in:i32 35 and v0, v1 43 description: Check 'and' with zero and various values. 68 - sig: and v1:in:i32, v2:in:i32 76 and v0, v1 84 description: Check 'and' with +1 and various values. 116 - sig: and v1:in:i32, v2:in:i32 [all …]
|
| /arkcompiler/runtime_core/compiler/docs/ |
| D | plt.md | 9 During code generation so-called `SlowPath` code is created, and we put it into a special cold code… 10 …SlowPath` blob is generated for each place it is called, and as it contains saving registers and s… 15 Speaking about AOT mode, for opcodes like `CallStatic`, `CallVirtual`, and opcodes related to `Clas… 22 For each pair of File (input for `ark_aot` compiler) and callee `method Id` (`panda_file::File::Ent… 23 consecutive slots are reserved in PLT-GOT table. `FirstSlot` is filled during AOT file creation and… 24 `SecondSlot` is filled during AOT file loading into runtime and contains `PLT CallStatic Resolver` … 55 `PLT CallStatic Resolver` after saving all registers to the stack and `BoundaryFrame` generation, h… 58 having this two values in `x0` and `x1` it just call `GetCalleeMethod` to gather `Method pointer`. 60 …pointer`, it is stored into `ThirdSlot`, allow to load proper executable address, and goes as first 66 For each pair of File (input for `ark_aot` compiler) and callee `method Id` (`panda_file::File::Ent… [all …]
|
| D | reg_alloc_graph_coloring_doc.md | 18 …and Fernando Pereira. It is based on observation that programs in a strict SSA form produce a Chor… 19 In works of Hack ("Register Allocation for Programs in SSA Form") and Pereira ("Register Allocation… 20 Before coloring, available registers are collected from Architecture and remapped (to sequential nu… 26 If interval is pre-colored, this value is set as pre-color for node. And input parameters is marked… 27 …ween values. Currently affinity edges are added for inputs of PHI-function and input of Return ins… 31 …eedy coloring is an algorithm that is collecting colors of neighbor nodes, and chose color for pro… 37 …ly. Pre-coalescing is known to potentially can increase register pressure, and make graph G’ not K… 38 …And on stage of coloring it is tried to satisfy these hints if possible. This approach is more fle… 39 …igned for nodes such as input parameters of function itself and arguments for call-sites, and affi… 42 …ne edges are visited. Marker of visited node here is assigned bias-number. And each bias additiona… [all …]
|
| D | balance_expressions_doc.md | 5 …binary associative and commutative operator, such as `ADD`, `MUL`, `AND`, `OR`, and etc. It calcul… 19 …ion and it is necessary to determine the whole chain and its critical path by recursive [analysis]… 21 …cate them to expression's terms in an [optimal way](#operators-allocation) and insert new operator… 26 …and has the only user (the operator itself). If so, the input is an operator of the expression, th… 27 If inputs belong to different basic blocks but satisfy the conditions above (have single user and a… 33 `Allocation in an optimal way` is an algorithm that creates expression and guarantees that it would… 34 … array of expression terms, algorithm called for two arguments `first_idx` and `last_idx` creates … 37 …st_idx` covers `2` elements then create and return operator with `lhs` and `rhs` equal to `terms[f… 38 …and size of `first_idx:split_idx` is the greatest possible power of 2, create and return operator … 47 // Recursively check and save inputs, determine critical_path_length; [all …]
|
| D | if_conversion_doc.md | 8 …and starts executing instructions after the branch speculatively before executing the branch itsel… 20 Two patterns are checked for each block: `Triangle` and `Diamond`. 35 `PBB`(Phi BB) -- false or true successor of `BB`, which contain PHI instruction for BB and JBB 48 `JBB`(Join BB), `JBB 2` -- true and false successors of BB, which will be joined to `BB ` 49 `PBB`(Phi BB) -- the successor of `JBB` and `JBB 2`, which contain PHI instruction for `JBB` and `J… 54 1. `JBB`(and `JBB 2` for Diamond) must have only one predecessor and one successor 56 3. `JBB`(and `JBB 2` for Diamond) is the predecessor of the PBB 57 4. `JBB`(and `JBB 2` for Diamond) doesn't contain instruction with `no_ifcvt` property(for example … 58 5. The number of instructions in `JBB`(and `JBB 2` for Diamond) less than the limit(set by the opti… 60 7. `PBB` doesn't contain float Phi with different inputs for `JBB` and `BB`(`JBB 2` for Diamond) [all …]
|
| D | ir_builder.md | 9 …lgorithms to construct SSA form, most known is a Cytron et al. It produce most clear and pruned SSA 11 build dominance tree and dominance frontier. 14 and faster. 20 - constant hasn't type as well and if one constant is used in integer and float operations, it must… 22 - if constant is `0` and it is used in instruction that expects object(f.e. `mov.obj`), we need to … 43 1. Iterate over all bytecode instructions and make basic block for all target instructions, i.e. in… 51 2. If basic block is a loop header, create SafePoint and OsrSaveState instructions. 66 …or all constants that are used in instructions with different types, split constant instruction and 69 …- Remove dead Phi and set types to phi which have no type. Phi may not have type if all it users a… 71 …- Check all instructions that have no type and fix it. Type is got from instructions with known in… [all …]
|
| /arkcompiler/runtime_core/libziparchive/ |
| D | zip_archive.h | 12 * See the License for the specific language governing permissions and 71 * Open a Zip archive from filename path, and sets handle for the file. 75 * Returns 0 on success, and 1 on failure. 85 * Open a Zip archive from opened file FILE* fp, and sets handle for the file. 89 * Returns 0 on success, and 1 on failure. 96 * Returns 0 on success, and 1 on failure. 104 * Returns 0 on success, and 1 on failure. 111 * Returns 0 on success, and 1 on failure. 118 * Returns 0 on success, and 1 on failure. 123 * Get Info about the current file within ZipFile and write info into the *entry structure. [all …]
|
| /arkcompiler/runtime_core/plugins/ |
| D | CMakeLists.txt | 11 # See the License for the specific language governing permissions and 19 if (PANDA_WITH_ECMASCRIPT AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ecmascript") 25 if (PANDA_WITH_ACCORD AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/accord") 31 if (PANDA_WITH_CANGJIE AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cangjie") 37 if (PANDA_WITH_JAVA AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/java") 43 if (PANDA_WITH_TESTS AND PANDA_WITH_RUNTIME AND PANDA_WITH_JAVA AND PANDA_WITH_ECMASCRIPT AND EXIST…
|
| /arkcompiler/runtime_core/docs/bc_verification/ |
| D | types_n_values.md | 8 3. Physycal (concrete) types. They are parameterized types by abstract and storage types. 12 Types are formed by some `Sort`, an uniq identifier of the type family, and particular parameters. 26 - Types are denoted by sort literal and parameters in parenthesis. For instance: `Array(~i8())`. 35 If two types, say `A()` and `B()` related as `A() <: B()`, i.e. `A()` is the subtype of `B()`, then… 43 - `A() <: B() <: C()` - means `A() <: B()`, `A() <: C()` and `B() <: C()` 45 - `(A() | B()) <: C()` - means `A() <: C()` and `B() <: C()` 47 - `(A() | B()) <: (C() | D())` - means `A() <: C()`, `B() <: C()`, `A() <: D()` and `B() <: D()` 49 In short `|` means composition of types (syntactically) in set, and `<:` is distriuted over `|`. 51 ## How to read notation of type parameters and to determine subtyping relation? 53 Suppose, we have types `T(+i8())` and `T(+i16())` and `i8() <: i16()`, how to relate types `T(...)`? [all …]
|
| /arkcompiler/runtime_core/runtime/bridge/arch/arm/ |
| D | handle_call_v4_v4_v4_imm4_id16_armhf.S | 12 * See the License for the specific language governing permissions and 18 // r0 - SHORTY_PTR_REG, r1 - SHORTY_REG, r2, r3 - shorty value and temp, 19 // r4 - gpr and fpr base ptr, r5 - gpr arg ptr, r6 - fpr arg ptr, 27 // read the pair of reg indexes into r9 and advance insn_ptr 29 // read reg index and acc position into r10 and advance insn_ptr 34 and ip, ip, #0xF // ip now contains acc position 41 // check acc position and branch to acc/vreg index handling 46 and r3, r10, #0xF
|
| D | handle_call_v4_v4_v4_imm4_id16_arm.S | 12 * See the License for the specific language governing permissions and 19 // r5 - iframe, r6, r7 and r9 - temps, r8 - pointer to stack, lr - method 22 // read the pair of reg indexes into r9 and advance insn_ptr 24 // read reg index and acc position into r3 and advance insn_ptr 29 and r9, r9, #0xF // r9 now contains acc position 36 // check acc position and branch to acc/vreg index handling 41 and r6, r3, #0xF
|
| /arkcompiler/ets_runtime/test/moduletest/calltype/ |
| D | expect_output.txt | 11 # See the License for the specific language governing permissions and 15 jscall 0 and native call1 16 jscall 1 and native call2 1 17 jscall 2 and native call3 1 2 18 jscall 3 and native callirange 1 2 3 19 jscallirange and native callirange 1 2 3 4
|
| /arkcompiler/runtime_core/runtime/bridge/arch/aarch64/ |
| D | handle_call_imm4_v4_v4_v4_aarch64.S | 12 * See the License for the specific language governing permissions and 26 and w1, w13, 0xF 31 and w2, w13, -16 38 // Read next insn byte for user's arg1 and arg2: 42 and w3, w13, 0xF 49 and w4, w13, -16 56 // Read next insn byte for user's arg3 and arg4: 60 and w5, w13, 0xF 67 and w6, w13, -16
|