| /arkcompiler/ets_frontend/es2panda/test/parser/ts/ |
| D | test-ts-type-predicate.ts | 10 * distributed under the License is distributed on an "AS IS" BASIS, 24 function function2(asserts: number | string): asserts is number { return }; 25 var var2: (asserts: number | string) => asserts is number; 28 (asserts: number | string): asserts is number; property 29 (asserts: { a: number | string }): asserts is this; property 32 function function3(is: number | string): is is number { return }; 33 var var3: (is: number | string) => is is number; 36 (is: number | string): is is number; property 37 (is: { a: number | string }): is is this; property 40 function function4(a: number | string): a is number { return }; [all …]
|
| /arkcompiler/runtime_core/docs/ |
| D | doxygen.config | 6 # All text after a double hash (##) is considered a comment and is placed in 7 # front of the TAG it is preceding. 9 # All text after a single hash (#) is considered a comment and will be ignored. 10 # The format is: 21 # that follow. The default is UTF-8 which is also the encoding used for all text 25 # The default value is: UTF-8. 29 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by 31 # project for which the documentation is generated. This name is used in the 33 # The default value is: My Project. 39 # control system is used. [all …]
|
| D | glossary.md | 6 development of compilers and interpreters is confusing in some cases. This document describes what 12 compilation" are used to indicate that the source code or bytecode is compiled before actual 13 execution. In case of Panda Runtime, AOT compilation is used to compile Panda Bytecode into 17 * **Compiler** is a tool that performs source code or bytecode translation, optimization and 19 * **IR** stands for **Intermediate Representation**. IR is an internal compiler data structure 25 compilation" are used to indicate that the source code or bytecode is compiled during program 26 execution. In case of Panda Runtime, JIT compilation is used to compile Panda Bytecode into 29 * **Panda Assembler** is a tool that translates **Panda Assembly Language** 31 * **Panda Assembly Language** is a low-level programming language retaining very strong 34 * **Panda Binary File** or **Panda File** or **PF** is a binary representation of Panda Bytecode. [all …]
|
| D | design-of-interpreter.md | 40 1. Bytecode is register-based: all arguments and variables are mapped to virtual registers, 42 1. There is a dedicated register called accumulator, which is addressed implicitly by some 44 1. Bytecode's instruction set architecture is machine-readable with a dedicated API for 51 Rationale on the machine-readable instruction set architecture is following. Since bytecode 52 is the main form of program representation, information about it is needed in many components of 54 a bunch of C/C++ headers is very fragile and error-prone. At the same time, 58 * Converter from bytecode to the compiler's intermediate representation is partially implemented 86 in the offset. Additionally, 4-byte alignment is enforced for the most of data structures for 99 Our aim is to address these issues by having a single file for application code. This, however, 127 1. Interpreter is stackless (from the host stack perspective): Whenever a call from managed code [all …]
|
| D | on-stack-replacement.md | 5 On-Stack Replacement (OSR) is a technique for switching between different implementations of the sa… 47 Both, OSR and regular compilation use the same hotness counter. First time, when counter is overflo… 48 whether method is already compiled or not. If not, we start compilation in regular mode. Otherwise,… 51 Once compilation is triggered and OSR compiled code is already set, we begin On-Stack Replacement p… 62 In OSR-methods special osr-entry flag is added to the loop-header basic blocks and some optimizatio… 68 New pseudo-instruction is introduced: SaveStateOsr - instruction should be the first one in each lo… 71 …cial OsrStackMap for each SaveStateOsr instruction. Difference from regular stackmap is that it has 81 No code is generated in place of OsrSaveState, but a special OsrEntryStub entity is created, 82 which is necessary to generate an OSR entry code. 86 2. encodes jump instruction to the head of the loop where the corresponding OsrSaveState is located [all …]
|
| D | code_metainfo.md | 5 Metainfo is an information that aims to provide reg-to-stack mapping for virtual registers. It is n… 10 we call the runtime, we can save information in which stack slot specific vreg is live. 12 Metainfo is placed together with compiled code: 42 Columns width is in a bits. 44 First row is a BitTable's header, that describe rows count and columns width. 51 Header is followed by data, which is a rows with fixed length. Row length is equal to sum of column… 70 Here, we have 4 columns and 5 rows. Number of rows is defeined in the first digit in a header, 71 number of columns is determined in compile time. 73 Row size is 25 bits, that is sum of columns width: 2 + 0 + 15 + 8. 74 Column width is determined by maximum value in a table, e.g. for 2th column it is zero row, that ha… [all …]
|
| D | rationale-for-bytecode.md | 13 There is a central processing unit (CPU) that reads commands (or _instructions_) from 19 is used for storing local variables along with function arguments and doing function calls. 26 Here comes the bytecode. Simply said, it is an attempt to build an abstract CPU on top of real 28 special program called _interpreter_. The goal of the interpreter is to read our unified _virtual_ 32 (debugger, profilers, etc.) is also unified, as well as the ecosystem for managing libraries, 37 In case there is a chance for ambiguity, the terms "virtual registers" and "virtual stack" are used 40 Just as real CPUs can expose different instruction set architectures, there is no universal way of 45 One very important question is how an operation refers to its operands. 79 more _dispatch overhead_. Which means that the stack-based bytecode is slower by nature. 85 Since bytecode interpretation is a required program execution mode for Panda, performance of the [all …]
|
| D | ir_format.md | 12 In the development process, it is very important to have auxiliary functionality for various code t… 13 Also in the compilation process, the order of execution of optimizations and analyses is very impor… 58 !NOTE It is possible to write other optimizations based on the specifics of the language and VM 83 The main target is ARM64. So Panda IR should be able to do arm specific optimizations. For this, ne… 88 In the first step, Panda bytecode is converted to high level instruction and architecturally indepe… 93 Overhead is the time that requires for compile. 94 Typically, an overhead is considered to be the average number of 'native' instructions(ARM) that ar… 97 In Ahead-Of-Time(AOT) mode the overhead is less critical for us, so we can do more optimizations. 100 The goal is overhead about 100000 native instructions per guest (standard for JIT compilers) 113 1. It is more common in compilers and easier to understand [all …]
|
| /arkcompiler/runtime_core/compiler/docs/ |
| D | reg_alloc_graph_coloring_doc.md | 17 This paper describes register allocation algorithm that is based on ideas of Chordal-graph coloring… 18 …is described in works of Sebastian Hack and Fernando Pereira. It is based on observation that prog… 19 …hs") to construct PEO is used Max Cardinality Search (MCS) algorithm. In this implementation was u… 23 …is built by liveness-intervals, algorithm under the hood is the same as in Linear-scan from works … 26 If interval is pre-colored, this value is set as pre-color for node. And input parameters is marked… 27 Here additionally to the built graph with regular edges that represent interference, it is built af… 31 … MCS or LexBFS (that is reverse PEO), one by one is colored by a Greedy coloring algorithm. Greedy… 36 There are two classes of approaches for coalescing, that is: 37 …is known to potentially can increase register pressure, and make graph G’ not K-colorable as origi… 38 …is a way when in front of coloring nodes are “hinted” with preferred colors. And on stage of color… [all …]
|
| D | plt.md | 7 JIT/AOT compiler has a `SlowPath` mechanism. It is used for some opcodes where a call to runtime is… 9 During code generation so-called `SlowPath` code is created, and we put it into a special cold code… 10 Unique `SlowPath` blob is generated for each place it is called, and as it contains saving register… 11 `BoundaryFrame` for stack walker, it's code is much longer than few runtime-call-related instructio… 17 The problem is that such a `SlowPath` would be actually required only once when we first time reach… 18 …Id`. So, in order to reduce code size in AOT mode, more tricky solution with PLT Resolvers is used. 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` … 25 …ould actually store `Method pointer` after resolving, but during AOT file loading it is initialized 28 During calls, first parameter is always a callee `Method pointer`, so the trick from previous parag… [all …]
|
| D | aot_resolve_string.md | 5 loads a value from a slot associated with a string and checks if that value is valid pointer. If it… 17 - `--compiler-aot-load-string-plt` option should be turned on (it is on by default). 19 If the condition is met then the compiler reserves a unique PLT-slot (with type `STRING_SLOT`) for … 20 emits load from that slot, followed by the check that the loaded value is a valid pointer and the s… 37 - if PLT-slot's value is already a pointer then the resolved string gets returned; 38 - if amount of already filled PLT-slots is above `--resolve-string-aot-threshold` then the resolved… 40 - if PLT-slot's value is below `--aot-string-gc-roots-limit` then slot's value is incremented and t… 42 - if PLT-slot's value is above `--aot-string-gc-roots-limit` then slot's value is replaced by strin… 43 registered as GC-root in `AotManager` and the resolved string is returned. 49 `AotManager` is responsible for storing PLT-slots containing references. It also provides methods t… [all …]
|
| D | interface_inline_cache.md | 4 `Interface Inline Cache` is an optimization for speeding up find method in interface method call. 11 * There is a 90% - 95% chance that the same method will be used in real-world application test. 12 * The speed of querying the itable table is very slow. 16 * `Fast Path`: Check whether the class is the same as the last cached class,if equal: use cache; i… 47 1. one cache is 64bit 49 3. cache's address is in an file's aot_got section 52 because read and write 64bit is atomic, same `cache` maybe use at same time 55 1. `class addr` is just the point to a class, in ark runtime, class point is 32bit 56 2. because `class address` is no move in ark, so we do not need to worry that the saved class will … 57 3. if class address is move, it is still save, but maybe the hit rate will be lower. [all …]
|
| D | balance_expressions_doc.md | 5 …is applied to expressions of the form of a long chain of the same binary associative and commutati… 19 If such instruction is found, it is the last one in an expression and it is necessary to determine … 26 …is a check if `lhs`(`rhs`) has the same opcode and has the only user (the operator itself). If so,… 30 The `optimal critical path` of an expression is `ceil[log2(n_terms)]` (`ceil[x]` is rounding `x` up… 33 `Allocation in an optimal way` is an algorithm that creates expression and guarantees that it would… 34 Assume `terms[]` is an array of expression terms, algorithm called for two arguments `first_idx` an… 35 The algorithm is: 38 …calculate `split_idx` so that `split_idx` is strictly less than `last_idx` and size of `first_idx:… 45 if (instruction is a suitable operator) { 115 …ns two expressions: `v8-v10` (critical path is 3) and `v11-v14` (critical path is 3). Moreover, `v…
|
| /arkcompiler/runtime_core/tests/cts-generator/cts-template/ |
| D | isinstance.yaml | 9 # distributed under the License is distributed on an "AS IS" BASIS, 49 title: Is instance 51 …Resolve object type by specified id and if an object in accumulator is an instance of the resolved… 53 …Object of type O is instance of type T if O is the same as T or is subtype of T. For arrays T shou… 54 …type in type hierarchy or T is such array that O array elements are the same or subtype of T array… 62 description: Check that null object reference is not an instance of any class 65 'null' object is not an instance of any class. 82 description: Check that null object reference is not an instance of any class 85 'null' object is not an instance of any class. 328 …Resolve object type by specified id and if an object in accumulator is an instance of the resolved… [all …]
|
| D | checkcast.yaml | 9 # distributed under the License is distributed on an "AS IS" BASIS, 49 … resolved type, accumulator content remains unchanged. Otherwise ClassCastException is thrown. 245 … description: Object of type O can be cast to type T if O is the same as T or is subtype of T. 289 … description: Object of type O can be cast to type T if O is the same as T or is subtype of T. 346 … description: Object of type O can be cast to type T if O is the same as T or is subtype of T. 390 … description: Object of type O can be cast to type T if O is the same as T or is subtype of T. 448 … description: Object of type O can be cast to type T if O is the same as T or is subtype of T. 488 …Object of type O can be cast to type T if O is the same as T or is subtype of T. For arrays O can … 489 …to T if T is a root type in type hierarchy or T is such array that O array elements are the same o… 526 …Object of type O can be cast to type T if O is the same as T or is subtype of T. For arrays O can … [all …]
|
| /arkcompiler/runtime_core/libpandabase/ |
| D | README.md | 7 pandargs is header-only utility tool that helps to parse command line arguments. It supports severa… 17 The more detail description of each type is in "Usage" section below. 30 To create an argument, it's template constructor should be called. Here is an instance: 45 There is description for them: 46 - Argument name, is a name, which will appear in a command line. 47 - Default value is a value argument will have regardless was it parsed or not. 49 - Delimiter is a character or string that separates the different value if the single argument list 50 - Min value is the number that the integer argument cannot be less than 51 - Max value is the number that the integer argument cannot be greater than 55 Template parameter is an argument type. Following values could be passed: [all …]
|
| /arkcompiler/runtime_core/docs/bc_verification/ |
| D | types_n_values.md | 16 Each parameter is a some type accompanied with a variance flag. 18 Variance of the parameter is classic: covariant, contrvariant, invariant. 24 - Sorts are denoted by some `Literals`. Where `Literal` is a word composed of characters from set `… 32 Subtyping relation is denoted by `<:`. Subtyping is a realtion on types which is used to determine … 33 value of the particular type may be used in the place where other type is expected. 35 If two types, say `A()` and `B()` related as `A() <: B()`, i.e. `A()` is the subtype of `B()`, then… 36 place, where a value of type `B()` is expected, value of type `A()` may be safely used. 38 By default, it is considered, that a type is in subtyping relation with itself, i.e. 49 In short `|` means composition of types (syntactically) in set, and `<:` is distriuted over `|`. 55 May be relation is `T(+i16()) <: T(+i8())`? Let's see, according to `+` (covariance), relation of t… [all …]
|
| /arkcompiler/toolchain/ |
| D | OAT.xml | 11 distributed under the License is distributed on an "AS IS" BASIS, 17 basedir: Root dir, the basedir + project path is the real source file location. 24 3. task policy: Default policy for projects under this task, this field is required and the specifi… 25 4. task filter: Default filefilter for projects under this task, this field is required and the spe… 31 …The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,… 34 "compatibility" is used to check license compatibility in the specified path; 35 "license" is used to check source license header in the specified path; 36 "copyright" is used to check source copyright header in the specified path; 37 … "import" is used to check source dependency in the specified path, such as import ... ,include ... 38 … "filetype" is used to check file type in the specified path, supported file types: archive, binary [all …]
|
| /arkcompiler/ets_runtime/ecmascript/ |
| D | js_proxy.cpp | 10 * distributed under the License is distributed on an "AS IS" BASIS, 30 // 1. If Type(target) is not Object, throw a TypeError exception. in ProxyCreate() 32 THROW_TYPE_ERROR_AND_RETURN(thread, "ProxyCreate: target is not Object", in ProxyCreate() 36 // 2. If Type(handler) is not Object, throw a TypeError exception. in ProxyCreate() 38 THROW_TYPE_ERROR_AND_RETURN(thread, "ProxyCreate: handler is not Object", in ProxyCreate() 42 // 6. If IsCallable(target) is true, then P.[[Call]] as specified in 9.5.12. in ProxyCreate() 55 // 2. If handler is null, throw a TypeError exception. in GetPrototype() 57 …THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::GetPrototype: handler is null", JSTaggedValue::Excep… in GetPrototype() 59 // 3. Assert: Type(handler) is Object. in GetPrototype() 69 // 7. If trap is undefined, then Return target.[[GetPrototypeOf]](). in GetPrototype() [all …]
|
| /arkcompiler/ets_frontend/ |
| D | OAT.xml | 10 distributed under the License is distributed on an "AS IS" BASIS, 16 basedir: Root dir, the basedir + project path is the real source file location. 23 3. task policy: Default policy for projects under this task, this field is required and the specifi… 24 4. task filter: Default filefilter for projects under this task, this field is required and the spe… 30 …The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,… 33 "compatibility" is used to check license compatibility in the specified path; 34 "license" is used to check source license header in the specified path; 35 "copyright" is used to check source copyright header in the specified path; 36 … "import" is used to check source dependency in the specified path, such as import ... ,include ... 37 … "filetype" is used to check file type in the specified path, supported file types: archive, binary [all …]
|
| /arkcompiler/runtime_core/verification/ |
| D | messages.yaml | 9 # distributed under the License is distributed on an "AS IS" BASIS, 23 message: ( type is '${type}' ) 29 message: ( constructor is '${constructor}' ) 34 message: ( constructor is array constructor ) 40 message: ( field is '${field}' ) 46 message: Field is '${field}'. 52 message: ( method is '${method}' ) 71 Field is '${field}'. Field type is '${field_type}'. Accumulator type is '${acc_type}'. 96 (try block scope is [${try_block_start}, ${try_block_end}]).${std::dec << std::setw(0)} 156 …${reg} is of wrong type: '${reg_type}'. Expected a subtype of one from ${target_types}. Compatible… [all …]
|
| /arkcompiler/ets_runtime/ecmascript/builtins/ |
| D | builtins_math.cpp | 10 * distributed under the License is distributed on an "AS IS" BASIS, 38 // if number_value is double,NaN,Undefine, deal in this case in Abs() 39 // if number_value is a String ,which can change to double. e.g."100",deal in this case in Abs() 42 // if number_value is int,boolean,null, deal in this case in Abs() 57 // value == -NaN , <-1 or > 1,result is NaN in Acos() 109 // value == -NaN, NaN, result is NaN in Asinh() 127 // value == -NaN, NaN, result is NaN in Atan() 170 // y < 0 and y is finite and x is POSITIVE_INFINITY,return -0 in Atan2() 171 // y >= 0 and y is finite and x is POSITIVE_INFINITY,return +0 in Atan2() 174 // If either x or y is NaN, the result is NaN in Atan2() [all …]
|
| /arkcompiler/ets_runtime/ |
| D | OAT.xml | 11 distributed under the License is distributed on an "AS IS" BASIS, 17 basedir: Root dir, the basedir + project path is the real source file location. 24 3. task policy: Default policy for projects under this task, this field is required and the specifi… 25 4. task filter: Default filefilter for projects under this task, this field is required and the spe… 31 …The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,… 34 "compatibility" is used to check license compatibility in the specified path; 35 "license" is used to check source license header in the specified path; 36 "copyright" is used to check source copyright header in the specified path; 37 … "import" is used to check source dependency in the specified path, such as import ... ,include ... 38 … "filetype" is used to check file type in the specified path, supported file types: archive, binary [all …]
|
| /arkcompiler/runtime_core/ |
| D | OAT.xml | 11 distributed under the License is distributed on an "AS IS" BASIS, 16 …This is the configuration file template for OpenHarmony OSS Audit Tool, please copy it to your pro… 24 …The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,… 27 "compatibility" is used to check license compatibility in the specified path; 28 "license" is used to check source license header in the specified path; 29 "copyright" is used to check source copyright header in the specified path; 30 … "import" is used to check source dependency in the specified path, such as import ... ,include ... 31 … "filetype" is used to check file type in the specified path, supported file types: archive, binary 32 …"filename" is used to check whether the specified file exists in the specified path(projectroot me… 33 …4. policyitem name: This field is used for define the license, copyright, "*" means match all, the… [all …]
|
| /arkcompiler/ets_runtime/ecmascript/tests/ |
| D | js_tagged_number_test.cpp | 10 * distributed under the License is distributed on an "AS IS" BASIS, 54 // number is int in HWTEST_F_L0() 59 // number is INT32_MAX in HWTEST_F_L0() 64 // number is double in HWTEST_F_L0() 69 // number is NAN in HWTEST_F_L0() 83 // one numer is int,one number is double in HWTEST_F_L0() 88 // number is double in HWTEST_F_L0() 97 // number is int in HWTEST_F_L0() 104 // number is double in HWTEST_F_L0() 114 // number is nan in HWTEST_F_L0() [all …]
|