ArkScript
A small, fast, functional and scripting language for video games
|
#include <Entity.hpp>
Public Member Functions | |
Entity (Kind kind) | |
Entity (Instruction inst, uint16_t arg=0) | |
Entity (Instruction inst, uint16_t primary_arg, uint16_t secondary_arg) | |
Word | bytecode () const |
label_t | label () const |
Kind | kind () const |
Instruction | inst () const |
uint16_t | primaryArg () const |
uint16_t | secondaryArg () const |
Static Public Member Functions | |
static Entity | Label (label_t value) |
static Entity | Goto (const Entity &label) |
static Entity | GotoIf (const Entity &label, bool cond) |
Private Attributes | |
Kind | m_kind |
label_t | m_label { 0 } |
Instruction | m_inst { NOP } |
uint16_t | m_primary_arg { 0 } |
uint16_t | m_secondary_arg { 0 } |
Definition at line 38 of file Entity.hpp.
|
explicit |
Definition at line 5 of file Entity.cpp.
|
explicit |
Definition at line 10 of file Entity.cpp.
Ark::internal::IR::Entity::Entity | ( | Instruction | inst, |
uint16_t | primary_arg, | ||
uint16_t | secondary_arg ) |
Definition at line 15 of file Entity.cpp.
|
nodiscard |
Definition at line 44 of file Entity.cpp.
References m_inst, m_kind, m_primary_arg, m_secondary_arg, Ark::internal::IR::Opcode, and Ark::internal::IR::Opcode2Args.
Definition at line 28 of file Entity.cpp.
References Entity(), Ark::internal::IR::Goto, and label().
Referenced by Ark::internal::Compiler::compileIf(), and Ark::internal::Compiler::compileWhile().
Definition at line 36 of file Entity.cpp.
References Entity(), Ark::internal::IR::GotoIfFalse, Ark::internal::IR::GotoIfTrue, and label().
Referenced by Ark::internal::Compiler::compileIf(), Ark::internal::Compiler::compileWhile(), and Ark::internal::Compiler::handleCalls().
|
inlinenodiscard |
Definition at line 59 of file Entity.hpp.
References m_inst.
Referenced by Ark::internal::IROptimizer::compactEntities(), and Ark::internal::IROptimizer::compactEntities().
|
inlinenodiscard |
Definition at line 57 of file Entity.hpp.
References m_kind.
Definition at line 20 of file Entity.cpp.
References Entity(), Ark::internal::IR::Label, and label().
Referenced by Ark::internal::Compiler::compileIf(), Ark::internal::Compiler::compileWhile(), and Ark::internal::Compiler::handleCalls().
|
inlinenodiscard |
|
inlinenodiscard |
Definition at line 61 of file Entity.hpp.
References m_primary_arg.
Referenced by Ark::internal::IROptimizer::compactEntities(), and Ark::internal::IROptimizer::compactEntities().
|
inlinenodiscard |
Definition at line 63 of file Entity.hpp.
References m_secondary_arg.
|
private |
Definition at line 68 of file Entity.hpp.
Referenced by bytecode(), and inst().
|
private |
Definition at line 66 of file Entity.hpp.
Referenced by bytecode(), and kind().
|
private |
Definition at line 67 of file Entity.hpp.
Referenced by label().
|
private |
Definition at line 69 of file Entity.hpp.
Referenced by bytecode(), and primaryArg().
|
private |
Definition at line 70 of file Entity.hpp.
Referenced by bytecode(), and secondaryArg().