Skip to content

fix IntLayout::fits_usize#81

Merged
dr-orlovsky merged 4 commits intoAluVM:masterfrom
6293:fix-fits-usize
Jun 21, 2023
Merged

fix IntLayout::fits_usize#81
dr-orlovsky merged 4 commits intoAluVM:masterfrom
6293:fix-fits-usize

Conversation

@6293
Copy link
Contributor

@6293 6293 commented Jun 17, 2023

@codecov-commenter
Copy link

codecov-commenter commented Jun 17, 2023

Codecov Report

Merging #81 (ded6d30) into master (33efa44) will increase coverage by 0.0%.
The diff coverage is 0.0%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@          Coverage Diff           @@
##           master     #81   +/-   ##
======================================
  Coverage    34.2%   34.2%           
======================================
  Files          19      19           
  Lines        4547    4544    -3     
======================================
  Hits         1554    1554           
+ Misses       2993    2990    -3     
Impacted Files Coverage Δ
src/data/number.rs 51.3% <0.0%> (+0.2%) ⬆️
src/isa/instr.rs 4.9% <0.0%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Comment on lines 645 to 656
/// If the string register is empty, or destination register can't fit the length, sets `st0`
/// to `false` and destination register to `None`.
#[display("len {0},{1}{2}")]
#[display("len {1}{2},{0}")]
Len(/** `s` register index */ RegS, RegA, Reg32),

/// Count number of byte occurrences from the `a8` register within the string and stores that
/// value into destination `a16` register.
///
/// If the string register is empty, or destination register can't fit the length, sets `st0`
/// to `false` and destination register to `None`.
///
/// If the source byte value register is uninitialized, sets destination register to `None` and
/// `st0` to `false`.
#[display("cnt {0},a8{1},a16{2}")]
/// If the string register is empty, or the source byte value register is uninitialized, sets
/// `st0` to `false` and destination register to `None`.
#[display("cnt a16{2},{0},a8{1}")]
Cnt(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unlike len, the return value cannot overflow the destination register which is always a16 in cnt

Copy link
Member

@dr-orlovsky dr-orlovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK ded6d30

@dr-orlovsky dr-orlovsky merged commit 6682504 into AluVM:master Jun 21, 2023
@dr-orlovsky dr-orlovsky added this to the 0.10.4 milestone Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants