-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! fixup! fixup! [move-vm] Removed most RCs from runtime
- Loading branch information
Showing
4 changed files
with
59 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
language/move-vm/transactional-tests/tests/builtins/vector_ops_using_generics.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
processed 3 tasks |
24 changes: 24 additions & 0 deletions
24
language/move-vm/transactional-tests/tests/builtins/vector_ops_using_generics.mvir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//# publish | ||
|
||
module 0x42.Tests { | ||
|
||
public test<T: copy + drop>(x: T) { | ||
let v: vector<T>; | ||
label l0: | ||
v = vec_pack_0<T>(); | ||
assert(vec_len<T>(&v) == 0, 42); | ||
vec_push_back<T>(&mut v, copy(x)); | ||
vec_push_back<T>(&mut v, copy(x)); | ||
vec_swap<T>(&mut v, 0, 1); | ||
_ = vec_imm_borrow<T>(&v, 0); | ||
_ = vec_mut_borrow<T>(&mut v, 0); | ||
_ = vec_pop_back<T>(&mut v); | ||
_ = vec_pop_back<T>(&mut v); | ||
vec_unpack_0<T>(move(v)); | ||
return; | ||
} | ||
} | ||
|
||
//# run 0x42::Tests::test --type-args u64 --args 0 | ||
|
||
//# run 0x42::Tests::test --type-args vector<u8> --args b"hello" |