| /ark/runtime_core/assembler/ |
| D | meta.h | 48 Error(std::string msg, Type type) : msg_(std::move(msg)), type_(type) {} in Error() 53 std::string GetMessage() const in GetMessage() 64 std::string msg_; 72 std::optional<Error> SetAttribute(std::string_view attribute) in SetAttribute() 84 void RemoveAttribute(const std::string &attribute) in RemoveAttribute() 91 bool GetAttribute(const std::string &attribute) const in GetAttribute() 96 std::optional<Error> SetAttributeValue(std::string_view attribute, std::string_view value) in SetAttributeValue() 108 std::vector<std::string> GetAttributeValues(const std::string &attribute) const in GetAttributeValues() 118 std::optional<std::string> GetAttributeValue(const std::string &attribute) const in GetAttributeValue() 128 const std::unordered_set<std::string> &GetBoolAttributes() const in GetBoolAttributes() [all …]
|
| 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; 48 std::unordered_map<std::string_view, panda_file::StringItem *> string_items; 49 std::unordered_map<std::string, panda_file::LiteralArrayItem *> literalarray_items; [all …]
|
| D | assembly-function.h | 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; 51 std::unordered_map<std::string_view, size_t> try_catch_labels; 52 std::unordered_map<std::string, std::vector<const CatchBlock *>> try_catch_map; 53 std::vector<std::string> try_catch_order; 54 TryCatchInfo(std::unordered_map<std::string_view, size_t> &labels, in TryCatchInfo() [all …]
|
| D | pandasm.cpp | 34 void PrintError(const panda::pandasm::Error &e, const std::string &msg) in PrintError() 36 std::stringstream sos; in PrintError() 37 std::cerr << msg << ": " << e.message << std::endl; in PrintError() 39 std::cerr << sos.str() << e.whole_line << std::endl; in PrintError() 40 std::cerr << std::setw(static_cast<int>(e.pos + sos.str().size()) + 1) << "^" << std::endl; in PrintError() 43 void PrintErrors(const panda::pandasm::ErrorList &warnings, const std::string &msg) in PrintErrors() 50 bool PrepareArgs(panda::PandArgParser &pa_parser, const panda::PandArg<std::string> &input_file, in PrepareArgs() 51 … const panda::PandArg<std::string> &output_file, const panda::PandArg<std::string> &log_file, in PrepareArgs() 52 … const panda::PandArg<bool> &help, const panda::PandArg<bool> &verbose, std::ifstream &inputfile, in PrepareArgs() 57 std::cerr << "Usage:" << std::endl; in PrepareArgs() [all …]
|
| /ark/js_runtime/ecmascript/tooling/base/ |
| D | pt_returns.h | 26 std::unique_ptr<PtJson> ToJson() const override in ToJson() 41 std::unique_ptr<PtJson> ToJson() const override; 53 …explicit SetBreakpointByUrlReturns(const std::string &id, std::vector<std::unique_ptr<Location>> l… in SetBreakpointByUrlReturns() 54 : id_(id), locations_(std::move(locations)) in SetBreakpointByUrlReturns() 58 std::unique_ptr<PtJson> ToJson() const override; 65 std::string id_ {}; 66 std::vector<std::unique_ptr<Location>> locations_ {}; 71 explicit EvaluateOnCallFrameReturns(std::unique_ptr<RemoteObject> result, 72 std::optional<std::unique_ptr<ExceptionDetails>> exceptionDetails = std::nullopt) 73 : result_(std::move(result)), exceptionDetails_(std::move(exceptionDetails)) in result_() [all …]
|
| D | pt_types.h | 35 virtual std::unique_ptr<PtJson> ToJson() const = 0; 47 using BreakpointId = std::string; 51 … return "id:" + std::to_string(metaData.line_) + ":" + std::to_string(metaData.column_) + ":" + in ToString() 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() 72 metaData->line_ = std::stoi(lineStr); in ParseBreakpointId() [all …]
|
| D | pt_events.h | 32 virtual std::string GetName() const = 0; 43 std::unique_ptr<PtJson> ToJson() const override; 45 std::string GetName() const override in GetName() 66 BreakpointResolved &SetLocation(std::unique_ptr<Location> location) in SetLocation() 68 location_ = std::move(location); in SetLocation() 77 std::unique_ptr<Location> location_ {nullptr}; 84 std::unique_ptr<PtJson> ToJson() const override; 86 std::string GetName() const override in GetName() 91 const std::vector<std::unique_ptr<CallFrame>> *GetCallFrames() const in GetCallFrames() 96 Paused &SetCallFrames(std::vector<std::unique_ptr<CallFrame>> callFrames) in SetCallFrames() [all …]
|
| D | pt_types.cpp | 27 const std::string ObjectType::Object = "object"; // NOLINT (readability-identifier-naming) 28 const std::string ObjectType::Function = "function"; // NOLINT (readability-identifier-naming) 29 const std::string ObjectType::Undefined = "undefined"; // NOLINT (readability-identifier-naming) 30 const std::string ObjectType::String = "string"; // NOLINT (readability-identifier-naming) 31 const std::string ObjectType::Number = "number"; // NOLINT (readability-identifier-naming) 32 const std::string ObjectType::Boolean = "boolean"; // NOLINT (readability-identifier-naming) 33 const std::string ObjectType::Symbol = "symbol"; // NOLINT (readability-identifier-naming) 34 const std::string ObjectType::Bigint = "bigint"; // NOLINT (readability-identifier-naming) 35 const std::string ObjectType::Wasm = "wasm"; // NOLINT (readability-identifier-naming) 37 const std::string ObjectSubType::Array = "array"; // NOLINT (readability-identifier-na… [all …]
|
| D | pt_params.h | 26 std::unique_ptr<PtJson> ToJson() const override in ToJson() 41 static std::unique_ptr<EnableParams> Create(const PtJson ¶ms); 57 std::optional<double> maxScriptsCacheSize_ {}; 65 static std::unique_ptr<EvaluateOnCallFrameParams> Create(const PtJson ¶ms); 72 const std::string &GetExpression() const in GetExpression() 82 std::string expression_ {}; 83 std::optional<std::string> objectGroup_ {}; 84 std::optional<bool> includeCommandLineAPI_ {}; 85 std::optional<bool> silent_ {}; 86 std::optional<bool> returnByValue_ {}; [all …]
|
| D | pt_returns.cpp | 19 std::unique_ptr<PtJson> EnableReturns::ToJson() const in ToJson() 21 std::unique_ptr<PtJson> result = PtJson::CreateObject(); in ToJson() 23 result->Add("debuggerId", std::to_string(debuggerId_).c_str()); in ToJson() 28 std::unique_ptr<PtJson> SetBreakpointByUrlReturns::ToJson() const in ToJson() 30 std::unique_ptr<PtJson> result = PtJson::CreateObject(); in ToJson() 33 std::unique_ptr<PtJson> array = PtJson::CreateArray(); in ToJson() 36 std::unique_ptr<PtJson> location = locations_[i]->ToJson(); in ToJson() 44 std::unique_ptr<PtJson> EvaluateOnCallFrameReturns::ToJson() const in ToJson() 46 std::unique_ptr<PtJson> result = PtJson::CreateObject(); in ToJson() 58 std::unique_ptr<PtJson> GetPossibleBreakpointsReturns::ToJson() const in ToJson() [all …]
|
| /ark/runtime_core/assembler/extensions/ecmascript/ |
| D | ecmascript_meta.h | 25 std::string GetBase() const override in GetBase() 35 std::vector<std::string> GetInterfaces() const override in GetInterfaces() 51 bool IsAnnotationRecordAttribute([[maybe_unused]] std::string_view attribute) const override in IsAnnotationRecordAttribute() 56 bool IsAnnotationIdAttribute([[maybe_unused]] std::string_view attribute) const override in IsAnnotationIdAttribute() 61 … bool IsAnnotationElementNameAttribute([[maybe_unused]] std::string_view attribute) const override in IsAnnotationElementNameAttribute() 66 … bool IsAnnotationElementTypeAttribute([[maybe_unused]] std::string_view attribute) const override in IsAnnotationElementTypeAttribute() 71 …bool IsAnnotationElementArrayComponentTypeAttribute([[maybe_unused]] std::string_view attribute) c… in IsAnnotationElementArrayComponentTypeAttribute() 76 … bool IsAnnotationElementValueAttribute([[maybe_unused]] std::string_view attribute) const override in IsAnnotationElementValueAttribute() 81 std::optional<Error> Validate(std::string_view attribute) const override; 83 … std::optional<Error> Validate(std::string_view attribute, std::string_view value) const override; [all …]
|
| /ark/runtime_core/disassembler/tests/ |
| D | instructions_test.cpp | 25 std::string g_bin_path_abs {}; 31 std::stringstream ss {}; in TEST() 35 EXPECT_TRUE(ss.str().find(".language PandaAssembly") != std::string::npos); in TEST() 42 std::stringstream ss {}; 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() [all …]
|
| /ark/js_runtime/ecmascript/compiler/ |
| D | verifier.cpp | 26 std::unordered_set<GateRef> gatesSet; in RunDataIntegrityCheck() 27 std::vector<GateRef> gatesList; in RunDataIntegrityCheck() 38 std::cerr << "[Verifier][Error] Circuit data is corrupted (bad next gate)" << std::endl; in RunDataIntegrityCheck() 39 std::cerr << "at: " << std::dec << gate << std::endl; in RunDataIntegrityCheck() 52 … std::cerr << "[Verifier][Error] Circuit data is corrupted (out of bound access)" << std::endl; in RunDataIntegrityCheck() 53 std::cerr << "at: " << std::dec << out << std::endl; in RunDataIntegrityCheck() 61 … std::cerr << "[Verifier][Error] Circuit data is corrupted (corrupted in list)" << std::endl; in RunDataIntegrityCheck() 62 std::cerr << "id: " << std::dec << circuit->GetId(gate) << std::endl; in RunDataIntegrityCheck() 66 … std::cerr << "[Verifier][Error] Circuit data is corrupted (invalid in address)" << std::endl; in RunDataIntegrityCheck() 67 std::cerr << "id: " << std::dec << circuit->GetId(gate) << std::endl; in RunDataIntegrityCheck() [all …]
|
| D | bytecode_circuit_builder.h | 41 std::vector<uint8_t *> succs {}; 42 CfgInfo(uint8_t *startOrEndPc, SplitKind kind, std::vector<uint8_t *> successors) in CfgInfo() 64 std::vector<BytecodeRegion *> preds {}; // List of predessesor blocks 65 std::vector<BytecodeRegion *> succs {}; // List of successors blocks 66 std::vector<BytecodeRegion *> trys {}; // List of trys blocks 67 std::vector<BytecodeRegion *> catchs {}; // List of catches blocks 68 std::vector<BytecodeRegion *> immDomBlocks {}; // List of dominated blocks 70 std::vector<BytecodeRegion *> domFrontiers {}; // List of dominace frontiers 72 std::set<uint16_t> phi {}; // phi node 76 std::vector<std::tuple<size_t, uint8_t *, bool>> expandedPreds {}; [all …]
|
| /ark/runtime_core/runtime/include/mem/ |
| D | panda_containers.h | 35 using PandaForwardList = std::forward_list<T, mem::AllocatorAdapter<T>>; 38 using PandaForwardListTL = std::forward_list<T, mem::AllocatorAdapter<T, mem::AllocScope::LOCAL>>; 41 using PandaList = std::list<T, mem::AllocatorAdapter<T>>; 44 using PandaListTL = std::list<T, mem::AllocatorAdapter<T, mem::AllocScope::LOCAL>>; 47 using PandaDeque = std::deque<T, mem::AllocatorAdapter<T>>; 50 using PandaDequeTL = std::deque<T, mem::AllocatorAdapter<T, mem::AllocScope::LOCAL>>; 53 using PandaQueue = std::queue<T, PandaContainer>; 56 using PandaQueueTL = std::queue<T, PandaContainer>; 59 using PandaStack = std::stack<T, PandaContainer>; 62 using PandaStackTL = std::stack<T, PandaContainer>; [all …]
|
| /ark/js_runtime/ecmascript/tooling/test/ |
| D | debugger_returns_test.cpp | 68 std::unique_ptr<EnableReturns> enableReturns = std::make_unique<EnableReturns>(100U); in HWTEST_F_L0() 75 EXPECT_EQ(std::string("100"), Local<StringRef>(result)->ToString()); in HWTEST_F_L0() 80 auto locations = std::vector<std::unique_ptr<Location>>(); in HWTEST_F_L0() 81 std::unique_ptr<Location> location = std::make_unique<Location>(); in HWTEST_F_L0() 83 locations.emplace_back(std::move(location)); in HWTEST_F_L0() 86 std::unique_ptr<SetBreakpointByUrlReturns> setBreakpointByUrlReturns in HWTEST_F_L0() 87 = std::make_unique<SetBreakpointByUrlReturns>("11", std::move(locations)); in HWTEST_F_L0() 94 EXPECT_EQ(std::string("11"), Local<StringRef>(result)->ToString()); in HWTEST_F_L0() 99 std::unique_ptr<RemoteObject> result1 = std::make_unique<RemoteObject>(); in HWTEST_F_L0() 100 std::unique_ptr<ExceptionDetails> exceptionDetails = std::make_unique<ExceptionDetails>(); in HWTEST_F_L0() [all …]
|
| /ark/js_runtime/ecmascript/base/ |
| D | string_helper.h | 45 static std::string ToStdString(EcmaString *string); 72 …static inline std::string SubString(JSThread *thread, const JSHandle<EcmaString> &string, uint32_t… in SubString() 76 return std::string(ConvertToString(substring, StringConvertedUsage::LOGICOPERATION)); in SubString() 79 static inline std::u16string Utf16ToU16String(const uint16_t *utf16Data, uint32_t dataLen) in Utf16ToU16String() 82 std::u16string u16str(char16tData, dataLen); in Utf16ToU16String() 86 static inline std::string Utf8ToString(const uint8_t *utf8Data, uint32_t dataLen) in Utf8ToString() 89 std::string str(charData, dataLen); in Utf8ToString() 93 static inline std::u16string Utf8ToU16String(const uint8_t *utf8Data, uint32_t dataLen) in Utf8ToU16String() 96 std::string str(charData, dataLen); in Utf8ToU16String() 97 …std::u16string u16str = std::wstring_convert<std::codecvt_utf8_utf16<char16_t>, char16_t>{}.from_b… in Utf8ToU16String() [all …]
|
| /ark/runtime_core/disassembler/ |
| D | accumulators.h | 24 using LabelTable = std::map<size_t, std::string>; 25 using IdList = std::vector<panda::panda_file::File::EntityId>; 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/ts2abc/ts2panda/ts2abc/ |
| D | main.cpp | 23 int Preprocess(const panda::ts2abc::Options &options, const panda::PandArgParser &argParser, std::s… in Preprocess() 24 std::string &data, const std::string &usage) in Preprocess() 26 std::string input; in Preprocess() 31 std::cerr << "Incorrect args number" << std::endl; in Preprocess() 32 std::cerr << "Usage example: ts2abc test.json test.abc"<< std::endl; in Preprocess() 33 std::cerr << usage << std::endl; in Preprocess() 34 std::cerr << argParser.GetHelpString(); in Preprocess() 44 std::cerr << usage << std::endl; in Preprocess() 45 std::cerr << argParser.GetHelpString(); in Preprocess() 60 std::cerr << argParser.GetErrorString(); in main() [all …]
|
| /ark/js_runtime/ecmascript/ |
| D | dump.cpp | 295 static void DumpArrayClass(JSThread *thread, const TaggedArray *arr, std::ostream &os) in DumpArrayClass() 299 os << " <TaggedArray[" << std::dec << len << "]>\n"; in DumpArrayClass() 303 os << std::right << std::setw(DUMP_PROPERTY_OFFSET) << i << ": "; in DumpArrayClass() 310 static void DumpStringClass(const EcmaString *str, std::ostream &os) in DumpStringClass() 317 static void DumpPropertyKey(JSTaggedValue key, std::ostream &os) in DumpPropertyKey() 329 static void DumpHClass(JSThread *thread, const JSHClass *jshclass, std::ostream &os, bool withDetai… in DumpHClass() 332 os << "JSHClass :" << std::setw(DUMP_TYPE_OFFSET); in DumpHClass() 335 os << " - Prototype :" << std::setw(DUMP_TYPE_OFFSET); in DumpHClass() 338 os << " - PropertyDescriptors :" << std::setw(DUMP_TYPE_OFFSET); in DumpHClass() 346 os << " - Transitions :" << std::setw(DUMP_TYPE_OFFSET); in DumpHClass() [all …]
|
| /ark/runtime_core/libpandabase/tests/ |
| D | utf_test.cpp | 40 const std::vector<uint8_t> in {0xc0, 0x80, 0x00}; in TEST() 41 const std::vector<uint16_t> res {0x0}; in TEST() 42 std::vector<uint16_t> out(res.size()); in TEST() 49 const std::vector<uint8_t> in {0x7f, 0x00}; in TEST() 50 const std::vector<uint16_t> res {0x7f}; in TEST() 51 std::vector<uint16_t> out(res.size()); in TEST() 58 const std::vector<uint8_t> in {0xc2, 0xa7, 0x33, 0x00}; in TEST() 59 const std::vector<uint16_t> res {0xa7, 0x33}; in TEST() 60 std::vector<uint16_t> out(res.size()); in TEST() 67 const std::vector<uint8_t> in {0xef, 0xbf, 0x83, 0x33, 0x00}; in TEST() [all …]
|
| D | bit_helpers_test.cpp | 27 EXPECT_TRUE((std::is_same_v<UnsignedTypeHelperT<0>, uint8_t>)); in TEST() 28 EXPECT_TRUE((std::is_same_v<UnsignedTypeHelperT<1>, uint8_t>)); in TEST() 29 EXPECT_TRUE((std::is_same_v<UnsignedTypeHelperT<8>, uint8_t>)); in TEST() 31 EXPECT_TRUE((std::is_same_v<UnsignedTypeHelperT<9>, uint16_t>)); in TEST() 32 EXPECT_TRUE((std::is_same_v<UnsignedTypeHelperT<16>, uint16_t>)); in TEST() 34 EXPECT_TRUE((std::is_same_v<UnsignedTypeHelperT<17>, uint32_t>)); in TEST() 35 EXPECT_TRUE((std::is_same_v<UnsignedTypeHelperT<32>, uint32_t>)); in TEST() 37 EXPECT_TRUE((std::is_same_v<UnsignedTypeHelperT<33>, uint64_t>)); in TEST() 38 EXPECT_TRUE((std::is_same_v<UnsignedTypeHelperT<64>, uint64_t>)); in TEST() 40 EXPECT_TRUE((std::is_same_v<UnsignedTypeHelperT<65>, void>)); in TEST() [all …]
|
| /ark/runtime_core/libpandabase/utils/ |
| D | arena_containers.h | 37 using ArenaVector = std::vector<T, ArenaAllocatorAdapter<T, use_oom_handler>>; 39 using ArenaDeque = std::deque<T, ArenaAllocatorAdapter<T, use_oom_handler>>; 41 using ArenaStack = std::stack<T, ArenaContainer>; 43 using ArenaQueue = std::queue<T, ArenaContainer>; 45 using ArenaList = std::list<T, ArenaAllocatorAdapter<T, use_oom_handler>>; 46 template <class Key, class Compare = std::less<Key>, bool use_oom_handler = false> 47 using ArenaSet = std::set<Key, Compare, ArenaAllocatorAdapter<Key, use_oom_handler>>; 48 template <class Key, class T, class Compare = std::less<Key>, bool use_oom_handler = false> 49 using ArenaMap = std::map<Key, T, Compare, ArenaAllocatorAdapter<std::pair<const Key, T>, use_oom_h… 50 template <class Key, class T, class Compare = std::less<Key>, bool use_oom_handler = false> [all …]
|
| /ark/runtime_core/verification/util/ |
| D | lazy.h | 41 template <typename U, std::decay_t<decltype(*((*(static_cast<U *>(nullptr)))))> *> 70 …return [end = c.end(), it = c.begin()]() mutable -> std::optional<std::decay_t<decltype(*(c.begin(… in LazyFetch() 74 return std::nullopt; in LazyFetch() 81 …return [end = c.end(), it = c.begin()]() mutable -> std::optional<std::decay_t<decltype(*(c.begin(… in LazyFetch() 85 return std::nullopt; in LazyFetch() 92 …return [cend = c.cend(), it = c.cbegin()]() mutable -> std::optional<std::decay_t<decltype(*(c.cbe… in ConstLazyFetch() 96 return std::nullopt; in ConstLazyFetch() 103 …return [end = c.end(), it = c.begin()]() mutable -> std::optional<decltype(std::ref(*(c.begin())))… in RefLazyFetch() 105 return {std::ref(*(it++))}; in RefLazyFetch() 107 return std::nullopt; in RefLazyFetch() [all …]
|
| /ark/runtime_core/dprof/converter/features/ |
| D | hotness_counters.h | 33 std::string name; 36 std::string app_name; 39 std::list<MethodInfo> methods_list; 43 explicit HCountersFunctor(std::ostream &out) : out_(out) {} in HCountersFunctor() 46 bool operator()(const AppData &appData, const std::vector<uint8_t> &data) override in operator() 48 std::unordered_map<std::string, uint32_t> methodInfoMap; in operator() 54 std::list<HCountersInfo::MethodInfo> methodsList; in operator() 56 methodsList.emplace_back(HCountersInfo::MethodInfo {std::move(it.first), it.second}); in operator() 60 … HCountersInfo {appData.GetName(), appData.GetHash(), appData.GetPid(), std::move(methodsList)}); in operator() 65 bool ShowInfo(const std::string &format) in ShowInfo() [all …]
|