ArkScript
A small, lisp-inspired, functional scripting language
Ark::internal::IROptimizer::Rule Struct Reference
Collaboration diagram for Ark::internal::IROptimizer::Rule:
[legend]

Public Member Functions

 Rule (std::vector< Instruction > &&input, Instruction replacement, Condition_t &&cond=default_cond)
 
 Rule (std::vector< Instruction > &&input, Condition_t &&cond, Replacement_t &&repl)
 
 Rule (std::vector< Instruction > &&input, Replacement_t &&repl)
 

Public Attributes

std::vector< Instructionexpected
 
Condition_t condition
 Additional condition to match.
 
Replacement_t createReplacement
 Create the replacement instructions from given context.
 

Static Public Attributes

static constexpr auto default_cond
 

Detailed Description

Definition at line 61 of file IROptimizer.hpp.

Constructor & Destructor Documentation

◆ Rule() [1/3]

Ark::internal::IROptimizer::Rule::Rule ( std::vector< Instruction > && input,
Instruction replacement,
Condition_t && cond = default_cond )
inline

Definition at line 71 of file IROptimizer.hpp.

◆ Rule() [2/3]

Ark::internal::IROptimizer::Rule::Rule ( std::vector< Instruction > && input,
Condition_t && cond,
Replacement_t && repl )
inline

Definition at line 79 of file IROptimizer.hpp.

◆ Rule() [3/3]

Ark::internal::IROptimizer::Rule::Rule ( std::vector< Instruction > && input,
Replacement_t && repl )
inline

Definition at line 83 of file IROptimizer.hpp.

Member Data Documentation

◆ condition

Condition_t Ark::internal::IROptimizer::Rule::condition

Additional condition to match.

Definition at line 64 of file IROptimizer.hpp.

◆ createReplacement

Replacement_t Ark::internal::IROptimizer::Rule::createReplacement

Create the replacement instructions from given context.

Definition at line 65 of file IROptimizer.hpp.

◆ default_cond

auto Ark::internal::IROptimizer::Rule::default_cond
staticconstexpr
Initial value:
= [](const Entities) {
return true;
}
std::span< const IR::Entity > Entities

Definition at line 67 of file IROptimizer.hpp.

◆ expected

std::vector<Instruction> Ark::internal::IROptimizer::Rule::expected

Definition at line 63 of file IROptimizer.hpp.


The documentation for this struct was generated from the following file: