Skip to content

Commit

Permalink
remove unneeded lsl (moonbitlang#663)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobzhang authored Jul 9, 2024
1 parent bbeb755 commit 2ea4919
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion strconv/double.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ let max_exponent_fast_path : Int64 = 22L
/// TODO: For `f32` it is 17, but we don't have `f32` yet.
let max_exponent_disguised_fast_path : Int64 = 37L

let max_mantissa_fast_path : UInt64 = lsl(2UL, mantissa_explicit_bits)
let max_mantissa_fast_path : UInt64 = 2UL.lsl(mantissa_explicit_bits)

pub fn parse_double(str : String) -> Double!String {
if str.length() == 0 {
Expand Down
4 changes: 0 additions & 4 deletions strconv/number.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,6 @@ fn parse_inf_nan(s : String) -> (Double, Int)? {
None
}

fn lsl(a : UInt64, b : Int) -> UInt64 {
a.to_int64().lsl(b).to_uint64()
}

/// Returns None if the multiplication might overflow (there are some false-negative corner cases).
/// Otherwise, returns Some(m), where m = self * b.
fn checked_mul(a : UInt64, b : UInt64) -> UInt64? {
Expand Down

0 comments on commit 2ea4919

Please sign in to comment.