mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-07-12 08:45:40 +00:00
use normal style for comments
Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
@@ -1,15 +1,11 @@
|
||||
//!
|
||||
//! Translates the arithmetic operations.
|
||||
//!
|
||||
|
||||
use inkwell::values::BasicValue;
|
||||
|
||||
use crate::eravm::context::Context;
|
||||
use crate::eravm::Dependency;
|
||||
|
||||
///
|
||||
/// Translates the arithmetic addition.
|
||||
///
|
||||
pub fn addition<'ctx, D>(
|
||||
context: &mut Context<'ctx, D>,
|
||||
operand_1: inkwell::values::IntValue<'ctx>,
|
||||
@@ -24,9 +20,7 @@ where
|
||||
.as_basic_value_enum())
|
||||
}
|
||||
|
||||
///
|
||||
/// Translates the arithmetic subtraction.
|
||||
///
|
||||
pub fn subtraction<'ctx, D>(
|
||||
context: &mut Context<'ctx, D>,
|
||||
operand_1: inkwell::values::IntValue<'ctx>,
|
||||
@@ -41,9 +35,7 @@ where
|
||||
.as_basic_value_enum())
|
||||
}
|
||||
|
||||
///
|
||||
/// Translates the arithmetic multiplication.
|
||||
///
|
||||
pub fn multiplication<'ctx, D>(
|
||||
context: &mut Context<'ctx, D>,
|
||||
operand_1: inkwell::values::IntValue<'ctx>,
|
||||
@@ -58,9 +50,7 @@ where
|
||||
.as_basic_value_enum())
|
||||
}
|
||||
|
||||
///
|
||||
/// Translates the arithmetic division.
|
||||
///
|
||||
pub fn division<'ctx, D>(
|
||||
context: &mut Context<'ctx, D>,
|
||||
operand_1: inkwell::values::IntValue<'ctx>,
|
||||
@@ -75,9 +65,7 @@ where
|
||||
.into())
|
||||
}
|
||||
|
||||
///
|
||||
/// Translates the arithmetic remainder.
|
||||
///
|
||||
pub fn remainder<'ctx, D>(
|
||||
context: &mut Context<'ctx, D>,
|
||||
operand_1: inkwell::values::IntValue<'ctx>,
|
||||
@@ -98,13 +86,10 @@ where
|
||||
.expect("Always exists"))
|
||||
}
|
||||
|
||||
///
|
||||
/// Translates the signed arithmetic division.
|
||||
///
|
||||
/// Two differences between the EVM and LLVM IR:
|
||||
/// 1. In case of division by zero, 0 is returned.
|
||||
/// 2. In case of overflow, the first argument is returned.
|
||||
///
|
||||
pub fn division_signed<'ctx, D>(
|
||||
context: &mut Context<'ctx, D>,
|
||||
operand_1: inkwell::values::IntValue<'ctx>,
|
||||
@@ -125,9 +110,7 @@ where
|
||||
.expect("Always exists"))
|
||||
}
|
||||
|
||||
///
|
||||
/// Translates the signed arithmetic remainder.
|
||||
///
|
||||
pub fn remainder_signed<'ctx, D>(
|
||||
context: &mut Context<'ctx, D>,
|
||||
operand_1: inkwell::values::IntValue<'ctx>,
|
||||
|
||||
Reference in New Issue
Block a user