| /arkcompiler/runtime_core/static_core/libpandafile/tests/ |
| D | bytecode_instruction_tests.cpp | 33 const uint8_t bytecode[] = {0x00, 0xa1, 0xff}; in TEST() local 34 BytecodeInstruction inst(bytecode); in TEST() 41 const uint8_t bytecode[] = {0x00, 0x2f, 0xff}; in TEST() local 42 BytecodeInstruction inst(bytecode); in TEST() 50 const uint8_t bytecode[] = {0x00, 0xf2, 0xff}; in TEST() local 51 BytecodeInstruction inst(bytecode); in TEST() 57 const uint8_t bytecode[] = {0x00, 0x21, 0xff}; in TEST() local 58 BytecodeInstruction inst(bytecode); in TEST() 65 const uint8_t bytecode[] = {0x00, 0x12, 0xf2, 0xff}; in TEST() local 66 BytecodeInstruction inst(bytecode); in TEST() [all …]
|
| /arkcompiler/runtime_core/libpandafile/tests/ |
| D | bytecode_instruction_tests.cpp | 31 const uint8_t bytecode[] = {0x00, 0xa1, 0xff}; in TEST() local 32 BytecodeInstruction inst(bytecode); in TEST() 39 const uint8_t bytecode[] = {0x00, 0x2f, 0xff}; in TEST() local 40 BytecodeInstruction inst(bytecode); in TEST() 48 const uint8_t bytecode[] = {0x00, 0xf2, 0xff}; in TEST() local 49 BytecodeInstruction inst(bytecode); in TEST() 55 const uint8_t bytecode[] = {0x00, 0x21, 0xff}; in TEST() local 56 BytecodeInstruction inst(bytecode); in TEST() 63 const uint8_t bytecode[] = {0x00, 0x12, 0xf2, 0xff}; in TEST() local 64 BytecodeInstruction inst(bytecode); in TEST() [all …]
|
| /arkcompiler/runtime_core/static_core/runtime/tests/ |
| D | interpreter_test.cpp | 114 const std::vector<uint8_t> &bytecode) in CreateMethod() argument 128 auto *codeItem = container.CreateItem<panda_file::CodeItem>(nregs, nargs, bytecode); in CreateMethod() 155 Class *klass, Frame *f, const std::vector<uint8_t> &bytecode) in CreateMethod() argument 157 return CreateMethod(klass, 0, 0, f->GetSize(), nullptr, bytecode); in CreateMethod() 211 std::vector<uint8_t> bytecode; in TEST_F() local 212 ASSERT_EQ(emitter.Build(&bytecode), BytecodeEmitter::ErrorCode::SUCCESS); in TEST_F() 219 auto methodData = CreateMethod(cls, f.get(), bytecode); in TEST_F() 234 Execute(ManagedThread::GetCurrent(), bytecode.data(), f.get()); in TEST_F() 318 std::vector<uint8_t> bytecode; in TEST_F() local 319 ASSERT_EQ(emitter.Build(&bytecode), BytecodeEmitter::ErrorCode::SUCCESS); in TEST_F() [all …]
|
| /arkcompiler/runtime_core/static_core/compiler/docs/ |
| D | ir_builder.md | 5 The IR builder pass constructs the Intermediate Representation (IR) from the Panda bytecode. 16 Due to specifics of the Panda bytecode, IR builder has responsibility to handle various situation t… 43 1. Iterate over all bytecode instructions and make basic block for all target instructions, i.e. in… 53 4. Get next bytecode instruction from the current basic block. 54 5. Build the Panda IR instruction from the bytecode instruction: 78 def Run(graph, bytecode): 79 BuildBasicBlocks(graph, bytecode) 83 for bc_inst in bytecode.instructions[bb.first_pc..bb.last_pc]: 90 def BuildBasicBlocks(graph, bytecode): 93 blocks.resize(bytecode.instructions.size()) [all …]
|
| D | try_catch_blocks_ir.md | 125 …ed to the `Catch-begin` basic block. Each `CatchPhi` corresponds to the bytecode's virtual registe… 148 - vector of try-begin blocks in order they are declared in the bytecode; 151 ## Try-catch blocks processing in the RegAlloc for bytecode-optimizer
|
| /arkcompiler/runtime_core/compiler/docs/ |
| D | ir_builder.md | 5 The IR builder pass constructs the Intermediate Representation (IR) from the Panda bytecode. 16 Due to specifics of the Panda bytecode, IR builder has responsibility to handle various situation t… 43 1. Iterate over all bytecode instructions and make basic block for all target instructions, i.e. in… 53 4. Get next bytecode instruction from the current basic block. 54 5. Build the Panda IR instruction from the bytecode instruction: 78 def Run(graph, bytecode): 79 BuildBasicBlocks(graph, bytecode) 83 for bc_inst in bytecode.instructions[bb.first_pc..bb.last_pc]: 90 def BuildBasicBlocks(graph, bytecode): 93 blocks.resize(bytecode.instructions.size()) [all …]
|
| D | try_catch_blocks_ir.md | 125 …ed to the `Catch-begin` basic block. Each `CatchPhi` corresponds to the bytecode's virtual registe… 148 - vector of try-begin blocks in order they are declared in the bytecode; 151 ## Try-catch blocks processing in the RegAlloc for bytecode-optimizer
|
| /arkcompiler/ets_runtime/ecmascript/tests/ |
| D | frame_test.cpp | 56 uint8_t bytecode[] = { in HWTEST_F_L0() local 72 frame[6] = reinterpret_cast<JSTaggedType>(&bytecode[2]); // 6: pc in HWTEST_F_L0() 75 uintptr_t x20 = reinterpret_cast<uintptr_t>(&bytecode[5]); // 5: HandleThrow offset in HWTEST_F_L0()
|
| /arkcompiler/runtime_core/ |
| D | README.md | 25 …ler # Assembler that converts an ARK bytecode file in text format (*.pa) into a byte… 26 …izer # Bytecode optimizer, further optimize the ARK bytecode to generate optimized bytecode f… 28 … # Compiler including IR(intermediate representation) and passes for bytecode optimization. See… 30 … # Disassembler that converts an ARK bytecode file in binary format (*.abc) into an ARK … 37 ├── libark_defect_scan_aux # Vulnerability defect scanning tool for ARK bytecode file in binary fo… 39 ├── libpandafile # Source code repository of ARK bytecode files (*.abc) in binary format. 41 ├── panda # CLI tool used to execute ARK bytecode files in binary format(*.abc).
|
| /arkcompiler/runtime_core/static_core/docs/ |
| D | rationale-for-bytecode.md | 5 This document sets up some context about bytecode design principles and provides rationales for 6 bytecode design in Panda Runtime. 10 Before discussing bytecode per se, let's take a look at an over-simplified picture of a real 26 Here comes the bytecode. Simply said, it is an attempt to build an abstract CPU on top of real 29 commands (or bytecode) and execute them. Of course, this implies additional performance overhead 35 Although bytecode represents some abstraction, it mirrors all the mentioned concepts from the 41 building bytecode. Following sections explain advantages and disadvantages of various approaches. 78 each bytecode instruction, execute it and move to the next one, running more instruction results in 79 more _dispatch overhead_. Which means that the stack-based bytecode is slower by nature. 81 According to our experiment, uncompressed register-based bytecode can be reduced by ~26% [all …]
|
| D | runtime-debug-api.md | 9 1. Runtime doesn't patch apps' bytecode on the fly. Instead of it notification about changing bytec… 15 1. As some low-end targets can store bytecode in ROM, runtime cannot patch app's bytecode on the fl… 27 * `BytecodePcChanged` - occurs when bytecode pc is changed during interpretation (only if runtime w…
|
| D | bytecode_profiling.md | 5 Each bytecode instruction, that supports profiling, contains additional field - profile index. It d… 15 …s a plain data of bytes, which content is determined by the language of a given bytecode. Core part 20 Each interpreter handler reads profiling field from bytecode instruction and update corresponding s…
|
| D | design-of-interpreter.md | 6 bytecode instruction set, executable file format, etc. Each subsection below consists of following 26 1. Program execution via bytecode interpretation should be enabled on all targets. 49 For the rationale on the bytecode type, please see [here](rationale-for-bytecode.md). 51 Rationale on the machine-readable instruction set architecture is following. Since bytecode 57 * In Panda Assembler's back-end, we automatically generate emission of bytecode in the binary form. 58 * Converter from bytecode to the compiler's intermediate representation is partially implemented 133 1. The inevitable extra cost that interpreters pay for decoding and dispatching bytecode 146 1. According to our experiments, a stackless interpreter for a stack-based bytecode (which is by 148 bytecode (which is by nature faster).
|
| D | glossary.md | 12 compilation" are used to indicate that the source code or bytecode is compiled before actual 14 native machine code to reduce runtime overhead from reading and compiling bytecode. 17 * **Compiler** is a tool that performs source code or bytecode translation, optimization and 25 compilation" are used to indicate that the source code or bytecode is compiled during program 27 native machine code to reduce overhead from interpreting bytecode.
|
| D | deoptimization.md | 69 * bytecode pc of the entry 92 * bytecode pc of the entry 96 …compiled_frame_`(saves false) fields in the thread register and calls interpreter from bytecode pc. 97 …in the inlined method, we call interpreter for all inlined methods from bytecode pc which is taken…
|
| /arkcompiler/runtime_core/docs/ |
| D | rationale-for-bytecode.md | 5 This document sets up some context about bytecode design principles and provides rationales for 6 bytecode design in Panda Runtime. 10 Before discussing bytecode per se, let's take a look at an over-simplified picture of a real 26 Here comes the bytecode. Simply said, it is an attempt to build an abstract CPU on top of real 29 commands (or bytecode) and execute them. Of course, this implies additional performance overhead 35 Although bytecode represents some abstraction, it mirrors all the mentioned concepts from the 41 building bytecode. Following sections explain advantages and disadvantages of various approaches. 78 each bytecode instruction, execute it and move to the next one, running more instruction results in 79 more _dispatch overhead_. Which means that the stack-based bytecode is slower by nature. 81 According to our experiment, uncompressed register-based bytecode can be reduced by ~26% [all …]
|
| D | runtime-debug-api.md | 9 1. Runtime doesn't patch apps' bytecode on the fly. Instead of it notification about changing bytec… 15 1. As some low-end targets can store bytecode in ROM, runtime cannot patch app's bytecode on the fl… 27 * `BytecodePcChanged` - occurs when bytecode pc is changed during interpretation (only if runtime w…
|
| D | 2022-08-18-isa-changelog.md | 11 The bytecode size and runtime performance have been suffering for a long time as the all the 12 ecmascript specific bytecode are prefixed and their opcode were encoded with two bytes. 14 2. We remove the prefix of ecmascript specific opcodes, such that most of the bytecode opcode can b… 18 …t of some opcodes (about immediate number and accumulator), so that the bytecode can be more compa… 45 3. In bytecode, we still use 16-bit literalarrayId rather than offset.
|
| D | design-of-interpreter.md | 6 bytecode instruction set, executable file format, etc. Each subsection below consists of following 26 1. Program execution via bytecode interpretation should be enabled on all targets. 49 For the rationale on the bytecode type, please see [here](rationale-for-bytecode.md). 51 Rationale on the machine-readable instruction set architecture is following. Since bytecode 57 * In Panda Assembler's back-end, we automatically generate emission of bytecode in the binary form. 58 * Converter from bytecode to the compiler's intermediate representation is partially implemented 133 1. The inevitable extra cost that interpreters pay for decoding and dispatching bytecode 146 1. According to our experiments, a stackless interpreter for a stack-based bytecode (which is by 148 bytecode (which is by nature faster).
|
| D | glossary.md | 12 compilation" are used to indicate that the source code or bytecode is compiled before actual 14 native machine code to reduce runtime overhead from reading and compiling bytecode. 17 * **Compiler** is a tool that performs source code or bytecode translation, optimization and 25 compilation" are used to indicate that the source code or bytecode is compiled during program 27 native machine code to reduce overhead from interpreting bytecode.
|
| /arkcompiler/runtime_core/static_core/assembler/ |
| D | assembly-function.h | 155 … BuildLineNumberProgram(panda_file::DebugInfoItem *debugItem, const std::vector<uint8_t> &bytecode, 159 Function::TryCatchInfo MakeOrderAndOffsets(const std::vector<uint8_t> &bytecode) const; 163 const std::vector<uint8_t> &bytecode) const;
|
| /arkcompiler/runtime_core/assembler/ |
| D | assembly-function.h | 184 …BuildLineNumberProgram(panda_file::DebugInfoItem *debug_item, const std::vector<uint8_t> &bytecode, 188 Function::TryCatchInfo MakeOrderAndOffsets(const std::vector<uint8_t> &bytecode) const; 192 const std::vector<uint8_t> &bytecode) const;
|
| /arkcompiler/ets_runtime/ecmascript/dfx/stackinfo/ |
| D | js_stackinfo.cpp | 918 size_t bytecode = fullBytecode & 0xff; // 0xff: last byte in CopyBytecodeInfoToBuffer() local 919 const char *bytecodeName = MessageString::GetMessageString(start + bytecode).c_str(); in CopyBytecodeInfoToBuffer() 923 if (start + bytecode == static_cast<size_t>(GET_MESSAGE_STRING_ID(HandleDeprecated)) || in CopyBytecodeInfoToBuffer() 924 start + bytecode == static_cast<size_t>(GET_MESSAGE_STRING_ID(HandleWide)) || in CopyBytecodeInfoToBuffer() 925 start + bytecode == static_cast<size_t>(GET_MESSAGE_STRING_ID(HandleThrow)) || in CopyBytecodeInfoToBuffer() 926 start + bytecode == static_cast<size_t>(GET_MESSAGE_STRING_ID(HandleCallRuntime))) { in CopyBytecodeInfoToBuffer() 928 if (start + bytecode == static_cast<size_t>(GET_MESSAGE_STRING_ID(HandleDeprecated))) { in CopyBytecodeInfoToBuffer() 930 } else if (start + bytecode == static_cast<size_t>(GET_MESSAGE_STRING_ID(HandleWide))) { in CopyBytecodeInfoToBuffer() 933 } else if (start + bytecode == static_cast<size_t>(GET_MESSAGE_STRING_ID(HandleThrow))) { in CopyBytecodeInfoToBuffer() 935 … } else if (start + bytecode == static_cast<size_t>(GET_MESSAGE_STRING_ID(HandleCallRuntime))) { in CopyBytecodeInfoToBuffer()
|
| /arkcompiler/ets_frontend/ts2panda/ |
| D | README.md | 2 ts2panda aims to translate JavaScript source files into ARK bytecode which could be executed by the…
|
| /arkcompiler/ets_runtime/ecmascript/compiler/ |
| D | gate.h | 183 … void Print(std::string bytecode = "", bool inListPreview = false, size_t highlightIdx = -1) const; 184 …void ShortPrint(std::string bytecode = "", bool inListPreview = false, size_t highlightIdx = -1) c…
|