Home
last modified time | relevance | path

Searched full:bytecode (Results 1 – 25 of 178) sorted by relevance

12345678

/arkcompiler/runtime_core/libpandafile/tests/
Dbytecode_instruction_tests.cpp31 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/docs/
Drationale-for-bytecode.md1 # Rationale for Bytecode
5 This document sets up some context about bytecode design principles and provides rationales for
6 bytecode design in Panda Runtime.
8 ## Bytecode basics
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
[all …]
Dglossary.md12 compilation" are used to indicate that the source code or bytecode is compiled before actual
13 execution. In case of Panda Runtime, AOT compilation is used to compile Panda Bytecode into
14 native machine code to reduce runtime overhead from reading and compiling bytecode.
16 * **Bytecode**. See **Panda Bytecode**.
17 * **Compiler** is a tool that performs source code or bytecode translation, optimization and
22 * **ISA** stands for **Instruction Set Architecture**. See **Panda Bytecode** and
25 compilation" are used to indicate that the source code or bytecode is compiled during program
26 execution. In case of Panda Runtime, JIT compilation is used to compile Panda Bytecode into
27 native machine code to reduce overhead from interpreting bytecode.
32 correspondence between the instructions in the language and **Panda Bytecode** instructions.
[all …]
Ddesign-of-interpreter.md6 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.
29 ## Bytecode section in Interpreter Design
33 1. Bytecode should allow the interpreter to run no slower than state of the art interpreters.
34 1. Bytecode should be compact in size to avoid bloating application code.
35 1. Bytecode description should have a single entry point to simplify maintenance
40 1. Bytecode is register-based: all arguments and variables are mapped to virtual registers,
44 1. Bytecode's instruction set architecture is machine-readable with a dedicated API for
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
[all …]
Druntime-debug-api.md9 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…
D2022-08-18-isa-changelog.md11 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.
Dassembly_format.md5 …t this document does not describe bytecode instructions supported by the Panda virtual machine, re…
197 Semantics of operations on all data types defined below follows the semantics defined in [Bytecode
226 | `cref` | code reference, represents references to the bytecode executable by Panda virtual machin…
267 …ould fit the virtusal register. Constraints on register are defined in [Bytecode ISA Specification…
315 …lly labeled sequence of bytecode instructions, one instruction defined per line. Instruction opcod…
335 - If number of arguments is less than specified in [Bytecode ISA Specification](isa/isa.yaml) it pa…
458 func_code := <newline-separated sequence of bytecode instructions and their operands>
560 * Elaborate on bytecode definition.
/arkcompiler/runtime_core/compiler/docs/
Dir_builder.md5 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 …]
Dtry_catch_blocks_ir.md125 …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/
DREADME.md26 …ler # Assembler that converts an ARK bytecode file in text format (*.pa) into a byte…
27 ├── bytecode_optimizer # Bytecode optimizer, further optimize the ARK bytecode to generate opt…
29 … # Compiler including IR(intermediate representation) and passes for bytecode optimization. See…
31 … # Disassembler that converts an ARK bytecode file in binary format (*.abc) into an ARK
36 ├── isa # Bytecode ISA description file YAML, Ruby scripts and templates.
38 ├── libark_defect_scan_aux # Vulnerability defect scanning tool for ARK bytecode file in binary fo…
40 ├── libpandafile # Source code repository of ARK bytecode files (*.abc) in binary format.
42 ├── panda # CLI tool used to execute ARK bytecode files in binary format(*.abc).
51 └── verification # Bytecode verifier. See docs/bc_verification.
75 The ark\_asm assembler converts the text ARK bytecode file into a bytecode file in binary format.
[all …]
/arkcompiler/ets_runtime/ecmascript/regexp/
Dregexp_executor.h64 bool ExecuteInternal(const DynChunk &byteCode, uint32_t pcEnd);
94 inline bool HandleOpChar(const DynChunk &byteCode, uint8_t opCode) in HandleOpChar() argument
98 expectedChar = byteCode.GetU32(GetCurrentPC() + 1); in HandleOpChar()
100 expectedChar = byteCode.GetU16(GetCurrentPC() + 1); in HandleOpChar()
168 inline void HandleOpSaveStart(const DynChunk &byteCode, uint8_t opCode) in HandleOpSaveStart() argument
170 uint32_t captureIndex = byteCode.GetU8(GetCurrentPC() + 1); in HandleOpSaveStart()
178 inline void HandleOpSaveEnd(const DynChunk &byteCode, uint8_t opCode) in HandleOpSaveEnd() argument
180 uint32_t captureIndex = byteCode.GetU8(GetCurrentPC() + 1); in HandleOpSaveEnd()
188 inline void HandleOpSaveReset(const DynChunk &byteCode, uint8_t opCode) in HandleOpSaveReset() argument
190 uint32_t catpureStartIndex = byteCode.GetU8(GetCurrentPC() + SAVE_RESET_START); in HandleOpSaveReset()
[all …]
Dregexp_executor.cpp101 bool RegExpExecutor::ExecuteInternal(const DynChunk &byteCode, uint32_t pcEnd) in ExecuteInternal() argument
108 uint8_t opCode = byteCode.GetU8(GetCurrentPC()); in ExecuteInternal()
119 if (!HandleOpChar(byteCode, opCode)) { in ExecuteInternal()
144 HandleOpSaveStart(byteCode, opCode); in ExecuteInternal()
147 HandleOpSaveEnd(byteCode, opCode); in ExecuteInternal()
150 uint32_t offset = byteCode.GetU32(GetCurrentPC() + 1); in ExecuteInternal()
164 HandleOpSaveReset(byteCode, opCode); in ExecuteInternal()
169 HandleOpMatch(byteCode, opCode); in ExecuteInternal()
172 HandleOpSplitFirst(byteCode, opCode); in ExecuteInternal()
182 HandleOpLoop(byteCode, opCode); in ExecuteInternal()
[all …]
/arkcompiler/runtime_core/isa/
DREADME1 Panda Bytecode Description (aka ISA)
6 The main file that contains the whole data about Panda Bytecode.
8 Bytecode information. It also aims hardcode avoidance in interpreter, compiler
Disa.yaml44 …On execution of a call bytecode a new function frame is created. All necessary arguments are copie…
47 …arguments. Accumulator value is considered as undefined and shall not be read in verified bytecode.
50 be read in verified bytecode.
62 If bytecode treats register value as signed integer, it uses two's complement representation.
63 To denote that bytecode treats register values as unsigned integer, u32/u64 notation is used.
132 description: Pass control to another bytecode in a current method.
156 description: Bytecode doesn't throw exceptions.
158 description: Bytecode throws NullPointerException in case of null reference as a source.
160 … description: Bytecode throws ArrayIndexOutOfBoundsException if index is out of bounds of an array.
162 description: Bytecode throws NegativeArraySizeException if index is less than zero.
[all …]
/arkcompiler/ets_frontend/ts2panda/ts2abc/
Dts2abc_options.h235 "1: basic bytecode optimizations, including valueNumber,"
243 R"(Print ark bytecode version)"};
245 R"(Print ark bytecode minimum supported version)"};
255 R"(Path to input(json file) or path to output(ark bytecode)"
258 R"(Path to output(ark bytecode) or ignore when 'compile-by-pipe' enabled)"};
/arkcompiler/ets_runtime/ecmascript/tests/
Dframe_test.cpp56 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/bytecode_optimizer/
Doptions.yaml28 …Optimization level for bytecode optimizer. N=0: No optimizations. N=1: New optimizer is turned on,…
50 - name: bytecode-opt-peepholes
Dbytecode_optimizer_isapi.rb14 # ISAPI specialization for bytecode optimizer
54 # Classes for bytecode description
133 # Sugar for bytecode description
305 # Bytecode description itself
/arkcompiler/runtime_core/libpandafile/templates/
Dfile_format_version.h.erb35 ss << "Bytecode version " << GetVersion(version) << '\n';
36 ss << "Minimum supported bytecode version " << GetVersion(minVersion) << '\n';
/arkcompiler/ets_runtime/ecmascript/compiler/
Dinterpreter_stub-inl.h39 return Load(VariableType::INT8(), pc, IntPtr(1)); // 1 : skip 1 byte of bytecode in ReadInst8_0()
44 return Load(VariableType::INT8(), pc, IntPtr(2)); // 2 : skip 1 byte of bytecode in ReadInst8_1()
49 return Load(VariableType::INT8(), pc, IntPtr(3)); // 3 : skip 1 byte of bytecode in ReadInst8_2()
54 return Load(VariableType::INT8(), pc, IntPtr(4)); // 4 : skip 1 byte of bytecode in ReadInst8_3()
59 return Load(VariableType::INT8(), pc, IntPtr(5)); // 5 : skip 1 byte of bytecode in ReadInst8_4()
64 return Load(VariableType::INT8(), pc, IntPtr(6)); // 6 : skip 1 byte of bytecode in ReadInst8_5()
69 return Load(VariableType::INT8(), pc, IntPtr(7)); // 7 : skip 1 byte of bytecode in ReadInst8_6()
74 return Load(VariableType::INT8(), pc, IntPtr(8)); // 8 : skip 1 byte of bytecode in ReadInst8_7()
79 return Load(VariableType::INT8(), pc, IntPtr(9)); // 9 : skip 1 byte of bytecode in ReadInst8_8()
89 // 1 : skip 1 byte of bytecode in ReadInst4_1()
[all …]
Dgate.cpp715 void Gate::Print(std::string bytecode, bool inListPreview, size_t highlightIdx) const in Print() argument
720 log += ((bytecode.compare("") == 0) ? "" : "\"bytecode\":\"") + bytecode; in Print()
721 log += ((bytecode.compare("") == 0) ? "" : "\", "); in Print()
774 void Gate::ShortPrint(std::string bytecode, bool inListPreview, size_t highlightIdx) const in ShortPrint() argument
779 log += ((bytecode.compare("") == 0) ? "" : "bytecode=") + bytecode; in ShortPrint()
780 log += ((bytecode.compare("") == 0) ? "" : ", "); in ShortPrint()
849 void Gate::PrintByteCode(std::string bytecode) const in PrintByteCode()
851 Print(bytecode); in PrintByteCode()
/arkcompiler/ets_runtime/ecmascript/dfx/stackinfo/
Djs_stackinfo.cpp402 size_t bytecode = fullBytecode & 0xff; // 0xff: last byte in CopyBytecodeInfoToBuffer() local
403 const char *bytecodeName = MessageString::GetMessageString(start + bytecode).c_str(); in CopyBytecodeInfoToBuffer()
407 if (start + bytecode == static_cast<size_t>(GET_MESSAGE_STRING_ID(HandleDeprecated)) || in CopyBytecodeInfoToBuffer()
408 start + bytecode == static_cast<size_t>(GET_MESSAGE_STRING_ID(HandleWide)) || in CopyBytecodeInfoToBuffer()
409 start + bytecode == static_cast<size_t>(GET_MESSAGE_STRING_ID(HandleThrow)) || in CopyBytecodeInfoToBuffer()
410 start + bytecode == static_cast<size_t>(GET_MESSAGE_STRING_ID(HandleCallRuntime))) { in CopyBytecodeInfoToBuffer()
412 if (start + bytecode == static_cast<size_t>(GET_MESSAGE_STRING_ID(HandleDeprecated))) { in CopyBytecodeInfoToBuffer()
414 } else if (start + bytecode == static_cast<size_t>(GET_MESSAGE_STRING_ID(HandleWide))) { in CopyBytecodeInfoToBuffer()
417 } else if (start + bytecode == static_cast<size_t>(GET_MESSAGE_STRING_ID(HandleThrow))) { in CopyBytecodeInfoToBuffer()
419 … } else if (start + bytecode == static_cast<size_t>(GET_MESSAGE_STRING_ID(HandleCallRuntime))) { in CopyBytecodeInfoToBuffer()
/arkcompiler/ets_runtime/docs/
Doverview.md16 ArkCompiler JS Runtime runs ArkCompiler bytecode files to implement JS semantic logic.
45 …iler JS Runtime statically pre-compiles JS/TS programs into ArkCompiler bytecode (with static type…
47 …he type information to statically generate inline caching to accelerate bytecode execution. The TS…
/arkcompiler/runtime_core/bytecode_optimizer/tests/benchmark/
DREADME.md1 ## Benchmark of Bytecode
4 of the bytecode.
12 usage: Run bytecode benchmarks [-h] [--testdir TESTDIR] [--bindir BINDIR]
/arkcompiler/runtime_core/tests/
DCMakeLists.txt772 …RRENT_SOURCE_DIR}/cts-assembly/far-jump-01.pa" COMPILER_OPTIONS --compiler-max-bytecode-size=40000)
773 …RRENT_SOURCE_DIR}/cts-assembly/far-jump-02.pa" COMPILER_OPTIONS --compiler-max-bytecode-size=40000)
774 …RRENT_SOURCE_DIR}/cts-assembly/far-jump-03.pa" COMPILER_OPTIONS --compiler-max-bytecode-size=40000)
775 …RRENT_SOURCE_DIR}/cts-assembly/far-jump-04.pa" COMPILER_OPTIONS --compiler-max-bytecode-size=40000)
776 …RRENT_SOURCE_DIR}/cts-assembly/far-jump-05.pa" COMPILER_OPTIONS --compiler-max-bytecode-size=40000)
777 …RRENT_SOURCE_DIR}/cts-assembly/far-jump-06.pa" COMPILER_OPTIONS --compiler-max-bytecode-size=40000)
778 …RRENT_SOURCE_DIR}/cts-assembly/far-jump-07.pa" COMPILER_OPTIONS --compiler-max-bytecode-size=40000)
779 …RRENT_SOURCE_DIR}/cts-assembly/far-jump-08.pa" COMPILER_OPTIONS --compiler-max-bytecode-size=40000)
780 …RRENT_SOURCE_DIR}/cts-assembly/far-jump-09.pa" COMPILER_OPTIONS --compiler-max-bytecode-size=40000)
781 …RRENT_SOURCE_DIR}/cts-assembly/far-jump-10.pa" COMPILER_OPTIONS --compiler-max-bytecode-size=40000)
[all …]

12345678