Home
last modified time | relevance | path

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

123456

/ark/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 …]
/ark/js_runtime/ecmascript/regexp/
Dregexp_executor.cpp128 bool RegExpExecutor::HandleOpChar(const DynChunk &byteCode, uint8_t opCode) in HandleOpChar() argument
132 expectedChar = byteCode.GetU32(GetCurrentPC() + 1); in HandleOpChar()
134 expectedChar = byteCode.GetU16(GetCurrentPC() + 1); in HandleOpChar()
215 void RegExpExecutor::HandleOpSaveStart(const DynChunk &byteCode, uint8_t opCode) in HandleOpSaveStart() argument
217 uint32_t captureIndex = byteCode.GetU8(GetCurrentPC() + 1); in HandleOpSaveStart()
225 void RegExpExecutor::HandleOpSaveEnd(const DynChunk &byteCode, uint8_t opCode) in HandleOpSaveEnd() argument
227 uint32_t captureIndex = byteCode.GetU8(GetCurrentPC() + 1); in HandleOpSaveEnd()
235 void RegExpExecutor::HandleOpSaveReset(const DynChunk &byteCode, uint8_t opCode) in HandleOpSaveReset() argument
237 uint32_t catpureStartIndex = byteCode.GetU8(GetCurrentPC() + SAVE_RESET_START); in HandleOpSaveReset()
238 uint32_t catpureEndIndex = byteCode.GetU8(GetCurrentPC() + SAVE_RESET_END); in HandleOpSaveReset()
[all …]
Dregexp_executor.h64 bool ExecuteInternal(const DynChunk &byteCode, uint32_t pcEnd);
67 bool HandleOpChar(const DynChunk &byteCode, uint8_t opCode);
71 void HandleOpSaveStart(const DynChunk &byteCode, uint8_t opCode);
72 void HandleOpSaveEnd(const DynChunk &byteCode, uint8_t opCode);
73 void HandleOpSaveReset(const DynChunk &byteCode, uint8_t opCode);
74 void HandleOpMatch(const DynChunk &byteCode, uint8_t opCode);
75 void HandleOpSplitFirst(const DynChunk &byteCode, uint8_t opCode);
77 void HandleOpLoop(const DynChunk &byteCode, uint8_t opCode);
78 bool HandleOpRange32(const DynChunk &byteCode);
79 bool HandleOpRange(const DynChunk &byteCode);
[all …]
/ark/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, let's take a look at a simplified picture of how a program is running o…
25 Here comes the bytecode. Simply said, it is an attempt to build an abstract CPU on top of real
28 commands (or bytecode) and execute them. Of course, this implies additional performance overhead
34 Although bytecode represents some abstraction, it mirrors all the mentioned concepts from the
40 building bytecode. Following sections explain advantages and disadvantages of various approaches.
75 bytecode instruction, execute it and move to the next one, running more instructions result 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. This document is organized as follows:
25 1. Program execution via bytecode interpretation should be enabled on all targets.
27 1. Java (and probably other languages that compile to JVM bytecode) should run with acceptable
32 ## Bytecode section in Interpreter Design
36 1. Bytecode should allow the interpreter to run no slower than state of the art interpreters.
37 1. Bytecode should be compact in size to avoid bloating application code.
38 1. Bytecode description should have a single entry point to simplify maintenance
43 1. Bytecode is register-based: all arguments and variables are mapped to virtual registers,
47 1. Bytecode's instruction set architecture is machine-readable with a dedicated API for
52 For the rationale on the bytecode type, please see [here](rationale-for-bytecode.md).
[all …]
Druntime-debug-api.md9 1. Runtime doesn't patch apps' bytecode on the fly. Instead, it notifies the listeners when the PC …
15 1. As some low-end targets can store bytecode in ROM, runtime cannot patch apps' bytecode on the fl…
27 * `BytecodePcChanged` - occurs when the PC of bytecode is changed during interpretation (only if ru…
Dassembly_format.md5 …is document does not describe the bytecode instructions supported by the Panda virtual machine, re…
152 Semantics of operations on all data types defined below follow the semantics defined in [Bytecode I…
181 | `cref` | Code reference, represents reference to the bytecode executable by Panda virtual machine…
222 …hould fit the virtual register. Constraints on register are defined in [Bytecode ISA Specification…
270 …lly labeled sequence of bytecode instructions, one instruction defined per line. Intsruction opcod…
290 - If number of arguments is less than specified in [Bytecode ISA Specification](isa/isa.yaml) it pa…
351 more precise verification of control flows in bytecode verifier.
411 func_code := <newline-separated sequence of bytecode instructions and their operands>
/ark/runtime_core/runtime/tests/
Dinterpreter_test.cpp107 const std::vector<uint8_t> &bytecode) in CreateMethod() argument
123 …nda_file::CodeItem *code_item = container.CreateItem<panda_file::CodeItem>(nregs, nargs, bytecode); in CreateMethod()
148 Class *klass, Frame *f, const std::vector<uint8_t> &bytecode) in CreateMethod() argument
150 return CreateMethod(klass, 0, 0, f->GetSize(), nullptr, bytecode); in CreateMethod()
213 std::vector<uint8_t> bytecode; in TEST_F() local
214 ASSERT_EQ(emitter.Build(&bytecode), BytecodeEmitter::ErrorCode::SUCCESS); in TEST_F()
220 auto method_data = CreateMethod(cls.get(), f.get(), bytecode); in TEST_F()
235 Execute(ManagedThread::GetCurrent(), bytecode.data(), f.get()); in TEST_F()
319 std::vector<uint8_t> bytecode; in TEST_F() local
320 ASSERT_EQ(emitter.Build(&bytecode), BytecodeEmitter::ErrorCode::SUCCESS); in TEST_F()
[all …]
/ark/runtime_core/
DREADME.md21 …mbler # Assembler that converts an ARK bytecode file (*.pa) in text format into a byte…
24 …r # Disassembler that converts an ARK bytecode file (*.abc) in binary format into an ARK
28 ├── isa # Bytecode ISA description file YAML, and Ruby scripts and templates.
31 ├── libpandafile # Source code repository of ARK bytecode files (*.abc) in binary format.
33 ├── panda # CLI tool used to execute ARK bytecode files (*.abc).
39 └── verification # Bytecode verifier. See docs/bc_verification.
47 The ark\_asm assembler converts the text ARK bytecode file into a bytecode file in binary format.
84 …></a><a name="p1715312588115"></a>Collects statistics on and prints ARK bytecode information after…
/ark/runtime_core/isa/
DREADME.md1 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
Dschema.json2 "title": "Panda Bytecode Spec (draft)",
3 "description": "Panda Bytecode specification in a machine-readable format",
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.
136 description: Pass control to another bytecode in a current method.
149 description: Bytecode doesn't throw exceptions.
151 description: Bytecode throws NullPointerException in case of null reference as a source.
153 … description: Bytecode throws ArrayIndexOutOfBoundsException if index is out of bounds of an array.
155 description: Bytecode throws NegativeArraySizeException if index is less than zero.
[all …]
/ark/js_runtime/ecmascript/compiler/
Dinterpreter_stub-inl.h39 return Load(StubMachineType::UINT8, pc, GetIntPtrConstant(2)); // 2 : skip 1 byte of bytecode in ReadInst8_1()
44 return Load(StubMachineType::UINT8, pc, GetIntPtrConstant(3)); // 3 : skip 1 byte of bytecode in ReadInst8_2()
49 return Load(StubMachineType::UINT8, pc, GetIntPtrConstant(4)); // 4 : skip 1 byte of bytecode in ReadInst8_3()
54 return Load(StubMachineType::UINT8, pc, GetIntPtrConstant(5)); // 5 : skip 1 byte of bytecode in ReadInst8_4()
59 return Load(StubMachineType::UINT8, pc, GetIntPtrConstant(6)); // 6 : skip 1 byte of bytecode in ReadInst8_5()
64 return Load(StubMachineType::UINT8, pc, GetIntPtrConstant(7)); // 7 : skip 1 byte of bytecode in ReadInst8_6()
69 return Load(StubMachineType::UINT8, pc, GetIntPtrConstant(8)); // 8 : skip 1 byte of bytecode in ReadInst8_7()
74 return Load(StubMachineType::UINT8, pc, GetIntPtrConstant(9)); // 9 : skip 1 byte of bytecode in ReadInst8_8()
85 GetInt8Constant(4)), GetInt8Constant(0xf)); // 4 : read 4 byte of bytecode in ReadInst4_1()
90 // 2 : skip 1 byte of bytecode in ReadInst4_2()
[all …]
/ark/ts2abc/ts2panda/ts2abc/
Dts2abc_options.h197 "1: basic bytecode optimizations, including valueNumber,"
205 R"(Print ark bytecode version)"};
207 R"(Print ark bytecode minimum supported version)"};
211 R"(Path to input(json file) or path to output(ark bytecode)"
214 R"(Path to output(ark bytecode) or ignore when 'compile-by-pipe' enabled)"};
/ark/runtime_core/verification/job_queue/
Djob_fill.cpp34 // ASSERT method.bytecode == cached_method.bytecode in FillJob()
39 if (pc_start_ptr != cached_method.bytecode || code_size != cached_method.bytecode_size) { in FillJob()
/ark/runtime_core/libpandafile/templates/
Dfile_format_version.h.erb35 ss << "Bytecode version " << GetVersion(version) << '\n';
36 ss << "Minimum supported bytecode version " << GetVersion(minVersion) << '\n';
/ark/js_runtime/
DREADME.md14 …(GC\), a standard library compliant with ECMAScript specifications, ARK bytecode interpreter, inli…
29 │ ├─ class_linker # Bytecode pre-processing module
51 * Only the bytecode file generated by the ARK JS frontend can be run.
/ark/runtime_core/verification/cflow/
Dcflow_check.cpp70 … (OffsetAsHexStr(method.bytecode, block_info.End))); in CheckFallthroughFromBlock()
127 … CacheOfRuntimeThings::GetName(method), (OffsetAsHexStr(method.bytecode, handler_info.Info.Start)), in CheckFallthroughFromExcHandler()
128 (OffsetAsHexStr(method.bytecode, handler_info.Info.End))); in CheckFallthroughFromExcHandler()
233 const uint8_t *method_pc_start_ptr = method.bytecode; in CheckCflow()
/ark/js_runtime/docs/
Doverview.md17 ARK-JS Runtime runs ARK bytecode files to implement JS semantic logic.
44 … uses the type information to statically generate an inline cache to accelerate bytecode execution.
Dusing-the-toolchain.md5 ## JS Bytecode Compiler
7 Front-end tools, converting JS source code into ARK bytecode, can be built by specifing the `--buil…
62 …16"><a name="p1024452794916"></a><a name="p1024452794916"></a>Outputs a text ARK bytecode file.</p>
128 … name="p14354832134715"></a><a name="p14354832134715"></a>Outputs the current bytecode version.</p>
138 …="p17469123534711"></a><a name="p17469123534711"></a>Outputs the lowest bytecode version supported…
150 The ark\_asm assembler converts the text ARK bytecode file into a bytecode file in binary format.
187 …></a><a name="p1715312588115"></a>Collects statistics on and prints ARK bytecode information after…
/ark/runtime_core/assembler/
Dassembly-function.h147 …BuildLineNumberProgram(panda_file::DebugInfoItem *debug_item, const std::vector<uint8_t> &bytecode,
151 Function::TryCatchInfo MakeOrderAndOffsets(const std::vector<uint8_t> &bytecode) const;
155 const std::vector<uint8_t> &bytecode) const;
/ark/runtime_core/scripts/dep-lists/
Dubuntu-18-04-build5 ruby=1:2.5.1 # For working with Bytecode ISA API
/ark/runtime_core/libpandafile/
Dbytecode_emitter.cpp280 static uint8_t getRegJcond(const std::vector<uint8_t> &bytecode, uint32_t insn_pc, BitImmSize encod… in getRegJcond() argument
285 … return BytecodeInstruction(bytecode.data()).JumpTo(insn_pc).GetVReg<Format::V8_IMM8, 0>(); in getRegJcond()
287 … return BytecodeInstruction(bytecode.data()).JumpTo(insn_pc).GetVReg<Format::V8_IMM16, 0>(); in getRegJcond()
349 uint8_t *bytecode = bytecode_.data(); in UpdateBranches() local
366 … uint8_t reg = BytecodeInstruction(bytecode).JumpTo(insn_pc).GetVReg<Format::V8_IMM8, 0>(); in UpdateBranches()
369 … uint8_t reg = BytecodeInstruction(bytecode).JumpTo(insn_pc).GetVReg<Format::V8_IMM16, 0>(); in UpdateBranches()
/ark/ts2abc/ts2panda/src/
DcmdOptions.ts37 …1: basic bytecode optimizations, including valueNumber, lowering, constantResolver, regAccAllocato…
38 … 2: other bytecode optimizations, unimplemented yet"},
40 …sion', alias: 'v', type: Boolean, defaultValue: false, description: "Print ark bytecode version" },
41 …{ name: 'bc-min-version', type: Boolean, defaultValue: false, description: "Print ark bytecode min…

123456