| /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 …]
|
| D | labels_test.cpp.in | 17 #include <string> 31 d.Disassemble(std::string(DISASM_BIN_DIR) + "labels1.bc"); 39 ASSERT_TRUE(beg_g != std::string::npos && end_g != std::string::npos) << "function g not found"; 40 …ASSERT_TRUE(beg_gg != std::string::npos && end_gg != std::string::npos) << "function gg not found"; 42 std::string body_g = 44 std::string body_gg = 56 d.Disassemble(std::string(DISASM_BIN_DIR) + "labels2.bc"); 62 ASSERT_TRUE(beg_g != std::string::npos && end_g != std::string::npos) << "function g not found"; 64 … std::string body_g = ss.str().substr(beg_g + strlen("g() {"), end_g - (beg_g + strlen("g() {"))); 66 …EXPECT_TRUE(body_g.find("jump_label_0:\n\tmovi v0, 0x0") != std::string::npos) << "jump_label_0 no… [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 …]
|
| D | test-ts-conditional-type.ts | 18 …string | number & boolean extends boolean ? number : string)[] extends ((boolean extends & string … 20 var b: boolean & number extends A ? number : string; 21 var c: A | number extends string ? number : string; variable 22 var d: boolean | A & string extends string ? number : string; variable 23 var e: boolean & number | string extends string ? number : string; variable
|
| /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/ets_frontend/ts2panda/src/ |
| D | pandasm.ts | 20 public attribute: string; 23 attribute: string = "" 31 public rt: string | undefined; // return type is always 'any', so we ignore it in json 33 constructor(params: number = 0, retType?: string | undefined) { 42 public id: Array<string> | undefined; // ids 44 public l: string | undefined; // label 50 ids: Array<string> | undefined = undefined, 52 label: string | undefined = undefined, 65 public n: string; // name 69 public l: Array<string> | undefined; // labels [all …]
|
| /arkcompiler/ets_frontend/es2panda/test/parser/ts/type_checker/ |
| D | varRedeclaration.ts | 23 var c: number | string; 24 var c: string | number; 26 var d: { a: number, b: string }; 27 var d: { b: string, a: number }; 29 var e: (a: number, b: (string | number)[]) => void; 30 var e: (a: number, b: (string | number)[]) => void; 32 var f: { a: number, b: string } | { a: number[], b?: string }; 33 var f: { a: number, b: string } | { a: number[], b?: string }; 37 b: string, 42 b: string, [all …]
|
| D | tupleAssignability.ts | 20 var tuple4: [typeof tuple1, string] = [[], "foo"]; variable 21 var tuple5: [[a: number, b?: string], [boolean | string, number[]]] = [[1], ["foo", [1, 2, 3]]]; 23 var tuple6: [number] | [string] = [5]; 24 var tuple7: [number, string] | number | string = [5, "foo"]; variable 25 var tuple8: (boolean | { a: number, b: string })[] | [string, number | string] = [false, { a: 5, b:… 27 var tuple9: [number, string | number, boolean | string]; variable 28 var tuple10: [number, string, string]; variable 29 var tuple11: [a: number, b: number | string, c: boolean]; 30 var tuple12: [a: number, b: string, c: boolean, d?: any]; 47 function func1(a: number, b: string): [a: number, b?: boolean[]] { [all …]
|
| /arkcompiler/runtime_core/runtime/tests/ |
| D | string_test.cpp | 23 #include "runtime/include/coretypes/string-inl.h" 81 …String::CreateFromMUtf8(data.data(), utf16_length, GetLanguageContext(), Runtime::GetCurrent()->Ge… in TEST_F() 82 ASSERT_TRUE(String::StringsAreEqualMUtf8(first_string, data.data(), utf16_length)); in TEST_F() 96 …String::CreateFromMUtf8(data.data(), utf16_length, GetLanguageContext(), Runtime::GetCurrent()->Ge… in TEST_F() 97 ASSERT_TRUE(String::StringsAreEqualMUtf8(first_string, data.data(), utf16_length)); in TEST_F() 106 …String::CreateFromMUtf8(data1.data(), utf16_length, GetLanguageContext(), Runtime::GetCurrent()->G… in TEST_F() 107 ASSERT_FALSE(String::StringsAreEqualMUtf8(first_string, data2.data(), utf16_length)); in TEST_F() 116 …String::CreateFromMUtf8(data1.data(), utf16_length, GetLanguageContext(), Runtime::GetCurrent()->G… in TEST_F() 117 ASSERT_FALSE(String::StringsAreEqualMUtf8(first_string, data2.data(), utf16_length)); in TEST_F() 126 …String::CreateFromMUtf8(data1.data(), utf16_length, GetLanguageContext(), Runtime::GetCurrent()->G… in TEST_F() [all …]
|
| /arkcompiler/runtime_core/runtime/ |
| D | string_table.cpp | 24 coretypes::String *StringTable::GetOrInternString(const uint8_t *mutf8_data, uint32_t utf16_length, in GetOrInternString() 27 bool can_be_compressed = coretypes::String::CanBeCompressedMUtf8(mutf8_data); in GetOrInternString() 35 coretypes::String *StringTable::GetOrInternString(const uint16_t *utf16_data, uint32_t utf16_length, in GetOrInternString() 45 coretypes::String *StringTable::GetOrInternString(coretypes::String *string, const LanguageContext … in GetOrInternString() argument 47 auto *str = internal_table_.GetString(string, ctx); in GetOrInternString() 49 str = table_.GetOrInternString(string, ctx); in GetOrInternString() 54 coretypes::String *StringTable::GetOrInternInternalString(const panda_file::File &pf, panda_file::F… in GetOrInternInternalString() 61 coretypes::String *str = table_.GetString(data.data, data.utf16_length, data.is_ascii, ctx); in GetOrInternInternalString() 91 coretypes::String *StringTable::Table::GetString(const uint8_t *utf8_data, uint32_t utf16_length, in GetString() 94 …uint32_t hash_code = coretypes::String::ComputeHashcodeMutf8(utf8_data, utf16_length, can_be_compr… in GetString() [all …]
|
| D | string_table.h | 22 #include "runtime/include/coretypes/string.h" 37 virtual coretypes::String *GetOrInternString(const uint8_t *mutf8_data, uint32_t utf16_length, 39 virtual coretypes::String *GetOrInternString(const uint16_t *utf16_data, uint32_t utf16_length, 41 coretypes::String *GetOrInternString(coretypes::String *string, const LanguageContext &ctx); 43 …coretypes::String *GetOrInternInternalString(const panda_file::File &pf, panda_file::File::EntityI… 46 …coretypes::String *GetInternalStringFast(const panda_file::File &pf, panda_file::File::EntityId id) in GetInternalStringFast() 76 … virtual coretypes::String *GetOrInternString(const uint8_t *mutf8_data, uint32_t utf16_length, 78 … virtual coretypes::String *GetOrInternString(const uint16_t *utf16_data, uint32_t utf16_length, 80 coretypes::String *GetOrInternString(coretypes::String *string, const LanguageContext &ctx); 89 …coretypes::String *GetString(const uint8_t *utf8_data, uint32_t utf16_length, bool can_be_compress… [all …]
|
| /arkcompiler/ets_runtime/ecmascript/ |
| D | ecma_string-inl.h | 30 auto string = vm->GetFactory()->AllocNonMovableStringObject(EcmaString::SIZE); in CreateEmptyString() local 31 string->SetLength(0, true); in CreateEmptyString() 32 string->SetRawHashcode(0); in CreateEmptyString() 33 return string; in CreateEmptyString() 41 EcmaString *string = nullptr; in AllocStringObjectWithSpaceType() local 44 string = vm->GetFactory()->AllocStringObject(size); in AllocStringObjectWithSpaceType() 47 string = vm->GetFactory()->AllocOldSpaceStringObject(size); in AllocStringObjectWithSpaceType() 50 string = vm->GetFactory()->AllocNonMovableStringObject(size); in AllocStringObjectWithSpaceType() 55 string->SetLength(length, compressed); in AllocStringObjectWithSpaceType() 56 string->SetRawHashcode(0); in AllocStringObjectWithSpaceType() [all …]
|
| /arkcompiler/ets_runtime/test/typeinfer/builtins/ |
| D | builtins.ts | 16 declare function AssertType(value: any, type: string): void; 23 AssertType(obj.toString(), "string"); 24 AssertType(obj.toLocaleString(), "string"); 29 AssertType(Object.getOwnPropertyNames({}), "string[]"); 37 AssertType(obj2.toString(), "string"); 38 AssertType(obj2.toLocaleString(), "string"); 45 AssertType(f.toString(), "string"); 53 AssertType(err.message, "string"); 54 AssertType(err.toString(), "string"); 57 AssertType(err2.message, "string"); [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 funcName; 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 void WriteSymbolTable(const std::string &content); 48 ArenaUnorderedMap<std::string, OriginFunctionInfo> *GetOriginFunctionInfo() in GetOriginFunctionInfo() [all …]
|
| D | hotfix.h | 41 … Hotfix(bool generateSymbolFile, bool generatePatch, bool hotReload, const std::string &recordName, in Hotfix() 62 uint32_t GetSlotIdFromSymbolTable(const std::string &variableName); 63 void AllocSlotfromPatchEnv(const std::string &variableName); 64 uint32_t GetPatchLexicalIdx(const std::string &variableName); 67 …void ProcessModule(const std::string &recordName, std::vector<panda::pandasm::LiteralArray::Litera… 68 … void ProcessJsonContentRecord(const std::string &recordName, const std::string &jsonFileContent); 73 …std::vector<std::pair<std::string, size_t>> GenerateFunctionAndClassHash(panda::pandasm::Function … 75 …void DumpModuleInfo(const std::string &recordName, std::vector<panda::pandasm::LiteralArray::Liter… 76 void ValidateModuleInfo(const std::string &recordName, 78 void DumpJsonContentRecInfo(const std::string &recordName, const std::string &jsonFileContent); [all …]
|
| /arkcompiler/ets_runtime/test/aottest/class_method_signature/ |
| D | class_method_signature.ts | 16 declare function print(str:any):string; 22 foo?(): string; 24 bar(): string { 36 foo?(a: string): string; 38 foo?(a: string): string { 42 foo?(a: string, b?: string): string; 44 bar(): string { 57 foo?(): string; 59 foo?(a: string): string; 61 foo?(a: string, b: string): string; [all …]
|
| /arkcompiler/toolchain/tooling/base/ |
| D | pt_types.h | 46 using BreakpointId = std::string; 57 if (lineStart == std::string::npos) { in ParseBreakpointId() 61 if (columnStart == std::string::npos) { in ParseBreakpointId() 65 if (urlStart == std::string::npos) { in ParseBreakpointId() 68 std::string lineStr = id.substr(lineStart + 1, columnStart - lineStart - 1); in ParseBreakpointId() 69 std::string columnStr = id.substr(columnStart + 1, urlStart - columnStart - 1); in ParseBreakpointId() 70 std::string url = id.substr(urlStart + 1); in ParseBreakpointId() 80 std::string url_ {}; 98 using UnserializableValue = std::string; 116 const std::string &GetType() const in GetType() [all …]
|
| /arkcompiler/runtime_core/runtime/coretypes/ |
| D | string.cpp | 24 #include "runtime/include/coretypes/string-inl.h" 31 bool String::compressed_strings_enabled = true; 34 String *String::CreateFromString(String *str, const LanguageContext &ctx, PandaVM *vm) in CreateFromString() 40 VMHandle<String> str_handle(thread, str); in CreateFromString() 41 auto string = AllocStringObject(str_handle->GetLength(), !str_handle->IsUtf16(), ctx, vm); in CreateFromString() local 42 if (string == nullptr) { in CreateFromString() 48 string->length_ = str->length_; in CreateFromString() 49 string->hashcode_ = str->hashcode_; in CreateFromString() 55 … memcpy_s(string->GetDataUtf16(), ComputeDataSizeUtf16(string->GetLength()), str->GetDataUtf16(), in CreateFromString() 58 memcpy_s(string->GetDataMUtf8(), string->GetLength(), str->GetDataMUtf8(), length); in CreateFromString() [all …]
|
| /arkcompiler/toolchain/tooling/test/ |
| D | profiler_impl_test.cpp | 89 ASSERT_TRUE(response.GetMessage().find("Stop is failure") != std::string::npos); in HWTEST_F_L0() 131 … std::string msg = std::string() + R"({"id":0,"method":"Debugger.requestMemoryDump","params":{}})"; in HWTEST_F_L0() 164 std::string result = ""; in HWTEST_F_L0() 165 std::function<void(const void*, const std::string &)> callback = in HWTEST_F_L0() 166 [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; in HWTEST_F_L0() 170 std::string msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{}})"; in HWTEST_F_L0() 173 ASSERT_TRUE(result.find("Unknown method: Test") != std::string::npos); in HWTEST_F_L0() 174 msg = std::string() + R"({"id":0,"method":"Debugger.disable","params":{}})"; in HWTEST_F_L0() 186 std::string result = ""; in HWTEST_F_L0() 187 std::function<void(const void*, const std::string &)> callback = in HWTEST_F_L0() [all …]
|
| D | runtime_impl_test.cpp | 55 std::string result = ""; in HWTEST_F_L0() 56 std::function<void(const void*, const std::string &)> callback = in HWTEST_F_L0() 57 [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; in HWTEST_F_L0() 61 std::string msg = std::string() + R"({"id":0,"method":"Rumtime.test","params":{}})"; in HWTEST_F_L0() 64 ASSERT_TRUE(result.find("unknown method: test") != std::string::npos); in HWTEST_F_L0() 66 msg = std::string() + R"({"id":0,"method":"Rumtime.enable","params":{}})"; in HWTEST_F_L0() 78 std::string result = ""; in HWTEST_F_L0() 79 std::function<void(const void*, const std::string &)> callback = in HWTEST_F_L0() 80 [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; in HWTEST_F_L0() 85 std::string msg = std::string() + R"({"id":0,"method":"Rumtime.enable","params":{}})"; in HWTEST_F_L0() [all …]
|
| D | heapprofiler_impl_test.cpp | 153 std::string result = ""; in HWTEST_F_L0() 154 std::function<void(const void*, const std::string &)> callback = in HWTEST_F_L0() 155 [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; in HWTEST_F_L0() 159 std::string msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{}})"; in HWTEST_F_L0() 162 ASSERT_TRUE(result.find("Unknown method: Test") != std::string::npos); in HWTEST_F_L0() 163 msg = std::string() + R"({"id":0,"method":"Debugger.disable","params":{}})"; in HWTEST_F_L0() 175 std::string result = ""; in HWTEST_F_L0() 176 std::function<void(const void*, const std::string &)> callback = in HWTEST_F_L0() 177 [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; in HWTEST_F_L0() 181 std::string msg = std::string() + R"({"id":0,"method":"HeapProfiler.disable","params":{}})"; in HWTEST_F_L0() [all …]
|
| D | tracing_impl_test.cpp | 64 std::vector<std::string> categories = {}; in HWTEST_F_L0() 73 std::string syncId; in HWTEST_F_L0() 83 std::string dumpGuid; in HWTEST_F_L0() 100 std::string result = ""; in HWTEST_F_L0() 101 std::function<void(const void*, const std::string &)> callback = in HWTEST_F_L0() 102 [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; in HWTEST_F_L0() 106 std::string msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{}})";; in HWTEST_F_L0() 109 ASSERT_TRUE(result.find("Unknown method: Test") != std::string::npos); in HWTEST_F_L0() 110 msg = std::string() + R"({"id":0,"method":"Debugger.end","params":{}})"; in HWTEST_F_L0() 117 ASSERT_TRUE(result.find("End not support now.") != std::string::npos); in HWTEST_F_L0() [all …]
|
| /arkcompiler/runtime_core/libark_defect_scan_aux/include/ |
| D | module_record.h | 19 #include <string> 24 std::string module_request_; 25 std::string import_name_; 26 std::string local_name_; 30 std::string export_name_; 31 std::string module_request_; 32 std::string import_name_; 33 std::string local_name_; 42 void SetRequestModules(std::vector<std::string> &request_modules); 49 const std::string &GetImportInternalNameByIndex(size_t index) const; [all …]
|
| /arkcompiler/ets_runtime/ecmascript/compiler/ |
| D | compiler_log.h | 25 #include <string> 37 explicit CompilerLog(const std::string &logOpt, bool TraceBC = false); 105 void SetMethodLog(const std::string &fileName, const CString& recordName, 106 const std::string &methodName, AotMethodLogList *logList); 108 void AddMethodTime(const std::string& name, uint32_t id, double time); 109 void AddPassTime(const std::string& name, double time); 112 std::map<std::string, int> nameIndex_; 128 void AddCompiledMethod(const std::string& name, const CString& recordName); 141 std::map<std::string, double> timePassMap_ {}; 142 std::map<std::pair<uint32_t, std::string>, double> timeMethodMap_ {}; [all …]
|
| /arkcompiler/runtime_core/compiler/docs/ |
| D | aot_resolve_string.md | 1 # String literal resolution in AOT-compiled code 3 To get string literal by its identifier application has to perform special runtime call. To improve… 5 loads a value from a slot associated with a string and checks if that value is valid pointer. If it… 7 returned string pointer into the slot and subsequent executions of the same code will bypass runtim… 17 - `--compiler-aot-load-string-plt` option should be turned on (it is on by default). 19 …on is met then the compiler reserves a unique PLT-slot (with type `STRING_SLOT`) for the string and 22 The slow path performs `ResolveStringAot` runtime call that returns resolved string. 26 There are two options controlling when and how many string will be saved into PLT-slots: 27 - `--aot-string-gc-roots-limit` controls how many time the same string should be resolved before it… 29 - `--resolve-string-aot-threshold` controls how many strings could be save to PLT-slots (option app… [all …]
|