367 const std::type_info&
lhs;
368 const std::type_info&
rhs;
380 + 4026031ul * src.
lhs.hash_code()
381 + 8175383ul * src.
rhs.hash_code();
395 return left.
op == right.
op
498 const char* dbgCallbackName,
506 const char* dbgCallbackName,
520 template<
size_t TCapacity>
561 template<
size_t TCapacity>
602 return ( std::hash<String>()(src.
op)
603 + 6949ul * std::hash<Box>()(src.
constVal)
604 + 14033ul * src.
other.hash_code()
619 return lhs.
op == rhs.
op
662 template<
size_t TCapacity>
std::size_t Hashcode() const
Box(*)(Scope &scope, ArgIterator argsBegin, ArgIterator argsEnd) CallbackDecl
const alib::boxing::Box & Type
Side
Denotes if something is left or right.
@ Left
Denotes the left side of something.
expressions::plugins::Calculus Calculus
Type alias in namespace alib.
strings::util::Token Token
Type alias in namespace alib.
strings::TString< nchar > NString
Type alias in namespace alib.
containers::HashMap< TAllocator, TKey, TMapped, THash, TEqual, THashCaching, TRecycling > HashMap
Type alias in namespace alib.
monomem::TMonoAllocator< lang::HeapAllocator > MonoAllocator
strings::TCString< nchar > NCString
Type alias in namespace alib.
boxing::Box Box
Type alias in namespace alib.
strings::TString< character > String
Type alias in namespace alib.
CompilerPlugin(const NString &name, Compiler &compiler, CompilePriorities pPriority)
An entry of the field AutoCasts. Defines auto-casts for custom types.
Box Type
The type that is to be automatically cast.
std::vector< String > * OperatorsDeclined
std::vector< String > * OperatorsAccepted
const char * DbgCallbackName
String ReverseCastFunctionName
Equality functor for operator hash map.
bool operator()(const BinOpOptKey &lhs, const BinOpOptKey &rhs) const
Hash functor for operator hash map.
std::size_t operator()(const BinOpOptKey &src) const
Key type for operator hash maps Operators and OperatorAliases.
lang::Side constSide
Denotes a left- or right-hand side optimization.
const String op
The operator to optimize.
const Box constVal
The type and value of the constant argument.
const std::type_info & other
The type of the non-constant argument.
Token Descriptor
The name, minimum length and letter case sensitivity of the function to recognize.
Box Result
The constant result.
CTInvokable IsCTInvokable
size_t SignatureLength
See Signature for more information.
const char * DbgCallbackName
Token Descriptor
The name, minimum length and letter case sensitivity of the function to recognize.
Equality functor for operator hash map.
bool operator()(const OperatorKey &left, const OperatorKey &right) const
Hash functor for operator hash map.
std::size_t operator()(const OperatorKey &src) const
Key type for operator hash maps Operators and OperatorAliases.
const std::type_info & rhs
const std::type_info & lhs
Left-hand side type.
const String op
A string defining the operator.
void AddOperatorAlias(const String &alias, Type lhsType, Type rhsType, const String &op)
static constexpr CTInvokable ETI
HashMap< MonoAllocator, OperatorKey, std::tuple< CallbackDecl, Box, CTInvokable ALIB_DBG(, const char *) >, OperatorKey::Hash, OperatorKey::EqualTo > Operators
virtual ALIB_DLL bool TryCompilation(CIFunction &ciFunction) override
Calculus(const NString &name, Compiler &compiler, CompilePriorities pPriority)
void AddOperatorAliases(OperatorAliasTableEntry(&table)[TCapacity])
const std::tuple< String, lang::Side, Type, const Box &, const Box & > BinaryOpOptimizationsTableEntry
std::vector< ConstantIdentifierEntry > ConstantIdentifiers
List of identifiers that return constant values to be compiled by this plug-in.
virtual ~Calculus() override
Virtual destructor.
static constexpr CTInvokable CTI
void AddBinaryOpOptimizations(BinaryOpOptimizationsTableEntry(&table)[TCapacity])
HashMap< MonoAllocator, BinOpOptKey, Box, BinOpOptKey::Hash, BinOpOptKey::EqualTo > BinaryOperatorOptimizations
std::vector< AutoCastEntry > AutoCasts
List of auto-casts to be compiled by this plug-in.
void AddOperators(OperatorTableEntry(&table)[TCapacity])
std::vector< FunctionEntry > Functions
List of functions to be compiled by this plug-in.
void AddOperator(const String &op, Type lhsType, Type rhsType, CallbackDecl callback, const char *dbgCallbackName, Type resultType, CTInvokable cti)
HashMap< MonoAllocator, OperatorKey, String, OperatorKey::Hash, OperatorKey::EqualTo > OperatorAliases
const std::tuple< String, Type, Type, String > OperatorAliasTableEntry
const std::tuple< String, Type, Type, CallbackDecl, Type, CTInvokable > OperatorTableEntry