| /arkcompiler/ets_runtime/test/sharedtest/definesendableclass/ |
| D | definesendableclass.ts | 24 declare function print(str: any): string; 59 a0:string = ""; 60 a1:string = ""; 61 a2:string = ""; 62 a3:string = ""; 63 a4:string = ""; 64 a5:string = ""; 65 a6:string = ""; 66 a7:string = ""; 67 a8:string = ""; [all …]
|
| /arkcompiler/ets_runtime/test/perform/string/ |
| D | expect_output.txt | 14 string replace regexp flag is g: 44 15 string replace regexp flag is gi :15 16 string replace regexp pattern is /([^d]*)(d*)([^w]*)/ : 161 17 string split number of input parameters is 2 : 70 18 string split number of input parameters is 1 : 35 19 string split into regexp.split : 22 20 string indexOf input parameter is a substring : 14 21 string indexOf Input parameter is not a substring : 15 22 string indexOf number of input parameters is 2 : 11 23 string slice number of input parameters is 1 : 17 [all …]
|
| /arkcompiler/ets_runtime/ecmascript/extractortool/src/ |
| D | file_path_utils.h | 19 #include <string> 25 bool StringStartWith(const std::string& str, const char* startStr, size_t startStrLen); 26 bool StringEndWith(const std::string& str, const char* endStr, size_t endStrLen); 27 …void SplitString(const std::string& str, std::vector<std::string>& out, size_t pos = 0, const char… 28 std::string JoinString(const std::vector<std::string>& strs, char sep, size_t startIndex = 0); 29 std::string StripString(const std::string& str, const char* charSet = " \t\n\r"); 31 void FixExtName(std::string& path); 32 std::string GetInstallPath(const std::string& curJsModulePath, bool module = true); 33 …std::string MakeNewJsModulePath(const std::string& curJsModulePath, const std::string& newJsModule… 34 std::string FindNpmPackageInPath(const std::string& npmPath); [all …]
|
| D | file_path_utils.cpp | 64 bool StringStartWith(const std::string& str, const char* startStr, size_t startStrLen) in StringStartWith() 69 bool StringEndWith(const std::string& str, const char* endStr, size_t endStrLen) in StringEndWith() 75 void SplitString(const std::string& str, std::vector<std::string>& out, size_t pos, const char* sep… in SplitString() 83 while ((endPos = str.find_first_of(seps, startPos)) != std::string::npos) { in SplitString() 95 std::string JoinString(const std::vector<std::string>& strs, char sep, size_t startIndex) in JoinString() 97 std::string out; in JoinString() 109 std::string StripString(const std::string& str, const char* charSet) in StripString() 112 if (startPos == std::string::npos) { in StripString() 113 return std::string(); in StripString() 119 void FixExtName(std::string& path) in FixExtName() [all …]
|
| /arkcompiler/ets_frontend/ets2panda/test/parser/ts/ |
| D | test-ts-type-predicate.ts | 17 function function1(a: number | string): asserts a { return }; 18 var var1: (a: number | string) => asserts a; 20 (a: number | string): asserts a; 21 (a: number | string): asserts this; 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; 29 (asserts: { a: number | string }): asserts is this; 32 function function3(is: number | string): is is number { return }; 33 var var3: (is: number | string) => is is number; [all …]
|
| /arkcompiler/ets_frontend/es2panda/test/parser/ts/ |
| D | test-ts-type-predicate.ts | 17 function function1(a: number | string): asserts a { return }; 18 var var1: (a: number | string) => asserts a; 20 (a: number | string): asserts a; 21 (a: number | string): asserts this; 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; 29 (asserts: { a: number | string }): asserts is this; 32 function function3(is: number | string): is is number { return }; 33 var var3: (is: number | string) => is is number; [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/07.function_and_method_overloading/02.class_method_overloading/ |
| D | cm_over1.params.yaml | 38 meth(p: A|string|null) {} 39 meth(p: string|A|null) {} 47 meth(p: Object): string { return "Object" } // should never be called 48 meth(p: byte): string { return "byte" } 49 meth(p: Byte): string { return "Byte" } 50 meth(p: short): string { return "short" } 51 meth(p: Short): string { return "Short" } 52 meth(p: int): string { return "int" } 53 meth(p: Int): string { return "Int" } 54 meth(p: long): string { return "long" } [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/stdlib-templates/std/core/ |
| D | list.std_core_string_instance.yaml | 16 object_type: String, 17 init_object_data_type: "String[]", 18 init_object_type: String, 31 object_type: String, 32 init_object_data_type: "String[]", 33 init_object_type: String, 46 object_type: String, 47 init_object_data_type: "String[]", 48 init_object_type: String, 61 object_type: String, [all …]
|
| D | list.std_core_string_static.yaml | 16 object_type: String, 18 param_init_data_types: {"param1":"String[][]", "param2": "String[]"}, 19 param_types: {"param1":"String[]", "param2": "String"}, 22 method_return_type: String, 24 expected_data_item_type: String, 25 expected_data_type: "String[]", 33 object_type: String, 35 …param_init_data_types: {"param1":"String[][]", "param2": "String[]", "prefix": "String[]", "suffix… 36 param_types: {"param1":"String[]", "param2": "String", "prefix": "String", "suffix": "String"}, 39 method_return_type: String, [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/stdlib/std/core/ |
| D | String.sts | 21 type StringOrRegExp = String | RegExp 24 * Unicode string 26 export final class String extends Object implements Comparable<String>, JSONable<String>, Iterable<… 30 * Constructs an empty String 35 * Constructs String from chars array initializer 42 * Constructs String from another String 46 public constructor(otherStr: String) {} 49 * Constructs String from NullishType 56 * Creates a new instance of a String 58 * @returns A new String instance [all …]
|
| D | StringBuilder.sts | 21 * Performance-oriented class for string construction 28 …ivate length: int = 0; // length of the resulting string 29 …ompress: boolean = true; // compress or not the resulting string. 42 let s: String = new String(fromChars); 51 * Constructs a new builder instance with provided string 53 * @param s string that will be used to initialize the builder 55 public constructor (s: String) { 64 * Concatenates two strings and return a result as a new string 66 * @param lhs left string (prefix) 68 * @param rhs right string (suffix) [all …]
|
| /arkcompiler/runtime_core/disassembler/tests/ |
| D | instructions_test.cpp.in | 17 #include <string> 31 d.Disassemble(std::string(DISASM_BIN_DIR) + "empty_record.bc"); 34 EXPECT_TRUE(ss.str().find(".language PandaAssembly") != std::string::npos); 42 d.Disassemble(std::string(DISASM_BIN_DIR) + "instructions.bc"); 48 ASSERT_TRUE(beg_g != std::string::npos && end_g != std::string::npos) << "function g not found"; 50 … std::string body_g = ss.str().substr(beg_g + strlen("g() {"), end_g - (beg_g + strlen("g() {"))); 52 EXPECT_TRUE(body_g.find("\tmov v0, v1") != std::string::npos); 53 EXPECT_TRUE(body_g.find("\tmov.64 v2, v3") != std::string::npos); 54 EXPECT_TRUE(body_g.find("\tmov.obj v4, v5") != std::string::npos); 56 EXPECT_TRUE(body_g.find("\tmovi v0, 0xffffffffffffffff") != std::string::npos); [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/04.names_declarations_and_scopes/08.function_declarations/09.function_overload_signatures/ |
| D | overload_neg.params.yaml | 18 function foo(): string; 19 function foo(a: string): string; 20 function foo(a: string, b: string): string; 26 function foo(): string; 27 function foo(a: string, b: string): string; 28 function bar(): string { 31 function foo(a?: string, b?:string): string { 39 function foo(): string; 40 function foo(a: string, b: string): string; 41 function foo(a?: string, b:string): string { [all …]
|
| /arkcompiler/ets_frontend/arkguard/src/utils/ |
| D | NameCacheUtil.ts | 18 export const NAME_CACHE_SUFFIX: string = '.cache.json'; 19 export const PROPERTY_CACHE_FILE: string = 'property.cache.json'; 20 export const IDENTIFIER_CACHE: string = 'IdentifierCache'; 21 export const MEM_METHOD_CACHE: string = 'MemberMethodCache'; 24 export function writeCache(cache: Map<string, string> | undefined, destFileName: string): void { 25 // convert map to json string 30 const cacheString: string = JSON.stringify(Object.fromEntries(cache), null, spaceOfNameCache); 34 export function readCache(filePath: string): Object | undefined { 35 // read json string from file 36 const cacheString: string = FileUtils.readFile(filePath); [all …]
|
| /arkcompiler/ets_frontend/es2panda/util/ |
| D | symbolTable.h | 26 static const std::string FIRST_LEVEL_SEPERATOR; 27 static const std::string SECOND_LEVEL_SEPERATOR; 30 std::string recordName; 31 std::string funcInternalName; 32 std::string funcHash; 33 ArenaMap<uint32_t, std::pair<std::string, int>> lexenv; // lexenv: <slot, <name, type>> 34 ArenaMap<std::string, std::string> classHash; 40 SymbolTable(const std::string &inputSymbolTable, const std::string &dumpSymbolTable) in SymbolTable() 47 bool Initialize(int targetApiVersion, std::string targetApiSubVersion); 51 ArenaUnorderedMap<std::string, OriginFunctionInfo> *GetOriginFunctionInfo() in GetOriginFunctionInfo() [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/25.equality_expressions/02.string_equality_operators/ |
| D | string_eq_cte.params.yaml | 16 - { ltype: 'String', lval: '"test0"', op: '==', rtype: 'Boolean', rval: 'true' } 17 - { ltype: 'String', lval: '"test1"', op: '==', rtype: 'Byte' , rval: '0' } 18 - { ltype: 'String', lval: '"test2"', op: '==', rtype: 'Int' , rval: '-134242' } 19 - { ltype: 'String', lval: '"test3"', op: '==', rtype: 'Short' , rval: '43000' } 20 - { ltype: 'String', lval: '"test4"', op: '==', rtype: 'Long' , rval: '147483647' } 22 - { rtype: 'String', rval: '"test5"', op: '==', ltype: 'Float', lval: '0.1' } 23 - { rtype: 'String', rval: '"test6"', op: '==', ltype: 'Double', lval: '4E10' } 24 - { rtype: 'String', rval: '"test7"', op: '==', ltype: 'BigInt', lval: '123456789n' } 25 - { rtype: 'String', rval: '"test8"', op: '==', ltype: 'String[]', lval: '["test1"]' } 26 - { rtype: 'String', rval: '"test9"', op: '==', ltype: 'TestClass', lval: 'new TestClass()' } [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/09.final_classes_and_methods/02.final_methods/ |
| D | fm.params.yaml | 19 meth(s: string, n: number): string { 24 final meth(s: string, n: number): string { 36 final public final meth(s: string, n: number): string { // CTE 47 final meth(s: string, n: number): string { 52 meth(s: string, n: number): string { // CTE 62 private final meth(s: string, n: number): string { 67 private meth(s: string, n: number): string { // OK 78 public final meth(s: string, n: number): string { 83 private meth(s: string, n: number): string { // CTE 94 final meth(s: string, n: number): string { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/scenarios/js_to_ets/indirect_call/ |
| D | indirect_union.sts | 18 const NUMERIC_VALUE: (number | string) = 1; 20 …let result: (number | string) = js.indirectCallUnion.call(null, NUMERIC_VALUE) as (number | string… 27 const STRING_VALUE: (number | string) = '1'; 29 …let result: (number | string) = js.indirectCallUnion.call(null, STRING_VALUE) as (number | string); 30 assert(typeof result == "string" && result as string == STRING_VALUE); 36 const NUMERIC_VALUE: (number | string) = 1; 38 …let result: (number | string) = js.indirectCallUnion.apply(null, [NUMERIC_VALUE]) as (number | str… 45 const STRING_VALUE: (number | string) = '1'; 47 …let result: (number | string) = js.indirectCallUnion.apply(null, [STRING_VALUE]) as (number | str… 48 assert(typeof result == "string" && result as string == STRING_VALUE); [all …]
|
| /arkcompiler/ets_runtime/test/aottest/class_method_signature/ |
| D | class_method_signature.ts | 16 declare function print(str:any):string; 21 foo?(): string; 23 bar(): string { 27 bar2(): string { 40 foo?(): string; 41 foo(): string { 45 bar(): string { 49 bar2(): string { 64 bar(): string { 68 foo?(): string; [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/stdlib/escompat/ |
| D | RegExp.sts | 21 export class RegExpExecArray /*extends Array<String>*/ { 24 /** The 0-based index of the match in the string */ 26 /** The original string that was matched against */ 27 readonly input: String 29 readonly result: String[] 37 * Returns result string by index 41 * @returns resulting string 43 public get(index: int): String { 48 * Returns result string by index 52 * @returns resulting string [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/11.function_call_expression/step_1_selection_of_function/ |
| D | step1.params.yaml | 17 type UT = number | string | null | undefined 18 function foo(p: Number): string { 21 function foo(p: Number|null): string { 24 function foo(p: UT): string { 34 function foo(p: Number|null): string { 37 function foo(p: UT): string { 47 function foo(p: Number|null): string { 50 function foo(p: UT): string { 53 function foo(p: number): string { 62 function foo(p: Number|null): string { [all …]
|
| /arkcompiler/ets_runtime/ecmascript/pgo_profiler/ |
| D | pgo_utils.h | 20 #include <string> 36 static const std::string ELEMENT_SEPARATOR; 37 static const std::string BLOCK_SEPARATOR; 38 static const std::string TYPE_SEPARATOR; 39 static const std::string BLOCK_START; 40 static const std::string ARRAY_START; 41 static const std::string ARRAY_END; 42 static const std::string NEW_LINE; 43 static const std::string SPACE; 44 static const std::string BLOCK_AND_ARRAY_START; [all …]
|
| /arkcompiler/runtime_core/static_core/tests/cts-generator/cts-template/ |
| D | test-schema.json | 11 "type": "string" 28 "type": "string" 31 "type": "string" 36 "type": "string" 42 "type": "string" 48 "type": "string" 62 "type": "string" 67 "type": "string" 71 "type": "string" 74 "type": "string" [all …]
|
| /arkcompiler/runtime_core/tests/cts-generator/cts-template/ |
| D | test-schema.json | 11 "type": "string" 28 "type": "string" 31 "type": "string" 36 "type": "string" 42 "type": "string" 48 "type": "string" 62 "type": "string" 67 "type": "string" 71 "type": "string" 74 "type": "string" [all …]
|
| /arkcompiler/toolchain/websocket/ |
| D | http.h | 19 #include <string> 30 static std::string DecodeHeader(const std::string& headersText, std::string_view headerName); 35 std::string version; 36 std::string connection; 37 std::string upgrade; 38 std::string secWebSocketKey; 40 static bool Decode(const std::string& request, HttpRequest& parsed); 43 …static std::string DecodeVersion(const std::string& request, std::string::size_type methodStartPos… 48 std::string version; 49 std::string status; [all …]
|