ArkScript
A small, fast, functional and scripting language for video games
Ark::internal::IROptimizer::Rule Struct Reference
Collaboration diagram for Ark::internal::IROptimizer::Rule:
[legend]

Public Attributes

std::vector< Instructionexpected
 
Instruction replacement
 
std::function< bool(const Entities &)> condition
 Additional condition to match.
 
std::function< DualArgs(const Entities &)> createReplacement
 Create the replacement instructions from given context.
 

Detailed Description

Definition at line 53 of file IROptimizer.hpp.

Member Data Documentation

◆ condition

std::function<bool(const Entities&)> Ark::internal::IROptimizer::Rule::condition
Initial value:
= [](const Entities&) {
return true;
}
std::vector< IR::Entity > Entities

Additional condition to match.

Definition at line 57 of file IROptimizer.hpp.

◆ createReplacement

std::function<DualArgs(const Entities&)> Ark::internal::IROptimizer::Rule::createReplacement
Initial value:
=
[](const Entities& entities) {
return std::make_pair(entities[0].primaryArg(), entities[1].primaryArg());
}

Create the replacement instructions from given context.

Definition at line 60 of file IROptimizer.hpp.

◆ expected

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

Definition at line 55 of file IROptimizer.hpp.

◆ replacement

Instruction Ark::internal::IROptimizer::Rule::replacement

Definition at line 56 of file IROptimizer.hpp.


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