frostc-1.0.0.0: The Frost Programming Language Compiler
Safe HaskellSafe-Inferred
LanguageHaskell2010

Codegen.ExprGen.Operator

Synopsis

Documentation

generateBinaryOp :: (MonadCodegen m, ExprGen Expr) => Expr -> m Operand Source #

Generate LLVM code for binary operations.

data BinaryOp m Source #

Binary operation data type.

Constructors

BinaryOp 

integerBinaryOperators :: MonadCodegen m => [BinaryOp m] Source #

List of supported integer binary operators.

floatingPointBinaryOperators :: MonadCodegen m => [BinaryOp m] Source #

List of supported floating-point binary operators.

data UnaryOp m Source #

Unary operation data type.

generateUnaryOp :: (MonadCodegen m, ExprGen Expr) => Expr -> m Operand Source #

Generate LLVM code for unary operations.

unaryOperators :: MonadCodegen m => SrcLoc -> [UnaryOp m] Source #

List of supported unary operators.

handlePreInc :: MonadCodegen m => SrcLoc -> Operand -> m Operand Source #

Handle pre-increment unary operator.

handlePreDec :: MonadCodegen m => SrcLoc -> Operand -> m Operand Source #

Handle pre-decrement unary operator.

handlePostInc :: MonadCodegen m => SrcLoc -> Operand -> m Operand Source #

Handle post-increment unary operator.

handlePostDec :: MonadCodegen m => SrcLoc -> Operand -> m Operand Source #

Handle post-decrement unary operator.

handleNot :: MonadCodegen m => SrcLoc -> Operand -> m Operand Source #

Handle not unary operator.

handleBitNot :: MonadCodegen m => SrcLoc -> Operand -> m Operand Source #

Handle bit-not unary operator.

handleDeref :: MonadCodegen m => SrcLoc -> Operand -> m Operand Source #

Handle dereference unary operator.

handleAddrOf :: MonadCodegen m => SrcLoc -> Operand -> m Operand Source #

Handle address-of unary operator.