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

Update std::math::u64 according to the new u32 refactoring #1142

Merged
merged 2 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#### Stdlib
- Introduced `std::utils` module with `is_empty_word` procedure. Refactored `std::collections::smt`
and `std::collections::smt64` to use the procedure (#1107).
- Removed `checked` versions of the instructions in the `std::math::u64` module (#1142).

#### VM Internals
- Introduced the `Event` decorator and an associated `on_event` handler on the `Host` trait (#1119).
Expand Down
2 changes: 1 addition & 1 deletion assembly/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ use.std::math::u64
begin
push.1.0
push.2.0
exec.u64::checked_add
exec.u64::wrapping_add
end
```

Expand Down
8 changes: 4 additions & 4 deletions assembly/src/ast/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ fn test_ast_program_serde_imports_serialized() {
begin
push.0
push.1
exec.u64::checked_add
exec.u64::wrapping_add
end";
assert_correct_program_serialization(source, true);
}
Expand All @@ -912,7 +912,7 @@ fn test_ast_program_serde_imports_not_serialized() {
begin
push.0
push.1
exec.u64::checked_add
exec.u64::wrapping_add
end";
assert_correct_program_serialization(source, false);
}
Expand All @@ -926,7 +926,7 @@ fn test_ast_module_serde_imports_serialized() {
proc.foo.2
push.0
push.1
exec.u64::checked_add
exec.u64::wrapping_add
end";
assert_correct_module_serialization(source, true);
}
Expand All @@ -940,7 +940,7 @@ fn test_ast_module_serde_imports_not_serialized() {
proc.foo.2
push.0
push.1
exec.u64::checked_add
exec.u64::wrapping_add
end";
assert_correct_module_serialization(source, false);
}
Expand Down
4 changes: 2 additions & 2 deletions docs/src/user_docs/assembly/code_organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ use.std::math::u64
begin
push.1.0
push.2.0
exec.u64::checked_add
exec.u64::wrapping_add
end
```
In the above example we import `std::math::u64` module from the [standard library](../stdlib/main.md). We then execute a program which pushes two 64-bit integers onto the stack, and then invokes a 64-bit addition procedure from the imported module.
Expand Down Expand Up @@ -156,7 +156,7 @@ const.ADDR_1=3

begin
push.CONSTANT_1.CONSTANT_2
exec.u64::checked_add
exec.u64::wrapping_add
mem_store.ADDR_1
end

Expand Down
69 changes: 26 additions & 43 deletions docs/src/user_docs/stdlib/math/u64.md

Large diffs are not rendered by default.

Loading
Loading