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

Idiotic division/multiplication by 4 generated in len, as-max-len? and slice? #589

Open
Acaccia opened this issue Dec 17, 2024 · 0 comments
Labels

Comments

@Acaccia
Copy link
Collaborator

Acaccia commented Dec 17, 2024

// UTF8 is represented as 32-bit unicode scalars values.
builder.i32_const(4);
builder.binop(BinaryOp::I32DivU);

builder.i32_const(4);
// Divide the length of the list by the length of each element to get
// the number of elements in the list.
builder.binop(BinaryOp::I32DivU);

// UTF8 is represented as 32-bit unicode scalars values.
builder.i64_const(4);
builder.binop(BinaryOp::I64Mul);

These should be a shift of 2.

@github-project-automation github-project-automation bot moved this to Status: 🆕 New in Stacks Core Eng Dec 17, 2024
@Acaccia Acaccia changed the title Idiotic division by 4 generated in as-max-len? Idiotic division by 4 generated in len and as-max-len? Dec 17, 2024
@Acaccia Acaccia changed the title Idiotic division by 4 generated in len and as-max-len? Idiotic division/multiplication by 4 generated in len an as-max-len? Dec 17, 2024
@Acaccia Acaccia changed the title Idiotic division/multiplication by 4 generated in len an as-max-len? Idiotic division/multiplication by 4 generated in len, as-max-len? and slice? Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Status: 🆕 New
Development

No branches or pull requests

1 participant