• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Glossary
2
3## Introduction
4
5During the development of Panda Runtime, we faced the fact that terminology related to the
6development of compilers and interpreters is confusing in some cases. This document describes what
7the terms used mean.
8
9## Core terminology
10
11* **AOT** stands for **Ahead-Of-Time**. In compilers, terms "ahead-of-time compilation" and "AOT
12  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.
15  See https://en.wikipedia.org/wiki/Ahead-of-time_compilation.
16* **Bytecode**. See **Panda Bytecode**.
17* **Compiler** is a tool that performs source code or bytecode translation, optimization and
18  native code generation.
19* **IR** stands for **Intermediate Representation**. IR is an internal compiler data structure
20  used to represent input program and usually designed for analysis and optimization.
21  See https://en.wikipedia.org/wiki/Intermediate_representation.
22* **ISA** stands for **Instruction Set Architecture**. See **Panda Bytecode** and
23  https://en.wikipedia.org/wiki/Instruction_set_architecture.
24* **JIT** stands for **Just-In-Time**. In compilers, terms "just-in-time compilation" and "JIT
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.
28  See https://en.wikipedia.org/wiki/Just-in-time_compilation.
29* **Panda Assembler** is a tool that translates **Panda Assembly Language**
30  to **Panda Binary File**.
31* **Panda Assembly Language** is a low-level programming language retaining very strong
32  correspondence between the instructions in the language and **Panda Bytecode** instructions.
33  See [Assembly Format](assembly_format.md).
34* **Panda Binary File** or **Panda File** or **PF** is a binary representation of Panda Bytecode.
35  See [File Format](file_format.md).
36* **Panda Bytecode** or **PBC** is a portable hardware-independent instruction set designed for
37  compactness and efficient execution by Panda Runtime. See https://en.wikipedia.org/wiki/Bytecode.
38* **Runtime** is a runtime system, also called runtime environment.
39
40## Memory management terms
41
42* **Allocator** is a part of the system servicing allocation and deallocation requests.
43* **Card** is a division of memory with some fixed size. A card is usually smaller than a page in size.
44* **Card table** is used for marking cards. In general, it has one bit or byte (a byte used to
45  improve performance of GC barrier) for one card.
46    It can be used by both generational and concurrent collectors.
47    It can be used for tracking references from the tenured generation to the young generation and
48    for tracking modified references during the concurrent phase of GC.
49* **Compacting GC** is a GC which compacts live objects to reduce fragmentation.
50* **Conservative GC** or non-precise GC works with ambiguous references,
51  i.e. it treats anything inside object boundaries like a reference. Opposite term: **Precise GC**.
52* **Full GC** is cleaning the entire Heap.
53* **Garbage collection** is also known as automatic memory management,
54  which means automatic recycling of dynamically allocated memory.
55* **Garbage collector** performs garbage collection. The garbage collector recycles memory
56  that it can prove will never be used again.
57* **GC** stands for Garbage collector or sometimes for Garbage collection.
58* **Minor GC** in general is garbage collection performed over the young generation space
59  (which includes survivor Eden and Survivor spaces).
60* **Major GC** in general is garbage collection performed over the tenured or old generation space.
61  Sometimes it is triggered by Minor GC, so it is impossible to separate them (see **Full GC**).
62* **Safepoint** is a range of execution where the state of the executing thread is well described.
63    Safepoint is used as a point at which we can safely stop the thread, and at this point, all
64    references on the stack are mapped (i.e., it is known when we have an object on the stack or not).
65    Mutator is at a known point in its interaction with the heap.
66    It means that all objects which are currently in use are known and we know how to get a value
67    for each of their fields.
68* **Precise GC** deals only with exact/sure references, i.e. it knows the object layout and can
69  extract references to the objects. Opposite term: **Conservative GC**.
70* **Semi-space compaction** is a compaction algorithm when memory is split to the two equal spaces
71  (one is empty and one used for allocation) and we just copy objects from one space to another
72  using the bump pointer allocator.
73* **STW** stands for **stop the world**, used in context of stop the world pauses forced by GC -
74  GC force to stop execution of code (interpreted, AOTed or JITed) to make exclusively some
75  operations.
76* **TLAB** stands for **Thread Local Allocation Buffer** - buffer used exclusively for allocations
77  in the thread (no lock required).
78* **White object** is an object non visited by GC (at the end of GC white objects will be reclaimed).
79* **Gray object** is reachable/alive object, but still should be scanned by GC (to process all fields with reference type).
80* **Black object** is reachable/alive object and scanned by GC.
81* **Throughput** is % of time not spent in GC over a long period of time (sometimes `GC throughput` is used as % time spent in GC over a long period of time).
82