/arkcompiler/runtime_core/assembler/ |
H A D | pandasm.h | 21 namespace panda::pandasm { 23 void PrintError(const panda::pandasm::Error &e, const std::string &msg); 25 void PrintErrors(const panda::pandasm::ErrorList &warnings, const std::string &msg); 27 bool PrepareArgs(panda::PandArgParser &pa_parser, const panda::PandArg<std::string> &input_file, 28 const panda::PandArg<std::string> &output_file, const panda::PandArg<std::string> &log_file, 29 const panda::PandArg<bool> &help, const panda::PandArg<bool> &verbose, std::ifstream &inputfile, 32 bool Tokenize(panda [all...] |
H A D | pandasm.cpp | 36 namespace panda::pandasm { 38 void PrintError(const panda::pandasm::Error &e, const std::string &msg) in PrintError() 47 void PrintErrors(const panda::pandasm::ErrorList &warnings, const std::string &msg) in PrintErrors() 54 void PrintHelp(const panda::PandArgParser &pa_parser) in PrintHelp() 62 bool PrepareArgs(panda::PandArgParser &pa_parser, const panda::PandArg<std::string> &input_file, in PrepareArgs() 63 const panda::PandArg<std::string> &output_file, const panda::PandArg<std::string> &log_file, in PrepareArgs() 64 const panda::PandArg<bool> &help, const panda in PrepareArgs() [all...] |
/arkcompiler/ets_frontend/merge_abc/src/ |
H A D | annotationProto.cpp | 18 namespace panda::proto { 19 void AnnotationData::Serialize(const panda::pandasm::AnnotationData &anno, protoPanda::AnnotationData &protoAnno) in Serialize() 28 void AnnotationData::Deserialize(const protoPanda::AnnotationData &protoAnno, panda::pandasm::AnnotationData &anno, in Deserialize() 29 panda::ArenaAllocator *allocator) in Deserialize() 32 panda::pandasm::AnnotationElement &element = AnnotationElement::Deserialize(protoElement, allocator); in Deserialize() 37 void AnnotationElement::Serialize(const panda::pandasm::AnnotationElement &element, in Serialize() 52 panda::pandasm::AnnotationElement &AnnotationElement::Deserialize(const protoPanda::AnnotationElement &protoElement, in Deserialize() 53 panda::ArenaAllocator *allocator) in Deserialize() 56 panda::pandasm::ArrayValue &array = ArrayValue::Deserialize(protoElement.array(), allocator); in Deserialize() 57 auto *element = allocator->New<panda in Deserialize() [all...] |
H A D | annotationProto.h | 24 namespace panda::proto { 27 static void Serialize(const panda::pandasm::AnnotationData &anno, protoPanda::AnnotationData &protoAnno); 28 static void Deserialize(const protoPanda::AnnotationData &protoAnno, panda::pandasm::AnnotationData &anno, 29 panda::ArenaAllocator *allocator); 34 static void Serialize(const panda::pandasm::AnnotationElement &element, 36 static panda::pandasm::AnnotationElement &Deserialize(const protoPanda::AnnotationElement &protoElement, 37 panda::ArenaAllocator *allocator); 42 static void Serialize(const panda::pandasm::ScalarValue &scalar, protoPanda::ScalarValue &protoScalar); 43 static panda::pandasm::ScalarValue Deserialize(const protoPanda::ScalarValue &protoScalar, 44 panda [all...] |
H A D | metaProto.h | 25 namespace panda::proto { 28 static void Serialize(const panda::pandasm::RecordMetadata &meta, protoPanda::RecordMetadata &protoMeta); 30 std::unique_ptr<panda::pandasm::RecordMetadata> &meta, 31 panda::ArenaAllocator *allocator); 36 static void Serialize(const panda::pandasm::FunctionMetadata &meta, 39 std::unique_ptr<panda::pandasm::FunctionMetadata> &meta, 40 panda::ArenaAllocator *allocator); 45 static void Serialize(const panda::pandasm::FieldMetadata &meta, protoPanda::FieldMetadata &protoMeta); 47 std::unique_ptr<panda::pandasm::FieldMetadata> &meta, 48 panda [all...] |
H A D | assemblyFunctionProto.h | 30 namespace panda::proto { 33 static void Serialize(const panda::pandasm::Function::CatchBlock &block, protoPanda::CatchBlock &protoBlock); 34 static void Deserialize(const protoPanda::CatchBlock &protoBlock, panda::pandasm::Function::CatchBlock &block); 39 static void Serialize(const panda::pandasm::Function::Parameter ¶m, protoPanda::Parameter &protoParam); 40 static void Deserialize(const protoPanda::Parameter &protoParam, panda::pandasm::Function::Parameter ¶m, 41 panda::ArenaAllocator *allocator); 46 static void Serialize(const panda::pandasm::Function &function, protoPanda::Function &protoFunction); 47 static void DeserializeLabels(const protoPanda::Function &protoFunction, panda::pandasm::Function &function, 48 panda::ArenaAllocator *allocator); 49 static void DeserializeProtoIns(const protoPanda::Function &protoFunction, panda [all...] |
H A D | metaProto.cpp | 17 namespace panda::proto { 18 void RecordMetadata::Serialize(const panda::pandasm::RecordMetadata &meta, protoPanda::RecordMetadata &protoMeta) in Serialize() 21 ItemMetadata::Serialize(static_cast<const panda::pandasm::ItemMetadata &>(meta), *protoItemmetadata); in Serialize() 25 std::unique_ptr<panda::pandasm::RecordMetadata> &meta, in Deserialize() 26 panda::ArenaAllocator *allocator) in Deserialize() 38 void FunctionMetadata::Serialize(const panda::pandasm::FunctionMetadata &meta, in Serialize() 42 ItemMetadata::Serialize(static_cast<const panda::pandasm::ItemMetadata &>(meta), *protoItemmetadata); in Serialize() 46 std::unique_ptr<panda::pandasm::FunctionMetadata> &meta, in Deserialize() 47 panda::ArenaAllocator *allocator) in Deserialize() 59 void FieldMetadata::Serialize(const panda [all...] |
H A D | protobufSnapshotGenerator.cpp | 21 namespace panda::proto { 22 void ProtobufSnapshotGenerator::GenerateSnapshot(const panda::pandasm::Program &program, const std::string &outputName) in GenerateSnapshot() 28 std::fstream output = panda::es2panda::util::Helpers::FileStream<std::fstream>( in GenerateSnapshot() 29 panda::os::file::File::GetExtendedFilePath(outputName), in GenerateSnapshot() 39 void ProtobufSnapshotGenerator::GenerateProgram(const std::string &inputName, panda::pandasm::Program &prog, in GenerateProgram() 40 panda::ArenaAllocator *allocator) in GenerateProgram() 42 std::fstream input = panda::es2panda::util::Helpers::FileStream<std::fstream>( in GenerateProgram() 43 panda::os::file::File::GetExtendedFilePath(inputName), in GenerateProgram() 57 panda::es2panda::util::ProgramCache *ProtobufSnapshotGenerator::GetCacheContext(const std::string &cacheFilePath, in GetCacheContext() 58 panda in GetCacheContext() [all...] |
/arkcompiler/runtime_core/assembler/tests/ |
H A D | annotation_test.cpp | 23 namespace panda::pandasm { 40 ScalarValue insn_order(ScalarValue::Create<panda::pandasm::Value::Type::I32>(1)); in HWTEST_F() 41 std::vector<panda::pandasm::ScalarValue> elements; in HWTEST_F() 44 ArrayValue array_value(panda::pandasm::Value::Type::I32, elements); in HWTEST_F() 57 ScalarValue insn_order1(ScalarValue::Create<panda::pandasm::Value::Type::U1>(1U)); in HWTEST_F() 59 ArrayValue array_value_U1(panda::pandasm::Value::Type::U1, elements); in HWTEST_F() 74 char type_u1 = Value::GetTypeAsChar(panda::pandasm::Value::Type::U1); in HWTEST_F() 78 type_u1 = Value::GetTypeAsChar(panda::pandasm::Value::Type::I8); in HWTEST_F() 82 type_u1 = Value::GetTypeAsChar(panda::pandasm::Value::Type::U8); in HWTEST_F() 86 type_u1 = Value::GetTypeAsChar(panda in HWTEST_F() [all...] |
/arkcompiler/ets_frontend/es2panda/compiler/core/emitter/ |
H A D | moduleRecordEmitter.cpp | 18 namespace panda::es2panda::compiler { 23 panda::pandasm::LiteralArray::Literal moduleSize = { in GenModuleRequests() 24 .tag_ = panda::panda_file::LiteralTag::INTEGER, .value_ = static_cast<uint32_t>(moduleRequests.size())}; in GenModuleRequests() 27 panda::pandasm::LiteralArray::Literal moduleRequest = { in GenModuleRequests() 28 .tag_ = panda::panda_file::LiteralTag::STRING, .value_ = (request.source_).Mutf8()}; in GenModuleRequests() 34 panda::pandasm::LiteralArray::Literal moduleRequestPhase = { in GenModuleRequests() 35 .tag_ = panda::panda_file::LiteralTag::INTEGER_8, .value_ = static_cast<uint8_t>(request.isLazy_)}; in GenModuleRequests() 44 panda::pandasm::LiteralArray::Literal entrySize = { in GenRegularImportEntries() 45 .tag_ = panda::panda_file::LiteralTag::INTEGER, in GenRegularImportEntries() 50 panda in GenRegularImportEntries() [all...] |
H A D | commonjs.cpp | 20 namespace panda::es2panda::compiler { 21 constexpr const auto LANG_EXT = panda::pandasm::extensions::Language::ECMASCRIPT; 25 auto isCommonJsField = panda::pandasm::Field(LANG_EXT); in SetCommonjsField() 27 isCommonJsField.type = panda::pandasm::Type("u8", 0); in SetCommonjsField() 29 panda::pandasm::ScalarValue::Create<panda::pandasm::Value::Type::U8>(static_cast<uint8_t>(isCommonjs))); in SetCommonjsField() 35 auto commonjsRecord = panda::pandasm::Record("_CommonJsRecord", LANG_EXT); in GenCommonjsRecord() 36 commonjsRecord.metadata->SetAccessFlags(panda::ACC_PUBLIC); in GenCommonjsRecord() 37 auto isCommonJsField = panda::pandasm::Field(LANG_EXT); in GenCommonjsRecord() 39 isCommonJsField.type = panda in GenCommonjsRecord() [all...] |
H A D | emitter.cpp | 58 namespace panda::es2panda::compiler { 59 constexpr const auto LANG_EXT = panda::pandasm::extensions::Language::ECMASCRIPT; 67 func_ = allocator->New<panda::pandasm::Function>(pg->InternalName().Mutf8(), LANG_EXT); in FunctionEmitter() 74 func_->params.emplace_back(panda::pandasm::Type("any", 0), LANG_EXT); in FunctionEmitter() 78 func_->return_type = panda::pandasm::Type("any", 0); in FunctionEmitter() 104 func_->SetFunctionKind(static_cast<panda::panda_file::FunctionKind>(pg_->GetFunctionKind())); in GenFunctionKind() 181 uint32_t FunctionEmitter::UpdateForReturnIns(const ir::AstNode *astNode, panda::pandasm::Ins *pandaIns) in UpdateForReturnIns() 209 void FunctionEmitter::GenInstructionDebugInfo(const IRNode *ins, panda::pandasm::Ins *pandaIns) in GenInstructionDebugInfo() 232 static std::vector<panda::pandasm::LiteralArray::Literal> ProcessNewExpressionInLiteralArray( in ProcessNewExpressionInLiteralArray() 235 std::vector<panda in ProcessNewExpressionInLiteralArray() [all...] |
/arkcompiler/runtime_core/disassembler/ |
H A D | disasm.cpp | 23 void PrintHelp(panda::PandArgParser &pa_parser) in PrintHelp() 36 panda::disasm::Disassembler disasm {}; in Disassemble() 50 bool ProcessArgs(panda::PandArgParser &pa_parser, const panda::PandArg<std::string> &input_file, in ProcessArgs() 51 const panda::PandArg<std::string> &output_file, panda::PandArg<bool> &debug, in ProcessArgs() 52 const panda::PandArg<std::string> &debug_file, const panda::PandArg<bool> &help, in ProcessArgs() 53 const panda::PandArg<bool> &version, int argc, const char **argv) in ProcessArgs() 61 panda in ProcessArgs() [all...] |
/arkcompiler/runtime_core/compiler/optimizer/ir/ |
H A D | ir-dyn-base-types.h | 24 namespace panda::compiler { 25 inline AnyBaseType NumericDataTypeToAnyType(panda::compiler::DataType::Type type, in NumericDataTypeToAnyType() 26 [[maybe_unused]] panda::compiler::SourceLanguage language) in NumericDataTypeToAnyType() 29 case panda::compiler::DataType::Type::INT32: in NumericDataTypeToAnyType() 30 return panda::compiler::AnyBaseType::ECMASCRIPT_INT_TYPE; in NumericDataTypeToAnyType() 31 case panda::compiler::DataType::Type::UINT32: in NumericDataTypeToAnyType() 32 case panda::compiler::DataType::Type::INT64: in NumericDataTypeToAnyType() 33 case panda::compiler::DataType::Type::UINT64: in NumericDataTypeToAnyType() 34 return panda::compiler::AnyBaseType::UNDEFINED_TYPE; in NumericDataTypeToAnyType() 35 case panda in NumericDataTypeToAnyType() [all...] |
/arkcompiler/runtime_core/tests/fuzztest/ziparchivehandle_fuzzer/ |
H A D | ziparchivehandle_fuzzer.cpp | 27 panda::ZipArchiveHandle handle = nullptr; in ZipArchiveHandleFuzzTest() 28 panda::CloseArchive(handle); in ZipArchiveHandleFuzzTest() 32 panda::ZipArchiveHandle handle = nullptr; in ZipArchiveHandleFuzzTest() 33 panda::CloseArchiveFile(handle); in ZipArchiveHandleFuzzTest() 37 panda::ZipArchiveHandle handle = nullptr; in ZipArchiveHandleFuzzTest() 38 panda::CloseCurrentFile(handle); in ZipArchiveHandleFuzzTest() 42 panda::ZipArchiveHandle handle = nullptr; in ZipArchiveHandleFuzzTest() 44 panda::ExtractToMemory(handle, buf, size); in ZipArchiveHandleFuzzTest() 48 panda::ZipArchiveHandle zipfile = nullptr; in ZipArchiveHandleFuzzTest() 50 panda in ZipArchiveHandleFuzzTest() [all...] |
/arkcompiler/runtime_core/abc2program/ |
H A D | abc2program_options.cpp | 19 namespace panda::abc2program { 23 panda::PandArg<bool> help("help", false, "Print this message and exit"); in Parse() 24 panda::PandArg<bool> debug( in Parse() 26 panda::PandArg<std::string> debug_file("debug-file", "", in Parse() 28 panda::PandArg<std::string> input_file("input_file", "", "Path to the source binary code"); in Parse() 29 panda::PandArg<std::string> output_file("output_file", "", "Path to the generated assembly code"); in Parse() 45 panda::Logger::InitializeStdLogging( in Parse() 46 panda::Logger::Level::DEBUG, in Parse() 47 panda::Logger::ComponentMask().set(panda in Parse() [all...] |
H A D | abc_module_array_processor.cpp | 18 namespace panda::abc2program { 30 std::vector<panda::pandasm::LiteralArray::Literal> literal_vec; in FillProgramData() 68 auto module_array = panda::pandasm::LiteralArray(std::move(literal_vec)); in FillProgramData() 73 void AbcModuleArrayProcessor::FillModuleRequests(std::vector<panda::pandasm::LiteralArray::Literal> &literal_vec, in FillModuleRequests() 76 panda::pandasm::LiteralArray::Literal module_size = { in FillModuleRequests() 77 .tag_ = panda::panda_file::LiteralTag::INTEGER, in FillModuleRequests() 82 panda::pandasm::LiteralArray::Literal module_request = { in FillModuleRequests() 83 .tag_ = panda::panda_file::LiteralTag::STRING, in FillModuleRequests() 90 void AbcModuleArrayProcessor::FillRegularImportEntry(std::vector<panda::pandasm::LiteralArray::Literal> &literal_vec, in FillRegularImportEntry() 93 panda in FillRegularImportEntry() [all...] |
/arkcompiler/runtime_core/tests/fuzztest/openuncompressedarchive_fuzzer/ |
H A D | openuncompressedarchive_fuzzer.cpp | 21 void CloseAndRemoveZipFile(panda::ZipArchiveHandle &handle, FILE *fp, const char *filename) in CloseAndRemoveZipFile() 23 panda::CloseArchiveFile(handle); in CloseAndRemoveZipFile() 32 const char *filename = panda::panda_file::ARCHIVE_FILENAME; in OpenUncompressedArchiveFuzzTest() 33 int ret = panda::CreateOrAddFileIntoZip(zip_filename, filename, data, size, APPEND_STATUS_CREATE, Z_NO_COMPRESSION); in OpenUncompressedArchiveFuzzTest() 50 panda::ZipArchiveHandle zipfile = nullptr; in OpenUncompressedArchiveFuzzTest() 51 if (panda::OpenArchiveFile(zipfile, fp) != panda::ZIPARCHIVE_OK) { in OpenUncompressedArchiveFuzzTest() 56 if (panda::LocateFile(zipfile, filename) != panda::ZIPARCHIVE_OK) { in OpenUncompressedArchiveFuzzTest() 60 panda in OpenUncompressedArchiveFuzzTest() [all...] |
/arkcompiler/runtime_core/tests/fuzztest/getglobalfileinfo_fuzzer/ |
H A D | getglobalfileinfo_fuzzer.cpp | 25 panda::ZipArchiveHandle handle = nullptr; in GetGlobalFileInfoFuzzTest() 26 panda::GlobalStat gi = panda::GlobalStat(); in GetGlobalFileInfoFuzzTest() 27 if (panda::GetGlobalFileInfo(handle, &gi) != 0) { in GetGlobalFileInfoFuzzTest() 38 panda::CreateOrAddFileIntoZip(zipname, filename, data, size, APPEND_STATUS_CREATE, in GetGlobalFileInfoFuzzTest() 44 panda::ZipArchiveHandle handle = nullptr; in GetGlobalFileInfoFuzzTest() 45 if (panda::OpenArchive(handle, zipname) != 0) { in GetGlobalFileInfoFuzzTest() 48 panda::GlobalStat gi = panda::GlobalStat(); in GetGlobalFileInfoFuzzTest() 49 if (panda in GetGlobalFileInfoFuzzTest() [all...] |
/arkcompiler/runtime_core/tests/fuzztest/gotonextfile_fuzzer/ |
H A D | gotonextfile_fuzzer.cpp | 35 ret = panda::CreateOrAddFileIntoZip(archive_name, "directory/", NULL, 0, APPEND_STATUS_CREATE, level); in GenerateZipfile() 50 ret = panda::CreateOrAddFileIntoZip(archive_name, archive_filename, buf, strlen(buf) + 1, in GenerateZipfile() 60 panda::pandasm::Parser p; in MakePfData() 64 if (p.ShowError().err != panda::pandasm::Error::ErrorType::ERR_NONE) { in MakePfData() 67 auto pf = panda::pandasm::AsmEmitter::Emit(res.Value()); in MakePfData() 72 pf_data.assign(header_ptr, header_ptr + sizeof(panda::panda_file::File::Header)); in MakePfData() 80 panda::ZipArchiveHandle handle = nullptr; in GoToNextFileFuzzTest() 81 panda::GoToNextFile(handle); in GoToNextFileFuzzTest() 102 panda::ZipArchiveHandle zipfile = nullptr; in GoToNextFileFuzzTest() 103 if (panda in GoToNextFileFuzzTest() [all...] |
/arkcompiler/ets_frontend/es2panda/aot/ |
H A D | main.cpp | 36 namespace panda::es2panda::aot { 58 static void GenerateBase64Output(panda::pandasm::Program *prog, in GenerateBase64Output() 59 const std::unique_ptr<panda::es2panda::aot::Options> &options) in GenerateBase64Output() 61 auto pandaFile = panda::pandasm::AsmEmitter::Emit(*prog, nullptr, options->CompilerOptions().targetApiVersion, in GenerateBase64Output() 120 static bool GenerateProgramsByWorkers(const std::map<std::string, panda::es2panda::util::ProgramCache*> &programsInfo, in GenerateProgramsByWorkers() 121 const std::unique_ptr<panda::es2panda::aot::Options> &options, std::map<std::string, size_t> *statp) in GenerateProgramsByWorkers() 123 auto queue = new panda::es2panda::aot::EmitFileQueue(options, statp, programsInfo); in GenerateProgramsByWorkers() 141 static void DumpProgramInfos(const std::map<std::string, panda::es2panda::util::ProgramCache*> &programsInfo, in DumpProgramInfos() 142 const std::unique_ptr<panda::es2panda::aot::Options> &options) in DumpProgramInfos() 149 panda in DumpProgramInfos() [all...] |
H A D | emitFiles.cpp | 26 namespace panda::es2panda::aot { 85 panda::Timer::timerStart(panda::EVENT_EMIT_SINGLE_PROGRAM, outputFileName_); in Run() 86 if (!panda::pandasm::AsmEmitter::Emit(panda::os::file::File::GetExtendedFilePath(outputFileName_), *prog_, statp_, in Run() 89 panda::pandasm::AsmEmitter::GetLastError()); in Run() 94 panda::Timer::timerEnd(panda::EVENT_EMIT_SINGLE_PROGRAM, outputFileName_); in Run() 99 panda::Timer::timerStart(panda in Run() [all...] |
/arkcompiler/runtime_core/arkplatform/include/ |
H A D | arkplatform_jsnapi.h | 24 using panda::LocalScope; 25 using panda::Local; 26 using panda::JSNApi; 27 using panda::NumberRef; 28 using panda::BooleanRef; 29 using panda::JSValueRef; 30 using panda::JSValueRefInternals; 31 using panda::JSTaggedType;
|
/arkcompiler/ets_frontend/es2panda/compiler/core/ |
H A D | compileQueue.cpp | 34 namespace panda::es2panda::compiler { 108 panda::Timer::timerStart(panda::EVENT_READ_INPUT_AND_CACHE, src_->fileName); in Run() 116 panda::Timer::timerEnd(panda::EVENT_READ_INPUT_AND_CACHE, src_->fileName); in Run() 120 panda::Timer::timerEnd(panda::EVENT_READ_INPUT_AND_CACHE, src_->fileName); in Run() 128 panda::pandasm::Program *prog = nullptr; in CompileProgram() 131 panda::Timer::timerStart(panda in CompileProgram() [all...] |
/arkcompiler/toolchain/tooling/ |
H A D | debugger_service.h | 24 namespace panda::ecmascript { 26 } // namespace panda::ecmascript 28 namespace panda::ecmascript::tooling { 35 TOOLCHAIN_EXPORT void InitializeDebugger(::panda::ecmascript::EcmaVM *vm, 38 TOOLCHAIN_EXPORT void UninitializeDebugger(::panda::ecmascript::EcmaVM *vm); 40 TOOLCHAIN_EXPORT void OnMessage(const ::panda::ecmascript::EcmaVM *vm, std::string &&message); 42 TOOLCHAIN_EXPORT void WaitForDebugger(const ::panda::ecmascript::EcmaVM *vm); 44 TOOLCHAIN_EXPORT void ProcessMessage(const ::panda::ecmascript::EcmaVM *vm); 46 TOOLCHAIN_EXPORT int32_t GetDispatchStatus(const ::panda::ecmascript::EcmaVM *vm); 53 } // panda [all...] |