Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expression simplifier #123

Merged
merged 1 commit into from
Jan 2, 2023
Merged

Expression simplifier #123

merged 1 commit into from
Jan 2, 2023

Conversation

chriseth
Copy link
Collaborator

@chriseth chriseth commented Jan 2, 2023

No description provided.

@chriseth chriseth changed the title Expressio simplifier Expression simplifier Jan 2, 2023
@chriseth chriseth force-pushed the simplifier branch 2 times, most recently from e26f484 to 5b45928 Compare January 2, 2023 14:29
@chriseth chriseth changed the base branch from main to fix_clippy January 2, 2023 14:29
Base automatically changed from fix_clippy to main January 2, 2023 14:36
if let Value::Op(opcode, mut args) = input {
let mask = (BigUint::from(1u64) << 256) - BigUint::from(1u64);
let two256 = BigUint::from(1u64) << 256;
let two255: BigUint = BigUint::from(1u64) << 255;
Copy link
Owner

Choose a reason for hiding this comment

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

why is the type annotation needed here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure, but it is.


pub fn simplify(input: Value) -> Value {
if let Value::Op(opcode, mut args) = input {
let mask = (BigUint::from(1u64) << 256) - BigUint::from(1u64);
Copy link
Owner

Choose a reason for hiding this comment

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

which mask is this?

@chriseth chriseth merged commit be04d08 into main Jan 2, 2023
@chriseth chriseth deleted the simplifier branch January 2, 2023 14:50
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.

None yet

2 participants