| /arkcompiler/ets_frontend/ts2panda/tests/ |
| D | scope.test.ts | 35 expect(variable instanceof GlobalVariable).to.be.true; 37 expect(outVariable === variable).to.be.true; 38 expect(lv).to.be.equal(0); 39 expect(sp).to.be.equal(scope); 45 expect(variable instanceof GlobalVariable).to.be.true; 47 expect(outVariable === variable).to.be.true; 48 expect(lv).to.be.equal(0); 49 expect(sp).to.be.equal(scope); 55 expect(variable instanceof LocalVariable).to.be.true; 57 expect(outVariable === variable).to.be.true; [all …]
|
| D | lexenv.test.ts | 75 …expect(globalScope.getChildVariableScope().length, "should not have any children!").to.be.equal(0); 76 … expect(globalScope.getParentVariableScope(), "should not have any children!").to.be.equal(null); 77 …lScope.getBindingNode() == sourceFile, "functionblock.node should equal to sourceFile").to.be.true; 105 expect(children.length, "should have 2 child!").to.be.equal(2); 106 expect(parent, "should not have any children!").to.be.equal(null); 107 … expect(bindingNode, "functionblock.root should equal to sourceFile").to.be.deep.equal(sourceFile); 113 expect(grandchildren0.length == 2, "son should have two children!").to.be.true; 121 expect(parentOfGrandson0).to.be.equal(son0); 122 expect(grandgrandchiildren0.length).to.be.equal(0); 126 expect(grandson1.getParentVariableScope()).to.be.equal(son0); [all …]
|
| /arkcompiler/ets_runtime/ecmascript/builtins/ |
| D | builtins_array.cpp | 51 // 1. Let numberOfArgs be the number of arguments passed to this function call. in ArrayConstructor() 54 …// 3. If NewTarget is undefined, let newTarget be the active function object, else let newTarget b… in ArrayConstructor() 61 // 4. Let proto be GetPrototypeFromConstructor(newTarget, "%ArrayPrototype%"). in ArrayConstructor() 73 // 6. Let array be ArrayCreate(0, proto). in ArrayConstructor() 78 // a. Let defineStatus be CreateDataProperty(array, "0", len). in ArrayConstructor() 80 // c. Let intLen be 1. in ArrayConstructor() 82 // a. Let intLen be ToUint32(len). in ArrayConstructor() 84 // 9. Let setStatus be Set(array, "length", intLen, true). in ArrayConstructor() 110 // 8. Let k be 0. in ArrayConstructor() 111 // 9. Let items be a zero-origined List containing the argument items in order. in ArrayConstructor() [all …]
|
| D | builtins_typedarray.cpp | 48 THROW_TYPE_ERROR_AND_RETURN(argv->GetThread(), "TypedArray Constructor cannot be called.", in TypedArrayBaseConstructor() 149 // 1. Let C be the this value. in From() 157 // 3. If mapfn is undefined, let mapping be false. in From() 160 // b. Let mapping be true. in From() 170 // 5. Let usingIterator be ? GetMethod(source, @@iterator). in From() 180 // a. Let values be ? IterableToList(source, usingIterator). in From() 181 // b. Let len be the number of elements in values. in From() 182 // c. Let targetObj be ? TypedArrayCreate(C, « len »). in From() 201 // d. Let k be 0. in From() 203 // i. Let Pk be ! ToString(k). in From() [all …]
|
| D | builtins_global.cpp | 51 // 1. Let num be ToNumber(number). in IsFinite() 70 // 1. Let num be ToNumber(number). in IsNaN() 132 // 1. Let uriString be ToString(encodedURI). in DecodeURI() 137 …// 3. Let reservedURISet be a String containing one instance of each code unit valid in uriReserve… in DecodeURI() 148 // 1. Let uriString be ToString(uri). in EncodeURI() 153 // 3. Let unescapedURISet be a String containing one instance of in EncodeURI() 165 // 1. Let componentString be ToString(encodedURIComponent). in DecodeURIComponent() 170 // 3. Let reservedURIComponentSet be the empty String. in DecodeURIComponent() 181 // 1. Let componentString be ToString(uriComponent). in EncodeURIComponent() 186 …// 3. Let unescapedURIComponentSet be a String containing one instance of each code unit valid in … in EncodeURIComponent() [all …]
|
| D | builtins_promise_handler.cpp | 42 ASSERT_PRINT(resolve->GetPromise().IsECMAObject(), "Resolve: promise must be js object"); in Resolve() 44 // 2. Let promise be the value of F's [[Promise]] internal slot. in Resolve() 45 // 3. Let alreadyResolved be the value of F's [[AlreadyResolved]] internal slot. in Resolve() 56 // a. Let selfResolutionError be a newly created TypeError object. in Resolve() 61 …tory->GetJSError(ErrorType::TYPE_ERROR, "Resolve: The promise and resolution cannot be the same."); in Resolve() 71 // 8. Let then be Get(resolution, "then"). in Resolve() 83 // 10. Let thenAction be then.[[value]]. in Resolve() 114 ASSERT_PRINT(reject->GetPromise().IsECMAObject(), "Reject: promise must be js object"); in Reject() 116 // 2. Let promise be the value of F's [[Promise]] internal slot. in Reject() 117 // 3. Let alreadyResolved be the value of F's [[AlreadyResolved]] internal slot. in Reject() [all …]
|
| D | builtins_promise.cpp | 59 // 3. Let promise be OrdinaryCreateFromConstructor(NewTarget, "%PromisePrototype%", in PromiseConstructor() 70 // 8. Let resolvingFunctions be CreateResolvingFunctions(promise). in PromiseConstructor() 72 …// 9. Let completion be Call(executor, undefined, «resolvingFunctions.[[Resolve]], resolvingFuncti… in PromiseConstructor() 84 // a. Let status be Call(resolvingFunctions.[[Reject]], undefined, «completion.[[value]]»). in PromiseConstructor() 113 // 1. Let C be the this value. in All() 119 // 3. Let S be Get(C, @@species). in All() 125 // 5. If S is neither undefined nor null, let C be S. in All() 129 // 6. Let promiseCapability be NewPromiseCapability(C). in All() 133 // 8. Let iterator be GetIterator(iterable). in All() 141 // 10. Let iteratorRecord be Record {[[iterator]]: iterator, [[done]]: false}. in All() [all …]
|
| D | builtins_object.cpp | 72 // 1.Let to be ToObject(target). in Assign() 79 // 4.Let sources be the List of argument values starting with the second argument. in Assign() 81 // a.If nextSource is undefined or null, let keys be an empty List. in Assign() 83 // i.Let from be ToObject(nextSource). in Assign() 84 // ii.Let keys be from.[[OwnPropertyKeys]](). in Assign() 98 // i.Let desc be from.[[GetOwnProperty]](nextKey). in Assign() 101 // 1.Let propValue be Get(from, nextKey). in Assign() 103 // 3.Let status be Set(to, nextKey, propValue, true). in Assign() 147 // 2.Let props be ToObject(Properties). in ObjectDefineProperties() 153 // 4.Let keys be props.[[OwnPropertyKeys]](). in ObjectDefineProperties() [all …]
|
| D | builtins_regexp.cpp | 49 // 1. Let patternIsRegExp be IsRegExp(pattern). in RegExpConstructor() 53 // 3. If NewTarget is not undefined, let newTarget be NewTarget. in RegExpConstructor() 63 // 4.a Let newTarget be the active function object. in RegExpConstructor() 68 // 4.b.i Let patternConstructor be Get(pattern, "constructor"). in RegExpConstructor() 89 // 5.a Let P be the value of pattern’s [[OriginalSource]] internal slot. in RegExpConstructor() 92 … // 5.b If flags is undefined, let F be the value of pattern’s [[OriginalFlags]] internal slot. in RegExpConstructor() 95 // 5.c Else, let F be flags. in RegExpConstructor() 104 // 6.a Let P be Get(pattern, "source"). in RegExpConstructor() 110 // 6.c.i Let F be Get(pattern, "flags"). in RegExpConstructor() 115 // 6.d Else, let F be flags. in RegExpConstructor() [all …]
|
| D | builtins_number_format.cpp | 37 …// 1. If NewTarget is undefined, let newTarget be the active function object, else let newTarget b… in NumberFormatConstructor() 44 // Let numberFormat be ? OrdinaryCreateFromConstructor(newTarget, "%NumberFormatPrototype%", in NumberFormatConstructor() 59 // 4. Let this be the this value. in NumberFormatConstructor() 86 // 1. Let availableLocales be %NumberFormat%.[[AvailableLocales]]. in SupportedLocalesOf() 89 // 2. Let requestedLocales be ? CanonicalizeLocaleList(locales). in SupportedLocalesOf() 107 // 1. Let nf be this value. in Format() 113 // 3. Let nf be ? UnwrapNumberFormat(nf). in Format() 123 … // a. Let F be a new built-in function object as defined in Number Format Functions (12.1.4). in Format() 141 // 1. Let nf be the this value. in FormatToParts() 147 // 3. Let x be ? ToNumeric(value). in FormatToParts() [all …]
|
| D | builtins_sharedarraybuffer.cpp | 45 // 2. Let byteLength be ? ToIndex(length). in SharedArrayBufferConstructor() 67 // 2. Let bufferData be obj.[[ArrayBufferData]]. in IsSharedArrayBuffer() 102 * 1. Let obj be ? OrdinaryCreateFromConstructor(constructor, "%SharedArrayBuffer.prototype%", in AllocateSharedArrayBuffer() 111 // 4. Let block be CreateSharedByteDataBlock(byteLength). in AllocateSharedArrayBuffer() 140 // 1. Let O be the this value. in GetByteLength() 151 // 5. Let length be the value of O’s [[SharedArrayBufferByteLength]] internal slot. in GetByteLength() 166 // 1. Let O be the this value. in Slice() 181 // 5. Let len be the value of O’s [[ArrayBufferByteLength]] internal slot. in Slice() 184 // 6. Let relativeStart be ToInteger(start). in Slice() 192 …// 8. If relativeStart < 0, let first be max((len + relativeStart),0); else let first be min(relat… in Slice() [all …]
|
| D | builtins_date_time_format.cpp | 35 …// 1. If NewTarget is undefined, let newTarget be the active function object, else let newTarget b… in DateTimeFormatConstructor() 42 …// 2. Let dateTimeFormat be ? OrdinaryCreateFromConstructor(newTarget, "%DateTimeFormatPrototype%"… in DateTimeFormatConstructor() 57 // 4. Let this be the this value. in DateTimeFormatConstructor() 84 // 1. Let availableLocales be %DateTimeFormat%.[[AvailableLocales]]. in SupportedLocalesOf() 87 // 2. Let requestedLocales be ? CanonicalizeLocaleList(locales). in SupportedLocalesOf() 105 // 1. Let dtf be this value. in Format() 113 // 3. Let dtf be ? UnwrapDateTimeFormat(dtf). in Format() 121 … // a. Let F be a new built-in function object as defined in DateTime Format Functions (13.1.5). in Format() 146 // 1. Let dtf be F.[[DateTimeFormat]]. in AnonymousDateTimeFormat() 153 // a. Let x be Call(%Date_now%, undefined). in AnonymousDateTimeFormat() [all …]
|
| /arkcompiler/ets_frontend/ts2panda/scripts/ |
| D | diagnosticMessages.json | 10 "A rest parameter must be last in a parameter list.": { 42 "A 'declare' modifier cannot be used in an already ambient context.": { 46 "'{0}' modifier cannot be used in an ambient context.": { 50 "'{0}' modifier cannot be used here.": { 58 "A rest parameter cannot be optional.": { 74 "A '{0}' modifier cannot be used with an import declaration.": { 98 "A 'delete' cannot be called on an identifier in strict mode.": { 102 "A 'continue' statement can only be used within an enclosing iteration statement.": { 106 "A 'break' statement can only be used within an enclosing iteration or switch statement.": { 114 "A 'return' statement can only be used within a function body.": { [all …]
|
| /arkcompiler/runtime_core/docs/ |
| D | doxygen.config | 3 # This file describes the settings to be used by the documentation system 9 # All text after a single hash (#) is considered a comment and will be ignored. 12 # For lists, items can also be appended using: 14 # Values that contain spaces should be placed between quotes (\" \"). 37 # The PROJECT_NUMBER tag can be used to enter a project or revision number. This 38 # could be handy for archiving the generated documentation or if some version 57 # into which the generated documentation will be written. If a relative path is 58 # entered, it will be relative to the location where doxygen was started. If 59 # left blank the current directory will be used. 66 # option can be useful when feeding doxygen a huge amount of source files, where [all …]
|
| D | design-of-interpreter.md | 20 This section outlines common requirements that should be considered while designing the interpreter 25 1. It should be able to run consuming 64Kb of RAM. 26 1. Program execution via bytecode interpretation should be enabled on all targets. 34 1. Bytecode should be compact in size to avoid bloating application code. 73 1. All entities in the executable file should be encoded and stored compactly to avoid bloating 76 should be kept at minimum to reduce access overhead during runtime. 77 1. Runtime memory footprint of executable files should be low. 85 and foreign (declared elsewhere). Local entities can be accessed directly by the offset 90 require explicitly how structures should be located relative to each other. 117 1. Interpreter should be portable enough to run on targets from IoT devices [all …]
|
| D | assembly_format.md | 5 …files, they are supposed to be fed to the Panda assembler, a dedicated tool that translates them t… 11 …be) supported by the platform. Instead, Panda assembly can be thought as a separate close-to-byte-… 28 * Floating-point decimal/hexadecimal literals that can be represented with IEEE 754. Hexadecimal fl… 32 …s out of Latin-1 character set must be encoded with `mutf8` encoding. For example: `"文字范例"` string… 34 The following escape sequences can be used in string literals: 60 Simple identifiers can be used for naming metadata annotations, primitive data types, aggregate dat… 66 Prefixed identifiers can be used for naming metadata annotations, aggregate data types and function… 84 In all cases where annotations can be optionally used, `optional_annotation` marker is used in this… 107 | `ctor` | Marks a function as object constructor. It will be renamed in binary file according to… 108 | `cctor` | Marks a function as static constructor. It will be renamed in binary file according to… [all …]
|
| D | 2022-08-18-isa-changelog.md | 14 … of ecmascript specific opcodes, such that most of the bytecode opcode can be encoded with one byt… 15 …precated"-prefixed opcodes (for compatibility). These prefixed opcode will be deleted once we do n… 16 4. We add prefix "throw" and make all throwing opcodes be prefixed by "throw". 18 …of some opcodes (about immediate number and accumulator), so that the bytecode can be more compact. 37 stringId and literalarrayId in a class should be put in a same index header. 38 Instead, we only ask that all methodId, stringId and literalarrayId in a method should be put in on… 46 4. The layout of literalarrays can be random.
|
| /arkcompiler/ets_frontend/ts2panda/tests/statements/ |
| D | variableDeclaration.test.ts | 60 expect(checkInstructions(insns, expected)).to.be.true; 62 expect(v instanceof GlobalVariable).to.be.true; 76 expect(checkInstructions(insns, expected)).to.be.true; 78 expect(v instanceof LocalVariable).to.be.true; 92 expect(checkInstructions(insns, expected)).to.be.true; 94 expect(v instanceof LocalVariable).to.be.true; 110 expect(checkInstructions(insns, expected)).to.be.true; 112 expect(v instanceof GlobalVariable).to.be.true; 126 expect(checkInstructions(insns, expected)).to.be.true; 128 expect(v instanceof LocalVariable).to.be.true; [all …]
|
| D | functionDeclaration.test.ts | 58 expect(checkInstructions(insns, expected)).to.be.true; 60 expect(foo != undefined).to.be.true; 61 expect(foo instanceof GlobalVariable).to.be.true; 78 expect(checkInstructions(insns, expected)).to.be.true; 80 expect(foo != undefined).to.be.true; 81 expect(foo instanceof GlobalVariable).to.be.true; 99 expect(checkInstructions(insns!, expected)).to.be.true; 101 expect(foo != undefined).to.be.true; 102 expect(foo instanceof LocalVariable).to.be.true; 104 expect(parameterLength == 0).to.be.true; [all …]
|
| /arkcompiler/runtime_core/tests/cts-generator/cts-template/ |
| D | checkcast.yaml | 48 Resolve object type by specified id and if an object in accumulator can be cast to the 58 description: Check that null object reference can be cast to any type 61 'null' object reference can be cast to every type. 100 description: Check that null object reference can be cast to any type 103 'null' object reference can be cast to every type. 150 description: Check that null object reference can be cast to any array type 153 'null' object reference can be cast to every type. 193 description: Check that null object reference can be cast to any array type 196 'null' object reference can be cast to every type. 243 description: Check that any object can be cast to the base type [all …]
|
| /arkcompiler/runtime_core/libpandabase/ |
| D | README.md | 25 Instead of `PandArg`, `PandArgCompound` can be used, which serves for creation of the compound argu… 30 To create an argument, it's template constructor should be called. Here is an instance: 48 - Argument description will be used to form a help message. 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 53 Sub-arguments should not be added to the parser via `PandArgParser::Add`. 55 Template parameter is an argument type. Following values could be passed: 82 Tail arguments are positional arguments, which should be introduced with help of parser API 87 and can be any type of argument. Compound arguments implicitly have default value `false` and user … 89 To access compound arguments from `C++`, regular convention should be used, for accessing sub-argum… [all …]
|
| /arkcompiler/runtime_core/compiler/docs/ |
| D | aot_resolve_string.md | 4 mode such runtime calls could be replaced with load from a special PLT-slot in AOT file. In that ca… 11 During AOT compilation `LoadString` instruction could be either encoded as regular `ResolveString` … 13 To use the latter encoding the following conditions have to be met: 15 - compiled method should not be a static class initializer (initializers get invoked only once and … 17 - `--compiler-aot-load-string-plt` option should be turned on (it is on by default). 26 There are two options controlling when and how many string will be saved into PLT-slots: 27 …-roots-limit` controls how many time the same string should be resolved before its pointer will be 29 - `--resolve-string-aot-threshold` controls how many strings could be save to PLT-slots (option app… 47 String pointers stored inside PLT-slots have to be treated as GC-roots to prevent its scavenge in c…
|
| /arkcompiler/ets_runtime/ecmascript/base/ |
| D | typed_array_helper.cpp | 53 …// 3. Let constructorName be the String value of the Constructor Name value specified in Table 61 … in TypedArrayConstructor() 55 // 4. Let O be ? AllocateTypedArray(constructorName, NewTarget, "%TypedArray.prototype%"). in TypedArrayConstructor() 95 // 5. Let usingIterator be ? GetMethod(object, @@iterator). in CreateFromOrdinaryObject() 104 // a. Let values be ? IterableToList(object, usingIterator). in CreateFromOrdinaryObject() 105 // b. Let len be the number of elements in values. in CreateFromOrdinaryObject() 121 // d. Let k be 0. in CreateFromOrdinaryObject() 123 // i. Let Pk be ! ToString(k). in CreateFromOrdinaryObject() 124 // ii. Let kValue be the first element of values and remove that element from values. in CreateFromOrdinaryObject() 143 // 8. Let arrayLike be object. in CreateFromOrdinaryObject() 144 // 9. Let len be ? LengthOfArrayLike(arrayLike). in CreateFromOrdinaryObject() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/ |
| D | js_async_function.cpp | 37 // 1.Let asyncContext be the running execution context. in AsyncFunctionAwait() 43 // 2.Let promiseCapability be ! NewPromiseCapability(%Promise%). in AsyncFunctionAwait() 49 // 3.Let resolveResult be ! Call(promiseCapability.[[Resolve]], undefined, « value »). in AsyncFunctionAwait() 60 …// 4.Let onFulfilled be a new built-in function object as defined in AsyncFunction Awaited Fulfill… in AsyncFunctionAwait() 64 …// 5.Let onRejected be a new built-in function object as defined in AsyncFunction Awaited Rejected. in AsyncFunctionAwait() 73 // 8.Let throwawayCapability be ! NewPromiseCapability(%Promise%). in AsyncFunctionAwait() 87 // resumptionValue the following steps will be performed: in AsyncFunctionAwait() 95 // 1.Let asyncContext be the running execution context. in AsyncFunctionAwait() 109 // 2.Let promise be ? PromiseResolve(%Promise%, value). in AsyncFunctionAwait() 116 …// 4.Let onFulfilled be a new built-in function object as defined in AsyncFunction Awaited Fulfill… in AsyncFunctionAwait() [all …]
|
| D | js_async_generator_object.cpp | 60 // 2. Let queue be generator.[[AsyncGeneratorQueue]]. in AsyncGeneratorResolve() 64 // 4. Let next be the first element of queue. in AsyncGeneratorResolve() 68 // 6. Let promiseCapability be next.[[Capability]]. in AsyncGeneratorResolve() 70 // 7. Let iteratorResult be ! CreateIterResultObject(value, done). in AsyncGeneratorResolve() 93 // 2. Let queue be generator.[[AsyncGeneratorQueue]]. in AsyncGeneratorReject() 97 // 4. Let next be the first element of queue. in AsyncGeneratorReject() 102 // 6. Let promiseCapability be next.[[Capability]]. in AsyncGeneratorReject() 124 // 2. Let state be generator.[[AsyncGeneratorState]]. in AsyncGeneratorResumeNext() 132 // 5. Let queue be generator.[[AsyncGeneratorQueue]]. in AsyncGeneratorResumeNext() 138 // 7. Let next be the value of the first element of queue. in AsyncGeneratorResumeNext() [all …]
|