| /ark/runtime_core/disassembler/tests/ |
| D | instructions_test.cpp | 18 #include <string> 25 std::string g_bin_path_abs {}; 35 EXPECT_TRUE(ss.str().find(".language PandaAssembly") != std::string::npos); in TEST() 49 ASSERT_TRUE(beg_g != std::string::npos && end_g != std::string::npos) << "function g not found"; in TEST() 51 … std::string body_g = ss.str().substr(beg_g + strlen("g() {"), end_g - (beg_g + strlen("g() {"))); in TEST() 53 EXPECT_TRUE(body_g.find("\tmov v0, v1") != std::string::npos); in TEST() 54 EXPECT_TRUE(body_g.find("\tmov.64 v2, v3") != std::string::npos); in TEST() 55 EXPECT_TRUE(body_g.find("\tmov.obj v4, v5") != std::string::npos); in TEST() 57 EXPECT_TRUE(body_g.find("\tmovi v0, 0xffffffffffffffff") != std::string::npos); in TEST() 58 EXPECT_TRUE(body_g.find("\tmovi.64 v0, 0x2") != std::string::npos); in TEST() [all …]
|
| D | labels_test.cpp | 17 #include <string> 24 std::string g_bin_path_abs {}; 39 ASSERT_TRUE(beg_g != std::string::npos && end_g != std::string::npos) << "function g not found"; in TEST() 40 …ASSERT_TRUE(beg_gg != std::string::npos && end_gg != std::string::npos) << "function gg not found"; in TEST() 42 std::string body_g = in TEST() 44 std::string body_gg = in TEST() 62 ASSERT_TRUE(beg_g != std::string::npos && end_g != std::string::npos) << "function g not found"; in TEST() 64 …std::string body_g = ss.str().substr(beg_g + strlen("g_u1_() {"), end_g - (beg_g + strlen("g_u1_()… in TEST() 66 …EXPECT_TRUE(body_g.find("jump_label_0: movi v0, 0x0") != std::string::npos) << "jump_label_0 not f… in TEST() 67 …EXPECT_TRUE(body_g.find("jump_label_2: movi v0, 0x1") != std::string::npos) << "jump_label_1 not f… in TEST() [all …]
|
| D | records_test.cpp | 17 #include <string> 24 std::string g_bin_path_abs {}; 34 …EXPECT_TRUE(ss.str().find(".record A {\n}") != std::string::npos) << "record translated incorrectl… in TEST() 45 EXPECT_TRUE(ss.str().find("u1 a") != std::string::npos) << "u1 translated incorrectly"; in TEST() 46 EXPECT_TRUE(ss.str().find("i8 b") != std::string::npos) << "i8 translated incorrectly"; in TEST() 47 EXPECT_TRUE(ss.str().find("u8 c") != std::string::npos) << "u8 translated incorrectly"; in TEST() 48 EXPECT_TRUE(ss.str().find("i16 d") != std::string::npos) << "i16 translated incorrectly"; in TEST() 49 EXPECT_TRUE(ss.str().find("u16 e") != std::string::npos) << "u16 translated incorrectly"; in TEST() 50 EXPECT_TRUE(ss.str().find("i32 f") != std::string::npos) << "i32 translated incorrectly"; in TEST() 51 EXPECT_TRUE(ss.str().find("u32 g") != std::string::npos) << "u32 translated incorrectly"; in TEST() [all …]
|
| /ark/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 …]
|
| D | lda.str.yaml | 20 .record java.lang.String <external> 23 .record panda.String <external> 29 title: Load accumulator from string constant pool 30 description: Load string specified by id into accumulator. 44 description: Load string specified by id into accumulator. 46 description: Check 'lda.str' instruction with invalid string. 71 - "\"test\", \"string\"" 73 - "test\"a\"string" 75 - "test'a'string" 78 - "\"test \\c string\"" [all …]
|
| /ark/runtime_core/runtime/ |
| D | string_table.h | 23 #include "runtime/include/coretypes/string.h" 38 …virtual coretypes::String *GetOrInternString(const uint8_t *mutf8_data, uint32_t utf16_length, Lan… 39 virtual coretypes::String *GetOrInternString(const uint16_t *utf16_data, uint32_t utf16_length, 41 coretypes::String *GetOrInternString(coretypes::String *string, 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() 51 using StringVisitor = std::function<void(coretypes::String *)>; 71 … virtual coretypes::String *GetOrInternString(const uint8_t *mutf8_data, uint32_t utf16_length, 73 … virtual coretypes::String *GetOrInternString(const uint16_t *utf16_data, uint32_t utf16_length, 75 coretypes::String *GetOrInternString(coretypes::String *string, LanguageContext ctx); [all …]
|
| D | string_table.cpp | 23 coretypes::String *StringTable::GetOrInternString(const uint8_t *mutf8_data, uint32_t utf16_length,… in GetOrInternString() 25 bool can_be_compressed = coretypes::String::CanBeCompressedMUtf8(mutf8_data); in GetOrInternString() 33 coretypes::String *StringTable::GetOrInternString(const uint16_t *utf16_data, uint32_t utf16_length, in GetOrInternString() 43 coretypes::String *StringTable::GetOrInternString(coretypes::String *string, LanguageContext ctx) in GetOrInternString() argument 45 auto *str = internal_table_.GetString(string, ctx); in GetOrInternString() 47 str = table_.GetOrInternString(string, ctx); in GetOrInternString() 52 coretypes::String *StringTable::GetOrInternInternalString(const panda_file::File &pf, panda_file::F… in GetOrInternInternalString() 56 coretypes::String *str = table_.GetString(data.data, data.utf16_length, data.is_ascii, ctx); in GetOrInternInternalString() 78 coretypes::String *StringTable::Table::GetString(const uint8_t *utf8_data, uint32_t utf16_length, in GetString() 81 …uint32_t hash_code = coretypes::String::ComputeHashcodeMutf8(utf8_data, utf16_length, can_be_compr… in GetString() [all …]
|
| /ark/runtime_core/runtime/tests/ |
| D | string_test.cpp | 24 #include "runtime/include/coretypes/string-inl.h" 80 …String::CreateFromMUtf8(data.data(), utf16_length, GetLanguageContext(), Runtime::GetCurrent()->Ge… in TEST_F() 81 ASSERT_TRUE(String::StringsAreEqualMUtf8(first_string, data.data(), utf16_length)); in TEST_F() 95 …String::CreateFromMUtf8(data.data(), utf16_length, GetLanguageContext(), Runtime::GetCurrent()->Ge… in TEST_F() 96 ASSERT_TRUE(String::StringsAreEqualMUtf8(first_string, data.data(), utf16_length)); in TEST_F() 105 …String::CreateFromMUtf8(data1.data(), utf16_length, GetLanguageContext(), Runtime::GetCurrent()->G… in TEST_F() 106 ASSERT_FALSE(String::StringsAreEqualMUtf8(first_string, data2.data(), utf16_length)); in TEST_F() 115 …String::CreateFromMUtf8(data1.data(), utf16_length, GetLanguageContext(), Runtime::GetCurrent()->G… in TEST_F() 116 ASSERT_FALSE(String::StringsAreEqualMUtf8(first_string, data2.data(), utf16_length)); in TEST_F() 125 …String::CreateFromMUtf8(data1.data(), utf16_length, GetLanguageContext(), Runtime::GetCurrent()->G… in TEST_F() [all …]
|
| /ark/runtime_core/isa/ |
| D | schema.json | 14 "type": "string" 17 "type": "string" 29 "type": "string" 32 "type": "string" 44 "type": "string" 47 "type": "string" 59 "type": "string" 62 "type": "string" 74 "type": "string" 77 "type": "string" [all …]
|
| /ark/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, LanguageContext ctx, PandaVM *vm) in CreateFromString() 39 VMHandle<String> str_handle(thread, str); in CreateFromString() 40 auto string = AllocStringObject(str_handle->GetLength(), !str_handle->IsUtf16(), ctx, vm); in CreateFromString() local 41 if (string == nullptr) { in CreateFromString() 47 string->length_ = str->length_; in CreateFromString() 48 string->hashcode_ = str->hashcode_; in CreateFromString() 54 …if (memcpy_s(string->GetDataUtf16(), ComputeDataSizeUtf16(string->GetLength()), str->GetDataUtf16(… in CreateFromString() 60 … if (memcpy_s(string->GetDataMUtf8(), string->GetLength(), str->GetDataMUtf8(), length) != EOK) { in CreateFromString() [all …]
|
| /ark/ts2abc/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 …]
|
| /ark/runtime_core/assembler/ |
| D | assembly-emitter.h | 37 std::unordered_map<uint32_t, std::string> methods; 38 std::unordered_map<uint32_t, std::string> fields; 39 std::unordered_map<uint32_t, std::string> classes; 40 std::unordered_map<uint32_t, std::string> strings; 41 std::unordered_map<uint32_t, std::string> literalarrays; 45 std::unordered_map<std::string, panda_file::BaseMethodItem *> method_items; 46 std::unordered_map<std::string, panda_file::BaseFieldItem *> field_items; 47 std::unordered_map<std::string, panda_file::BaseClassItem *> class_items; 49 std::unordered_map<std::string, panda_file::LiteralArrayItem *> literalarray_items; 55 …static bool Emit(panda_file::Writer *writer, const Program &program, std::map<std::string, size_t>… [all …]
|
| D | mangling.h | 21 #include <string> 25 static std::string MANGLE_BEGIN = ":"; 26 static std::string MANGLE_SEPARATOR = ";"; 28 inline std::string MangleFunctionName(const std::string &name, const std::vector<pandasm::Function:… in MangleFunctionName() 31 std::string mangle_name {name}; in MangleFunctionName() 41 inline std::string DeMangleName(const std::string &name) in DeMangleName() 44 if (iter != std::string::npos) { in DeMangleName() 50 inline std::string MangleFieldName(const std::string &name, const pandasm::Type &type) in MangleFieldName() 52 std::string mangle_name {name}; in MangleFieldName()
|
| D | assembly-function.h | 21 #include <string> 42 std::string whole_line; 43 std::string exception_record; 44 std::string try_begin_label; 45 std::string try_end_label; 46 std::string catch_begin_label; 47 std::string catch_end_label; 52 std::unordered_map<std::string, std::vector<const CatchBlock *>> try_catch_map; 53 std::vector<std::string> try_catch_order; 55 std::unordered_map<std::string, std::vector<const CatchBlock *>> &map, in TryCatchInfo() [all …]
|
| /ark/js_runtime/ecmascript/tooling/base/ |
| D | pt_types.h | 47 using BreakpointId = std::string; 58 if (lineStart == std::string::npos) { in ParseBreakpointId() 62 if (columnStart == std::string::npos) { in ParseBreakpointId() 66 if (urlStart == std::string::npos) { in ParseBreakpointId() 69 std::string lineStr = id.substr(lineStart + 1, columnStart - lineStart - 1); in ParseBreakpointId() 70 std::string columnStr = id.substr(columnStart + 1, urlStart - columnStart - 1); in ParseBreakpointId() 71 std::string url = id.substr(urlStart + 1); in ParseBreakpointId() 81 std::string url_ {}; 99 using UnserializableValue = std::string; 117 const std::string &GetType() const in GetType() [all …]
|
| D | pt_script.h | 31 …PtScript(ScriptId scriptId, const std::string &fileName, const std::string &url, const std::string… 44 const std::string &GetFileName() const in GetFileName() 49 void SetFileName(const std::string &fileName) in SetFileName() 54 const std::string &GetUrl() const in GetUrl() 59 void SetUrl(const std::string &url) in SetUrl() 64 const std::string &GetHash() const in GetHash() 69 void SetHash(const std::string &hash) in SetHash() 74 const std::string &GetScriptSource() const in GetScriptSource() 79 void SetScriptSource(const std::string &scriptSource) in SetScriptSource() 84 const std::string &GetSourceMapUrl() const in GetSourceMapUrl() [all …]
|
| D | pt_events.h | 32 virtual std::string GetName() const = 0; 45 std::string GetName() const override in GetName() 86 std::string GetName() const override in GetName() 102 const std::string &GetReason() const in GetReason() 113 static std::string GetReasonString(PauseReason reason) in GetReasonString() 199 std::string reason_ {}; 210 std::string GetName() const override in GetName() 226 std::string GetName() const override in GetName() 242 const std::string &GetUrl() const in GetUrl() 247 ScriptFailedToParse &SetUrl(const std::string &url) in SetUrl() [all …]
|
| /ark/runtime_core/runtime/include/coretypes/ |
| D | string.h | 32 class String : public ObjectHeader { 34 static String *Cast(ObjectHeader *object) in Cast() 36 return static_cast<String *>(object); in Cast() 39 …static String *CreateFromMUtf8(const uint8_t *mutf8_data, size_t mutf8_length, uint32_t utf16_leng… 42 …static String *CreateFromMUtf8(const uint8_t *mutf8_data, uint32_t utf16_length, bool can_be_compr… 45 …static String *CreateFromMUtf8(const uint8_t *mutf8_data, uint32_t utf16_length, LanguageContext c… 48 …static String *CreateFromMUtf8(const uint8_t *mutf8_data, LanguageContext ctx, PandaVM *vm, bool m… 50 …static String *CreateFromUtf16(const uint16_t *utf16_data, uint32_t utf16_length, LanguageContext … 53 static String *CreateEmptyString(LanguageContext ctx, PandaVM *vm); 55 static String *CreateFromString(String *str, LanguageContext ctx, PandaVM *vm); [all …]
|
| /ark/runtime_core/libpandabase/ |
| D | README.md | 11 - string 41 - Delimiter is a character or string that separates the different value if the single argument list. 49 - `std::string` for string argument 53 …red in `pandargs.h` under `panda` namespace, which is an alias for `std::vector<std::string>` type. 57 - `std::string GetName()` - return name of an argument 58 - `std::string GetDesc()` - return description of an argument 72 …ments are arguments that come after trailing `--`. All of them are plain std::vector of std::string 79 - `std::string GetErrorString()` - return error string if error occurred on argument addition or pa… 84 - `bool IsArgSet(const std::string& arg_name)` - return `true` if an argument with given name was a… 92 - `std::string GetHelpString()` - return string with all arguments and their description [all …]
|
| /ark/js_runtime/ecmascript/ |
| D | ecma_string-inl.h | 43 auto string = vm->GetFactory()->AllocNonMovableStringObject(EcmaString::SIZE); in CreateEmptyString() local 44 string->SetLength(0, GetCompressedStringsEnabled()); in CreateEmptyString() 45 string->SetRawHashcode(0); in CreateEmptyString() 46 return string; in CreateEmptyString() 56 EcmaString *string = nullptr; in CreateFromUtf8() local 58 string = AllocStringObject(utf8Len, true, vm); in CreateFromUtf8() 59 ASSERT(string != nullptr); in CreateFromUtf8() 61 if (memcpy_s(string->GetDataUtf8Writable(), utf8Len, utf8Data, utf8Len) != EOK) { in CreateFromUtf8() 67 string = AllocStringObject(utf16Len, false, vm); in CreateFromUtf8() 68 ASSERT(string != nullptr); in CreateFromUtf8() [all …]
|
| /ark/runtime_core/disassembler/ |
| D | accumulators.h | 20 #include <string> 24 using LabelTable = std::map<size_t, std::string>; 26 using AnnotationList = std::vector<std::pair<std::string, std::string>>; 29 std::string method_info; 31 std::vector<std::string> instructions_info; 35 std::string record_info; 37 std::vector<std::string> fields_info; 41 std::map<std::string, RecordInfo> records_info; 42 std::map<std::string, MethodInfo> methods_info; 47 std::map<std::string, AnnotationList> field_annotations; [all …]
|
| /ark/runtime_core/tests/cts-assembly/ |
| D | obj-14.pa | 14 .record panda.String <external> 16 .function void IO.printString(panda.String a0) <external> 20 # String[] v6 = new String[5]; 22 # String[] s = allocString(); 31 # String[] allocString() { 32 # String[] v1 = new String[1]; 49 # String[] v1 = new String[1]; 52 .function panda.String[] allocString(){ 57 # v1 = new String[v0] 58 newarr v1, v0, panda.String[] [all …]
|
| /ark/js_runtime/ecmascript/tooling/test/ |
| D | debugger_params_test.cpp | 72 std::string msg; in HWTEST_F_L0() 76 msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{}})"; in HWTEST_F_L0() 82 … msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{"maxScriptsCacheSize":100}})"; in HWTEST_F_L0() 92 std::string msg; in HWTEST_F_L0() 96 msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{}})"; in HWTEST_F_L0() 102 msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{"unknownKey":100}})"; in HWTEST_F_L0() 108 msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{"samplingInterval":true}})"; in HWTEST_F_L0() 113 … msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{"samplingInterval":"Test"}})"; in HWTEST_F_L0() 118 msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{"samplingInterval":1000}})"; in HWTEST_F_L0() 126 std::string msg; in HWTEST_F_L0() [all …]
|
| /ark/runtime_core/pandastdlib/ |
| D | pandastdlib.pa | 14 .record panda.String <external> 29 panda.String message 34 panda.String message 39 panda.String message 44 panda.String message 49 panda.String message 54 panda.String message 59 panda.String message 64 panda.String message 69 panda.String message [all …]
|
| /ark/js_runtime/ecmascript/base/ |
| D | string_helper.h | 23 #include <string> 45 static std::string ToStdString(EcmaString *string); 47 static bool CheckDuplicate(EcmaString *string); 49 static inline bool Contains(const EcmaString *string, const EcmaString *other) in Contains() argument 52 CString str = ConvertToString(string, StringConvertedUsage::LOGICOPERATION); in Contains() 72 …static inline std::string SubString(JSThread *thread, const JSHandle<EcmaString> &string, uint32_t… in SubString() argument 75 … EcmaString *substring = EcmaString::FastSubString(string, start, length, thread->GetEcmaVM()); in SubString() 76 return std::string(ConvertToString(substring, StringConvertedUsage::LOGICOPERATION)); in SubString() 86 static inline std::string Utf8ToString(const uint8_t *utf8Data, uint32_t dataLen) in Utf8ToString() 89 std::string str(charData, dataLen); in Utf8ToString() [all …]
|