From ae2049a483fba4d6a2897432631e5cc61d5d6f93 Mon Sep 17 00:00:00 2001 From: Wolfgang Grieskamp Date: Tue, 8 Oct 2024 08:20:13 -0700 Subject: [PATCH] Fixing type display context for multiple usage scenarios --- .../move-to-yul/tests/AccountStateMachine.exp | 56 +-- .../evm/move-to-yul/tests/ConstructorTest.exp | 8 +- .../evm/move-to-yul/tests/GlobalVectors.exp | 366 +++++++-------- .../move/evm/move-to-yul/tests/Resources.exp | 80 ++-- .../tests/Resources.exp.capture-source-info | 80 ++-- .../move/evm/move-to-yul/tests/Structs.exp | 90 ++-- .../move/evm/move-to-yul/tests/Tables.exp | 168 +++---- .../evm/move-to-yul/tests/TestABIStructs.exp | 68 +-- .../move-to-yul/tests/TestExternalResult.exp | 126 ++--- .../move-to-yul/tests/TestStringLiteral.exp | 16 +- .../move/evm/move-to-yul/tests/Vectors.exp | 132 +++--- .../DispatcherArrayDecoding.exp | 22 +- .../DispatcherBasicStorage.exp | 12 +- .../DispatcherEncodingStorage.exp | 26 +- .../tests/test-dispatcher/ExternalCall.exp | 90 ++-- .../tests/test-events/CallEmit.exp | 36 +- .../tests/bytecode-generator/assign.exp | 6 +- .../tests/bytecode-generator/borrow.exp | 4 +- .../bug_14471_receiver_inference.exp | 4 +- .../bytecode-generator/conditional_borrow.exp | 2 +- .../bytecode-generator/escape_autoref.exp | 6 +- .../tests/bytecode-generator/fields.exp | 18 +- .../bytecode-generator/fields_invalid.exp | 2 +- .../bytecode-generator/freeze_mut_ref.exp | 18 +- .../matching_ability_err.exp | 6 +- .../matching_coverage_err.exp | 20 +- .../tests/bytecode-generator/matching_ok.exp | 26 +- .../matching_refutable_err.exp | 2 +- .../mutate_immutable_cmp.exp | 2 +- .../tests/bytecode-generator/operators.exp | 4 +- .../tests/bytecode-generator/pack_order.exp | 12 +- .../tests/bytecode-generator/pack_unpack.exp | 4 +- .../bytecode-generator/spec_construct.exp | 2 +- .../v1-typing/mutate_immutable.exp | 2 +- .../tests/bytecode-generator/wildcard3.exp | 2 +- .../tests/checking/abilities/tuple.exp | 2 +- .../v1/phantom_param_op_abilities.exp | 12 +- .../tests/checking/dotdot/dotdot_valid.exp | 42 +- .../tests/checking/dotdot/extra_dotdot.exp | 2 +- .../tests/checking/inlining/lambda.exp | 2 +- .../tests/checking/inlining/lambda_typed.exp | 2 +- .../checking/inlining/resources_valid.exp | 6 +- .../tests/checking/inlining/test_12670.exp | 2 +- .../checking/naming/generics_shadowing.exp | 2 +- .../positional_fields/assign_field.exp | 10 +- .../bind_anonymous_field.exp | 6 +- .../positional_fields/common_access.exp | 2 +- .../checking/positional_fields/decl_ok.exp | 4 +- .../named_tuple_construct_ok.exp | 12 +- .../tests/checking/receiver/calls.exp | 10 +- .../checking/receiver/calls_with_freeze.exp | 4 +- .../tests/checking/receiver/decl_errors.exp | 8 +- .../receiver/dont_warn_unused_self.exp | 2 +- .../tests/checking/receiver/generic_calls.exp | 18 +- .../checking/receiver/generic_calls_typed.exp | 18 +- .../tests/checking/receiver/same_names.exp | 8 +- .../checking/receiver/same_names_typed.exp | 8 +- .../tests/checking/receiver/vectors.exp | 6 +- .../tests/checking/specs/conditions_ok.exp | 2 +- .../checking/specs/inline_fun_in_spec.exp | 4 +- .../specs/inline_fun_in_spec_typed.exp | 4 +- .../checking/specs/intrinsic_decl_ok.exp | 28 +- .../specs/move_function_in_spec_ok.exp | 4 +- .../tests/checking/specs/quantifiers_ok.exp | 4 +- .../tests/checking/specs/structs_ok.exp | 16 +- .../tests/checking/specs/update_field_ok.exp | 4 +- .../tests/checking/typing/assign_tuple_wg.exp | 2 +- .../tests/checking/typing/binary_add.exp | 2 +- .../tests/checking/typing/binary_and.exp | 2 +- .../tests/checking/typing/binary_bit_and.exp | 2 +- .../tests/checking/typing/binary_bit_or.exp | 2 +- .../tests/checking/typing/binary_div.exp | 2 +- .../tests/checking/typing/binary_geq.exp | 2 +- .../tests/checking/typing/binary_gt.exp | 2 +- .../tests/checking/typing/binary_leq.exp | 2 +- .../tests/checking/typing/binary_lt.exp | 2 +- .../tests/checking/typing/binary_mod.exp | 2 +- .../tests/checking/typing/binary_mul.exp | 2 +- .../tests/checking/typing/binary_or.exp | 2 +- .../tests/checking/typing/binary_shl.exp | 2 +- .../tests/checking/typing/binary_shr.exp | 2 +- .../tests/checking/typing/binary_sub.exp | 2 +- .../tests/checking/typing/binary_xor.exp | 2 +- .../tests/checking/typing/borrow_field.exp | 2 +- .../checking/typing/borrow_field_chain.exp | 2 +- .../typing/borrow_field_complex_root_expr.exp | 2 +- .../typing/borrow_field_non_ref_root.exp | 2 +- .../tests/checking/typing/borrow_local.exp | 4 +- .../tests/checking/typing/break_any_type.exp | 2 +- .../checking/typing/continue_any_type.exp | 2 +- .../tests/checking/typing/derefrence.exp | 2 +- .../typing/entry_signature_no_warning.exp | 4 +- .../tests/checking/typing/eq.exp | 2 +- .../tests/checking/typing/exp_list.exp | 4 +- .../typing/hex_and_decimal_address.exp | 4 +- .../typing/implicit_deref_borrow_field.exp | 2 +- .../implicit_deref_borrow_field_chain.exp | 2 +- ...t_deref_borrow_field_complex_root_expr.exp | 2 +- ...ef_borrow_field_non_ref_non_local_root.exp | 6 +- ...plicit_deref_borrow_field_non_ref_root.exp | 2 +- .../checking/typing/loop_result_type.exp | 4 +- .../typing/main_arguments_various_caes.exp | 4 +- .../checking/typing/mutable_eq_and_neq.exp | 6 +- .../tests/checking/typing/mutate.exp | 4 +- .../tests/checking/typing/neq.exp | 2 +- .../checking/typing/nested_post_process.exp | 4 +- .../tests/checking/typing/other_builtins.exp | 2 +- .../tests/checking/typing/return_any_type.exp | 2 +- .../typing/return_type_explicit_exp.exp | 2 +- .../checking/typing/return_type_last_exp.exp | 2 +- .../checking/typing/struct_no_field_list.exp | 2 +- .../tests/checking/typing/subtype_args.exp | 8 +- .../tests/checking/typing/subtype_return.exp | 2 +- .../tests/checking/typing/tuple.exp | 2 +- .../type_variable_join_single_unpack.exp | 2 +- ...ype_variable_join_single_unpack_assign.exp | 2 +- .../type_variable_join_threaded_pack.exp | 8 +- .../tests/checking/typing/unary_not.exp | 2 +- .../multi_pool_money_market_token.exp | 38 +- .../v1-examples/simple_money_market_token.exp | 26 +- .../variants/variants_allow_match_fun_1.exp | 4 +- .../variants/variants_allow_match_fun_3.exp | 4 +- .../variants/variants_allow_match_var.exp | 2 +- .../checking/variants/variants_constants.exp | 2 +- .../tests/checking/variants/variants_ok.exp | 30 +- .../variants_test_no_parenthesis_ok.exp | 10 +- .../checking/variants/variants_test_ok.exp | 10 +- .../variants/variants_test_parse_ok2.exp | 2 +- .../recursive_one_arg_just_type_params_ok.exp | 2 +- .../tests/folding/non_constant_empty_vec.exp | 8 +- .../tests/lambda-lifting/pattern.exp | 10 +- .../tests/op-equal/valid0.exp | 20 +- .../tests/op-equal/valid1.exp | 12 +- .../tests/op-equal/valid2.exp | 2 +- .../simplifier-elimination/binary_add.exp | 2 +- .../tests/simplifier/conditional_borrow.exp | 2 +- .../tests/simplifier/random.exp | 4 +- .../tests/simplifier/simplifier_test4.exp | 6 +- .../ast-generator-tests/tests/match.exp | 102 ++--- .../bytecode/tests/borrow/basic_test.exp | 176 +++---- .../bytecode/tests/borrow/function_call.exp | 86 ++-- .../bytecode/tests/borrow/hyper_edge.exp | 70 +-- .../tests/borrow_strong/basic_test.exp | 230 +++++----- .../bytecode/tests/borrow_strong/mut_ref.exp | 430 +++++++++--------- .../regression_generic_and_native_type.exp | 54 +-- .../bytecode/tests/from_move/smoke_test.exp | 166 +++---- .../bytecode/tests/livevar/basic_test.exp | 82 ++-- .../tests/reaching_def/basic_test.exp | 12 +- .../bytecode/tests/usage_analysis/test.exp | 48 +- third_party/move/move-model/src/ast.rs | 4 +- .../move-model/src/builder/model_builder.rs | 1 + third_party/move/move-model/src/model.rs | 46 +- third_party/move/move-model/src/ty.rs | 27 +- .../move-prover/move-docgen/src/docgen.rs | 33 +- 154 files changed, 1853 insertions(+), 1822 deletions(-) diff --git a/third_party/move/evm/move-to-yul/tests/AccountStateMachine.exp b/third_party/move/evm/move-to-yul/tests/AccountStateMachine.exp index 08f39e05a23f3..19d655cc32931 100644 --- a/third_party/move/evm/move-to-yul/tests/AccountStateMachine.exp +++ b/third_party/move/evm/move-to-yul/tests/AccountStateMachine.exp @@ -48,9 +48,9 @@ object "A3_AccountStateMachine" { $t0 := 0 // $t1 := 0 $t1 := 0 - // $t2 := vector::empty() + // $t2 := vector::empty<0x3::AccountStateMachine::PendingTransfer>() $t2 := A1_vector_empty$A3_AccountStateMachine_PendingTransfer$() - // $t3 := pack AccountStateMachine::Account($t0, $t1, $t2) + // $t3 := pack 0x3::AccountStateMachine::Account($t0, $t1, $t2) { let $mem := $Malloc(48) $MemoryStoreU64(add($mem, 32), $t0) @@ -245,7 +245,7 @@ object "A3_AccountStateMachine" { // label L6 // $t7 := freeze_ref($t5) $t7 := $t5 - // $t8 := vector::length($t7) + // $t8 := vector::length<0x3::AccountStateMachine::PendingTransfer>($t7) $t8 := A1_vector_length$A3_AccountStateMachine_PendingTransfer$($t7) // $t9 := <($t2, $t8) $t9 := $Lt(i, $t8) @@ -255,7 +255,7 @@ object "A3_AccountStateMachine" { default { $block := 4 } } case 3 { - // $t5 := borrow_field.pending($t0) + // $t5 := borrow_field<0x3::AccountStateMachine::Account>.pending($t0) $t5 := this // $t6 := 0 $t6 := 0 @@ -279,11 +279,11 @@ object "A3_AccountStateMachine" { // label L2 // $t10 := freeze_ref($t5) $t10 := $t5 - // $t11 := vector::borrow($t10, $t2) + // $t11 := vector::borrow<0x3::AccountStateMachine::PendingTransfer>($t10, $t2) $t11 := A1_vector_borrow$A3_AccountStateMachine_PendingTransfer$($t10, i) // $t12 := Actor::virtual_time() $t12 := A1_Actor_virtual_time() - // $t13 := borrow_field.initiated_at($t11) + // $t13 := borrow_field<0x3::AccountStateMachine::PendingTransfer>.initiated_at($t11) $t13 := $t11 // $t14 := read_ref($t13) $t14 := $LoadU128($t13) @@ -300,7 +300,7 @@ object "A3_AccountStateMachine" { } case 7 { // label L4 - // $t18 := vector::remove($t5, $t2) + // $t18 := vector::remove<0x3::AccountStateMachine::PendingTransfer>($t5, $t2) $t18 := A1_vector_remove$A3_AccountStateMachine_PendingTransfer$($t5, i) // drop($t18) $Free($t18, 32) @@ -345,7 +345,7 @@ object "A3_AccountStateMachine" { case 4 { // $t2 := 43 $t2 := 43 - // $t3 := borrow_field.value($t0) + // $t3 := borrow_field<0x3::AccountStateMachine::Account>.value($t0) $t3 := $IndexPtr(this, 32) // $t4 := read_ref($t3) $t4 := $LoadU64($t3) @@ -360,13 +360,13 @@ object "A3_AccountStateMachine" { } case 5 { // label L2 - // $t8 := borrow_field.value($t0) + // $t8 := borrow_field<0x3::AccountStateMachine::Account>.value($t0) $t8 := $IndexPtr(this, 32) // $t9 := read_ref($t8) $t9 := $LoadU64($t8) // $t10 := +($t9, $t1) $t10 := $AddU64($t9, v) - // $t11 := borrow_field.value($t0) + // $t11 := borrow_field<0x3::AccountStateMachine::Account>.value($t0) $t11 := $IndexPtr(this, 32) // write_ref($t11, $t10) $StoreU64($t11, $t10) @@ -395,7 +395,7 @@ object "A3_AccountStateMachine" { $Abort($t5) } case 4 { - // $t2 := borrow_field.value($t0) + // $t2 := borrow_field<0x3::AccountStateMachine::Account>.value($t0) $t2 := $IndexPtr(this, 32) // $t3 := read_ref($t2) $t3 := $LoadU64($t2) @@ -408,13 +408,13 @@ object "A3_AccountStateMachine" { } case 5 { // label L2 - // $t6 := borrow_field.value($t0) + // $t6 := borrow_field<0x3::AccountStateMachine::Account>.value($t0) $t6 := $IndexPtr(this, 32) // $t7 := read_ref($t6) $t7 := $LoadU64($t6) // $t8 := -($t7, $t1) $t8 := $Sub($t7, v) - // $t9 := borrow_field.value($t0) + // $t9 := borrow_field<0x3::AccountStateMachine::Account>.value($t0) $t9 := $IndexPtr(this, 32) // write_ref($t9, $t8) $StoreU64($t9, $t8) @@ -443,7 +443,7 @@ object "A3_AccountStateMachine" { $Abort($t7) } case 4 { - // $t4 := borrow_field.value($t0) + // $t4 := borrow_field<0x3::AccountStateMachine::Account>.value($t0) $t4 := $IndexPtr(this, 32) // $t5 := read_ref($t4) $t5 := $LoadU64($t4) @@ -458,11 +458,11 @@ object "A3_AccountStateMachine" { // label L2 // $t8 := AccountStateMachine::new_xfer_id($t0) $t8 := A3_AccountStateMachine_new_xfer_id(this) - // $t9 := borrow_field.pending($t0) + // $t9 := borrow_field<0x3::AccountStateMachine::Account>.pending($t0) $t9 := this // $t10 := Actor::virtual_time() $t10 := A1_Actor_virtual_time() - // $t11 := pack AccountStateMachine::PendingTransfer($t8, $t2, $t10) + // $t11 := pack 0x3::AccountStateMachine::PendingTransfer($t8, $t2, $t10) { let $mem := $Malloc(32) $MemoryStoreU64(add($mem, 16), $t8) @@ -470,7 +470,7 @@ object "A3_AccountStateMachine" { $MemoryStoreU128(add($mem, 0), $t10) $t11 := $mem } - // vector::push_back($t9, $t11) + // vector::push_back<0x3::AccountStateMachine::PendingTransfer>($t9, $t11) A1_vector_push_back$A3_AccountStateMachine_PendingTransfer$($t9, $t11) // $t12 := Actor::self() $t12 := A1_Actor_self() @@ -496,17 +496,17 @@ object "A3_AccountStateMachine" { $t5 := this // $t6 := AccountStateMachine::find_xfer($t5, $t1) $t6 := A3_AccountStateMachine_find_xfer($t5, xfer_id) - // $t7 := borrow_field.pending($t0) + // $t7 := borrow_field<0x3::AccountStateMachine::Account>.pending($t0) $t7 := this - // $t8 := vector::borrow($t7, $t6) + // $t8 := vector::borrow<0x3::AccountStateMachine::PendingTransfer>($t7, $t6) $t8 := A1_vector_borrow$A3_AccountStateMachine_PendingTransfer$($t7, $t6) - // $t9 := borrow_field.amount($t8) + // $t9 := borrow_field<0x3::AccountStateMachine::PendingTransfer>.amount($t8) $t9 := $IndexPtr($t8, 24) // $t10 := read_ref($t9) $t10 := $LoadU64($t9) - // $t11 := borrow_field.pending($t0) + // $t11 := borrow_field<0x3::AccountStateMachine::Account>.pending($t0) $t11 := this - // $t12 := vector::remove($t11, $t6) + // $t12 := vector::remove<0x3::AccountStateMachine::PendingTransfer>($t11, $t6) $t12 := A1_vector_remove$A3_AccountStateMachine_PendingTransfer$($t11, $t6) // drop($t12) $Free($t12, 32) @@ -639,7 +639,7 @@ object "A3_AccountStateMachine" { switch $block case 2 { // label L6 - // $t7 := vector::length($t5) + // $t7 := vector::length<0x3::AccountStateMachine::PendingTransfer>($t5) $t7 := A1_vector_length$A3_AccountStateMachine_PendingTransfer$($t5) // $t8 := <($t3, $t7) $t8 := $Lt(i, $t7) @@ -649,7 +649,7 @@ object "A3_AccountStateMachine" { default { $block := 4 } } case 3 { - // $t5 := borrow_field.pending($t0) + // $t5 := borrow_field<0x3::AccountStateMachine::Account>.pending($t0) $t5 := this // $t6 := 0 $t6 := 0 @@ -674,9 +674,9 @@ object "A3_AccountStateMachine" { } case 6 { // label L2 - // $t9 := vector::borrow($t5, $t3) + // $t9 := vector::borrow<0x3::AccountStateMachine::PendingTransfer>($t5, $t3) $t9 := A1_vector_borrow$A3_AccountStateMachine_PendingTransfer$($t5, i) - // $t10 := borrow_field.xfer_id($t9) + // $t10 := borrow_field<0x3::AccountStateMachine::PendingTransfer>.xfer_id($t9) $t10 := $IndexPtr($t9, 16) // $t11 := read_ref($t10) $t11 := $LoadU64($t10) @@ -703,7 +703,7 @@ object "A3_AccountStateMachine" { } case 9 { // label L4 - // $t14 := vector::length($t5) + // $t14 := vector::length<0x3::AccountStateMachine::PendingTransfer>($t5) $t14 := A1_vector_length$A3_AccountStateMachine_PendingTransfer$($t5) // $t15 := <($t3, $t14) $t15 := $Lt(i, $t14) @@ -782,7 +782,7 @@ object "A3_AccountStateMachine" { } function A3_AccountStateMachine_new_xfer_id(this) -> $result { let counter, xfer_id, $t3, $t4, $t5, $t6, $t7 - // $t3 := borrow_field.xfer_id_counter($t0) + // $t3 := borrow_field<0x3::AccountStateMachine::Account>.xfer_id_counter($t0) $t3 := $IndexPtr(this, 40) // $t4 := read_ref($t3) $t4 := $LoadU64($t3) diff --git a/third_party/move/evm/move-to-yul/tests/ConstructorTest.exp b/third_party/move/evm/move-to-yul/tests/ConstructorTest.exp index b51e33ba8fde2..4666b284b3fcd 100644 --- a/third_party/move/evm/move-to-yul/tests/ConstructorTest.exp +++ b/third_party/move/evm/move-to-yul/tests/ConstructorTest.exp @@ -23,14 +23,14 @@ object "A2_ConstructorTest" { mstore($locals, A2_Evm_sign($t3)) // $t4 := borrow_local($t2) $t4 := $MakePtr(false, $locals) - // $t5 := pack ConstructorTest::Balance($t0, $t1) + // $t5 := pack 0x2::ConstructorTest::Balance($t0, $t1) { let $mem := $Malloc(16) $MemoryStoreU64(add($mem, 0), value) $MemoryStoreU64(add($mem, 8), value2) $t5 := $mem } - // move_to($t5, $t4) + // move_to<0x2::ConstructorTest::Balance>($t5, $t4) { let $base_offset := $MakeTypeStorageBase(0, 0x91d9463a, $LoadU256($t4)) if $AlignedStorageLoad($base_offset) { @@ -212,7 +212,7 @@ object "A2_ConstructorTest" { let $t0, $t1, $t2, $t3 // $t0 := 0x42 $t0 := 0x42 - // $t1 := borrow_global($t0) + // $t1 := borrow_global<0x2::ConstructorTest::Balance>($t0) { let $base_offset := $MakeTypeStorageBase(0, 0x91d9463a, $t0) if iszero($AlignedStorageLoad($base_offset)) { @@ -220,7 +220,7 @@ object "A2_ConstructorTest" { } $t1 := $MakePtr(true, add($base_offset, 32)) } - // $t2 := borrow_field.value($t1) + // $t2 := borrow_field<0x2::ConstructorTest::Balance>.value($t1) $t2 := $t1 // $t3 := read_ref($t2) $t3 := $LoadU64($t2) diff --git a/third_party/move/evm/move-to-yul/tests/GlobalVectors.exp b/third_party/move/evm/move-to-yul/tests/GlobalVectors.exp index fcee1e13c2424..12db22c42d0a0 100644 --- a/third_party/move/evm/move-to-yul/tests/GlobalVectors.exp +++ b/third_party/move/evm/move-to-yul/tests/GlobalVectors.exp @@ -93,13 +93,13 @@ object "test_A2_GlobalVectors_test_borrow_mut_global" { $t10 := $MakePtr(false, add($locals, 32)) // $t11 := move($t2) $t11 := mload($locals) - // $t12 := pack GlobalVectors::T($t11) + // $t12 := pack 0x2::GlobalVectors::T($t11) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t11) $t12 := $mem } - // move_to>($t12, $t10) + // move_to<0x2::GlobalVectors::T>($t12, $t10) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $LoadU256($t10)) if $AlignedStorageLoad($base_offset) { @@ -128,7 +128,7 @@ object "test_A2_GlobalVectors_test_borrow_mut_global" { } // $t13 := 0x42 $t13 := 0x42 - // $t14 := borrow_global>($t13) + // $t14 := borrow_global<0x2::GlobalVectors::T>($t13) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t13) if iszero($AlignedStorageLoad($base_offset)) { @@ -136,7 +136,7 @@ object "test_A2_GlobalVectors_test_borrow_mut_global" { } $t14 := $MakePtr(true, add($base_offset, 32)) } - // $t15 := borrow_field>.v($t14) + // $t15 := borrow_field<0x2::GlobalVectors::T>.v($t14) $t15 := $t14 // $t16 := 0 $t16 := 0 @@ -148,7 +148,7 @@ object "test_A2_GlobalVectors_test_borrow_mut_global" { $StoreU64($t17, $t18) // $t19 := 0x42 $t19 := 0x42 - // $t20 := borrow_global>($t19) + // $t20 := borrow_global<0x2::GlobalVectors::T>($t19) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t19) if iszero($AlignedStorageLoad($base_offset)) { @@ -156,7 +156,7 @@ object "test_A2_GlobalVectors_test_borrow_mut_global" { } $t20 := $MakePtr(true, add($base_offset, 32)) } - // $t21 := borrow_field>.v($t20) + // $t21 := borrow_field<0x2::GlobalVectors::T>.v($t20) $t21 := $t20 // $t22 := 0 $t22 := 0 @@ -502,13 +502,13 @@ object "test_A2_GlobalVectors_test_move_from" { $t10 := $MakePtr(false, add($locals, 32)) // $t11 := move($t1) $t11 := mload($locals) - // $t12 := pack GlobalVectors::T($t11) + // $t12 := pack 0x2::GlobalVectors::T($t11) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t11) $t12 := $mem } - // move_to>($t12, $t10) + // move_to<0x2::GlobalVectors::T>($t12, $t10) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $LoadU256($t10)) if $AlignedStorageLoad($base_offset) { @@ -537,7 +537,7 @@ object "test_A2_GlobalVectors_test_move_from" { } // $t13 := 0x42 $t13 := 0x42 - // $t14 := move_from>($t13) + // $t14 := move_from<0x2::GlobalVectors::T>($t13) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t13) if iszero($AlignedStorageLoad($base_offset)) { @@ -569,7 +569,7 @@ object "test_A2_GlobalVectors_test_move_from" { $t14 := $dst } } - // $t2 := unpack GlobalVectors::T($t14) + // $t2 := unpack 0x2::GlobalVectors::T($t14) mstore(add($locals, 64), $MemoryLoadU256(add($t14, 0))) $Free($t14, 32) // $t15 := borrow_local($t2) @@ -1060,7 +1060,7 @@ object "test_A2_GlobalVectors_test_move_from_vector_of_struct" { $Abort($t25) } case 4 { - // $t2 := vector::empty() + // $t2 := vector::empty<0x2::GlobalVectors::S>() mstore($locals, A1_vector_empty$A2_GlobalVectors_S$()) // $t3 := borrow_local($t2) $t3 := $MakePtr(false, $locals) @@ -1068,14 +1068,14 @@ object "test_A2_GlobalVectors_test_move_from_vector_of_struct" { $t4 := 10 // $t5 := 40 $t5 := 40 - // $t6 := pack GlobalVectors::S($t4, $t5) + // $t6 := pack 0x2::GlobalVectors::S($t4, $t5) { let $mem := $Malloc(24) $MemoryStoreU128(add($mem, 0), $t4) $MemoryStoreU64(add($mem, 16), $t5) $t6 := $mem } - // vector::push_back($t3, $t6) + // vector::push_back<0x2::GlobalVectors::S>($t3, $t6) A1_vector_push_back$A2_GlobalVectors_S$($t3, $t6) // $t7 := borrow_local($t2) $t7 := $MakePtr(false, $locals) @@ -1083,14 +1083,14 @@ object "test_A2_GlobalVectors_test_move_from_vector_of_struct" { $t8 := 11 // $t9 := 41 $t9 := 41 - // $t10 := pack GlobalVectors::S($t8, $t9) + // $t10 := pack 0x2::GlobalVectors::S($t8, $t9) { let $mem := $Malloc(24) $MemoryStoreU128(add($mem, 0), $t8) $MemoryStoreU64(add($mem, 16), $t9) $t10 := $mem } - // vector::push_back($t7, $t10) + // vector::push_back<0x2::GlobalVectors::S>($t7, $t10) A1_vector_push_back$A2_GlobalVectors_S$($t7, $t10) // $t11 := borrow_local($t2) $t11 := $MakePtr(false, $locals) @@ -1098,14 +1098,14 @@ object "test_A2_GlobalVectors_test_move_from_vector_of_struct" { $t12 := 12 // $t13 := 42 $t13 := 42 - // $t14 := pack GlobalVectors::S($t12, $t13) + // $t14 := pack 0x2::GlobalVectors::S($t12, $t13) { let $mem := $Malloc(24) $MemoryStoreU128(add($mem, 0), $t12) $MemoryStoreU64(add($mem, 16), $t13) $t14 := $mem } - // vector::push_back($t11, $t14) + // vector::push_back<0x2::GlobalVectors::S>($t11, $t14) A1_vector_push_back$A2_GlobalVectors_S$($t11, $t14) // $t15 := 0x42 $t15 := 0x42 @@ -1115,13 +1115,13 @@ object "test_A2_GlobalVectors_test_move_from_vector_of_struct" { $t16 := $MakePtr(false, add($locals, 32)) // $t17 := move($t2) $t17 := mload($locals) - // $t18 := pack GlobalVectors::T($t17) + // $t18 := pack 0x2::GlobalVectors::T<0x2::GlobalVectors::S>($t17) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t17) $t18 := $mem } - // move_to>($t18, $t16) + // move_to<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>($t18, $t16) { let $base_offset := $MakeTypeStorageBase(0, 0x27c9b6b7, $LoadU256($t16)) if $AlignedStorageLoad($base_offset) { @@ -1156,7 +1156,7 @@ object "test_A2_GlobalVectors_test_move_from_vector_of_struct" { } // $t19 := 0x42 $t19 := 0x42 - // $t1 := move_from>($t19) + // $t1 := move_from<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>($t19) { let $base_offset := $MakeTypeStorageBase(0, 0x27c9b6b7, $t19) if iszero($AlignedStorageLoad($base_offset)) { @@ -1197,9 +1197,9 @@ object "test_A2_GlobalVectors_test_move_from_vector_of_struct" { } // $t20 := borrow_local($t1) $t20 := $MakePtr(false, local_t) - // $t21 := borrow_field>.v($t20) + // $t21 := borrow_field<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>.v($t20) $t21 := $t20 - // $t22 := vector::length($t21) + // $t22 := vector::length<0x2::GlobalVectors::S>($t21) $t22 := A1_vector_length$A2_GlobalVectors_S$($t21) // $t23 := 3 $t23 := 3 @@ -1214,13 +1214,13 @@ object "test_A2_GlobalVectors_test_move_from_vector_of_struct" { // label L2 // $t26 := borrow_local($t1) $t26 := $MakePtr(false, local_t) - // $t27 := borrow_field>.v($t26) + // $t27 := borrow_field<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>.v($t26) $t27 := $t26 // $t28 := 0 $t28 := 0 - // $t29 := vector::borrow($t27, $t28) + // $t29 := vector::borrow<0x2::GlobalVectors::S>($t27, $t28) $t29 := A1_vector_borrow$A2_GlobalVectors_S$($t27, $t28) - // $t30 := borrow_field.x($t29) + // $t30 := borrow_field<0x2::GlobalVectors::S>.x($t29) $t30 := $t29 // $t31 := read_ref($t30) $t31 := $LoadU128($t30) @@ -1249,13 +1249,13 @@ object "test_A2_GlobalVectors_test_move_from_vector_of_struct" { // label L5 // $t35 := borrow_local($t1) $t35 := $MakePtr(false, local_t) - // $t36 := borrow_field>.v($t35) + // $t36 := borrow_field<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>.v($t35) $t36 := $t35 // $t37 := 1 $t37 := 1 - // $t38 := vector::borrow($t36, $t37) + // $t38 := vector::borrow<0x2::GlobalVectors::S>($t36, $t37) $t38 := A1_vector_borrow$A2_GlobalVectors_S$($t36, $t37) - // $t39 := borrow_field.x($t38) + // $t39 := borrow_field<0x2::GlobalVectors::S>.x($t38) $t39 := $t38 // $t40 := read_ref($t39) $t40 := $LoadU128($t39) @@ -1284,13 +1284,13 @@ object "test_A2_GlobalVectors_test_move_from_vector_of_struct" { // label L8 // $t44 := borrow_local($t1) $t44 := $MakePtr(false, local_t) - // $t45 := borrow_field>.v($t44) + // $t45 := borrow_field<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>.v($t44) $t45 := $t44 // $t46 := 2 $t46 := 2 - // $t47 := vector::borrow($t45, $t46) + // $t47 := vector::borrow<0x2::GlobalVectors::S>($t45, $t46) $t47 := A1_vector_borrow$A2_GlobalVectors_S$($t45, $t46) - // $t48 := borrow_field.x($t47) + // $t48 := borrow_field<0x2::GlobalVectors::S>.x($t47) $t48 := $t47 // $t49 := read_ref($t48) $t49 := $LoadU128($t48) @@ -1685,13 +1685,13 @@ object "test_A2_GlobalVectors_test_move_from_vector_of_vector" { $t13 := $MakePtr(false, add($locals, 32)) // $t14 := move($t2) $t14 := mload($locals) - // $t15 := pack GlobalVectors::T>($t14) + // $t15 := pack 0x2::GlobalVectors::T>($t14) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t14) $t15 := $mem } - // move_to>>($t15, $t13) + // move_to<0x2::GlobalVectors::T>>($t15, $t13) { let $base_offset := $MakeTypeStorageBase(0, 0x9947b477, $LoadU256($t13)) if $AlignedStorageLoad($base_offset) { @@ -1733,7 +1733,7 @@ object "test_A2_GlobalVectors_test_move_from_vector_of_vector" { } // $t16 := 0x42 $t16 := 0x42 - // $t1 := move_from>>($t16) + // $t1 := move_from<0x2::GlobalVectors::T>>($t16) { let $base_offset := $MakeTypeStorageBase(0, 0x9947b477, $t16) if iszero($AlignedStorageLoad($base_offset)) { @@ -1783,7 +1783,7 @@ object "test_A2_GlobalVectors_test_move_from_vector_of_vector" { } // $t17 := borrow_local($t1) $t17 := $MakePtr(false, local_t) - // $t18 := borrow_field>>.v($t17) + // $t18 := borrow_field<0x2::GlobalVectors::T>>.v($t17) $t18 := $t17 // $t19 := vector::length>($t18) $t19 := A1_vector_length$vec$u64$$($t18) @@ -1800,7 +1800,7 @@ object "test_A2_GlobalVectors_test_move_from_vector_of_vector" { // label L2 // $t23 := borrow_local($t1) $t23 := $MakePtr(false, local_t) - // $t24 := borrow_field>>.v($t23) + // $t24 := borrow_field<0x2::GlobalVectors::T>>.v($t23) $t24 := $t23 // $t25 := 0 $t25 := 0 @@ -1837,7 +1837,7 @@ object "test_A2_GlobalVectors_test_move_from_vector_of_vector" { // label L5 // $t33 := borrow_local($t1) $t33 := $MakePtr(false, local_t) - // $t34 := borrow_field>>.v($t33) + // $t34 := borrow_field<0x2::GlobalVectors::T>>.v($t33) $t34 := $t33 // $t35 := 1 $t35 := 1 @@ -1874,7 +1874,7 @@ object "test_A2_GlobalVectors_test_move_from_vector_of_vector" { // label L8 // $t43 := borrow_local($t1) $t43 := $MakePtr(false, local_t) - // $t44 := borrow_field>>.v($t43) + // $t44 := borrow_field<0x2::GlobalVectors::T>>.v($t43) $t44 := $t43 // $t45 := 2 $t45 := 2 @@ -2298,13 +2298,13 @@ object "test_A2_GlobalVectors_test_move_to" { $t9 := $MakePtr(false, add($locals, 32)) // $t10 := move($t1) $t10 := mload($locals) - // $t11 := pack GlobalVectors::T($t10) + // $t11 := pack 0x2::GlobalVectors::T($t10) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t10) $t11 := $mem } - // move_to>($t11, $t9) + // move_to<0x2::GlobalVectors::T>($t11, $t9) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $LoadU256($t9)) if $AlignedStorageLoad($base_offset) { @@ -2333,7 +2333,7 @@ object "test_A2_GlobalVectors_test_move_to" { } // $t12 := 0x42 $t12 := 0x42 - // $t13 := borrow_global>($t12) + // $t13 := borrow_global<0x2::GlobalVectors::T>($t12) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t12) if iszero($AlignedStorageLoad($base_offset)) { @@ -2341,7 +2341,7 @@ object "test_A2_GlobalVectors_test_move_to" { } $t13 := $MakePtr(true, add($base_offset, 32)) } - // $t14 := borrow_field>.v($t13) + // $t14 := borrow_field<0x2::GlobalVectors::T>.v($t13) $t14 := $t13 // $t15 := vector::length($t14) $t15 := A1_vector_length$u64$($t14) @@ -2358,7 +2358,7 @@ object "test_A2_GlobalVectors_test_move_to" { // label L2 // $t19 := 0x42 $t19 := 0x42 - // $t20 := borrow_global>($t19) + // $t20 := borrow_global<0x2::GlobalVectors::T>($t19) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t19) if iszero($AlignedStorageLoad($base_offset)) { @@ -2366,7 +2366,7 @@ object "test_A2_GlobalVectors_test_move_to" { } $t20 := $MakePtr(true, add($base_offset, 32)) } - // $t21 := borrow_field>.v($t20) + // $t21 := borrow_field<0x2::GlobalVectors::T>.v($t20) $t21 := $t20 // $t22 := 0 $t22 := 0 @@ -2399,7 +2399,7 @@ object "test_A2_GlobalVectors_test_move_to" { // label L5 // $t28 := 0x42 $t28 := 0x42 - // $t29 := borrow_global>($t28) + // $t29 := borrow_global<0x2::GlobalVectors::T>($t28) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t28) if iszero($AlignedStorageLoad($base_offset)) { @@ -2407,7 +2407,7 @@ object "test_A2_GlobalVectors_test_move_to" { } $t29 := $MakePtr(true, add($base_offset, 32)) } - // $t30 := borrow_field>.v($t29) + // $t30 := borrow_field<0x2::GlobalVectors::T>.v($t29) $t30 := $t29 // $t31 := 1 $t31 := 1 @@ -2440,7 +2440,7 @@ object "test_A2_GlobalVectors_test_move_to" { // label L8 // $t37 := 0x42 $t37 := 0x42 - // $t38 := borrow_global>($t37) + // $t38 := borrow_global<0x2::GlobalVectors::T>($t37) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t37) if iszero($AlignedStorageLoad($base_offset)) { @@ -2448,7 +2448,7 @@ object "test_A2_GlobalVectors_test_move_to" { } $t38 := $MakePtr(true, add($base_offset, 32)) } - // $t39 := borrow_field>.v($t38) + // $t39 := borrow_field<0x2::GlobalVectors::T>.v($t38) $t39 := $t38 // $t40 := 2 $t40 := 2 @@ -2776,7 +2776,7 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_struct" { $Abort($t24) } case 4 { - // $t1 := vector::empty() + // $t1 := vector::empty<0x2::GlobalVectors::S>() mstore($locals, A1_vector_empty$A2_GlobalVectors_S$()) // $t2 := borrow_local($t1) $t2 := $MakePtr(false, $locals) @@ -2784,14 +2784,14 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_struct" { $t3 := 10 // $t4 := 40 $t4 := 40 - // $t5 := pack GlobalVectors::S($t3, $t4) + // $t5 := pack 0x2::GlobalVectors::S($t3, $t4) { let $mem := $Malloc(24) $MemoryStoreU128(add($mem, 0), $t3) $MemoryStoreU64(add($mem, 16), $t4) $t5 := $mem } - // vector::push_back($t2, $t5) + // vector::push_back<0x2::GlobalVectors::S>($t2, $t5) A1_vector_push_back$A2_GlobalVectors_S$($t2, $t5) // $t6 := borrow_local($t1) $t6 := $MakePtr(false, $locals) @@ -2799,14 +2799,14 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_struct" { $t7 := 11 // $t8 := 41 $t8 := 41 - // $t9 := pack GlobalVectors::S($t7, $t8) + // $t9 := pack 0x2::GlobalVectors::S($t7, $t8) { let $mem := $Malloc(24) $MemoryStoreU128(add($mem, 0), $t7) $MemoryStoreU64(add($mem, 16), $t8) $t9 := $mem } - // vector::push_back($t6, $t9) + // vector::push_back<0x2::GlobalVectors::S>($t6, $t9) A1_vector_push_back$A2_GlobalVectors_S$($t6, $t9) // $t10 := borrow_local($t1) $t10 := $MakePtr(false, $locals) @@ -2814,14 +2814,14 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_struct" { $t11 := 12 // $t12 := 42 $t12 := 42 - // $t13 := pack GlobalVectors::S($t11, $t12) + // $t13 := pack 0x2::GlobalVectors::S($t11, $t12) { let $mem := $Malloc(24) $MemoryStoreU128(add($mem, 0), $t11) $MemoryStoreU64(add($mem, 16), $t12) $t13 := $mem } - // vector::push_back($t10, $t13) + // vector::push_back<0x2::GlobalVectors::S>($t10, $t13) A1_vector_push_back$A2_GlobalVectors_S$($t10, $t13) // $t14 := 0x42 $t14 := 0x42 @@ -2831,13 +2831,13 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_struct" { $t15 := $MakePtr(false, add($locals, 32)) // $t16 := move($t1) $t16 := mload($locals) - // $t17 := pack GlobalVectors::T($t16) + // $t17 := pack 0x2::GlobalVectors::T<0x2::GlobalVectors::S>($t16) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t16) $t17 := $mem } - // move_to>($t17, $t15) + // move_to<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>($t17, $t15) { let $base_offset := $MakeTypeStorageBase(0, 0x27c9b6b7, $LoadU256($t15)) if $AlignedStorageLoad($base_offset) { @@ -2872,7 +2872,7 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_struct" { } // $t18 := 0x42 $t18 := 0x42 - // $t19 := borrow_global>($t18) + // $t19 := borrow_global<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>($t18) { let $base_offset := $MakeTypeStorageBase(0, 0x27c9b6b7, $t18) if iszero($AlignedStorageLoad($base_offset)) { @@ -2880,9 +2880,9 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_struct" { } $t19 := $MakePtr(true, add($base_offset, 32)) } - // $t20 := borrow_field>.v($t19) + // $t20 := borrow_field<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>.v($t19) $t20 := $t19 - // $t21 := vector::length($t20) + // $t21 := vector::length<0x2::GlobalVectors::S>($t20) $t21 := A1_vector_length$A2_GlobalVectors_S$($t20) // $t22 := 3 $t22 := 3 @@ -2897,7 +2897,7 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_struct" { // label L2 // $t25 := 0x42 $t25 := 0x42 - // $t26 := borrow_global>($t25) + // $t26 := borrow_global<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>($t25) { let $base_offset := $MakeTypeStorageBase(0, 0x27c9b6b7, $t25) if iszero($AlignedStorageLoad($base_offset)) { @@ -2905,13 +2905,13 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_struct" { } $t26 := $MakePtr(true, add($base_offset, 32)) } - // $t27 := borrow_field>.v($t26) + // $t27 := borrow_field<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>.v($t26) $t27 := $t26 // $t28 := 0 $t28 := 0 - // $t29 := vector::borrow($t27, $t28) + // $t29 := vector::borrow<0x2::GlobalVectors::S>($t27, $t28) $t29 := A1_vector_borrow$A2_GlobalVectors_S$($t27, $t28) - // $t30 := borrow_field.x($t29) + // $t30 := borrow_field<0x2::GlobalVectors::S>.x($t29) $t30 := $t29 // $t31 := read_ref($t30) $t31 := $LoadU128($t30) @@ -2940,7 +2940,7 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_struct" { // label L5 // $t35 := 0x42 $t35 := 0x42 - // $t36 := borrow_global>($t35) + // $t36 := borrow_global<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>($t35) { let $base_offset := $MakeTypeStorageBase(0, 0x27c9b6b7, $t35) if iszero($AlignedStorageLoad($base_offset)) { @@ -2948,13 +2948,13 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_struct" { } $t36 := $MakePtr(true, add($base_offset, 32)) } - // $t37 := borrow_field>.v($t36) + // $t37 := borrow_field<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>.v($t36) $t37 := $t36 // $t38 := 1 $t38 := 1 - // $t39 := vector::borrow($t37, $t38) + // $t39 := vector::borrow<0x2::GlobalVectors::S>($t37, $t38) $t39 := A1_vector_borrow$A2_GlobalVectors_S$($t37, $t38) - // $t40 := borrow_field.x($t39) + // $t40 := borrow_field<0x2::GlobalVectors::S>.x($t39) $t40 := $t39 // $t41 := read_ref($t40) $t41 := $LoadU128($t40) @@ -2983,7 +2983,7 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_struct" { // label L8 // $t45 := 0x42 $t45 := 0x42 - // $t46 := borrow_global>($t45) + // $t46 := borrow_global<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>($t45) { let $base_offset := $MakeTypeStorageBase(0, 0x27c9b6b7, $t45) if iszero($AlignedStorageLoad($base_offset)) { @@ -2991,13 +2991,13 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_struct" { } $t46 := $MakePtr(true, add($base_offset, 32)) } - // $t47 := borrow_field>.v($t46) + // $t47 := borrow_field<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>.v($t46) $t47 := $t46 // $t48 := 2 $t48 := 2 - // $t49 := vector::borrow($t47, $t48) + // $t49 := vector::borrow<0x2::GlobalVectors::S>($t47, $t48) $t49 := A1_vector_borrow$A2_GlobalVectors_S$($t47, $t48) - // $t50 := borrow_field.x($t49) + // $t50 := borrow_field<0x2::GlobalVectors::S>.x($t49) $t50 := $t49 // $t51 := read_ref($t50) $t51 := $LoadU128($t50) @@ -3383,13 +3383,13 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_vector" { $t12 := $MakePtr(false, add($locals, 32)) // $t13 := move($t1) $t13 := mload($locals) - // $t14 := pack GlobalVectors::T>($t13) + // $t14 := pack 0x2::GlobalVectors::T>($t13) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t13) $t14 := $mem } - // move_to>>($t14, $t12) + // move_to<0x2::GlobalVectors::T>>($t14, $t12) { let $base_offset := $MakeTypeStorageBase(0, 0x9947b477, $LoadU256($t12)) if $AlignedStorageLoad($base_offset) { @@ -3431,7 +3431,7 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_vector" { } // $t15 := 0x42 $t15 := 0x42 - // $t16 := borrow_global>>($t15) + // $t16 := borrow_global<0x2::GlobalVectors::T>>($t15) { let $base_offset := $MakeTypeStorageBase(0, 0x9947b477, $t15) if iszero($AlignedStorageLoad($base_offset)) { @@ -3439,7 +3439,7 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_vector" { } $t16 := $MakePtr(true, add($base_offset, 32)) } - // $t17 := borrow_field>>.v($t16) + // $t17 := borrow_field<0x2::GlobalVectors::T>>.v($t16) $t17 := $t16 // $t18 := vector::length>($t17) $t18 := A1_vector_length$vec$u64$$($t17) @@ -3456,7 +3456,7 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_vector" { // label L2 // $t22 := 0x42 $t22 := 0x42 - // $t23 := borrow_global>>($t22) + // $t23 := borrow_global<0x2::GlobalVectors::T>>($t22) { let $base_offset := $MakeTypeStorageBase(0, 0x9947b477, $t22) if iszero($AlignedStorageLoad($base_offset)) { @@ -3464,7 +3464,7 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_vector" { } $t23 := $MakePtr(true, add($base_offset, 32)) } - // $t24 := borrow_field>>.v($t23) + // $t24 := borrow_field<0x2::GlobalVectors::T>>.v($t23) $t24 := $t23 // $t25 := 0 $t25 := 0 @@ -3501,7 +3501,7 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_vector" { // label L5 // $t33 := 0x42 $t33 := 0x42 - // $t34 := borrow_global>>($t33) + // $t34 := borrow_global<0x2::GlobalVectors::T>>($t33) { let $base_offset := $MakeTypeStorageBase(0, 0x9947b477, $t33) if iszero($AlignedStorageLoad($base_offset)) { @@ -3509,7 +3509,7 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_vector" { } $t34 := $MakePtr(true, add($base_offset, 32)) } - // $t35 := borrow_field>>.v($t34) + // $t35 := borrow_field<0x2::GlobalVectors::T>>.v($t34) $t35 := $t34 // $t36 := 1 $t36 := 1 @@ -3546,7 +3546,7 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_vector" { // label L8 // $t44 := 0x42 $t44 := 0x42 - // $t45 := borrow_global>>($t44) + // $t45 := borrow_global<0x2::GlobalVectors::T>>($t44) { let $base_offset := $MakeTypeStorageBase(0, 0x9947b477, $t44) if iszero($AlignedStorageLoad($base_offset)) { @@ -3554,7 +3554,7 @@ object "test_A2_GlobalVectors_test_move_to_vector_of_vector" { } $t45 := $MakePtr(true, add($base_offset, 32)) } - // $t46 := borrow_field>>.v($t45) + // $t46 := borrow_field<0x2::GlobalVectors::T>>.v($t45) $t46 := $t45 // $t47 := 2 $t47 := 2 @@ -3969,13 +3969,13 @@ object "test_A2_GlobalVectors_test_pop_back_global" { $t9 := $MakePtr(false, add($locals, 32)) // $t10 := move($t1) $t10 := mload($locals) - // $t11 := pack GlobalVectors::T($t10) + // $t11 := pack 0x2::GlobalVectors::T($t10) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t10) $t11 := $mem } - // move_to>($t11, $t9) + // move_to<0x2::GlobalVectors::T>($t11, $t9) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $LoadU256($t9)) if $AlignedStorageLoad($base_offset) { @@ -4004,7 +4004,7 @@ object "test_A2_GlobalVectors_test_pop_back_global" { } // $t12 := 0x42 $t12 := 0x42 - // $t13 := borrow_global>($t12) + // $t13 := borrow_global<0x2::GlobalVectors::T>($t12) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t12) if iszero($AlignedStorageLoad($base_offset)) { @@ -4012,7 +4012,7 @@ object "test_A2_GlobalVectors_test_pop_back_global" { } $t13 := $MakePtr(true, add($base_offset, 32)) } - // $t14 := borrow_field>.v($t13) + // $t14 := borrow_field<0x2::GlobalVectors::T>.v($t13) $t14 := $t13 // $t15 := vector::pop_back($t14) $t15 := A1_vector_pop_back$u64$($t14) @@ -4029,7 +4029,7 @@ object "test_A2_GlobalVectors_test_pop_back_global" { // label L2 // $t19 := 0x42 $t19 := 0x42 - // $t20 := borrow_global>($t19) + // $t20 := borrow_global<0x2::GlobalVectors::T>($t19) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t19) if iszero($AlignedStorageLoad($base_offset)) { @@ -4037,7 +4037,7 @@ object "test_A2_GlobalVectors_test_pop_back_global" { } $t20 := $MakePtr(true, add($base_offset, 32)) } - // $t21 := borrow_field>.v($t20) + // $t21 := borrow_field<0x2::GlobalVectors::T>.v($t20) $t21 := $t20 // $t22 := vector::length($t21) $t22 := A1_vector_length$u64$($t21) @@ -4066,7 +4066,7 @@ object "test_A2_GlobalVectors_test_pop_back_global" { // label L5 // $t26 := 0x42 $t26 := 0x42 - // $t27 := borrow_global>($t26) + // $t27 := borrow_global<0x2::GlobalVectors::T>($t26) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t26) if iszero($AlignedStorageLoad($base_offset)) { @@ -4074,7 +4074,7 @@ object "test_A2_GlobalVectors_test_pop_back_global" { } $t27 := $MakePtr(true, add($base_offset, 32)) } - // $t28 := borrow_field>.v($t27) + // $t28 := borrow_field<0x2::GlobalVectors::T>.v($t27) $t28 := $t27 // $t29 := vector::pop_back($t28) $t29 := A1_vector_pop_back$u64$($t28) @@ -4103,7 +4103,7 @@ object "test_A2_GlobalVectors_test_pop_back_global" { // label L8 // $t33 := 0x42 $t33 := 0x42 - // $t34 := borrow_global>($t33) + // $t34 := borrow_global<0x2::GlobalVectors::T>($t33) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t33) if iszero($AlignedStorageLoad($base_offset)) { @@ -4111,7 +4111,7 @@ object "test_A2_GlobalVectors_test_pop_back_global" { } $t34 := $MakePtr(true, add($base_offset, 32)) } - // $t35 := borrow_field>.v($t34) + // $t35 := borrow_field<0x2::GlobalVectors::T>.v($t34) $t35 := $t34 // $t36 := vector::length($t35) $t36 := A1_vector_length$u64$($t35) @@ -4425,7 +4425,7 @@ object "test_A2_GlobalVectors_test_pop_back_struct_global" { // label L1 // $t29 := borrow_local($t3) $t29 := $MakePtr(false, e) - // $t30 := borrow_field.y($t29) + // $t30 := borrow_field<0x2::GlobalVectors::S>.y($t29) $t30 := $IndexPtr($t29, 16) // $t31 := read_ref($t30) $t31 := $LoadU64($t30) @@ -4446,7 +4446,7 @@ object "test_A2_GlobalVectors_test_pop_back_struct_global" { $block := 5 } case 4 { - // $t4 := vector::empty() + // $t4 := vector::empty<0x2::GlobalVectors::S>() mstore($locals, A1_vector_empty$A2_GlobalVectors_S$()) // $t5 := borrow_local($t4) $t5 := $MakePtr(false, $locals) @@ -4454,14 +4454,14 @@ object "test_A2_GlobalVectors_test_pop_back_struct_global" { $t6 := 10 // $t7 := 40 $t7 := 40 - // $t8 := pack GlobalVectors::S($t6, $t7) + // $t8 := pack 0x2::GlobalVectors::S($t6, $t7) { let $mem := $Malloc(24) $MemoryStoreU128(add($mem, 0), $t6) $MemoryStoreU64(add($mem, 16), $t7) $t8 := $mem } - // vector::push_back($t5, $t8) + // vector::push_back<0x2::GlobalVectors::S>($t5, $t8) A1_vector_push_back$A2_GlobalVectors_S$($t5, $t8) // $t9 := borrow_local($t4) $t9 := $MakePtr(false, $locals) @@ -4469,14 +4469,14 @@ object "test_A2_GlobalVectors_test_pop_back_struct_global" { $t10 := 11 // $t11 := 41 $t11 := 41 - // $t12 := pack GlobalVectors::S($t10, $t11) + // $t12 := pack 0x2::GlobalVectors::S($t10, $t11) { let $mem := $Malloc(24) $MemoryStoreU128(add($mem, 0), $t10) $MemoryStoreU64(add($mem, 16), $t11) $t12 := $mem } - // vector::push_back($t9, $t12) + // vector::push_back<0x2::GlobalVectors::S>($t9, $t12) A1_vector_push_back$A2_GlobalVectors_S$($t9, $t12) // $t13 := borrow_local($t4) $t13 := $MakePtr(false, $locals) @@ -4484,14 +4484,14 @@ object "test_A2_GlobalVectors_test_pop_back_struct_global" { $t14 := 12 // $t15 := 42 $t15 := 42 - // $t16 := pack GlobalVectors::S($t14, $t15) + // $t16 := pack 0x2::GlobalVectors::S($t14, $t15) { let $mem := $Malloc(24) $MemoryStoreU128(add($mem, 0), $t14) $MemoryStoreU64(add($mem, 16), $t15) $t16 := $mem } - // vector::push_back($t13, $t16) + // vector::push_back<0x2::GlobalVectors::S>($t13, $t16) A1_vector_push_back$A2_GlobalVectors_S$($t13, $t16) // $t17 := 0x42 $t17 := 0x42 @@ -4501,13 +4501,13 @@ object "test_A2_GlobalVectors_test_pop_back_struct_global" { $t18 := $MakePtr(false, add($locals, 32)) // $t19 := move($t4) $t19 := mload($locals) - // $t20 := pack GlobalVectors::T($t19) + // $t20 := pack 0x2::GlobalVectors::T<0x2::GlobalVectors::S>($t19) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t19) $t20 := $mem } - // move_to>($t20, $t18) + // move_to<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>($t20, $t18) { let $base_offset := $MakeTypeStorageBase(0, 0x27c9b6b7, $LoadU256($t18)) if $AlignedStorageLoad($base_offset) { @@ -4542,7 +4542,7 @@ object "test_A2_GlobalVectors_test_pop_back_struct_global" { } // $t21 := 0x42 $t21 := 0x42 - // $t22 := borrow_global>($t21) + // $t22 := borrow_global<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>($t21) { let $base_offset := $MakeTypeStorageBase(0, 0x27c9b6b7, $t21) if iszero($AlignedStorageLoad($base_offset)) { @@ -4550,13 +4550,13 @@ object "test_A2_GlobalVectors_test_pop_back_struct_global" { } $t22 := $MakePtr(true, add($base_offset, 32)) } - // $t23 := borrow_field>.v($t22) + // $t23 := borrow_field<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>.v($t22) $t23 := $t22 - // $t3 := vector::pop_back($t23) + // $t3 := vector::pop_back<0x2::GlobalVectors::S>($t23) e := A1_vector_pop_back$A2_GlobalVectors_S$($t23) // $t24 := borrow_local($t3) $t24 := $MakePtr(false, e) - // $t25 := borrow_field.x($t24) + // $t25 := borrow_field<0x2::GlobalVectors::S>.x($t24) $t25 := $t24 // $t26 := read_ref($t25) $t26 := $LoadU128($t25) @@ -4592,7 +4592,7 @@ object "test_A2_GlobalVectors_test_pop_back_struct_global" { // label L5 // $t35 := 0x42 $t35 := 0x42 - // $t36 := borrow_global>($t35) + // $t36 := borrow_global<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>($t35) { let $base_offset := $MakeTypeStorageBase(0, 0x27c9b6b7, $t35) if iszero($AlignedStorageLoad($base_offset)) { @@ -4600,9 +4600,9 @@ object "test_A2_GlobalVectors_test_pop_back_struct_global" { } $t36 := $MakePtr(true, add($base_offset, 32)) } - // $t37 := borrow_field>.v($t36) + // $t37 := borrow_field<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>.v($t36) $t37 := $t36 - // $t38 := vector::length($t37) + // $t38 := vector::length<0x2::GlobalVectors::S>($t37) $t38 := A1_vector_length$A2_GlobalVectors_S$($t37) // $t39 := 2 $t39 := 2 @@ -4629,7 +4629,7 @@ object "test_A2_GlobalVectors_test_pop_back_struct_global" { // label L8 // $t42 := 0x42 $t42 := 0x42 - // $t43 := borrow_global>($t42) + // $t43 := borrow_global<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>($t42) { let $base_offset := $MakeTypeStorageBase(0, 0x27c9b6b7, $t42) if iszero($AlignedStorageLoad($base_offset)) { @@ -4637,13 +4637,13 @@ object "test_A2_GlobalVectors_test_pop_back_struct_global" { } $t43 := $MakePtr(true, add($base_offset, 32)) } - // $t44 := borrow_field>.v($t43) + // $t44 := borrow_field<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>.v($t43) $t44 := $t43 - // $t3 := vector::pop_back($t44) + // $t3 := vector::pop_back<0x2::GlobalVectors::S>($t44) e := A1_vector_pop_back$A2_GlobalVectors_S$($t44) // $t45 := borrow_local($t3) $t45 := $MakePtr(false, e) - // $t46 := borrow_field.x($t45) + // $t46 := borrow_field<0x2::GlobalVectors::S>.x($t45) $t46 := $t45 // $t47 := read_ref($t46) $t47 := $LoadU128($t46) @@ -4660,7 +4660,7 @@ object "test_A2_GlobalVectors_test_pop_back_struct_global" { // label L10 // $t50 := borrow_local($t3) $t50 := $MakePtr(false, e) - // $t51 := borrow_field.y($t50) + // $t51 := borrow_field<0x2::GlobalVectors::S>.y($t50) $t51 := $IndexPtr($t50, 16) // $t52 := read_ref($t51) $t52 := $LoadU64($t51) @@ -4703,7 +4703,7 @@ object "test_A2_GlobalVectors_test_pop_back_struct_global" { // label L14 // $t56 := 0x42 $t56 := 0x42 - // $t57 := borrow_global>($t56) + // $t57 := borrow_global<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>($t56) { let $base_offset := $MakeTypeStorageBase(0, 0x27c9b6b7, $t56) if iszero($AlignedStorageLoad($base_offset)) { @@ -4711,9 +4711,9 @@ object "test_A2_GlobalVectors_test_pop_back_struct_global" { } $t57 := $MakePtr(true, add($base_offset, 32)) } - // $t58 := borrow_field>.v($t57) + // $t58 := borrow_field<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>.v($t57) $t58 := $t57 - // $t59 := vector::length($t58) + // $t59 := vector::length<0x2::GlobalVectors::S>($t58) $t59 := A1_vector_length$A2_GlobalVectors_S$($t58) // $t60 := 1 $t60 := 1 @@ -5096,13 +5096,13 @@ object "test_A2_GlobalVectors_test_push_back_global" { $t9 := $MakePtr(false, add($locals, 32)) // $t10 := copy($t1) $t10 := mload($locals) - // $t11 := pack GlobalVectors::T($t10) + // $t11 := pack 0x2::GlobalVectors::T($t10) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t10) $t11 := $mem } - // move_to>($t11, $t9) + // move_to<0x2::GlobalVectors::T>($t11, $t9) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $LoadU256($t9)) if $AlignedStorageLoad($base_offset) { @@ -5131,7 +5131,7 @@ object "test_A2_GlobalVectors_test_push_back_global" { } // $t12 := 0x42 $t12 := 0x42 - // $t13 := borrow_global>($t12) + // $t13 := borrow_global<0x2::GlobalVectors::T>($t12) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t12) if iszero($AlignedStorageLoad($base_offset)) { @@ -5139,7 +5139,7 @@ object "test_A2_GlobalVectors_test_push_back_global" { } $t13 := $MakePtr(true, add($base_offset, 32)) } - // $t14 := borrow_field>.v($t13) + // $t14 := borrow_field<0x2::GlobalVectors::T>.v($t13) $t14 := $t13 // $t15 := 13 $t15 := 13 @@ -5147,7 +5147,7 @@ object "test_A2_GlobalVectors_test_push_back_global" { A1_vector_push_back$u64$($t14, $t15) // $t16 := 0x42 $t16 := 0x42 - // $t17 := borrow_global>($t16) + // $t17 := borrow_global<0x2::GlobalVectors::T>($t16) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t16) if iszero($AlignedStorageLoad($base_offset)) { @@ -5155,7 +5155,7 @@ object "test_A2_GlobalVectors_test_push_back_global" { } $t17 := $MakePtr(true, add($base_offset, 32)) } - // $t18 := borrow_field>.v($t17) + // $t18 := borrow_field<0x2::GlobalVectors::T>.v($t17) $t18 := $t17 // $t19 := 14 $t19 := 14 @@ -5163,7 +5163,7 @@ object "test_A2_GlobalVectors_test_push_back_global" { A1_vector_push_back$u64$($t18, $t19) // $t20 := 0x42 $t20 := 0x42 - // $t21 := borrow_global>($t20) + // $t21 := borrow_global<0x2::GlobalVectors::T>($t20) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t20) if iszero($AlignedStorageLoad($base_offset)) { @@ -5171,7 +5171,7 @@ object "test_A2_GlobalVectors_test_push_back_global" { } $t21 := $MakePtr(true, add($base_offset, 32)) } - // $t22 := borrow_field>.v($t21) + // $t22 := borrow_field<0x2::GlobalVectors::T>.v($t21) $t22 := $t21 // $t23 := vector::length($t22) $t23 := A1_vector_length$u64$($t22) @@ -5188,7 +5188,7 @@ object "test_A2_GlobalVectors_test_push_back_global" { // label L2 // $t27 := 0x42 $t27 := 0x42 - // $t28 := borrow_global>($t27) + // $t28 := borrow_global<0x2::GlobalVectors::T>($t27) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t27) if iszero($AlignedStorageLoad($base_offset)) { @@ -5196,7 +5196,7 @@ object "test_A2_GlobalVectors_test_push_back_global" { } $t28 := $MakePtr(true, add($base_offset, 32)) } - // $t29 := borrow_field>.v($t28) + // $t29 := borrow_field<0x2::GlobalVectors::T>.v($t28) $t29 := $t28 // $t30 := 0 $t30 := 0 @@ -5229,7 +5229,7 @@ object "test_A2_GlobalVectors_test_push_back_global" { // label L5 // $t36 := 0x42 $t36 := 0x42 - // $t37 := borrow_global>($t36) + // $t37 := borrow_global<0x2::GlobalVectors::T>($t36) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t36) if iszero($AlignedStorageLoad($base_offset)) { @@ -5237,7 +5237,7 @@ object "test_A2_GlobalVectors_test_push_back_global" { } $t37 := $MakePtr(true, add($base_offset, 32)) } - // $t38 := borrow_field>.v($t37) + // $t38 := borrow_field<0x2::GlobalVectors::T>.v($t37) $t38 := $t37 // $t39 := 1 $t39 := 1 @@ -5270,7 +5270,7 @@ object "test_A2_GlobalVectors_test_push_back_global" { // label L8 // $t45 := 0x42 $t45 := 0x42 - // $t46 := borrow_global>($t45) + // $t46 := borrow_global<0x2::GlobalVectors::T>($t45) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t45) if iszero($AlignedStorageLoad($base_offset)) { @@ -5278,7 +5278,7 @@ object "test_A2_GlobalVectors_test_push_back_global" { } $t46 := $MakePtr(true, add($base_offset, 32)) } - // $t47 := borrow_field>.v($t46) + // $t47 := borrow_field<0x2::GlobalVectors::T>.v($t46) $t47 := $t46 // $t48 := 2 $t48 := 2 @@ -5311,7 +5311,7 @@ object "test_A2_GlobalVectors_test_push_back_global" { // label L11 // $t54 := 0x42 $t54 := 0x42 - // $t55 := borrow_global>($t54) + // $t55 := borrow_global<0x2::GlobalVectors::T>($t54) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t54) if iszero($AlignedStorageLoad($base_offset)) { @@ -5319,7 +5319,7 @@ object "test_A2_GlobalVectors_test_push_back_global" { } $t55 := $MakePtr(true, add($base_offset, 32)) } - // $t56 := borrow_field>.v($t55) + // $t56 := borrow_field<0x2::GlobalVectors::T>.v($t55) $t56 := $t55 // $t57 := 3 $t57 := 3 @@ -5352,7 +5352,7 @@ object "test_A2_GlobalVectors_test_push_back_global" { // label L14 // $t63 := 0x42 $t63 := 0x42 - // $t64 := borrow_global>($t63) + // $t64 := borrow_global<0x2::GlobalVectors::T>($t63) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t63) if iszero($AlignedStorageLoad($base_offset)) { @@ -5360,7 +5360,7 @@ object "test_A2_GlobalVectors_test_push_back_global" { } $t64 := $MakePtr(true, add($base_offset, 32)) } - // $t65 := borrow_field>.v($t64) + // $t65 := borrow_field<0x2::GlobalVectors::T>.v($t64) $t65 := $t64 // $t66 := 4 $t66 := 4 @@ -5688,7 +5688,7 @@ object "test_A2_GlobalVectors_test_push_back_struct_global" { $Abort($t36) } case 4 { - // $t1 := vector::empty() + // $t1 := vector::empty<0x2::GlobalVectors::S>() mstore($locals, A1_vector_empty$A2_GlobalVectors_S$()) // $t2 := borrow_local($t1) $t2 := $MakePtr(false, $locals) @@ -5696,14 +5696,14 @@ object "test_A2_GlobalVectors_test_push_back_struct_global" { $t3 := 10 // $t4 := 40 $t4 := 40 - // $t5 := pack GlobalVectors::S($t3, $t4) + // $t5 := pack 0x2::GlobalVectors::S($t3, $t4) { let $mem := $Malloc(24) $MemoryStoreU128(add($mem, 0), $t3) $MemoryStoreU64(add($mem, 16), $t4) $t5 := $mem } - // vector::push_back($t2, $t5) + // vector::push_back<0x2::GlobalVectors::S>($t2, $t5) A1_vector_push_back$A2_GlobalVectors_S$($t2, $t5) // $t6 := borrow_local($t1) $t6 := $MakePtr(false, $locals) @@ -5711,14 +5711,14 @@ object "test_A2_GlobalVectors_test_push_back_struct_global" { $t7 := 11 // $t8 := 41 $t8 := 41 - // $t9 := pack GlobalVectors::S($t7, $t8) + // $t9 := pack 0x2::GlobalVectors::S($t7, $t8) { let $mem := $Malloc(24) $MemoryStoreU128(add($mem, 0), $t7) $MemoryStoreU64(add($mem, 16), $t8) $t9 := $mem } - // vector::push_back($t6, $t9) + // vector::push_back<0x2::GlobalVectors::S>($t6, $t9) A1_vector_push_back$A2_GlobalVectors_S$($t6, $t9) // $t10 := borrow_local($t1) $t10 := $MakePtr(false, $locals) @@ -5726,14 +5726,14 @@ object "test_A2_GlobalVectors_test_push_back_struct_global" { $t11 := 12 // $t12 := 42 $t12 := 42 - // $t13 := pack GlobalVectors::S($t11, $t12) + // $t13 := pack 0x2::GlobalVectors::S($t11, $t12) { let $mem := $Malloc(24) $MemoryStoreU128(add($mem, 0), $t11) $MemoryStoreU64(add($mem, 16), $t12) $t13 := $mem } - // vector::push_back($t10, $t13) + // vector::push_back<0x2::GlobalVectors::S>($t10, $t13) A1_vector_push_back$A2_GlobalVectors_S$($t10, $t13) // $t14 := 0x42 $t14 := 0x42 @@ -5743,13 +5743,13 @@ object "test_A2_GlobalVectors_test_push_back_struct_global" { $t15 := $MakePtr(false, add($locals, 32)) // $t16 := move($t1) $t16 := mload($locals) - // $t17 := pack GlobalVectors::T($t16) + // $t17 := pack 0x2::GlobalVectors::T<0x2::GlobalVectors::S>($t16) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t16) $t17 := $mem } - // move_to>($t17, $t15) + // move_to<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>($t17, $t15) { let $base_offset := $MakeTypeStorageBase(0, 0x27c9b6b7, $LoadU256($t15)) if $AlignedStorageLoad($base_offset) { @@ -5784,7 +5784,7 @@ object "test_A2_GlobalVectors_test_push_back_struct_global" { } // $t18 := 0x42 $t18 := 0x42 - // $t19 := borrow_global>($t18) + // $t19 := borrow_global<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>($t18) { let $base_offset := $MakeTypeStorageBase(0, 0x27c9b6b7, $t18) if iszero($AlignedStorageLoad($base_offset)) { @@ -5792,24 +5792,24 @@ object "test_A2_GlobalVectors_test_push_back_struct_global" { } $t19 := $MakePtr(true, add($base_offset, 32)) } - // $t20 := borrow_field>.v($t19) + // $t20 := borrow_field<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>.v($t19) $t20 := $t19 // $t21 := 13 $t21 := 13 // $t22 := 43 $t22 := 43 - // $t23 := pack GlobalVectors::S($t21, $t22) + // $t23 := pack 0x2::GlobalVectors::S($t21, $t22) { let $mem := $Malloc(24) $MemoryStoreU128(add($mem, 0), $t21) $MemoryStoreU64(add($mem, 16), $t22) $t23 := $mem } - // vector::push_back($t20, $t23) + // vector::push_back<0x2::GlobalVectors::S>($t20, $t23) A1_vector_push_back$A2_GlobalVectors_S$($t20, $t23) // $t24 := 0x42 $t24 := 0x42 - // $t25 := borrow_global>($t24) + // $t25 := borrow_global<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>($t24) { let $base_offset := $MakeTypeStorageBase(0, 0x27c9b6b7, $t24) if iszero($AlignedStorageLoad($base_offset)) { @@ -5817,24 +5817,24 @@ object "test_A2_GlobalVectors_test_push_back_struct_global" { } $t25 := $MakePtr(true, add($base_offset, 32)) } - // $t26 := borrow_field>.v($t25) + // $t26 := borrow_field<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>.v($t25) $t26 := $t25 // $t27 := 14 $t27 := 14 // $t28 := 44 $t28 := 44 - // $t29 := pack GlobalVectors::S($t27, $t28) + // $t29 := pack 0x2::GlobalVectors::S($t27, $t28) { let $mem := $Malloc(24) $MemoryStoreU128(add($mem, 0), $t27) $MemoryStoreU64(add($mem, 16), $t28) $t29 := $mem } - // vector::push_back($t26, $t29) + // vector::push_back<0x2::GlobalVectors::S>($t26, $t29) A1_vector_push_back$A2_GlobalVectors_S$($t26, $t29) // $t30 := 0x42 $t30 := 0x42 - // $t31 := borrow_global>($t30) + // $t31 := borrow_global<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>($t30) { let $base_offset := $MakeTypeStorageBase(0, 0x27c9b6b7, $t30) if iszero($AlignedStorageLoad($base_offset)) { @@ -5842,9 +5842,9 @@ object "test_A2_GlobalVectors_test_push_back_struct_global" { } $t31 := $MakePtr(true, add($base_offset, 32)) } - // $t32 := borrow_field>.v($t31) + // $t32 := borrow_field<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>.v($t31) $t32 := $t31 - // $t33 := vector::length($t32) + // $t33 := vector::length<0x2::GlobalVectors::S>($t32) $t33 := A1_vector_length$A2_GlobalVectors_S$($t32) // $t34 := 5 $t34 := 5 @@ -5859,7 +5859,7 @@ object "test_A2_GlobalVectors_test_push_back_struct_global" { // label L2 // $t37 := 0x42 $t37 := 0x42 - // $t38 := borrow_global>($t37) + // $t38 := borrow_global<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>($t37) { let $base_offset := $MakeTypeStorageBase(0, 0x27c9b6b7, $t37) if iszero($AlignedStorageLoad($base_offset)) { @@ -5867,13 +5867,13 @@ object "test_A2_GlobalVectors_test_push_back_struct_global" { } $t38 := $MakePtr(true, add($base_offset, 32)) } - // $t39 := borrow_field>.v($t38) + // $t39 := borrow_field<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>.v($t38) $t39 := $t38 // $t40 := 0 $t40 := 0 - // $t41 := vector::borrow($t39, $t40) + // $t41 := vector::borrow<0x2::GlobalVectors::S>($t39, $t40) $t41 := A1_vector_borrow$A2_GlobalVectors_S$($t39, $t40) - // $t42 := borrow_field.x($t41) + // $t42 := borrow_field<0x2::GlobalVectors::S>.x($t41) $t42 := $t41 // $t43 := read_ref($t42) $t43 := $LoadU128($t42) @@ -5902,7 +5902,7 @@ object "test_A2_GlobalVectors_test_push_back_struct_global" { // label L5 // $t47 := 0x42 $t47 := 0x42 - // $t48 := borrow_global>($t47) + // $t48 := borrow_global<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>($t47) { let $base_offset := $MakeTypeStorageBase(0, 0x27c9b6b7, $t47) if iszero($AlignedStorageLoad($base_offset)) { @@ -5910,13 +5910,13 @@ object "test_A2_GlobalVectors_test_push_back_struct_global" { } $t48 := $MakePtr(true, add($base_offset, 32)) } - // $t49 := borrow_field>.v($t48) + // $t49 := borrow_field<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>.v($t48) $t49 := $t48 // $t50 := 1 $t50 := 1 - // $t51 := vector::borrow($t49, $t50) + // $t51 := vector::borrow<0x2::GlobalVectors::S>($t49, $t50) $t51 := A1_vector_borrow$A2_GlobalVectors_S$($t49, $t50) - // $t52 := borrow_field.x($t51) + // $t52 := borrow_field<0x2::GlobalVectors::S>.x($t51) $t52 := $t51 // $t53 := read_ref($t52) $t53 := $LoadU128($t52) @@ -5945,7 +5945,7 @@ object "test_A2_GlobalVectors_test_push_back_struct_global" { // label L8 // $t57 := 0x42 $t57 := 0x42 - // $t58 := borrow_global>($t57) + // $t58 := borrow_global<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>($t57) { let $base_offset := $MakeTypeStorageBase(0, 0x27c9b6b7, $t57) if iszero($AlignedStorageLoad($base_offset)) { @@ -5953,13 +5953,13 @@ object "test_A2_GlobalVectors_test_push_back_struct_global" { } $t58 := $MakePtr(true, add($base_offset, 32)) } - // $t59 := borrow_field>.v($t58) + // $t59 := borrow_field<0x2::GlobalVectors::T<0x2::GlobalVectors::S>>.v($t58) $t59 := $t58 // $t60 := 2 $t60 := 2 - // $t61 := vector::borrow($t59, $t60) + // $t61 := vector::borrow<0x2::GlobalVectors::S>($t59, $t60) $t61 := A1_vector_borrow$A2_GlobalVectors_S$($t59, $t60) - // $t62 := borrow_field.x($t61) + // $t62 := borrow_field<0x2::GlobalVectors::S>.x($t61) $t62 := $t61 // $t63 := read_ref($t62) $t63 := $LoadU128($t62) @@ -6327,13 +6327,13 @@ object "test_A2_GlobalVectors_test_read_ref_copy" { $t6 := $MakePtr(false, add($locals, 32)) // $t7 := move($t1) $t7 := mload($locals) - // $t8 := pack GlobalVectors::T($t7) + // $t8 := pack 0x2::GlobalVectors::T($t7) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t7) $t8 := $mem } - // move_to>($t8, $t6) + // move_to<0x2::GlobalVectors::T>($t8, $t6) { let $base_offset := $MakeTypeStorageBase(0, 0x10b7746c, $LoadU256($t6)) if $AlignedStorageLoad($base_offset) { @@ -6362,7 +6362,7 @@ object "test_A2_GlobalVectors_test_read_ref_copy" { } // $t9 := 0x42 $t9 := 0x42 - // $t10 := borrow_global>($t9) + // $t10 := borrow_global<0x2::GlobalVectors::T>($t9) { let $base_offset := $MakeTypeStorageBase(0, 0x10b7746c, $t9) if iszero($AlignedStorageLoad($base_offset)) { @@ -6370,7 +6370,7 @@ object "test_A2_GlobalVectors_test_read_ref_copy" { } $t10 := $MakePtr(true, add($base_offset, 32)) } - // $t11 := borrow_field>.v($t10) + // $t11 := borrow_field<0x2::GlobalVectors::T>.v($t10) $t11 := $t10 // $t2 := read_ref($t11) mstore(add($locals, 64), $LoadU256($t11)) @@ -6802,13 +6802,13 @@ object "test_A2_GlobalVectors_test_swap_global" { $t9 := $MakePtr(false, add($locals, 32)) // $t10 := move($t1) $t10 := mload($locals) - // $t11 := pack GlobalVectors::T($t10) + // $t11 := pack 0x2::GlobalVectors::T($t10) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t10) $t11 := $mem } - // move_to>($t11, $t9) + // move_to<0x2::GlobalVectors::T>($t11, $t9) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $LoadU256($t9)) if $AlignedStorageLoad($base_offset) { @@ -6837,7 +6837,7 @@ object "test_A2_GlobalVectors_test_swap_global" { } // $t12 := 0x42 $t12 := 0x42 - // $t13 := borrow_global>($t12) + // $t13 := borrow_global<0x2::GlobalVectors::T>($t12) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t12) if iszero($AlignedStorageLoad($base_offset)) { @@ -6845,7 +6845,7 @@ object "test_A2_GlobalVectors_test_swap_global" { } $t13 := $MakePtr(true, add($base_offset, 32)) } - // $t14 := borrow_field>.v($t13) + // $t14 := borrow_field<0x2::GlobalVectors::T>.v($t13) $t14 := $t13 // $t15 := 0 $t15 := 0 @@ -6855,7 +6855,7 @@ object "test_A2_GlobalVectors_test_swap_global" { A1_vector_swap$u64$($t14, $t15, $t16) // $t17 := 0x42 $t17 := 0x42 - // $t18 := borrow_global>($t17) + // $t18 := borrow_global<0x2::GlobalVectors::T>($t17) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t17) if iszero($AlignedStorageLoad($base_offset)) { @@ -6863,7 +6863,7 @@ object "test_A2_GlobalVectors_test_swap_global" { } $t18 := $MakePtr(true, add($base_offset, 32)) } - // $t19 := borrow_field>.v($t18) + // $t19 := borrow_field<0x2::GlobalVectors::T>.v($t18) $t19 := $t18 // $t20 := vector::length($t19) $t20 := A1_vector_length$u64$($t19) @@ -6880,7 +6880,7 @@ object "test_A2_GlobalVectors_test_swap_global" { // label L2 // $t24 := 0x42 $t24 := 0x42 - // $t25 := borrow_global>($t24) + // $t25 := borrow_global<0x2::GlobalVectors::T>($t24) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t24) if iszero($AlignedStorageLoad($base_offset)) { @@ -6888,7 +6888,7 @@ object "test_A2_GlobalVectors_test_swap_global" { } $t25 := $MakePtr(true, add($base_offset, 32)) } - // $t26 := borrow_field>.v($t25) + // $t26 := borrow_field<0x2::GlobalVectors::T>.v($t25) $t26 := $t25 // $t27 := 0 $t27 := 0 @@ -6921,7 +6921,7 @@ object "test_A2_GlobalVectors_test_swap_global" { // label L5 // $t33 := 0x42 $t33 := 0x42 - // $t34 := borrow_global>($t33) + // $t34 := borrow_global<0x2::GlobalVectors::T>($t33) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t33) if iszero($AlignedStorageLoad($base_offset)) { @@ -6929,7 +6929,7 @@ object "test_A2_GlobalVectors_test_swap_global" { } $t34 := $MakePtr(true, add($base_offset, 32)) } - // $t35 := borrow_field>.v($t34) + // $t35 := borrow_field<0x2::GlobalVectors::T>.v($t34) $t35 := $t34 // $t36 := 1 $t36 := 1 @@ -6962,7 +6962,7 @@ object "test_A2_GlobalVectors_test_swap_global" { // label L8 // $t42 := 0x42 $t42 := 0x42 - // $t43 := borrow_global>($t42) + // $t43 := borrow_global<0x2::GlobalVectors::T>($t42) { let $base_offset := $MakeTypeStorageBase(0, 0x7da2a540, $t42) if iszero($AlignedStorageLoad($base_offset)) { @@ -6970,7 +6970,7 @@ object "test_A2_GlobalVectors_test_swap_global" { } $t43 := $MakePtr(true, add($base_offset, 32)) } - // $t44 := borrow_field>.v($t43) + // $t44 := borrow_field<0x2::GlobalVectors::T>.v($t43) $t44 := $t43 // $t45 := 2 $t45 := 2 diff --git a/third_party/move/evm/move-to-yul/tests/Resources.exp b/third_party/move/evm/move-to-yul/tests/Resources.exp index e75268ee3b854..d28737892fc66 100644 --- a/third_party/move/evm/move-to-yul/tests/Resources.exp +++ b/third_party/move/evm/move-to-yul/tests/Resources.exp @@ -81,7 +81,7 @@ object "test_A2_M_test_increment_a" { A2_M_increment_a($t4) // $t5 := 0x3 $t5 := 0x3 - // $t6 := borrow_global($t5) + // $t6 := borrow_global<0x2::M::S>($t5) { let $base_offset := $MakeTypeStorageBase(0, 0x698265eb, $t5) if iszero($AlignedStorageLoad($base_offset)) { @@ -89,7 +89,7 @@ object "test_A2_M_test_increment_a" { } $t6 := $MakePtr(true, add($base_offset, 32)) } - // $t7 := borrow_field.a($t6) + // $t7 := borrow_field<0x2::M::S>.a($t6) $t7 := $IndexPtr($t6, 32) // $t8 := read_ref($t7) $t8 := $LoadU64($t7) @@ -113,7 +113,7 @@ object "test_A2_M_test_increment_a" { function A2_M_increment_a(addr) { let r, $t2, $t3, $t4, $t5, $t6, $t7 - // $t2 := borrow_global($t0) + // $t2 := borrow_global<0x2::M::S>($t0) { let $base_offset := $MakeTypeStorageBase(0, 0x698265eb, addr) if iszero($AlignedStorageLoad($base_offset)) { @@ -121,7 +121,7 @@ object "test_A2_M_test_increment_a" { } $t2 := $MakePtr(true, add($base_offset, 32)) } - // $t3 := borrow_field.a($t2) + // $t3 := borrow_field<0x2::M::S>.a($t2) $t3 := $IndexPtr($t2, 32) // $t4 := read_ref($t3) $t4 := $LoadU64($t3) @@ -129,7 +129,7 @@ object "test_A2_M_test_increment_a" { $t5 := 1 // $t6 := +($t4, $t5) $t6 := $AddU64($t4, $t5) - // $t7 := borrow_field.a($t2) + // $t7 := borrow_field<0x2::M::S>.a($t2) $t7 := $IndexPtr($t2, 32) // write_ref($t7, $t6) $StoreU64($t7, $t6) @@ -148,13 +148,13 @@ object "test_A2_M_test_increment_a" { $t6 := $AddU64(a, a) // $t7 := (u128)($t6) $t7 := $CastU128($t6) - // $t8 := pack M::S2($t7) + // $t8 := pack 0x2::M::S2($t7) { let $mem := $Malloc(16) $MemoryStoreU128(add($mem, 0), $t7) $t8 := $mem } - // $t9 := pack M::S($t1, $t5, $t8) + // $t9 := pack 0x2::M::S($t1, $t5, $t8) { let $mem := $Malloc(41) $MemoryStoreU64(add($mem, 32), a) @@ -162,7 +162,7 @@ object "test_A2_M_test_increment_a" { $MemoryStoreU256(add($mem, 0), $t8) $t9 := $mem } - // move_to($t9, $t0) + // move_to<0x2::M::S>($t9, $t0) { let $base_offset := $MakeTypeStorageBase(0, 0x698265eb, $LoadU256(sg)) if $AlignedStorageLoad($base_offset) { @@ -441,7 +441,7 @@ object "test_A2_M_test_publish" { A2_M_publish($t2, $t3) // $t4 := 0x3 $t4 := 0x3 - // $t5 := exists($t4) + // $t5 := exists<0x2::M::S>($t4) $t5 := $AlignedStorageLoad($MakeTypeStorageBase(0, 0x698265eb, $t4)) // if ($t5) goto L1 else goto L0 switch $t5 @@ -452,7 +452,7 @@ object "test_A2_M_test_publish" { // label L2 // $t7 := 0x3 $t7 := 0x3 - // $t8 := borrow_global($t7) + // $t8 := borrow_global<0x2::M::S>($t7) { let $base_offset := $MakeTypeStorageBase(0, 0x698265eb, $t7) if iszero($AlignedStorageLoad($base_offset)) { @@ -460,7 +460,7 @@ object "test_A2_M_test_publish" { } $t8 := $MakePtr(true, add($base_offset, 32)) } - // $t9 := borrow_field.a($t8) + // $t9 := borrow_field<0x2::M::S>.a($t8) $t9 := $IndexPtr($t8, 32) // $t10 := read_ref($t9) $t10 := $LoadU64($t9) @@ -489,7 +489,7 @@ object "test_A2_M_test_publish" { // label L5 // $t14 := 0x3 $t14 := 0x3 - // $t15 := borrow_global($t14) + // $t15 := borrow_global<0x2::M::S>($t14) { let $base_offset := $MakeTypeStorageBase(0, 0x698265eb, $t14) if iszero($AlignedStorageLoad($base_offset)) { @@ -497,7 +497,7 @@ object "test_A2_M_test_publish" { } $t15 := $MakePtr(true, add($base_offset, 32)) } - // $t16 := borrow_field.b($t15) + // $t16 := borrow_field<0x2::M::S>.b($t15) $t16 := $IndexPtr($t15, 40) // $t17 := read_ref($t16) $t17 := $LoadU8($t16) @@ -526,7 +526,7 @@ object "test_A2_M_test_publish" { // label L8 // $t21 := 0x3 $t21 := 0x3 - // $t22 := borrow_global($t21) + // $t22 := borrow_global<0x2::M::S>($t21) { let $base_offset := $MakeTypeStorageBase(0, 0x698265eb, $t21) if iszero($AlignedStorageLoad($base_offset)) { @@ -534,11 +534,11 @@ object "test_A2_M_test_publish" { } $t22 := $MakePtr(true, add($base_offset, 32)) } - // $t23 := borrow_field.c($t22) + // $t23 := borrow_field<0x2::M::S>.c($t22) { $t23 := $MakePtr($IsStoragePtr($t22), $LoadU256($t22)) } - // $t24 := borrow_field.x($t23) + // $t24 := borrow_field<0x2::M::S2>.x($t23) $t24 := $t23 // $t25 := read_ref($t24) $t25 := $LoadU128($t24) @@ -584,13 +584,13 @@ object "test_A2_M_test_publish" { $t6 := $AddU64(a, a) // $t7 := (u128)($t6) $t7 := $CastU128($t6) - // $t8 := pack M::S2($t7) + // $t8 := pack 0x2::M::S2($t7) { let $mem := $Malloc(16) $MemoryStoreU128(add($mem, 0), $t7) $t8 := $mem } - // $t9 := pack M::S($t1, $t5, $t8) + // $t9 := pack 0x2::M::S($t1, $t5, $t8) { let $mem := $Malloc(41) $MemoryStoreU64(add($mem, 32), a) @@ -598,7 +598,7 @@ object "test_A2_M_test_publish" { $MemoryStoreU256(add($mem, 0), $t8) $t9 := $mem } - // move_to($t9, $t0) + // move_to<0x2::M::S>($t9, $t0) { let $base_offset := $MakeTypeStorageBase(0, 0x698265eb, $LoadU256(sg)) if $AlignedStorageLoad($base_offset) { @@ -870,7 +870,7 @@ object "test_A2_M_test_publish_t" { A2_M_publish_t($t2, $t3) // $t4 := 0x3 $t4 := 0x3 - // $t5 := exists($t4) + // $t5 := exists<0x2::M::T>($t4) $t5 := $AlignedStorageLoad($MakeTypeStorageBase(0, 0x3948ca0a, $t4)) // if ($t5) goto L1 else goto L0 switch $t5 @@ -881,7 +881,7 @@ object "test_A2_M_test_publish_t" { // label L2 // $t7 := 0x3 $t7 := 0x3 - // $t8 := borrow_global($t7) + // $t8 := borrow_global<0x2::M::T>($t7) { let $base_offset := $MakeTypeStorageBase(0, 0x3948ca0a, $t7) if iszero($AlignedStorageLoad($base_offset)) { @@ -889,11 +889,11 @@ object "test_A2_M_test_publish_t" { } $t8 := $MakePtr(true, add($base_offset, 32)) } - // $t9 := borrow_field.s($t8) + // $t9 := borrow_field<0x2::M::T>.s($t8) { $t9 := $MakePtr($IsStoragePtr($t8), $LoadU256($t8)) } - // $t10 := borrow_field.a($t9) + // $t10 := borrow_field<0x2::M::S>.a($t9) $t10 := $IndexPtr($t9, 32) // $t11 := read_ref($t10) $t11 := $LoadU64($t10) @@ -922,7 +922,7 @@ object "test_A2_M_test_publish_t" { // label L5 // $t15 := 0x3 $t15 := 0x3 - // $t16 := borrow_global($t15) + // $t16 := borrow_global<0x2::M::T>($t15) { let $base_offset := $MakeTypeStorageBase(0, 0x3948ca0a, $t15) if iszero($AlignedStorageLoad($base_offset)) { @@ -930,11 +930,11 @@ object "test_A2_M_test_publish_t" { } $t16 := $MakePtr(true, add($base_offset, 32)) } - // $t17 := borrow_field.s($t16) + // $t17 := borrow_field<0x2::M::T>.s($t16) { $t17 := $MakePtr($IsStoragePtr($t16), $LoadU256($t16)) } - // $t18 := borrow_field.b($t17) + // $t18 := borrow_field<0x2::M::S>.b($t17) $t18 := $IndexPtr($t17, 40) // $t19 := read_ref($t18) $t19 := $LoadU8($t18) @@ -963,7 +963,7 @@ object "test_A2_M_test_publish_t" { // label L8 // $t23 := 0x3 $t23 := 0x3 - // $t24 := borrow_global($t23) + // $t24 := borrow_global<0x2::M::T>($t23) { let $base_offset := $MakeTypeStorageBase(0, 0x3948ca0a, $t23) if iszero($AlignedStorageLoad($base_offset)) { @@ -971,15 +971,15 @@ object "test_A2_M_test_publish_t" { } $t24 := $MakePtr(true, add($base_offset, 32)) } - // $t25 := borrow_field.s($t24) + // $t25 := borrow_field<0x2::M::T>.s($t24) { $t25 := $MakePtr($IsStoragePtr($t24), $LoadU256($t24)) } - // $t26 := borrow_field.c($t25) + // $t26 := borrow_field<0x2::M::S>.c($t25) { $t26 := $MakePtr($IsStoragePtr($t25), $LoadU256($t25)) } - // $t27 := borrow_field.x($t26) + // $t27 := borrow_field<0x2::M::S2>.x($t26) $t27 := $t26 // $t28 := read_ref($t27) $t28 := $LoadU128($t27) @@ -1025,13 +1025,13 @@ object "test_A2_M_test_publish_t" { $t6 := $AddU64(a, a) // $t7 := (u128)($t6) $t7 := $CastU128($t6) - // $t8 := pack M::S2($t7) + // $t8 := pack 0x2::M::S2($t7) { let $mem := $Malloc(16) $MemoryStoreU128(add($mem, 0), $t7) $t8 := $mem } - // $t9 := pack M::S($t1, $t5, $t8) + // $t9 := pack 0x2::M::S($t1, $t5, $t8) { let $mem := $Malloc(41) $MemoryStoreU64(add($mem, 32), a) @@ -1039,13 +1039,13 @@ object "test_A2_M_test_publish_t" { $MemoryStoreU256(add($mem, 0), $t8) $t9 := $mem } - // $t10 := pack M::T($t9) + // $t10 := pack 0x2::M::T($t9) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t9) $t10 := $mem } - // move_to($t10, $t0) + // move_to<0x2::M::T>($t10, $t0) { let $base_offset := $MakeTypeStorageBase(0, 0x3948ca0a, $LoadU256(sg)) if $AlignedStorageLoad($base_offset) { @@ -1325,12 +1325,12 @@ object "test_A2_M_test_unpublish" { $t6 := 0x3 // $t7 := M::unpublish($t6) $t7 := A2_M_unpublish($t6) - // ($t8, $t9, $t10) := unpack M::S($t7) + // ($t8, $t9, $t10) := unpack 0x2::M::S($t7) $t8 := $MemoryLoadU64(add($t7, 32)) $t9 := $MemoryLoadU8(add($t7, 40)) $t10 := $MemoryLoadU256(add($t7, 0)) $Free($t7, 41) - // $t11 := unpack M::S2($t10) + // $t11 := unpack 0x2::M::S2($t10) $t11 := $MemoryLoadU128(add($t10, 0)) $Free($t10, 16) // $t12 := 33 @@ -1399,7 +1399,7 @@ object "test_A2_M_test_unpublish" { function A2_M_unpublish(a) -> $result { let $t1 - // $t1 := move_from($t0) + // $t1 := move_from<0x2::M::S>($t0) { let $base_offset := $MakeTypeStorageBase(0, 0x698265eb, a) if iszero($AlignedStorageLoad($base_offset)) { @@ -1440,13 +1440,13 @@ object "test_A2_M_test_unpublish" { $t6 := $AddU64(a, a) // $t7 := (u128)($t6) $t7 := $CastU128($t6) - // $t8 := pack M::S2($t7) + // $t8 := pack 0x2::M::S2($t7) { let $mem := $Malloc(16) $MemoryStoreU128(add($mem, 0), $t7) $t8 := $mem } - // $t9 := pack M::S($t1, $t5, $t8) + // $t9 := pack 0x2::M::S($t1, $t5, $t8) { let $mem := $Malloc(41) $MemoryStoreU64(add($mem, 32), a) @@ -1454,7 +1454,7 @@ object "test_A2_M_test_unpublish" { $MemoryStoreU256(add($mem, 0), $t8) $t9 := $mem } - // move_to($t9, $t0) + // move_to<0x2::M::S>($t9, $t0) { let $base_offset := $MakeTypeStorageBase(0, 0x698265eb, $LoadU256(sg)) if $AlignedStorageLoad($base_offset) { diff --git a/third_party/move/evm/move-to-yul/tests/Resources.exp.capture-source-info b/third_party/move/evm/move-to-yul/tests/Resources.exp.capture-source-info index c04def6d750e5..9832954c64548 100644 --- a/third_party/move/evm/move-to-yul/tests/Resources.exp.capture-source-info +++ b/third_party/move/evm/move-to-yul/tests/Resources.exp.capture-source-info @@ -96,7 +96,7 @@ object "test_A2_M_test_increment_a" { // $t5 := 0x3 /// @src 1:1309:1311 $t5 := 0x3 - // $t6 := borrow_global($t5) + // $t6 := borrow_global<0x2::M::S>($t5) /// @src 1:1292:1305 { let $base_offset := $MakeTypeStorageBase(0, 0x698265eb, $t5) @@ -105,7 +105,7 @@ object "test_A2_M_test_increment_a" { } $t6 := $MakePtr(true, add($base_offset, 32)) } - // $t7 := borrow_field.a($t6) + // $t7 := borrow_field<0x2::M::S>.a($t6) /// @src 1:1292:1314 $t7 := $IndexPtr($t6, 32) // $t8 := read_ref($t7) @@ -135,7 +135,7 @@ object "test_A2_M_test_increment_a" { function A2_M_increment_a(addr) { let r, $t2, $t3, $t4, $t5, $t6, $t7 - // $t2 := borrow_global($t0) + // $t2 := borrow_global<0x2::M::S>($t0) /// @src 1:1106:1123 { let $base_offset := $MakeTypeStorageBase(0, 0x698265eb, addr) @@ -144,7 +144,7 @@ object "test_A2_M_test_increment_a" { } $t2 := $MakePtr(true, add($base_offset, 32)) } - // $t3 := borrow_field.a($t2) + // $t3 := borrow_field<0x2::M::S>.a($t2) /// @src 1:1148:1151 $t3 := $IndexPtr($t2, 32) // $t4 := read_ref($t3) @@ -156,7 +156,7 @@ object "test_A2_M_test_increment_a" { // $t6 := +($t4, $t5) /// @src 1:1152:1153 $t6 := $AddU64($t4, $t5) - // $t7 := borrow_field.a($t2) + // $t7 := borrow_field<0x2::M::S>.a($t2) /// @src 1:1142:1145 $t7 := $IndexPtr($t2, 32) // write_ref($t7, $t6) @@ -183,14 +183,14 @@ object "test_A2_M_test_increment_a" { // $t7 := (u128)($t6) /// @src 1:405:422 $t7 := $CastU128($t6) - // $t8 := pack M::S2($t7) + // $t8 := pack 0x2::M::S2($t7) /// @src 1:399:423 { let $mem := $Malloc(16) $MemoryStoreU128(add($mem, 0), $t7) $t8 := $mem } - // $t9 := pack M::S($t1, $t5, $t8) + // $t9 := pack 0x2::M::S($t1, $t5, $t8) /// @src 1:371:424 { let $mem := $Malloc(41) @@ -199,7 +199,7 @@ object "test_A2_M_test_increment_a" { $MemoryStoreU256(add($mem, 0), $t8) $t9 := $mem } - // move_to($t9, $t0) + // move_to<0x2::M::S>($t9, $t0) /// @src 1:434:441 { let $base_offset := $MakeTypeStorageBase(0, 0x698265eb, $LoadU256(sg)) @@ -492,7 +492,7 @@ object "test_A2_M_test_publish" { // $t4 := 0x3 /// @src 1:566:568 $t4 := 0x3 - // $t5 := exists($t4) + // $t5 := exists<0x2::M::S>($t4) /// @src 1:556:562 $t5 := $AlignedStorageLoad($MakeTypeStorageBase(0, 0x698265eb, $t4)) // if ($t5) goto L1 else goto L0 @@ -506,7 +506,7 @@ object "test_A2_M_test_publish" { // $t7 := 0x3 /// @src 1:609:611 $t7 := 0x3 - // $t8 := borrow_global($t7) + // $t8 := borrow_global<0x2::M::S>($t7) /// @src 1:592:605 { let $base_offset := $MakeTypeStorageBase(0, 0x698265eb, $t7) @@ -515,7 +515,7 @@ object "test_A2_M_test_publish" { } $t8 := $MakePtr(true, add($base_offset, 32)) } - // $t9 := borrow_field.a($t8) + // $t9 := borrow_field<0x2::M::S>.a($t8) /// @src 1:592:614 $t9 := $IndexPtr($t8, 32) // $t10 := read_ref($t9) @@ -553,7 +553,7 @@ object "test_A2_M_test_publish" { // $t14 := 0x3 /// @src 1:660:662 $t14 := 0x3 - // $t15 := borrow_global($t14) + // $t15 := borrow_global<0x2::M::S>($t14) /// @src 1:643:656 { let $base_offset := $MakeTypeStorageBase(0, 0x698265eb, $t14) @@ -562,7 +562,7 @@ object "test_A2_M_test_publish" { } $t15 := $MakePtr(true, add($base_offset, 32)) } - // $t16 := borrow_field.b($t15) + // $t16 := borrow_field<0x2::M::S>.b($t15) /// @src 1:643:665 $t16 := $IndexPtr($t15, 40) // $t17 := read_ref($t16) @@ -600,7 +600,7 @@ object "test_A2_M_test_publish" { // $t21 := 0x3 /// @src 1:711:713 $t21 := 0x3 - // $t22 := borrow_global($t21) + // $t22 := borrow_global<0x2::M::S>($t21) /// @src 1:694:707 { let $base_offset := $MakeTypeStorageBase(0, 0x698265eb, $t21) @@ -609,12 +609,12 @@ object "test_A2_M_test_publish" { } $t22 := $MakePtr(true, add($base_offset, 32)) } - // $t23 := borrow_field.c($t22) + // $t23 := borrow_field<0x2::M::S>.c($t22) /// @src 1:694:716 { $t23 := $MakePtr($IsStoragePtr($t22), $LoadU256($t22)) } - // $t24 := borrow_field.x($t23) + // $t24 := borrow_field<0x2::M::S2>.x($t23) /// @src 1:694:718 $t24 := $t23 // $t25 := read_ref($t24) @@ -674,14 +674,14 @@ object "test_A2_M_test_publish" { // $t7 := (u128)($t6) /// @src 1:405:422 $t7 := $CastU128($t6) - // $t8 := pack M::S2($t7) + // $t8 := pack 0x2::M::S2($t7) /// @src 1:399:423 { let $mem := $Malloc(16) $MemoryStoreU128(add($mem, 0), $t7) $t8 := $mem } - // $t9 := pack M::S($t1, $t5, $t8) + // $t9 := pack 0x2::M::S($t1, $t5, $t8) /// @src 1:371:424 { let $mem := $Malloc(41) @@ -690,7 +690,7 @@ object "test_A2_M_test_publish" { $MemoryStoreU256(add($mem, 0), $t8) $t9 := $mem } - // move_to($t9, $t0) + // move_to<0x2::M::S>($t9, $t0) /// @src 1:434:441 { let $base_offset := $MakeTypeStorageBase(0, 0x698265eb, $LoadU256(sg)) @@ -976,7 +976,7 @@ object "test_A2_M_test_publish_t" { // $t4 := 0x3 /// @src 1:1602:1604 $t4 := 0x3 - // $t5 := exists($t4) + // $t5 := exists<0x2::M::T>($t4) /// @src 1:1592:1598 $t5 := $AlignedStorageLoad($MakeTypeStorageBase(0, 0x3948ca0a, $t4)) // if ($t5) goto L1 else goto L0 @@ -990,7 +990,7 @@ object "test_A2_M_test_publish_t" { // $t7 := 0x3 /// @src 1:1646:1648 $t7 := 0x3 - // $t8 := borrow_global($t7) + // $t8 := borrow_global<0x2::M::T>($t7) /// @src 1:1629:1642 { let $base_offset := $MakeTypeStorageBase(0, 0x3948ca0a, $t7) @@ -999,12 +999,12 @@ object "test_A2_M_test_publish_t" { } $t8 := $MakePtr(true, add($base_offset, 32)) } - // $t9 := borrow_field.s($t8) + // $t9 := borrow_field<0x2::M::T>.s($t8) /// @src 1:1629:1651 { $t9 := $MakePtr($IsStoragePtr($t8), $LoadU256($t8)) } - // $t10 := borrow_field.a($t9) + // $t10 := borrow_field<0x2::M::S>.a($t9) /// @src 1:1629:1653 $t10 := $IndexPtr($t9, 32) // $t11 := read_ref($t10) @@ -1042,7 +1042,7 @@ object "test_A2_M_test_publish_t" { // $t15 := 0x3 /// @src 1:1700:1702 $t15 := 0x3 - // $t16 := borrow_global($t15) + // $t16 := borrow_global<0x2::M::T>($t15) /// @src 1:1683:1696 { let $base_offset := $MakeTypeStorageBase(0, 0x3948ca0a, $t15) @@ -1051,12 +1051,12 @@ object "test_A2_M_test_publish_t" { } $t16 := $MakePtr(true, add($base_offset, 32)) } - // $t17 := borrow_field.s($t16) + // $t17 := borrow_field<0x2::M::T>.s($t16) /// @src 1:1683:1705 { $t17 := $MakePtr($IsStoragePtr($t16), $LoadU256($t16)) } - // $t18 := borrow_field.b($t17) + // $t18 := borrow_field<0x2::M::S>.b($t17) /// @src 1:1683:1707 $t18 := $IndexPtr($t17, 40) // $t19 := read_ref($t18) @@ -1094,7 +1094,7 @@ object "test_A2_M_test_publish_t" { // $t23 := 0x3 /// @src 1:1754:1756 $t23 := 0x3 - // $t24 := borrow_global($t23) + // $t24 := borrow_global<0x2::M::T>($t23) /// @src 1:1737:1750 { let $base_offset := $MakeTypeStorageBase(0, 0x3948ca0a, $t23) @@ -1103,17 +1103,17 @@ object "test_A2_M_test_publish_t" { } $t24 := $MakePtr(true, add($base_offset, 32)) } - // $t25 := borrow_field.s($t24) + // $t25 := borrow_field<0x2::M::T>.s($t24) /// @src 1:1737:1759 { $t25 := $MakePtr($IsStoragePtr($t24), $LoadU256($t24)) } - // $t26 := borrow_field.c($t25) + // $t26 := borrow_field<0x2::M::S>.c($t25) /// @src 1:1737:1761 { $t26 := $MakePtr($IsStoragePtr($t25), $LoadU256($t25)) } - // $t27 := borrow_field.x($t26) + // $t27 := borrow_field<0x2::M::S2>.x($t26) /// @src 1:1737:1763 $t27 := $t26 // $t28 := read_ref($t27) @@ -1173,14 +1173,14 @@ object "test_A2_M_test_publish_t" { // $t7 := (u128)($t6) /// @src 1:1434:1451 $t7 := $CastU128($t6) - // $t8 := pack M::S2($t7) + // $t8 := pack 0x2::M::S2($t7) /// @src 1:1428:1452 { let $mem := $Malloc(16) $MemoryStoreU128(add($mem, 0), $t7) $t8 := $mem } - // $t9 := pack M::S($t1, $t5, $t8) + // $t9 := pack 0x2::M::S($t1, $t5, $t8) /// @src 1:1400:1453 { let $mem := $Malloc(41) @@ -1189,14 +1189,14 @@ object "test_A2_M_test_publish_t" { $MemoryStoreU256(add($mem, 0), $t8) $t9 := $mem } - // $t10 := pack M::T($t9) + // $t10 := pack 0x2::M::T($t9) /// @src 1:1393:1454 { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t9) $t10 := $mem } - // move_to($t10, $t0) + // move_to<0x2::M::T>($t10, $t0) /// @src 1:1464:1471 { let $base_offset := $MakeTypeStorageBase(0, 0x3948ca0a, $LoadU256(sg)) @@ -1491,13 +1491,13 @@ object "test_A2_M_test_unpublish" { // $t7 := M::unpublish($t6) /// @src 1:931:944 $t7 := A2_M_unpublish($t6) - // ($t8, $t9, $t10) := unpack M::S($t7) + // ($t8, $t9, $t10) := unpack 0x2::M::S($t7) /// @src 1:911:928 $t8 := $MemoryLoadU64(add($t7, 32)) $t9 := $MemoryLoadU8(add($t7, 40)) $t10 := $MemoryLoadU256(add($t7, 0)) $Free($t7, 41) - // $t11 := unpack M::S2($t10) + // $t11 := unpack 0x2::M::S2($t10) /// @src 1:922:927 $t11 := $MemoryLoadU128(add($t10, 0)) $Free($t10, 16) @@ -1583,7 +1583,7 @@ object "test_A2_M_test_unpublish" { function A2_M_unpublish(a) -> $result { let $t1 - // $t1 := move_from($t0) + // $t1 := move_from<0x2::M::S>($t0) /// @src 1:793:802 { let $base_offset := $MakeTypeStorageBase(0, 0x698265eb, a) @@ -1631,14 +1631,14 @@ object "test_A2_M_test_unpublish" { // $t7 := (u128)($t6) /// @src 1:405:422 $t7 := $CastU128($t6) - // $t8 := pack M::S2($t7) + // $t8 := pack 0x2::M::S2($t7) /// @src 1:399:423 { let $mem := $Malloc(16) $MemoryStoreU128(add($mem, 0), $t7) $t8 := $mem } - // $t9 := pack M::S($t1, $t5, $t8) + // $t9 := pack 0x2::M::S($t1, $t5, $t8) /// @src 1:371:424 { let $mem := $Malloc(41) @@ -1647,7 +1647,7 @@ object "test_A2_M_test_unpublish" { $MemoryStoreU256(add($mem, 0), $t8) $t9 := $mem } - // move_to($t9, $t0) + // move_to<0x2::M::S>($t9, $t0) /// @src 1:434:441 { let $base_offset := $MakeTypeStorageBase(0, 0x698265eb, $LoadU256(sg)) diff --git a/third_party/move/evm/move-to-yul/tests/Structs.exp b/third_party/move/evm/move-to-yul/tests/Structs.exp index d79871424ed16..078aae2d530ec 100644 --- a/third_party/move/evm/move-to-yul/tests/Structs.exp +++ b/third_party/move/evm/move-to-yul/tests/Structs.exp @@ -54,7 +54,7 @@ object "test_A2_M_test_drop" { $t1 := false // $t2 := M::pack_S($t0, $t1) $t2 := A2_M_pack_S($t0, $t1) - // $t3 := pack M::S3($t2) + // $t3 := pack 0x2::M::S3($t2) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t2) @@ -79,7 +79,7 @@ object "test_A2_M_test_drop" { $t2 := $CastU128(a) // $t3 := M::pack_S2($t2) $t3 := A2_M_pack_S2($t2) - // $t4 := pack M::S($t0, $t1, $t3) + // $t4 := pack 0x2::M::S($t0, $t1, $t3) { let $mem := $Malloc(41) $MemoryStoreU64(add($mem, 32), a) @@ -93,7 +93,7 @@ object "test_A2_M_test_drop" { function A2_M_pack_S2(x) -> $result { let $t1 - // $t1 := pack M::S2($t0) + // $t1 := pack 0x2::M::S2($t0) { let $mem := $Malloc(16) $MemoryStoreU128(add($mem, 0), x) @@ -330,7 +330,7 @@ object "test_A2_M_test_equality" { $t2 := $CastU128(a) // $t3 := M::pack_S2($t2) $t3 := A2_M_pack_S2($t2) - // $t4 := pack M::S($t0, $t1, $t3) + // $t4 := pack 0x2::M::S($t0, $t1, $t3) { let $mem := $Malloc(41) $MemoryStoreU64(add($mem, 32), a) @@ -344,7 +344,7 @@ object "test_A2_M_test_equality" { function A2_M_pack_S2(x) -> $result { let $t1 - // $t1 := pack M::S2($t0) + // $t1 := pack 0x2::M::S2($t0) { let $mem := $Malloc(16) $MemoryStoreU128(add($mem, 0), x) @@ -460,7 +460,7 @@ object "test_A2_M_test_pack_S" { s := A2_M_pack_S($t1, $t2) // $t3 := borrow_local($t0) $t3 := $MakePtr(false, s) - // $t4 := borrow_field.a($t3) + // $t4 := borrow_field<0x2::M::S>.a($t3) $t4 := $IndexPtr($t3, 32) // $t5 := read_ref($t4) $t5 := $LoadU64($t4) @@ -477,7 +477,7 @@ object "test_A2_M_test_pack_S" { // label L2 // $t9 := borrow_local($t0) $t9 := $MakePtr(false, s) - // $t10 := borrow_field.b($t9) + // $t10 := borrow_field<0x2::M::S>.b($t9) $t10 := $IndexPtr($t9, 40) // $t11 := read_ref($t10) $t11 := $LoadU8($t10) @@ -506,11 +506,11 @@ object "test_A2_M_test_pack_S" { // label L5 // $t15 := borrow_local($t0) $t15 := $MakePtr(false, s) - // $t16 := borrow_field.c($t15) + // $t16 := borrow_field<0x2::M::S>.c($t15) { $t16 := $MakePtr($IsStoragePtr($t15), $LoadU256($t15)) } - // $t17 := borrow_field.x($t16) + // $t17 := borrow_field<0x2::M::S2>.x($t16) $t17 := $t16 // $t18 := read_ref($t17) $t18 := $LoadU128($t17) @@ -549,7 +549,7 @@ object "test_A2_M_test_pack_S" { $t2 := $CastU128(a) // $t3 := M::pack_S2($t2) $t3 := A2_M_pack_S2($t2) - // $t4 := pack M::S($t0, $t1, $t3) + // $t4 := pack 0x2::M::S($t0, $t1, $t3) { let $mem := $Malloc(41) $MemoryStoreU64(add($mem, 32), a) @@ -563,7 +563,7 @@ object "test_A2_M_test_pack_S" { function A2_M_pack_S2(x) -> $result { let $t1 - // $t1 := pack M::S2($t0) + // $t1 := pack 0x2::M::S2($t0) { let $mem := $Malloc(16) $MemoryStoreU128(add($mem, 0), x) @@ -780,7 +780,7 @@ object "test_A2_M_test_pack_S2" { s := A2_M_pack_S2($t1) // $t2 := borrow_local($t0) $t2 := $MakePtr(false, s) - // $t3 := borrow_field.x($t2) + // $t3 := borrow_field<0x2::M::S2>.x($t2) $t3 := $t2 // $t4 := read_ref($t3) $t4 := $LoadU128($t3) @@ -803,7 +803,7 @@ object "test_A2_M_test_pack_S2" { function A2_M_pack_S2(x) -> $result { let $t1 - // $t1 := pack M::S2($t0) + // $t1 := pack 0x2::M::S2($t0) { let $mem := $Malloc(16) $MemoryStoreU128(add($mem, 0), x) @@ -952,7 +952,7 @@ object "test_A2_M_test_pack_S2_fail" { s := A2_M_pack_S2($t1) // $t2 := borrow_local($t0) $t2 := $MakePtr(false, s) - // $t3 := borrow_field.x($t2) + // $t3 := borrow_field<0x2::M::S2>.x($t2) $t3 := $t2 // $t4 := read_ref($t3) $t4 := $LoadU128($t3) @@ -975,7 +975,7 @@ object "test_A2_M_test_pack_S2_fail" { function A2_M_pack_S2(x) -> $result { let $t1 - // $t1 := pack M::S2($t0) + // $t1 := pack 0x2::M::S2($t0) { let $mem := $Malloc(16) $MemoryStoreU128(add($mem, 0), x) @@ -1147,15 +1147,15 @@ object "test_A2_M_test_read_S" { function A2_M_read_S(s) -> $result { let $t1, $t2, $t3, $t4, $t5, $t6, $t7 - // $t1 := borrow_field.a($t0) + // $t1 := borrow_field<0x2::M::S>.a($t0) $t1 := $IndexPtr(s, 32) // $t2 := read_ref($t1) $t2 := $LoadU64($t1) - // $t3 := borrow_field.c($t0) + // $t3 := borrow_field<0x2::M::S>.c($t0) { $t3 := $MakePtr($IsStoragePtr(s), $LoadU256(s)) } - // $t4 := borrow_field.x($t3) + // $t4 := borrow_field<0x2::M::S2>.x($t3) $t4 := $t3 // $t5 := read_ref($t4) $t5 := $LoadU128($t4) @@ -1173,7 +1173,7 @@ object "test_A2_M_test_read_S" { $t2 := $CastU128(a) // $t3 := M::pack_S2($t2) $t3 := A2_M_pack_S2($t2) - // $t4 := pack M::S($t0, $t1, $t3) + // $t4 := pack 0x2::M::S($t0, $t1, $t3) { let $mem := $Malloc(41) $MemoryStoreU64(add($mem, 32), a) @@ -1187,7 +1187,7 @@ object "test_A2_M_test_read_S" { function A2_M_pack_S2(x) -> $result { let $t1 - // $t1 := pack M::S2($t0) + // $t1 := pack 0x2::M::S2($t0) { let $mem := $Malloc(16) $MemoryStoreU128(add($mem, 0), x) @@ -1394,7 +1394,7 @@ object "test_A2_M_test_read_and_write_S" { s := A2_M_read_and_write_S() // $t1 := borrow_local($t0) $t1 := $MakePtr(false, s) - // $t2 := borrow_field.a($t1) + // $t2 := borrow_field<0x2::M::S>.a($t1) $t2 := $IndexPtr($t1, 32) // $t3 := read_ref($t2) $t3 := $LoadU64($t2) @@ -1411,11 +1411,11 @@ object "test_A2_M_test_read_and_write_S" { // label L2 // $t7 := borrow_local($t0) $t7 := $MakePtr(false, s) - // $t8 := borrow_field.c($t7) + // $t8 := borrow_field<0x2::M::S>.c($t7) { $t8 := $MakePtr($IsStoragePtr($t7), $LoadU256($t7)) } - // $t9 := borrow_field.x($t8) + // $t9 := borrow_field<0x2::M::S2>.x($t8) $t9 := $t8 // $t10 := read_ref($t9) $t10 := $LoadU128($t9) @@ -1472,21 +1472,21 @@ object "test_A2_M_test_read_and_write_S" { function A2_M_write_S(s, v) { let $t2, $t3, $t4, $t5, $t6, $t7 - // $t2 := borrow_field.a($t0) + // $t2 := borrow_field<0x2::M::S>.a($t0) $t2 := $IndexPtr(s, 32) // write_ref($t2, $t1) $StoreU64($t2, v) - // $t3 := borrow_field.a($t0) + // $t3 := borrow_field<0x2::M::S>.a($t0) $t3 := $IndexPtr(s, 32) // $t4 := read_ref($t3) $t4 := $LoadU64($t3) // $t5 := (u128)($t4) $t5 := $CastU128($t4) - // $t6 := borrow_field.c($t0) + // $t6 := borrow_field<0x2::M::S>.c($t0) { $t6 := $MakePtr($IsStoragePtr(s), $LoadU256(s)) } - // $t7 := borrow_field.x($t6) + // $t7 := borrow_field<0x2::M::S2>.x($t6) $t7 := $t6 // write_ref($t7, $t5) $StoreU128($t7, $t5) @@ -1495,15 +1495,15 @@ object "test_A2_M_test_read_and_write_S" { function A2_M_read_S(s) -> $result { let $t1, $t2, $t3, $t4, $t5, $t6, $t7 - // $t1 := borrow_field.a($t0) + // $t1 := borrow_field<0x2::M::S>.a($t0) $t1 := $IndexPtr(s, 32) // $t2 := read_ref($t1) $t2 := $LoadU64($t1) - // $t3 := borrow_field.c($t0) + // $t3 := borrow_field<0x2::M::S>.c($t0) { $t3 := $MakePtr($IsStoragePtr(s), $LoadU256(s)) } - // $t4 := borrow_field.x($t3) + // $t4 := borrow_field<0x2::M::S2>.x($t3) $t4 := $t3 // $t5 := read_ref($t4) $t5 := $LoadU128($t4) @@ -1521,7 +1521,7 @@ object "test_A2_M_test_read_and_write_S" { $t2 := $CastU128(a) // $t3 := M::pack_S2($t2) $t3 := A2_M_pack_S2($t2) - // $t4 := pack M::S($t0, $t1, $t3) + // $t4 := pack 0x2::M::S($t0, $t1, $t3) { let $mem := $Malloc(41) $MemoryStoreU64(add($mem, 32), a) @@ -1535,7 +1535,7 @@ object "test_A2_M_test_read_and_write_S" { function A2_M_pack_S2(x) -> $result { let $t1 - // $t1 := pack M::S2($t0) + // $t1 := pack 0x2::M::S2($t0) { let $mem := $Malloc(16) $MemoryStoreU128(add($mem, 0), x) @@ -1800,7 +1800,7 @@ object "test_A2_M_test_unpack" { s1 := A2_M_unpack($t3) // $t4 := borrow_local($t0) $t4 := $MakePtr(false, s1) - // $t5 := borrow_field.x($t4) + // $t5 := borrow_field<0x2::M::S2>.x($t4) $t5 := $t4 // $t6 := read_ref($t5) $t6 := $LoadU128($t5) @@ -1823,7 +1823,7 @@ object "test_A2_M_test_unpack" { function A2_M_unpack(s) -> $result { let c, $t2, $t3, $t4 - // ($t2, $t3, $t4) := unpack M::S($t0) + // ($t2, $t3, $t4) := unpack 0x2::M::S($t0) $t2 := $MemoryLoadU64(add(s, 32)) $t3 := $MemoryLoadU8(add(s, 40)) $t4 := $MemoryLoadU256(add(s, 0)) @@ -1840,7 +1840,7 @@ object "test_A2_M_test_unpack" { $t2 := $CastU128(a) // $t3 := M::pack_S2($t2) $t3 := A2_M_pack_S2($t2) - // $t4 := pack M::S($t0, $t1, $t3) + // $t4 := pack 0x2::M::S($t0, $t1, $t3) { let $mem := $Malloc(41) $MemoryStoreU64(add($mem, 32), a) @@ -1854,7 +1854,7 @@ object "test_A2_M_test_unpack" { function A2_M_pack_S2(x) -> $result { let $t1 - // $t1 := pack M::S2($t0) + // $t1 := pack 0x2::M::S2($t0) { let $mem := $Malloc(16) $MemoryStoreU128(add($mem, 0), x) @@ -2039,7 +2039,7 @@ object "test_A2_M_test_write_S" { A2_M_write_S($t3, $t4) // $t5 := borrow_local($t0) $t5 := $MakePtr(false, s) - // $t6 := borrow_field.a($t5) + // $t6 := borrow_field<0x2::M::S>.a($t5) $t6 := $IndexPtr($t5, 32) // $t7 := read_ref($t6) $t7 := $LoadU64($t6) @@ -2056,11 +2056,11 @@ object "test_A2_M_test_write_S" { // label L2 // $t11 := borrow_local($t0) $t11 := $MakePtr(false, s) - // $t12 := borrow_field.c($t11) + // $t12 := borrow_field<0x2::M::S>.c($t11) { $t12 := $MakePtr($IsStoragePtr($t11), $LoadU256($t11)) } - // $t13 := borrow_field.x($t12) + // $t13 := borrow_field<0x2::M::S2>.x($t12) $t13 := $t12 // $t14 := read_ref($t13) $t14 := $LoadU128($t13) @@ -2095,21 +2095,21 @@ object "test_A2_M_test_write_S" { function A2_M_write_S(s, v) { let $t2, $t3, $t4, $t5, $t6, $t7 - // $t2 := borrow_field.a($t0) + // $t2 := borrow_field<0x2::M::S>.a($t0) $t2 := $IndexPtr(s, 32) // write_ref($t2, $t1) $StoreU64($t2, v) - // $t3 := borrow_field.a($t0) + // $t3 := borrow_field<0x2::M::S>.a($t0) $t3 := $IndexPtr(s, 32) // $t4 := read_ref($t3) $t4 := $LoadU64($t3) // $t5 := (u128)($t4) $t5 := $CastU128($t4) - // $t6 := borrow_field.c($t0) + // $t6 := borrow_field<0x2::M::S>.c($t0) { $t6 := $MakePtr($IsStoragePtr(s), $LoadU256(s)) } - // $t7 := borrow_field.x($t6) + // $t7 := borrow_field<0x2::M::S2>.x($t6) $t7 := $t6 // write_ref($t7, $t5) $StoreU128($t7, $t5) @@ -2122,7 +2122,7 @@ object "test_A2_M_test_write_S" { $t2 := $CastU128(a) // $t3 := M::pack_S2($t2) $t3 := A2_M_pack_S2($t2) - // $t4 := pack M::S($t0, $t1, $t3) + // $t4 := pack 0x2::M::S($t0, $t1, $t3) { let $mem := $Malloc(41) $MemoryStoreU64(add($mem, 32), a) @@ -2136,7 +2136,7 @@ object "test_A2_M_test_write_S" { function A2_M_pack_S2(x) -> $result { let $t1 - // $t1 := pack M::S2($t0) + // $t1 := pack 0x2::M::S2($t0) { let $mem := $Malloc(16) $MemoryStoreU128(add($mem, 0), x) diff --git a/third_party/move/evm/move-to-yul/tests/Tables.exp b/third_party/move/evm/move-to-yul/tests/Tables.exp index f6ce37ffea2a9..04a2ed965d8c1 100644 --- a/third_party/move/evm/move-to-yul/tests/Tables.exp +++ b/third_party/move/evm/move-to-yul/tests/Tables.exp @@ -108,13 +108,13 @@ object "test_A2_Tables_test_borrow_fail" { $t19 := $MakePtr(false, add($locals, 96)) // $t20 := move($t6) $t20 := mload($locals) - // $t21 := pack Tables::S($t20) + // $t21 := pack 0x2::Tables::S($t20) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t20) $t21 := $mem } - // move_to>($t21, $t19) + // move_to<0x2::Tables::S>($t21, $t19) { let $base_offset := $MakeTypeStorageBase(0, 0x8a475b1c, $LoadU256($t19)) if $AlignedStorageLoad($base_offset) { @@ -456,13 +456,13 @@ object "test_A2_Tables_test_insert_fail" { $t30 := $MakePtr(false, add($locals, 160)) // $t31 := move($t9) $t31 := mload($locals) - // $t32 := pack Tables::S($t31) + // $t32 := pack 0x2::Tables::S($t31) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t31) $t32 := $mem } - // move_to>($t32, $t30) + // move_to<0x2::Tables::S>($t32, $t30) { let $base_offset := $MakeTypeStorageBase(0, 0x8a475b1c, $LoadU256($t30)) if $AlignedStorageLoad($base_offset) { @@ -1022,13 +1022,13 @@ object "test_A2_Tables_test_primitive" { $t98 := $MakePtr(false, add($locals, 384)) // $t99 := move($t31) $t99 := mload($locals) - // $t100 := pack Tables::S($t99) + // $t100 := pack 0x2::Tables::S($t99) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t99) $t100 := $mem } - // move_to>($t100, $t98) + // move_to<0x2::Tables::S>($t100, $t98) { let $base_offset := $MakeTypeStorageBase(0, 0x8a475b1c, $LoadU256($t98)) if $AlignedStorageLoad($base_offset) { @@ -1044,7 +1044,7 @@ object "test_A2_Tables_test_primitive" { } // $t101 := 0x42 $t101 := 0x42 - // $t102 := borrow_global>($t101) + // $t102 := borrow_global<0x2::Tables::S>($t101) { let $base_offset := $MakeTypeStorageBase(0, 0x8a475b1c, $t101) if iszero($AlignedStorageLoad($base_offset)) { @@ -1052,7 +1052,7 @@ object "test_A2_Tables_test_primitive" { } $t102 := $MakePtr(true, add($base_offset, 32)) } - // $t103 := borrow_field>.t($t102) + // $t103 := borrow_field<0x2::Tables::S>.t($t102) $t103 := $t102 // $t104 := 42 $t104 := 42 @@ -1119,7 +1119,7 @@ object "test_A2_Tables_test_primitive" { // label L32 // $t116 := 0x42 $t116 := 0x42 - // $t117 := move_from>($t116) + // $t117 := move_from<0x2::Tables::S>($t116) { let $base_offset := $MakeTypeStorageBase(0, 0x8a475b1c, $t116) if iszero($AlignedStorageLoad($base_offset)) { @@ -1135,7 +1135,7 @@ object "test_A2_Tables_test_primitive" { $t117 := $dst } } - // $t30 := unpack Tables::S($t117) + // $t30 := unpack 0x2::Tables::S($t117) mstore(add($locals, 480), $MemoryLoadU256(add($t117, 0))) $Free($t117, 32) // $t118 := borrow_local($t30) @@ -1181,13 +1181,13 @@ object "test_A2_Tables_test_primitive" { $t127 := $MakePtr(false, add($locals, 544)) // $t128 := move($t30) $t128 := mload(add($locals, 480)) - // $t129 := pack Tables::S($t128) + // $t129 := pack 0x2::Tables::S($t128) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t128) $t129 := $mem } - // move_to>($t129, $t127) + // move_to<0x2::Tables::S>($t129, $t127) { let $base_offset := $MakeTypeStorageBase(0, 0x8a475b1c, $LoadU256($t127)) if $AlignedStorageLoad($base_offset) { @@ -1483,7 +1483,7 @@ object "test_A2_Tables_test_remove_fail" { $Abort($t11) } case 4 { - // $t3 := Table::empty() + // $t3 := Table::empty() mstore($locals, A2_Table_empty$u64_A2_Tables_Balance$()) // $t4 := borrow_local($t3) $t4 := $MakePtr(false, $locals) @@ -1493,9 +1493,9 @@ object "test_A2_Tables_test_remove_fail" { mstore(add($locals, 32), $t5) // $t6 := borrow_local($t0) $t6 := $MakePtr(false, add($locals, 56)) - // $t7 := Table::remove($t4, $t6) + // $t7 := Table::remove($t4, $t6) $t7 := A2_Table_remove$u64_A2_Tables_Balance$($t4, $t6) - // $t8 := unpack Tables::Balance($t7) + // $t8 := unpack 0x2::Tables::Balance($t7) $t8 := $MemoryLoadU256(add($t7, 0)) $Free($t7, 32) // $t9 := U256::zero() @@ -1517,13 +1517,13 @@ object "test_A2_Tables_test_remove_fail" { $t13 := $MakePtr(false, add($locals, 64)) // $t14 := move($t3) $t14 := mload($locals) - // $t15 := pack Tables::S($t14) + // $t15 := pack 0x2::Tables::S($t14) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t14) $t15 := $mem } - // move_to>($t15, $t13) + // move_to<0x2::Tables::S>($t15, $t13) { let $base_offset := $MakeTypeStorageBase(0, 0x6f98bffd, $LoadU256($t13)) if $AlignedStorageLoad($base_offset) { @@ -1749,7 +1749,7 @@ object "test_A2_Tables_test_struct" { $Abort($t40) } case 4 { - // $t27 := Table::empty() + // $t27 := Table::empty() mstore($locals, A2_Table_empty$address_A2_Tables_Balance$()) // $t30 := 3743106036130323098097120681749450326028 $t30 := 3743106036130323098097120681749450326028 @@ -1763,13 +1763,13 @@ object "test_A2_Tables_test_struct" { mstore(add($locals, 32), $t33) // $t34 := borrow_local($t0) $t34 := $MakePtr(false, add($locals, 32)) - // $t35 := pack Tables::Balance($t30) + // $t35 := pack 0x2::Tables::Balance($t30) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t30) $t35 := $mem } - // Table::insert($t32, $t34, $t35) + // Table::insert($t32, $t34, $t35) A2_Table_insert$address_A2_Tables_Balance$($t32, $t34, $t35) // $t36 := borrow_local($t27) $t36 := $MakePtr(false, $locals) @@ -1779,7 +1779,7 @@ object "test_A2_Tables_test_struct" { mstore(add($locals, 64), $t37) // $t38 := borrow_local($t18) $t38 := $MakePtr(false, add($locals, 64)) - // $t39 := Table::contains($t36, $t38) + // $t39 := Table::contains($t36, $t38) $t39 := A2_Table_contains$address_A2_Tables_Balance$($t36, $t38) // if ($t39) goto L1 else goto L0 switch $t39 @@ -1796,9 +1796,9 @@ object "test_A2_Tables_test_struct" { mstore(add($locals, 96), $t42) // $t43 := borrow_local($t20) $t43 := $MakePtr(false, add($locals, 96)) - // $t44 := Table::borrow($t41, $t43) + // $t44 := Table::borrow($t41, $t43) $t44 := A2_Table_borrow$address_A2_Tables_Balance$($t41, $t43) - // $t45 := borrow_field.value($t44) + // $t45 := borrow_field<0x2::Tables::Balance>.value($t44) $t45 := $t44 // $t46 := read_ref($t45) $t46 := $LoadU256($t45) @@ -1831,13 +1831,13 @@ object "test_A2_Tables_test_struct" { $t50 := $MakePtr(false, add($locals, 128)) // $t51 := move($t27) $t51 := mload($locals) - // $t52 := pack Tables::S($t51) + // $t52 := pack 0x2::Tables::S($t51) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t51) $t52 := $mem } - // move_to>($t52, $t50) + // move_to<0x2::Tables::S>($t52, $t50) { let $base_offset := $MakeTypeStorageBase(0, 0x7dd56ec3, $LoadU256($t50)) if $AlignedStorageLoad($base_offset) { @@ -1853,7 +1853,7 @@ object "test_A2_Tables_test_struct" { } // $t53 := 0x42 $t53 := 0x42 - // $t54 := borrow_global>($t53) + // $t54 := borrow_global<0x2::Tables::S>($t53) { let $base_offset := $MakeTypeStorageBase(0, 0x7dd56ec3, $t53) if iszero($AlignedStorageLoad($base_offset)) { @@ -1861,7 +1861,7 @@ object "test_A2_Tables_test_struct" { } $t54 := $MakePtr(true, add($base_offset, 32)) } - // $t55 := borrow_field>.t($t54) + // $t55 := borrow_field<0x2::Tables::S>.t($t54) $t55 := $t54 // $t56 := 0xcd $t56 := 0xcd @@ -1869,13 +1869,13 @@ object "test_A2_Tables_test_struct" { mstore(add($locals, 160), $t56) // $t57 := borrow_local($t23) $t57 := $MakePtr(false, add($locals, 160)) - // $t58 := pack Tables::Balance($t31) + // $t58 := pack 0x2::Tables::Balance($t31) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t31) $t58 := $mem } - // Table::insert($t55, $t57, $t58) + // Table::insert($t55, $t57, $t58) A2_Table_insert$address_A2_Tables_Balance$($t55, $t57, $t58) // $t59 := 0xab $t59 := 0xab @@ -1885,9 +1885,9 @@ object "test_A2_Tables_test_struct" { $t60 := $MakePtr(false, add($locals, 192)) // $t61 := freeze_ref($t55) $t61 := $t55 - // $t62 := Table::borrow($t61, $t60) + // $t62 := Table::borrow($t61, $t60) $t62 := A2_Table_borrow$address_A2_Tables_Balance$($t61, $t60) - // $t63 := borrow_field.value($t62) + // $t63 := borrow_field<0x2::Tables::Balance>.value($t62) $t63 := $t62 // $t64 := read_ref($t63) $t64 := $LoadU256($t63) @@ -1921,9 +1921,9 @@ object "test_A2_Tables_test_struct" { $t68 := $MakePtr(false, add($locals, 224)) // $t69 := freeze_ref($t55) $t69 := $t55 - // $t70 := Table::borrow($t69, $t68) + // $t70 := Table::borrow($t69, $t68) $t70 := A2_Table_borrow$address_A2_Tables_Balance$($t69, $t68) - // $t71 := borrow_field.value($t70) + // $t71 := borrow_field<0x2::Tables::Balance>.value($t70) $t71 := $t70 // $t72 := read_ref($t71) $t72 := $LoadU256($t71) @@ -1955,9 +1955,9 @@ object "test_A2_Tables_test_struct" { mstore(add($locals, 256), $t75) // $t76 := borrow_local($t7) $t76 := $MakePtr(false, add($locals, 256)) - // $t77 := Table::borrow_mut($t55, $t76) + // $t77 := Table::borrow_mut($t55, $t76) $t77 := A2_Table_borrow_mut$address_A2_Tables_Balance$($t55, $t76) - // $t78 := borrow_field.value($t77) + // $t78 := borrow_field<0x2::Tables::Balance>.value($t77) $t78 := $t77 // $t79 := read_ref($t78) $t79 := $LoadU256($t78) @@ -1965,7 +1965,7 @@ object "test_A2_Tables_test_struct" { $t80 := A2_U256_one() // $t81 := -($t79, $t80) $t81 := $Sub($t79, $t80) - // $t82 := borrow_field.value($t77) + // $t82 := borrow_field<0x2::Tables::Balance>.value($t77) $t82 := $t77 // write_ref($t82, $t81) $StoreU256($t82, $t81) @@ -1977,9 +1977,9 @@ object "test_A2_Tables_test_struct" { $t84 := $MakePtr(false, add($locals, 288)) // $t85 := freeze_ref($t55) $t85 := $t55 - // $t86 := Table::borrow($t85, $t84) + // $t86 := Table::borrow($t85, $t84) $t86 := A2_Table_borrow$address_A2_Tables_Balance$($t85, $t84) - // $t87 := borrow_field.value($t86) + // $t87 := borrow_field<0x2::Tables::Balance>.value($t86) $t87 := $t86 // $t88 := read_ref($t87) $t88 := $LoadU256($t87) @@ -2013,9 +2013,9 @@ object "test_A2_Tables_test_struct" { mstore(add($locals, 320), $t92) // $t93 := borrow_local($t13) $t93 := $MakePtr(false, add($locals, 320)) - // $t94 := Table::remove($t55, $t93) + // $t94 := Table::remove($t55, $t93) $t94 := A2_Table_remove$address_A2_Tables_Balance$($t55, $t93) - // $t95 := unpack Tables::Balance($t94) + // $t95 := unpack 0x2::Tables::Balance($t94) $t95 := $MemoryLoadU256(add($t94, 0)) $Free($t94, 32) // $t96 := ==($t95, $t30) @@ -2048,7 +2048,7 @@ object "test_A2_Tables_test_struct" { $t99 := $MakePtr(false, add($locals, 352)) // $t100 := freeze_ref($t55) $t100 := $t55 - // $t101 := Table::contains($t100, $t99) + // $t101 := Table::contains($t100, $t99) $t101 := A2_Table_contains$address_A2_Tables_Balance$($t100, $t99) // $t102 := !($t101) $t102 := $LogicalNot($t101) @@ -2356,7 +2356,7 @@ object "test_A2_Tables_test_table_of_tables" { $Abort($t75) } case 4 { - // $t45 := Table::empty>() + // $t45 := Table::empty>() mstore(add($locals, 128), A2_Table_empty$address_A2_Table_Table$address_A2_U256_U256$$()) // $t51 := 3743106036130323098097120681749450326028 $t51 := 3743106036130323098097120681749450326028 @@ -2364,7 +2364,7 @@ object "test_A2_Tables_test_table_of_tables" { $t52 := 15312706511442230855851857334429569515566 // $t53 := 26542024619833200150143219379677920493647 $t53 := 26542024619833200150143219379677920493647 - // $t46 := Table::empty() + // $t46 := Table::empty() mstore($locals, A2_Table_empty$address_A2_U256_U256$()) // $t54 := borrow_local($t46) $t54 := $MakePtr(false, $locals) @@ -2374,9 +2374,9 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 32), $t55) // $t56 := borrow_local($t0) $t56 := $MakePtr(false, add($locals, 32)) - // Table::insert($t54, $t56, $t51) + // Table::insert($t54, $t56, $t51) A2_Table_insert$address_A2_U256_U256$($t54, $t56, $t51) - // $t47 := Table::empty() + // $t47 := Table::empty() mstore(add($locals, 64), A2_Table_empty$address_A2_U256_U256$()) // $t57 := borrow_local($t47) $t57 := $MakePtr(false, add($locals, 64)) @@ -2386,7 +2386,7 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 96), $t58) // $t59 := borrow_local($t22) $t59 := $MakePtr(false, add($locals, 96)) - // Table::insert($t57, $t59, $t52) + // Table::insert($t57, $t59, $t52) A2_Table_insert$address_A2_U256_U256$($t57, $t59, $t52) // $t60 := borrow_local($t45) $t60 := $MakePtr(false, add($locals, 128)) @@ -2398,7 +2398,7 @@ object "test_A2_Tables_test_table_of_tables" { $t62 := $MakePtr(false, add($locals, 160)) // $t63 := move($t46) $t63 := mload($locals) - // Table::insert>($t60, $t62, $t63) + // Table::insert>($t60, $t62, $t63) A2_Table_insert$address_A2_Table_Table$address_A2_U256_U256$$($t60, $t62, $t63) // $t64 := borrow_local($t45) $t64 := $MakePtr(false, add($locals, 128)) @@ -2410,7 +2410,7 @@ object "test_A2_Tables_test_table_of_tables" { $t66 := $MakePtr(false, add($locals, 192)) // $t67 := move($t47) $t67 := mload(add($locals, 64)) - // Table::insert>($t64, $t66, $t67) + // Table::insert>($t64, $t66, $t67) A2_Table_insert$address_A2_Table_Table$address_A2_U256_U256$$($t64, $t66, $t67) // $t68 := borrow_local($t45) $t68 := $MakePtr(false, add($locals, 128)) @@ -2420,7 +2420,7 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 224), $t69) // $t70 := borrow_local($t1) $t70 := $MakePtr(false, add($locals, 224)) - // $t71 := Table::borrow>($t68, $t70) + // $t71 := Table::borrow>($t68, $t70) $t71 := A2_Table_borrow$address_A2_Table_Table$address_A2_U256_U256$$($t68, $t70) // $t72 := 0xab $t72 := 0xab @@ -2428,7 +2428,7 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 256), $t72) // $t73 := borrow_local($t44) $t73 := $MakePtr(false, add($locals, 256)) - // $t74 := Table::contains($t71, $t73) + // $t74 := Table::contains($t71, $t73) $t74 := A2_Table_contains$address_A2_U256_U256$($t71, $t73) // if ($t74) goto L1 else goto L0 switch $t74 @@ -2445,7 +2445,7 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 288), $t77) // $t78 := borrow_local($t5) $t78 := $MakePtr(false, add($locals, 288)) - // $t79 := Table::borrow>($t76, $t78) + // $t79 := Table::borrow>($t76, $t78) $t79 := A2_Table_borrow$address_A2_Table_Table$address_A2_U256_U256$$($t76, $t78) // $t80 := 0xcd $t80 := 0xcd @@ -2453,7 +2453,7 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 320), $t80) // $t81 := borrow_local($t4) $t81 := $MakePtr(false, add($locals, 320)) - // $t82 := Table::contains($t79, $t81) + // $t82 := Table::contains($t79, $t81) $t82 := A2_Table_contains$address_A2_U256_U256$($t79, $t81) // if ($t82) goto L4 else goto L3 switch $t82 @@ -2482,7 +2482,7 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 352), $t85) // $t86 := borrow_local($t9) $t86 := $MakePtr(false, add($locals, 352)) - // $t87 := Table::borrow>($t84, $t86) + // $t87 := Table::borrow>($t84, $t86) $t87 := A2_Table_borrow$address_A2_Table_Table$address_A2_U256_U256$$($t84, $t86) // $t88 := 0xab $t88 := 0xab @@ -2490,7 +2490,7 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 384), $t88) // $t89 := borrow_local($t8) $t89 := $MakePtr(false, add($locals, 384)) - // $t90 := Table::borrow($t87, $t89) + // $t90 := Table::borrow($t87, $t89) $t90 := A2_Table_borrow$address_A2_U256_U256$($t87, $t89) // $t91 := read_ref($t90) $t91 := $LoadU256($t90) @@ -2523,7 +2523,7 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 416), $t95) // $t96 := borrow_local($t14) $t96 := $MakePtr(false, add($locals, 416)) - // $t97 := Table::borrow>($t94, $t96) + // $t97 := Table::borrow>($t94, $t96) $t97 := A2_Table_borrow$address_A2_Table_Table$address_A2_U256_U256$$($t94, $t96) // $t98 := 0xcd $t98 := 0xcd @@ -2531,7 +2531,7 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 448), $t98) // $t99 := borrow_local($t13) $t99 := $MakePtr(false, add($locals, 448)) - // $t100 := Table::borrow($t97, $t99) + // $t100 := Table::borrow($t97, $t99) $t100 := A2_Table_borrow$address_A2_U256_U256$($t97, $t99) // $t101 := read_ref($t100) $t101 := $LoadU256($t100) @@ -2564,7 +2564,7 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 480), $t105) // $t106 := borrow_local($t18) $t106 := $MakePtr(false, add($locals, 480)) - // $t107 := Table::borrow_mut>($t104, $t106) + // $t107 := Table::borrow_mut>($t104, $t106) $t107 := A2_Table_borrow_mut$address_A2_Table_Table$address_A2_U256_U256$$($t104, $t106) // $t108 := 0xef $t108 := 0xef @@ -2572,7 +2572,7 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 512), $t108) // $t109 := borrow_local($t17) $t109 := $MakePtr(false, add($locals, 512)) - // Table::insert($t107, $t109, $t53) + // Table::insert($t107, $t109, $t53) A2_Table_insert$address_A2_U256_U256$($t107, $t109, $t53) // $t110 := borrow_local($t45) $t110 := $MakePtr(false, add($locals, 128)) @@ -2582,7 +2582,7 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 544), $t111) // $t112 := borrow_local($t23) $t112 := $MakePtr(false, add($locals, 544)) - // $t113 := Table::borrow>($t110, $t112) + // $t113 := Table::borrow>($t110, $t112) $t113 := A2_Table_borrow$address_A2_Table_Table$address_A2_U256_U256$$($t110, $t112) // $t114 := 0xef $t114 := 0xef @@ -2590,7 +2590,7 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 576), $t114) // $t115 := borrow_local($t21) $t115 := $MakePtr(false, add($locals, 576)) - // $t116 := Table::borrow($t113, $t115) + // $t116 := Table::borrow($t113, $t115) $t116 := A2_Table_borrow$address_A2_U256_U256$($t113, $t115) // $t117 := read_ref($t116) $t117 := $LoadU256($t116) @@ -2623,7 +2623,7 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 608), $t121) // $t122 := borrow_local($t27) $t122 := $MakePtr(false, add($locals, 608)) - // $t123 := Table::borrow>($t120, $t122) + // $t123 := Table::borrow>($t120, $t122) $t123 := A2_Table_borrow$address_A2_Table_Table$address_A2_U256_U256$$($t120, $t122) // $t124 := 0xab $t124 := 0xab @@ -2631,7 +2631,7 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 640), $t124) // $t125 := borrow_local($t26) $t125 := $MakePtr(false, add($locals, 640)) - // $t126 := Table::borrow($t123, $t125) + // $t126 := Table::borrow($t123, $t125) $t126 := A2_Table_borrow$address_A2_U256_U256$($t123, $t125) // $t127 := read_ref($t126) $t127 := $LoadU256($t126) @@ -2664,7 +2664,7 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 672), $t131) // $t132 := borrow_local($t31) $t132 := $MakePtr(false, add($locals, 672)) - // $t133 := Table::borrow_mut>($t130, $t132) + // $t133 := Table::borrow_mut>($t130, $t132) $t133 := A2_Table_borrow_mut$address_A2_Table_Table$address_A2_U256_U256$$($t130, $t132) // $t134 := 0xcd $t134 := 0xcd @@ -2672,7 +2672,7 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 704), $t134) // $t135 := borrow_local($t30) $t135 := $MakePtr(false, add($locals, 704)) - // $t136 := Table::remove($t133, $t135) + // $t136 := Table::remove($t133, $t135) $t136 := A2_Table_remove$address_A2_U256_U256$($t133, $t135) // $t137 := ==($t136, $t52) $t137 := $Eq($t136, $t52) @@ -2703,7 +2703,7 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 736), $t140) // $t141 := borrow_local($t36) $t141 := $MakePtr(false, add($locals, 736)) - // $t142 := Table::borrow>($t139, $t141) + // $t142 := Table::borrow>($t139, $t141) $t142 := A2_Table_borrow$address_A2_Table_Table$address_A2_U256_U256$$($t139, $t141) // $t143 := 0xcd $t143 := 0xcd @@ -2711,7 +2711,7 @@ object "test_A2_Tables_test_table_of_tables" { mstore(add($locals, 768), $t143) // $t144 := borrow_local($t35) $t144 := $MakePtr(false, add($locals, 768)) - // $t145 := Table::contains($t142, $t144) + // $t145 := Table::contains($t142, $t144) $t145 := A2_Table_contains$address_A2_U256_U256$($t142, $t144) // $t146 := !($t145) $t146 := $LogicalNot($t145) @@ -2742,13 +2742,13 @@ object "test_A2_Tables_test_table_of_tables" { $t149 := $MakePtr(false, add($locals, 800)) // $t150 := move($t45) $t150 := mload(add($locals, 128)) - // $t151 := pack Tables::S>($t150) + // $t151 := pack 0x2::Tables::S>($t150) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t150) $t151 := $mem } - // move_to>>($t151, $t149) + // move_to<0x2::Tables::S>>($t151, $t149) { let $base_offset := $MakeTypeStorageBase(0, 0xc5110c9a, $LoadU256($t149)) if $AlignedStorageLoad($base_offset) { @@ -3047,7 +3047,7 @@ object "test_A2_Tables_test_u256" { $Abort($t14) } case 4 { - // $t3 := Table::empty() + // $t3 := Table::empty<0x2::U256::U256, 0x2::U256::U256>() mstore($locals, A2_Table_empty$A2_U256_U256_A2_U256_U256$()) // $t6 := 26542024619833200150143219379677920493647 $t6 := 26542024619833200150143219379677920493647 @@ -3061,13 +3061,13 @@ object "test_A2_Tables_test_u256" { $t9 := $MakePtr(false, $locals) // $t10 := borrow_local($t2) $t10 := $MakePtr(false, add($locals, 32)) - // Table::insert($t9, $t10, $t7) + // Table::insert<0x2::U256::U256, 0x2::U256::U256>($t9, $t10, $t7) A2_Table_insert$A2_U256_U256_A2_U256_U256$($t9, $t10, $t7) // $t11 := borrow_local($t3) $t11 := $MakePtr(false, $locals) // $t12 := borrow_local($t2) $t12 := $MakePtr(false, add($locals, 32)) - // $t13 := Table::contains($t11, $t12) + // $t13 := Table::contains<0x2::U256::U256, 0x2::U256::U256>($t11, $t12) $t13 := A2_Table_contains$A2_U256_U256_A2_U256_U256$($t11, $t12) // if ($t13) goto L1 else goto L0 switch $t13 @@ -3080,7 +3080,7 @@ object "test_A2_Tables_test_u256" { $t15 := $MakePtr(false, $locals) // $t16 := borrow_local($t2) $t16 := $MakePtr(false, add($locals, 32)) - // $t17 := Table::borrow($t15, $t16) + // $t17 := Table::borrow<0x2::U256::U256, 0x2::U256::U256>($t15, $t16) $t17 := A2_Table_borrow$A2_U256_U256_A2_U256_U256$($t15, $t16) // $t18 := read_ref($t17) $t18 := $LoadU256($t17) @@ -3111,7 +3111,7 @@ object "test_A2_Tables_test_u256" { $t22 := $MakePtr(false, $locals) // $t23 := borrow_local($t2) $t23 := $MakePtr(false, add($locals, 32)) - // $t24 := Table::borrow_mut($t22, $t23) + // $t24 := Table::borrow_mut<0x2::U256::U256, 0x2::U256::U256>($t22, $t23) $t24 := A2_Table_borrow_mut$A2_U256_U256_A2_U256_U256$($t22, $t23) // write_ref($t24, $t8) $StoreU256($t24, $t8) @@ -3119,7 +3119,7 @@ object "test_A2_Tables_test_u256" { $t25 := $MakePtr(false, $locals) // $t26 := borrow_local($t2) $t26 := $MakePtr(false, add($locals, 32)) - // $t27 := Table::borrow($t25, $t26) + // $t27 := Table::borrow<0x2::U256::U256, 0x2::U256::U256>($t25, $t26) $t27 := A2_Table_borrow$A2_U256_U256_A2_U256_U256$($t25, $t26) // $t28 := read_ref($t27) $t28 := $LoadU256($t27) @@ -3152,13 +3152,13 @@ object "test_A2_Tables_test_u256" { $t32 := $MakePtr(false, add($locals, 64)) // $t33 := move($t3) $t33 := mload($locals) - // $t34 := pack Tables::S($t33) + // $t34 := pack 0x2::Tables::S<0x2::U256::U256, 0x2::U256::U256>($t33) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t33) $t34 := $mem } - // move_to>($t34, $t32) + // move_to<0x2::Tables::S<0x2::U256::U256, 0x2::U256::U256>>($t34, $t32) { let $base_offset := $MakeTypeStorageBase(0, 0xa20c17a3, $LoadU256($t32)) if $AlignedStorageLoad($base_offset) { @@ -3576,13 +3576,13 @@ object "test_A2_Tables_test_vector" { $t59 := $MakePtr(false, add($locals, 192)) // $t60 := move($t22) $t60 := mload($locals) - // $t61 := pack Tables::S>($t60) + // $t61 := pack 0x2::Tables::S>($t60) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t60) $t61 := $mem } - // move_to>>($t61, $t59) + // move_to<0x2::Tables::S>>($t61, $t59) { let $base_offset := $MakeTypeStorageBase(0, 0xa0362133, $LoadU256($t59)) if $AlignedStorageLoad($base_offset) { @@ -3598,7 +3598,7 @@ object "test_A2_Tables_test_vector" { } // $t62 := 0x42 $t62 := 0x42 - // $t63 := borrow_global>>($t62) + // $t63 := borrow_global<0x2::Tables::S>>($t62) { let $base_offset := $MakeTypeStorageBase(0, 0xa0362133, $t62) if iszero($AlignedStorageLoad($base_offset)) { @@ -3606,7 +3606,7 @@ object "test_A2_Tables_test_vector" { } $t63 := $MakePtr(true, add($base_offset, 32)) } - // $t64 := borrow_field>>.t($t63) + // $t64 := borrow_field<0x2::Tables::S>>.t($t63) $t64 := $t63 // $t65 := 42 $t65 := 42 @@ -3620,7 +3620,7 @@ object "test_A2_Tables_test_vector" { $t68 := 0x1013 // vector::push_back
($t67, $t68) A1_vector_push_back$address$($t67, $t68) - // $t69 := borrow_field>>.t($t63) + // $t69 := borrow_field<0x2::Tables::S>>.t($t63) $t69 := $t63 // $t70 := 42 $t70 := 42 @@ -3656,7 +3656,7 @@ object "test_A2_Tables_test_vector" { } case 17 { // label L14 - // $t77 := borrow_field>>.t($t63) + // $t77 := borrow_field<0x2::Tables::S>>.t($t63) $t77 := $t63 // $t78 := 42 $t78 := 42 @@ -3696,7 +3696,7 @@ object "test_A2_Tables_test_vector" { } case 20 { // label L17 - // $t87 := borrow_field>>.t($t63) + // $t87 := borrow_field<0x2::Tables::S>>.t($t63) $t87 := $t63 // $t88 := 42 $t88 := 42 @@ -3798,7 +3798,7 @@ object "test_A2_Tables_test_vector" { } case 29 { // label L26 - // $t109 := borrow_field>>.t($t63) + // $t109 := borrow_field<0x2::Tables::S>>.t($t63) $t109 := $t63 // $t110 := 42 $t110 := 42 diff --git a/third_party/move/evm/move-to-yul/tests/TestABIStructs.exp b/third_party/move/evm/move-to-yul/tests/TestABIStructs.exp index 49a3eb0ea4782..06d766ee22495 100644 --- a/third_party/move/evm/move-to-yul/tests/TestABIStructs.exp +++ b/third_party/move/evm/move-to-yul/tests/TestABIStructs.exp @@ -101,13 +101,13 @@ object "A2_M" { $t1 := true // $t2 := M::pack_S($t0, $t1) $t2 := A2_M_pack_S($t0, $t1) - // $t3 := pack M::Event_S($t2) + // $t3 := pack 0x2::M::Event_S($t2) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t2) $t3 := $mem } - // Evm::emit($t3) + // Evm::emit<0x2::M::Event_S>($t3) A2_Evm_emit$A2_M_Event_S$($t3) // return () } @@ -130,7 +130,7 @@ object "A2_M" { $t1 := $MakePtr(false, $locals) // $t2 := 0 $t2 := 0 - // $t3 := vector::borrow>($t1, $t2) + // $t3 := vector::borrow>($t1, $t2) $t3 := A1_vector_borrow$vec$A2_M_S$$($t1, $t2) // $t4 := read_ref($t3) $t4 := $LoadU256($t3) @@ -244,7 +244,7 @@ object "A2_M" { function A2_M_pack_S(a, b) -> $result { let s2, $t4, $t5, $t6, $t7, $t8 let $locals := $Malloc(32) - // $t3 := vector::empty() + // $t3 := vector::empty<0x2::M::S2>() mstore($locals, A1_vector_empty$A2_M_S2$()) // $t4 := (u128)($t0) $t4 := $CastU128(a) @@ -252,11 +252,11 @@ object "A2_M" { $t5 := A2_M_pack_S2($t4) // $t6 := borrow_local($t3) $t6 := $MakePtr(false, $locals) - // vector::push_back($t6, $t5) + // vector::push_back<0x2::M::S2>($t6, $t5) A1_vector_push_back$A2_M_S2$($t6, $t5) // $t7 := move($t3) $t7 := mload($locals) - // $t8 := pack M::S($t0, $t1, $t7) + // $t8 := pack 0x2::M::S($t0, $t1, $t7) { let $mem := $Malloc(41) $MemoryStoreU64(add($mem, 32), a) @@ -314,7 +314,7 @@ object "A2_M" { A1_vector_push_back$u128$($t2, x) // $t3 := move($t1) $t3 := mload($locals) - // $t4 := pack M::S2($t3) + // $t4 := pack 0x2::M::S2($t3) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t3) @@ -1068,13 +1068,13 @@ object "test_A2_M_test_abi_S" { _s := A2_M_decode_S($t7) // $t8 := borrow_local($t2) $t8 := $MakePtr(false, s) - // $t9 := borrow_field.a($t8) + // $t9 := borrow_field<0x2::M::S>.a($t8) $t9 := $IndexPtr($t8, 32) // $t10 := read_ref($t9) $t10 := $LoadU64($t9) // $t11 := borrow_local($t0) $t11 := $MakePtr(false, _s) - // $t12 := borrow_field.a($t11) + // $t12 := borrow_field<0x2::M::S>.a($t11) $t12 := $IndexPtr($t11, 32) // $t13 := read_ref($t12) $t13 := $LoadU64($t12) @@ -1089,7 +1089,7 @@ object "test_A2_M_test_abi_S" { // label L2 // $t16 := borrow_local($t0) $t16 := $MakePtr(false, _s) - // $t17 := borrow_field.a($t16) + // $t17 := borrow_field<0x2::M::S>.a($t16) $t17 := $IndexPtr($t16, 32) // $t18 := read_ref($t17) $t18 := $LoadU64($t17) @@ -1118,13 +1118,13 @@ object "test_A2_M_test_abi_S" { // label L5 // $t22 := borrow_local($t2) $t22 := $MakePtr(false, s) - // $t23 := borrow_field.b($t22) + // $t23 := borrow_field<0x2::M::S>.b($t22) $t23 := $IndexPtr($t22, 40) // $t24 := read_ref($t23) $t24 := $LoadU8($t23) // $t25 := borrow_local($t0) $t25 := $MakePtr(false, _s) - // $t26 := borrow_field.b($t25) + // $t26 := borrow_field<0x2::M::S>.b($t25) $t26 := $IndexPtr($t25, 40) // $t27 := read_ref($t26) $t27 := $LoadU8($t26) @@ -1151,7 +1151,7 @@ object "test_A2_M_test_abi_S" { // label L8 // $t30 := borrow_local($t0) $t30 := $MakePtr(false, _s) - // $t31 := borrow_field.b($t30) + // $t31 := borrow_field<0x2::M::S>.b($t30) $t31 := $IndexPtr($t30, 40) // $t32 := read_ref($t31) $t32 := $LoadU8($t31) @@ -1180,7 +1180,7 @@ object "test_A2_M_test_abi_S" { // label L11 // $t36 := borrow_local($t2) $t36 := $MakePtr(false, s) - // $t37 := borrow_field.c($t36) + // $t37 := borrow_field<0x2::M::S>.c($t36) $t37 := $t36 // $t3 := read_ref($t37) mstore($locals, $LoadU256($t37)) @@ -1222,7 +1222,7 @@ object "test_A2_M_test_abi_S" { } // $t38 := borrow_local($t0) $t38 := $MakePtr(false, _s) - // $t39 := borrow_field.c($t38) + // $t39 := borrow_field<0x2::M::S>.c($t38) $t39 := $t38 // $t1 := read_ref($t39) mstore(add($locals, 32), $LoadU256($t39)) @@ -1264,7 +1264,7 @@ object "test_A2_M_test_abi_S" { } // $t40 := borrow_local($t3) $t40 := $MakePtr(false, $locals) - // $t41 := vector::length($t40) + // $t41 := vector::length<0x2::M::S2>($t40) $t41 := A1_vector_length$A2_M_S2$($t40) // $t42 := 1 $t42 := 1 @@ -1291,7 +1291,7 @@ object "test_A2_M_test_abi_S" { // label L14 // $t45 := borrow_local($t1) $t45 := $MakePtr(false, add($locals, 32)) - // $t46 := vector::length($t45) + // $t46 := vector::length<0x2::M::S2>($t45) $t46 := A1_vector_length$A2_M_S2$($t45) // $t47 := 1 $t47 := 1 @@ -1320,9 +1320,9 @@ object "test_A2_M_test_abi_S" { $t50 := $MakePtr(false, add($locals, 32)) // $t51 := 0 $t51 := 0 - // $t52 := vector::borrow($t50, $t51) + // $t52 := vector::borrow<0x2::M::S2>($t50, $t51) $t52 := A1_vector_borrow$A2_M_S2$($t50, $t51) - // $t53 := borrow_field.x($t52) + // $t53 := borrow_field<0x2::M::S2>.x($t52) $t53 := $t52 // $t54 := 0 $t54 := 0 @@ -1404,7 +1404,7 @@ object "test_A2_M_test_abi_S" { function A2_M_pack_S(a, b) -> $result { let s2, $t4, $t5, $t6, $t7, $t8 let $locals := $Malloc(32) - // $t3 := vector::empty() + // $t3 := vector::empty<0x2::M::S2>() mstore($locals, A1_vector_empty$A2_M_S2$()) // $t4 := (u128)($t0) $t4 := $CastU128(a) @@ -1412,11 +1412,11 @@ object "test_A2_M_test_abi_S" { $t5 := A2_M_pack_S2($t4) // $t6 := borrow_local($t3) $t6 := $MakePtr(false, $locals) - // vector::push_back($t6, $t5) + // vector::push_back<0x2::M::S2>($t6, $t5) A1_vector_push_back$A2_M_S2$($t6, $t5) // $t7 := move($t3) $t7 := mload($locals) - // $t8 := pack M::S($t0, $t1, $t7) + // $t8 := pack 0x2::M::S($t0, $t1, $t7) { let $mem := $Malloc(41) $MemoryStoreU64(add($mem, 32), a) @@ -1474,7 +1474,7 @@ object "test_A2_M_test_abi_S" { A1_vector_push_back$u128$($t2, x) // $t3 := move($t1) $t3 := mload($locals) - // $t4 := pack M::S2($t3) + // $t4 := pack 0x2::M::S2($t3) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t3) @@ -2216,7 +2216,7 @@ object "test_A2_M_test_abi_String" { } function A1_ascii_into_bytes(string) -> $result { let $t1 - // $t1 := unpack ascii::String($t0) + // $t1 := unpack 0x1::ascii::String($t0) $t1 := $MemoryLoadU256(add(string, 0)) $Free(string, 32) // return $t1 @@ -2249,7 +2249,7 @@ object "test_A2_M_test_abi_String" { function A1_ascii_as_bytes(string) -> $result { let $t1 - // $t1 := borrow_field.bytes($t0) + // $t1 := borrow_field<0x1::ascii::String>.bytes($t0) $t1 := string // return $t1 $result := $t1 @@ -2297,7 +2297,7 @@ object "test_A2_M_test_abi_String" { x := A1_ascii_try_string(bytes) // $t2 := borrow_local($t1) $t2 := $MakePtr(false, x) - // $t3 := option::is_some($t2) + // $t3 := option::is_some<0x1::ascii::String>($t2) $t3 := A1_option_is_some$A1_ascii_String$($t2) // if ($t3) goto L1 else goto L0 switch $t3 @@ -2308,7 +2308,7 @@ object "test_A2_M_test_abi_String" { // label L2 // $t5 := move($t1) $t5 := x - // $t6 := option::destroy_some($t5) + // $t6 := option::destroy_some<0x1::ascii::String>($t5) $t6 := A1_option_destroy_some$A1_ascii_String$($t5) // return $t6 $result := $t6 @@ -2349,7 +2349,7 @@ object "test_A2_M_test_abi_String" { // label L2 // $t6 := move($t0) $t6 := t - // $t2 := unpack option::Option<#0>($t6) + // $t2 := unpack 0x1::option::Option<#0>($t6) mstore($locals, $MemoryLoadU256(add($t6, 0))) $Free($t6, 32) // $t7 := borrow_local($t2) @@ -2409,7 +2409,7 @@ object "test_A2_M_test_abi_String" { } function A1_option_is_some$A1_ascii_String$(t) -> $result { let $t1, $t2, $t3 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$A1_ascii_String$($t1) @@ -2477,13 +2477,13 @@ object "test_A2_M_test_abi_String" { // assert forall j: num: Range(0, $t4): ascii::is_valid_char(Index($t0, j)) // $t14 := move($t0) $t14 := mload($locals) - // $t15 := pack ascii::String($t14) + // $t15 := pack 0x1::ascii::String($t14) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t14) $t15 := $mem } - // $t16 := option::some($t15) + // $t16 := option::some<0x1::ascii::String>($t15) $t16 := A1_option_some$A1_ascii_String$($t15) // return $t16 $result := $t16 @@ -2509,7 +2509,7 @@ object "test_A2_M_test_abi_String" { } case 7 { // label L4 - // $t12 := option::none() + // $t12 := option::none<0x1::ascii::String>() $t12 := A1_option_none$A1_ascii_String$() // return $t12 $result := $t12 @@ -2532,7 +2532,7 @@ object "test_A2_M_test_abi_String" { let $t0, $t1 // $t0 := vector::empty<#0>() $t0 := A1_vector_empty$A1_ascii_String$() - // $t1 := pack option::Option<#0>($t0) + // $t1 := pack 0x1::option::Option<#0>($t0) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t0) @@ -2550,7 +2550,7 @@ object "test_A2_M_test_abi_String" { let $t1, $t2 // $t1 := vector::singleton<#0>($t0) $t1 := A1_vector_singleton$A1_ascii_String$(e) - // $t2 := pack option::Option<#0>($t1) + // $t2 := pack 0x1::option::Option<#0>($t1) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t1) diff --git a/third_party/move/evm/move-to-yul/tests/TestExternalResult.exp b/third_party/move/evm/move-to-yul/tests/TestExternalResult.exp index 0efdfd006698d..53d43f5dcd892 100644 --- a/third_party/move/evm/move-to-yul/tests/TestExternalResult.exp +++ b/third_party/move/evm/move-to-yul/tests/TestExternalResult.exp @@ -171,7 +171,7 @@ object "test_A2_M_extract_err_data" { } function A2_ExternalResult_unwrap_err_data$u64$(result) -> $result { let err_data, err_reason, panic_code, $t4, $t5, $t6, $t7, $t8 - // ($t4, $t5, $t6, $t7) := unpack ExternalResult::ExternalResult<#0>($t0) + // ($t4, $t5, $t6, $t7) := unpack 0x2::ExternalResult::ExternalResult<#0>($t0) $t4 := $MemoryLoadU256(add(result, 0)) $t5 := $MemoryLoadU256(add(result, 32)) $t6 := $MemoryLoadU256(add(result, 64)) @@ -181,7 +181,7 @@ object "test_A2_M_extract_err_data" { A1_option_destroy_none$u64$($t4) // option::destroy_none>($t6) A1_option_destroy_none$vec$u8$$($t6) - // option::destroy_none($t7) + // option::destroy_none<0x2::U256::U256>($t7) A1_option_destroy_none$A2_U256_U256$($t7) // $t8 := option::destroy_some>($t5) $t8 := A1_option_destroy_some$vec$u8$$($t5) @@ -221,7 +221,7 @@ object "test_A2_M_extract_err_data" { // label L2 // $t6 := move($t0) $t6 := t - // $t2 := unpack option::Option<#0>($t6) + // $t2 := unpack 0x1::option::Option<#0>($t6) mstore($locals, $MemoryLoadU256(add($t6, 0))) $Free($t6, 32) // $t7 := borrow_local($t2) @@ -274,7 +274,7 @@ object "test_A2_M_extract_err_data" { } function A1_option_is_some$vec$u8$$(t) -> $result { let $t1, $t2, $t3 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$vec$u8$$($t1) @@ -332,7 +332,7 @@ object "test_A2_M_extract_err_data" { // label L2 // $t4 := move($t0) $t4 := t - // $t5 := unpack option::Option<#0>($t4) + // $t5 := unpack 0x1::option::Option<#0>($t4) $t5 := $MemoryLoadU256(add($t4, 0)) $Free($t4, 32) // vector::destroy_empty<#0>($t5) @@ -351,7 +351,7 @@ object "test_A2_M_extract_err_data" { } function A1_option_is_none$A2_U256_U256$(t) -> $result { let $t1, $t2 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$A2_U256_U256$($t1) @@ -407,7 +407,7 @@ object "test_A2_M_extract_err_data" { // label L2 // $t4 := move($t0) $t4 := t - // $t5 := unpack option::Option<#0>($t4) + // $t5 := unpack 0x1::option::Option<#0>($t4) $t5 := $MemoryLoadU256(add($t4, 0)) $Free($t4, 32) // vector::destroy_empty<#0>($t5) @@ -420,7 +420,7 @@ object "test_A2_M_extract_err_data" { function A1_option_is_none$vec$u8$$(t) -> $result { let $t1, $t2 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$vec$u8$$($t1) @@ -459,7 +459,7 @@ object "test_A2_M_extract_err_data" { // label L2 // $t4 := move($t0) $t4 := t - // $t5 := unpack option::Option<#0>($t4) + // $t5 := unpack 0x1::option::Option<#0>($t4) $t5 := $MemoryLoadU256(add($t4, 0)) $Free($t4, 32) // vector::destroy_empty<#0>($t5) @@ -478,7 +478,7 @@ object "test_A2_M_extract_err_data" { } function A1_option_is_none$u64$(t) -> $result { let $t1, $t2 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$u64$($t1) @@ -505,7 +505,7 @@ object "test_A2_M_extract_err_data" { } function A2_ExternalResult_is_err_data$u64$(result) -> $result { let $t1, $t2 - // $t1 := borrow_field>.err_data($t0) + // $t1 := borrow_field<0x2::ExternalResult::ExternalResult<#0>>.err_data($t0) { let $field_ptr := $IndexPtr(result, 32) $t1 := $MakePtr($IsStoragePtr($field_ptr), $LoadU256($field_ptr)) @@ -532,9 +532,9 @@ object "test_A2_M_extract_err_data" { $t2 := A1_option_some$vec$u8$$(error) // $t3 := option::none>() $t3 := A1_option_none$vec$u8$$() - // $t4 := option::none() + // $t4 := option::none<0x2::U256::U256>() $t4 := A1_option_none$A2_U256_U256$() - // $t5 := pack ExternalResult::ExternalResult<#0>($t1, $t2, $t3, $t4) + // $t5 := pack 0x2::ExternalResult::ExternalResult<#0>($t1, $t2, $t3, $t4) { let $mem := $Malloc(128) $MemoryStoreU256(add($mem, 0), $t1) @@ -551,7 +551,7 @@ object "test_A2_M_extract_err_data" { let $t0, $t1 // $t0 := vector::empty<#0>() $t0 := A1_vector_empty$A2_U256_U256$() - // $t1 := pack option::Option<#0>($t0) + // $t1 := pack 0x1::option::Option<#0>($t0) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t0) @@ -569,7 +569,7 @@ object "test_A2_M_extract_err_data" { let $t0, $t1 // $t0 := vector::empty<#0>() $t0 := A1_vector_empty$vec$u8$$() - // $t1 := pack option::Option<#0>($t0) + // $t1 := pack 0x1::option::Option<#0>($t0) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t0) @@ -587,7 +587,7 @@ object "test_A2_M_extract_err_data" { let $t1, $t2 // $t1 := vector::singleton<#0>($t0) $t1 := A1_vector_singleton$vec$u8$$(e) - // $t2 := pack option::Option<#0>($t1) + // $t2 := pack 0x1::option::Option<#0>($t1) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t1) @@ -645,7 +645,7 @@ object "test_A2_M_extract_err_data" { let $t0, $t1 // $t0 := vector::empty<#0>() $t0 := A1_vector_empty$u64$() - // $t1 := pack option::Option<#0>($t0) + // $t1 := pack 0x1::option::Option<#0>($t0) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t0) @@ -1082,7 +1082,7 @@ object "test_A2_M_extract_err_reason" { } function A2_ExternalResult_unwrap_err_reason$u64$(result) -> $result { let err_data, err_reason, panic_code, $t4, $t5, $t6, $t7, $t8 - // ($t4, $t5, $t6, $t7) := unpack ExternalResult::ExternalResult<#0>($t0) + // ($t4, $t5, $t6, $t7) := unpack 0x2::ExternalResult::ExternalResult<#0>($t0) $t4 := $MemoryLoadU256(add(result, 0)) $t5 := $MemoryLoadU256(add(result, 32)) $t6 := $MemoryLoadU256(add(result, 64)) @@ -1092,7 +1092,7 @@ object "test_A2_M_extract_err_reason" { A1_option_destroy_none$u64$($t4) // option::destroy_none>($t5) A1_option_destroy_none$vec$u8$$($t5) - // option::destroy_none($t7) + // option::destroy_none<0x2::U256::U256>($t7) A1_option_destroy_none$A2_U256_U256$($t7) // $t8 := option::destroy_some>($t6) $t8 := A1_option_destroy_some$vec$u8$$($t6) @@ -1132,7 +1132,7 @@ object "test_A2_M_extract_err_reason" { // label L2 // $t6 := move($t0) $t6 := t - // $t2 := unpack option::Option<#0>($t6) + // $t2 := unpack 0x1::option::Option<#0>($t6) mstore($locals, $MemoryLoadU256(add($t6, 0))) $Free($t6, 32) // $t7 := borrow_local($t2) @@ -1185,7 +1185,7 @@ object "test_A2_M_extract_err_reason" { } function A1_option_is_some$vec$u8$$(t) -> $result { let $t1, $t2, $t3 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$vec$u8$$($t1) @@ -1243,7 +1243,7 @@ object "test_A2_M_extract_err_reason" { // label L2 // $t4 := move($t0) $t4 := t - // $t5 := unpack option::Option<#0>($t4) + // $t5 := unpack 0x1::option::Option<#0>($t4) $t5 := $MemoryLoadU256(add($t4, 0)) $Free($t4, 32) // vector::destroy_empty<#0>($t5) @@ -1262,7 +1262,7 @@ object "test_A2_M_extract_err_reason" { } function A1_option_is_none$A2_U256_U256$(t) -> $result { let $t1, $t2 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$A2_U256_U256$($t1) @@ -1318,7 +1318,7 @@ object "test_A2_M_extract_err_reason" { // label L2 // $t4 := move($t0) $t4 := t - // $t5 := unpack option::Option<#0>($t4) + // $t5 := unpack 0x1::option::Option<#0>($t4) $t5 := $MemoryLoadU256(add($t4, 0)) $Free($t4, 32) // vector::destroy_empty<#0>($t5) @@ -1331,7 +1331,7 @@ object "test_A2_M_extract_err_reason" { function A1_option_is_none$vec$u8$$(t) -> $result { let $t1, $t2 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$vec$u8$$($t1) @@ -1370,7 +1370,7 @@ object "test_A2_M_extract_err_reason" { // label L2 // $t4 := move($t0) $t4 := t - // $t5 := unpack option::Option<#0>($t4) + // $t5 := unpack 0x1::option::Option<#0>($t4) $t5 := $MemoryLoadU256(add($t4, 0)) $Free($t4, 32) // vector::destroy_empty<#0>($t5) @@ -1389,7 +1389,7 @@ object "test_A2_M_extract_err_reason" { } function A1_option_is_none$u64$(t) -> $result { let $t1, $t2 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$u64$($t1) @@ -1416,7 +1416,7 @@ object "test_A2_M_extract_err_reason" { } function A2_ExternalResult_is_err_reason$u64$(result) -> $result { let $t1, $t2 - // $t1 := borrow_field>.err_reason($t0) + // $t1 := borrow_field<0x2::ExternalResult::ExternalResult<#0>>.err_reason($t0) { let $field_ptr := $IndexPtr(result, 64) $t1 := $MakePtr($IsStoragePtr($field_ptr), $LoadU256($field_ptr)) @@ -1443,9 +1443,9 @@ object "test_A2_M_extract_err_reason" { $t6 := A1_option_some$vec$u8$$(error) // $t7 := option::none>() $t7 := A1_option_none$vec$u8$$() - // $t8 := option::none() + // $t8 := option::none<0x2::U256::U256>() $t8 := A1_option_none$A2_U256_U256$() - // $t9 := pack ExternalResult::ExternalResult<#0>($t5, $t7, $t6, $t8) + // $t9 := pack 0x2::ExternalResult::ExternalResult<#0>($t5, $t7, $t6, $t8) { let $mem := $Malloc(128) $MemoryStoreU256(add($mem, 0), $t5) @@ -1462,7 +1462,7 @@ object "test_A2_M_extract_err_reason" { let $t0, $t1 // $t0 := vector::empty<#0>() $t0 := A1_vector_empty$A2_U256_U256$() - // $t1 := pack option::Option<#0>($t0) + // $t1 := pack 0x1::option::Option<#0>($t0) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t0) @@ -1480,7 +1480,7 @@ object "test_A2_M_extract_err_reason" { let $t0, $t1 // $t0 := vector::empty<#0>() $t0 := A1_vector_empty$vec$u8$$() - // $t1 := pack option::Option<#0>($t0) + // $t1 := pack 0x1::option::Option<#0>($t0) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t0) @@ -1498,7 +1498,7 @@ object "test_A2_M_extract_err_reason" { let $t1, $t2 // $t1 := vector::singleton<#0>($t0) $t1 := A1_vector_singleton$vec$u8$$(e) - // $t2 := pack option::Option<#0>($t1) + // $t2 := pack 0x1::option::Option<#0>($t1) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t1) @@ -1556,7 +1556,7 @@ object "test_A2_M_extract_err_reason" { let $t0, $t1 // $t0 := vector::empty<#0>() $t0 := A1_vector_empty$u64$() - // $t1 := pack option::Option<#0>($t0) + // $t1 := pack 0x1::option::Option<#0>($t0) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t0) @@ -1950,7 +1950,7 @@ object "test_A2_M_extract_panic_code" { function A2_ExternalResult_unwrap_panic$u64$(result) -> $result { let err_data, err_reason, panic_code, $t4, $t5, $t6, $t7, $t8 - // ($t4, $t5, $t6, $t7) := unpack ExternalResult::ExternalResult<#0>($t0) + // ($t4, $t5, $t6, $t7) := unpack 0x2::ExternalResult::ExternalResult<#0>($t0) $t4 := $MemoryLoadU256(add(result, 0)) $t5 := $MemoryLoadU256(add(result, 32)) $t6 := $MemoryLoadU256(add(result, 64)) @@ -1962,7 +1962,7 @@ object "test_A2_M_extract_panic_code" { A1_option_destroy_none$vec$u8$$($t6) // option::destroy_none>($t5) A1_option_destroy_none$vec$u8$$($t5) - // $t8 := option::destroy_some($t7) + // $t8 := option::destroy_some<0x2::U256::U256>($t7) $t8 := A1_option_destroy_some$A2_U256_U256$($t7) // return $t8 $result := $t8 @@ -2000,7 +2000,7 @@ object "test_A2_M_extract_panic_code" { // label L2 // $t6 := move($t0) $t6 := t - // $t2 := unpack option::Option<#0>($t6) + // $t2 := unpack 0x1::option::Option<#0>($t6) mstore($locals, $MemoryLoadU256(add($t6, 0))) $Free($t6, 32) // $t7 := borrow_local($t2) @@ -2036,7 +2036,7 @@ object "test_A2_M_extract_panic_code" { } function A1_option_is_some$A2_U256_U256$(t) -> $result { let $t1, $t2, $t3 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$A2_U256_U256$($t1) @@ -2094,7 +2094,7 @@ object "test_A2_M_extract_panic_code" { // label L2 // $t4 := move($t0) $t4 := t - // $t5 := unpack option::Option<#0>($t4) + // $t5 := unpack 0x1::option::Option<#0>($t4) $t5 := $MemoryLoadU256(add($t4, 0)) $Free($t4, 32) // vector::destroy_empty<#0>($t5) @@ -2113,7 +2113,7 @@ object "test_A2_M_extract_panic_code" { } function A1_option_is_none$vec$u8$$(t) -> $result { let $t1, $t2 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$vec$u8$$($t1) @@ -2169,7 +2169,7 @@ object "test_A2_M_extract_panic_code" { // label L2 // $t4 := move($t0) $t4 := t - // $t5 := unpack option::Option<#0>($t4) + // $t5 := unpack 0x1::option::Option<#0>($t4) $t5 := $MemoryLoadU256(add($t4, 0)) $Free($t4, 32) // vector::destroy_empty<#0>($t5) @@ -2188,7 +2188,7 @@ object "test_A2_M_extract_panic_code" { } function A1_option_is_none$u64$(t) -> $result { let $t1, $t2 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$u64$($t1) @@ -2215,12 +2215,12 @@ object "test_A2_M_extract_panic_code" { } function A2_ExternalResult_is_panic$u64$(result) -> $result { let $t1, $t2 - // $t1 := borrow_field>.panic_code($t0) + // $t1 := borrow_field<0x2::ExternalResult::ExternalResult<#0>>.panic_code($t0) { let $field_ptr := $IndexPtr(result, 96) $t1 := $MakePtr($IsStoragePtr($field_ptr), $LoadU256($field_ptr)) } - // $t2 := option::is_some($t1) + // $t2 := option::is_some<0x2::U256::U256>($t1) $t2 := A1_option_is_some$A2_U256_U256$($t1) // return $t2 $result := $t2 @@ -2242,9 +2242,9 @@ object "test_A2_M_extract_panic_code" { $t6 := A1_option_none$vec$u8$$() // $t7 := option::none>() $t7 := A1_option_none$vec$u8$$() - // $t8 := option::some($t0) + // $t8 := option::some<0x2::U256::U256>($t0) $t8 := A1_option_some$A2_U256_U256$(panic_code) - // $t9 := pack ExternalResult::ExternalResult<#0>($t5, $t7, $t6, $t8) + // $t9 := pack 0x2::ExternalResult::ExternalResult<#0>($t5, $t7, $t6, $t8) { let $mem := $Malloc(128) $MemoryStoreU256(add($mem, 0), $t5) @@ -2261,7 +2261,7 @@ object "test_A2_M_extract_panic_code" { let $t1, $t2 // $t1 := vector::singleton<#0>($t0) $t1 := A1_vector_singleton$A2_U256_U256$(e) - // $t2 := pack option::Option<#0>($t1) + // $t2 := pack 0x1::option::Option<#0>($t1) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t1) @@ -2309,7 +2309,7 @@ object "test_A2_M_extract_panic_code" { let $t0, $t1 // $t0 := vector::empty<#0>() $t0 := A1_vector_empty$vec$u8$$() - // $t1 := pack option::Option<#0>($t0) + // $t1 := pack 0x1::option::Option<#0>($t0) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t0) @@ -2327,7 +2327,7 @@ object "test_A2_M_extract_panic_code" { let $t0, $t1 // $t0 := vector::empty<#0>() $t0 := A1_vector_empty$u64$() - // $t1 := pack option::Option<#0>($t0) + // $t1 := pack 0x1::option::Option<#0>($t0) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t0) @@ -2632,7 +2632,7 @@ object "test_A2_M_extract_value" { function A2_ExternalResult_unwrap$u64$(result) -> $result { let err_data, err_reason, panic_code, value, $t5, $t6, $t7, $t8, $t9 - // ($t5, $t6, $t7, $t8) := unpack ExternalResult::ExternalResult<#0>($t0) + // ($t5, $t6, $t7, $t8) := unpack 0x2::ExternalResult::ExternalResult<#0>($t0) $t5 := $MemoryLoadU256(add(result, 0)) $t6 := $MemoryLoadU256(add(result, 32)) $t7 := $MemoryLoadU256(add(result, 64)) @@ -2642,7 +2642,7 @@ object "test_A2_M_extract_value" { A1_option_destroy_none$vec$u8$$($t6) // option::destroy_none>($t7) A1_option_destroy_none$vec$u8$$($t7) - // option::destroy_none($t8) + // option::destroy_none<0x2::U256::U256>($t8) A1_option_destroy_none$A2_U256_U256$($t8) // $t9 := option::destroy_some<#0>($t5) $t9 := A1_option_destroy_some$u64$($t5) @@ -2682,7 +2682,7 @@ object "test_A2_M_extract_value" { // label L2 // $t6 := move($t0) $t6 := t - // $t2 := unpack option::Option<#0>($t6) + // $t2 := unpack 0x1::option::Option<#0>($t6) mstore($locals, $MemoryLoadU256(add($t6, 0))) $Free($t6, 32) // $t7 := borrow_local($t2) @@ -2718,7 +2718,7 @@ object "test_A2_M_extract_value" { } function A1_option_is_some$u64$(t) -> $result { let $t1, $t2, $t3 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$u64$($t1) @@ -2776,7 +2776,7 @@ object "test_A2_M_extract_value" { // label L2 // $t4 := move($t0) $t4 := t - // $t5 := unpack option::Option<#0>($t4) + // $t5 := unpack 0x1::option::Option<#0>($t4) $t5 := $MemoryLoadU256(add($t4, 0)) $Free($t4, 32) // vector::destroy_empty<#0>($t5) @@ -2795,7 +2795,7 @@ object "test_A2_M_extract_value" { } function A1_option_is_none$A2_U256_U256$(t) -> $result { let $t1, $t2 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$A2_U256_U256$($t1) @@ -2851,7 +2851,7 @@ object "test_A2_M_extract_value" { // label L2 // $t4 := move($t0) $t4 := t - // $t5 := unpack option::Option<#0>($t4) + // $t5 := unpack 0x1::option::Option<#0>($t4) $t5 := $MemoryLoadU256(add($t4, 0)) $Free($t4, 32) // vector::destroy_empty<#0>($t5) @@ -2870,7 +2870,7 @@ object "test_A2_M_extract_value" { } function A1_option_is_none$vec$u8$$(t) -> $result { let $t1, $t2 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$vec$u8$$($t1) @@ -2897,7 +2897,7 @@ object "test_A2_M_extract_value" { } function A2_ExternalResult_is_ok$u64$(result) -> $result { let $t1, $t2 - // $t1 := borrow_field>.value($t0) + // $t1 := borrow_field<0x2::ExternalResult::ExternalResult<#0>>.value($t0) { $t1 := $MakePtr($IsStoragePtr(result), $LoadU256(result)) } @@ -2923,9 +2923,9 @@ object "test_A2_M_extract_value" { $t2 := A1_option_none$vec$u8$$() // $t3 := option::none>() $t3 := A1_option_none$vec$u8$$() - // $t4 := option::none() + // $t4 := option::none<0x2::U256::U256>() $t4 := A1_option_none$A2_U256_U256$() - // $t5 := pack ExternalResult::ExternalResult<#0>($t1, $t2, $t3, $t4) + // $t5 := pack 0x2::ExternalResult::ExternalResult<#0>($t1, $t2, $t3, $t4) { let $mem := $Malloc(128) $MemoryStoreU256(add($mem, 0), $t1) @@ -2942,7 +2942,7 @@ object "test_A2_M_extract_value" { let $t0, $t1 // $t0 := vector::empty<#0>() $t0 := A1_vector_empty$A2_U256_U256$() - // $t1 := pack option::Option<#0>($t0) + // $t1 := pack 0x1::option::Option<#0>($t0) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t0) @@ -2960,7 +2960,7 @@ object "test_A2_M_extract_value" { let $t0, $t1 // $t0 := vector::empty<#0>() $t0 := A1_vector_empty$vec$u8$$() - // $t1 := pack option::Option<#0>($t0) + // $t1 := pack 0x1::option::Option<#0>($t0) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t0) @@ -2978,7 +2978,7 @@ object "test_A2_M_extract_value" { let $t1, $t2 // $t1 := vector::singleton<#0>($t0) $t1 := A1_vector_singleton$u64$(e) - // $t2 := pack option::Option<#0>($t1) + // $t2 := pack 0x1::option::Option<#0>($t1) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t1) diff --git a/third_party/move/evm/move-to-yul/tests/TestStringLiteral.exp b/third_party/move/evm/move-to-yul/tests/TestStringLiteral.exp index 7ff6ff55a5591..d268ad845efe2 100644 --- a/third_party/move/evm/move-to-yul/tests/TestStringLiteral.exp +++ b/third_party/move/evm/move-to-yul/tests/TestStringLiteral.exp @@ -76,13 +76,13 @@ object "test_A2_M_h1" { $MemoryStoreU64($t5, 3) $MemoryStoreU64(add($t5, 8), $ClosestGreaterPowerOfTwo(3)) copy_literal_string_to_memory_2053440334(add($t5, 32)) - // $t6 := pack M::T($t5) + // $t6 := pack 0x2::M::T($t5) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t5) $t6 := $mem } - // move_to($t6, $t4) + // move_to<0x2::M::T>($t6, $t4) { let $base_offset := $MakeTypeStorageBase(0, 0x3948ca0a, $LoadU256($t4)) if $AlignedStorageLoad($base_offset) { @@ -111,7 +111,7 @@ object "test_A2_M_h1" { } // $t7 := 0x3 $t7 := 0x3 - // $t8 := borrow_global($t7) + // $t8 := borrow_global<0x2::M::T>($t7) { let $base_offset := $MakeTypeStorageBase(0, 0x3948ca0a, $t7) if iszero($AlignedStorageLoad($base_offset)) { @@ -119,7 +119,7 @@ object "test_A2_M_h1" { } $t8 := $MakePtr(true, add($base_offset, 32)) } - // $t9 := borrow_field.s($t8) + // $t9 := borrow_field<0x2::M::T>.s($t8) $t9 := $t8 // $t1 := read_ref($t9) mstore(add($locals, 32), $LoadU256($t9)) @@ -253,7 +253,7 @@ object "test_A2_M_h1" { copy_literal_string_to_memory_2788570470(add($t36, 32)) // $t37 := 0x3 $t37 := 0x3 - // $t38 := borrow_global($t37) + // $t38 := borrow_global<0x2::M::T>($t37) { let $base_offset := $MakeTypeStorageBase(0, 0x3948ca0a, $t37) if iszero($AlignedStorageLoad($base_offset)) { @@ -261,7 +261,7 @@ object "test_A2_M_h1" { } $t38 := $MakePtr(true, add($base_offset, 32)) } - // $t39 := borrow_field.s($t38) + // $t39 := borrow_field<0x2::M::T>.s($t38) $t39 := $t38 // write_ref($t39, $t36) if $IsStoragePtr($t39){ @@ -279,7 +279,7 @@ object "test_A2_M_h1" { $StoreU256($t39, $t36) // $t40 := 0x3 $t40 := 0x3 - // $t41 := borrow_global($t40) + // $t41 := borrow_global<0x2::M::T>($t40) { let $base_offset := $MakeTypeStorageBase(0, 0x3948ca0a, $t40) if iszero($AlignedStorageLoad($base_offset)) { @@ -287,7 +287,7 @@ object "test_A2_M_h1" { } $t41 := $MakePtr(true, add($base_offset, 32)) } - // $t42 := borrow_field.s($t41) + // $t42 := borrow_field<0x2::M::T>.s($t41) $t42 := $t41 // $t2 := read_ref($t42) mstore(add($locals, 64), $LoadU256($t42)) diff --git a/third_party/move/evm/move-to-yul/tests/Vectors.exp b/third_party/move/evm/move-to-yul/tests/Vectors.exp index b173205f13135..0c52bbbddab24 100644 --- a/third_party/move/evm/move-to-yul/tests/Vectors.exp +++ b/third_party/move/evm/move-to-yul/tests/Vectors.exp @@ -622,7 +622,7 @@ object "test_A2_Vectors_test_borrow_mut" { $t5 := false // $t6 := 123 $t6 := 123 - // $t7 := pack Vectors::S($t4, $t5, $t6) + // $t7 := pack 0x2::Vectors::S($t4, $t5, $t6) { let $mem := $Malloc(25) $MemoryStoreU128(add($mem, 0), $t4) @@ -630,29 +630,29 @@ object "test_A2_Vectors_test_borrow_mut" { $MemoryStoreU64(add($mem, 16), $t6) $t7 := $mem } - // vector::push_back($t3, $t7) + // vector::push_back<0x2::Vectors::S>($t3, $t7) A1_vector_push_back$A2_Vectors_S$($t3, $t7) // $t8 := borrow_local($t2) $t8 := $MakePtr(false, $locals) // $t9 := 0 $t9 := 0 - // $t10 := vector::borrow_mut($t8, $t9) + // $t10 := vector::borrow_mut<0x2::Vectors::S>($t8, $t9) $t10 := A1_vector_borrow_mut$A2_Vectors_S$($t8, $t9) // $t11 := 90 $t11 := 90 - // $t12 := borrow_field.x($t10) + // $t12 := borrow_field<0x2::Vectors::S>.x($t10) $t12 := $t10 // write_ref($t12, $t11) $StoreU128($t12, $t11) // $t13 := false $t13 := false - // $t14 := borrow_field.y($t10) + // $t14 := borrow_field<0x2::Vectors::S>.y($t10) $t14 := $IndexPtr($t10, 24) // write_ref($t14, $t13) $StoreU8($t14, $t13) // $t15 := 1028 $t15 := 1028 - // $t16 := borrow_field.z($t10) + // $t16 := borrow_field<0x2::Vectors::S>.z($t10) $t16 := $IndexPtr($t10, 16) // write_ref($t16, $t15) $StoreU64($t16, $t15) @@ -660,9 +660,9 @@ object "test_A2_Vectors_test_borrow_mut" { $t17 := $MakePtr(false, $locals) // $t18 := 0 $t18 := 0 - // $t19 := vector::borrow($t17, $t18) + // $t19 := vector::borrow<0x2::Vectors::S>($t17, $t18) $t19 := A1_vector_borrow$A2_Vectors_S$($t17, $t18) - // $t20 := borrow_field.x($t19) + // $t20 := borrow_field<0x2::Vectors::S>.x($t19) $t20 := $t19 // $t21 := read_ref($t20) $t21 := $LoadU128($t20) @@ -681,9 +681,9 @@ object "test_A2_Vectors_test_borrow_mut" { $t25 := $MakePtr(false, $locals) // $t26 := 0 $t26 := 0 - // $t27 := vector::borrow($t25, $t26) + // $t27 := vector::borrow<0x2::Vectors::S>($t25, $t26) $t27 := A1_vector_borrow$A2_Vectors_S$($t25, $t26) - // $t28 := borrow_field.y($t27) + // $t28 := borrow_field<0x2::Vectors::S>.y($t27) $t28 := $IndexPtr($t27, 24) // $t29 := read_ref($t28) $t29 := $LoadU8($t28) @@ -714,9 +714,9 @@ object "test_A2_Vectors_test_borrow_mut" { $t33 := $MakePtr(false, $locals) // $t34 := 0 $t34 := 0 - // $t35 := vector::borrow($t33, $t34) + // $t35 := vector::borrow<0x2::Vectors::S>($t33, $t34) $t35 := A1_vector_borrow$A2_Vectors_S$($t33, $t34) - // $t36 := borrow_field.z($t35) + // $t36 := borrow_field<0x2::Vectors::S>.z($t35) $t36 := $IndexPtr($t35, 16) // $t37 := read_ref($t36) $t37 := $LoadU64($t36) @@ -747,9 +747,9 @@ object "test_A2_Vectors_test_borrow_mut" { $t41 := $MakePtr(false, $locals) // $t42 := 1 $t42 := 1 - // $t43 := vector::borrow($t41, $t42) + // $t43 := vector::borrow<0x2::Vectors::S>($t41, $t42) $t43 := A1_vector_borrow$A2_Vectors_S$($t41, $t42) - // $t44 := borrow_field.x($t43) + // $t44 := borrow_field<0x2::Vectors::S>.x($t43) $t44 := $t43 // $t45 := read_ref($t44) $t45 := $LoadU128($t44) @@ -780,9 +780,9 @@ object "test_A2_Vectors_test_borrow_mut" { $t49 := $MakePtr(false, $locals) // $t50 := 1 $t50 := 1 - // $t51 := vector::borrow($t49, $t50) + // $t51 := vector::borrow<0x2::Vectors::S>($t49, $t50) $t51 := A1_vector_borrow$A2_Vectors_S$($t49, $t50) - // $t52 := borrow_field.y($t51) + // $t52 := borrow_field<0x2::Vectors::S>.y($t51) $t52 := $IndexPtr($t51, 24) // $t53 := read_ref($t52) $t53 := $LoadU8($t52) @@ -813,9 +813,9 @@ object "test_A2_Vectors_test_borrow_mut" { $t57 := $MakePtr(false, $locals) // $t58 := 1 $t58 := 1 - // $t59 := vector::borrow($t57, $t58) + // $t59 := vector::borrow<0x2::Vectors::S>($t57, $t58) $t59 := A1_vector_borrow$A2_Vectors_S$($t57, $t58) - // $t60 := borrow_field.z($t59) + // $t60 := borrow_field<0x2::Vectors::S>.z($t59) $t60 := $IndexPtr($t59, 16) // $t61 := read_ref($t60) $t61 := $LoadU64($t60) @@ -846,23 +846,23 @@ object "test_A2_Vectors_test_borrow_mut" { $t65 := $MakePtr(false, $locals) // $t66 := 1 $t66 := 1 - // $t67 := vector::borrow_mut($t65, $t66) + // $t67 := vector::borrow_mut<0x2::Vectors::S>($t65, $t66) $t67 := A1_vector_borrow_mut$A2_Vectors_S$($t65, $t66) // $t68 := 10 $t68 := 10 - // $t69 := borrow_field.x($t67) + // $t69 := borrow_field<0x2::Vectors::S>.x($t67) $t69 := $t67 // write_ref($t69, $t68) $StoreU128($t69, $t68) // $t70 := true $t70 := true - // $t71 := borrow_field.y($t67) + // $t71 := borrow_field<0x2::Vectors::S>.y($t67) $t71 := $IndexPtr($t67, 24) // write_ref($t71, $t70) $StoreU8($t71, $t70) // $t72 := 456 $t72 := 456 - // $t73 := borrow_field.z($t67) + // $t73 := borrow_field<0x2::Vectors::S>.z($t67) $t73 := $IndexPtr($t67, 16) // write_ref($t73, $t72) $StoreU64($t73, $t72) @@ -870,9 +870,9 @@ object "test_A2_Vectors_test_borrow_mut" { $t74 := $MakePtr(false, $locals) // $t75 := 1 $t75 := 1 - // $t76 := vector::borrow($t74, $t75) + // $t76 := vector::borrow<0x2::Vectors::S>($t74, $t75) $t76 := A1_vector_borrow$A2_Vectors_S$($t74, $t75) - // $t77 := borrow_field.x($t76) + // $t77 := borrow_field<0x2::Vectors::S>.x($t76) $t77 := $t76 // $t78 := read_ref($t77) $t78 := $LoadU128($t77) @@ -903,9 +903,9 @@ object "test_A2_Vectors_test_borrow_mut" { $t82 := $MakePtr(false, $locals) // $t83 := 1 $t83 := 1 - // $t84 := vector::borrow($t82, $t83) + // $t84 := vector::borrow<0x2::Vectors::S>($t82, $t83) $t84 := A1_vector_borrow$A2_Vectors_S$($t82, $t83) - // $t85 := borrow_field.y($t84) + // $t85 := borrow_field<0x2::Vectors::S>.y($t84) $t85 := $IndexPtr($t84, 24) // $t86 := read_ref($t85) $t86 := $LoadU8($t85) @@ -936,9 +936,9 @@ object "test_A2_Vectors_test_borrow_mut" { $t90 := $MakePtr(false, $locals) // $t91 := 1 $t91 := 1 - // $t92 := vector::borrow($t90, $t91) + // $t92 := vector::borrow<0x2::Vectors::S>($t90, $t91) $t92 := A1_vector_borrow$A2_Vectors_S$($t90, $t91) - // $t93 := borrow_field.z($t92) + // $t93 := borrow_field<0x2::Vectors::S>.z($t92) $t93 := $IndexPtr($t92, 16) // $t94 := read_ref($t93) $t94 := $LoadU64($t93) @@ -1014,7 +1014,7 @@ object "test_A2_Vectors_test_borrow_mut" { function A2_Vectors_one_elem_struct() -> $result { let $t1, $t2, $t3, $t4, $t5, $t6 let $locals := $Malloc(32) - // $t0 := vector::empty() + // $t0 := vector::empty<0x2::Vectors::S>() mstore($locals, A1_vector_empty$A2_Vectors_S$()) // $t1 := borrow_local($t0) $t1 := $MakePtr(false, $locals) @@ -1024,7 +1024,7 @@ object "test_A2_Vectors_test_borrow_mut" { $t3 := true // $t4 := 789 $t4 := 789 - // $t5 := pack Vectors::S($t2, $t3, $t4) + // $t5 := pack 0x2::Vectors::S($t2, $t3, $t4) { let $mem := $Malloc(25) $MemoryStoreU128(add($mem, 0), $t2) @@ -1032,7 +1032,7 @@ object "test_A2_Vectors_test_borrow_mut" { $MemoryStoreU64(add($mem, 16), $t4) $t5 := $mem } - // vector::push_back($t1, $t5) + // vector::push_back<0x2::Vectors::S>($t1, $t5) A1_vector_push_back$A2_Vectors_S$($t1, $t5) // $t6 := move($t0) $t6 := mload($locals) @@ -1418,7 +1418,7 @@ object "test_A2_Vectors_test_destroy_non_empty_fail" { let $t0 // $t0 := Vectors::one_elem_struct() $t0 := A2_Vectors_one_elem_struct() - // vector::destroy_empty($t0) + // vector::destroy_empty<0x2::Vectors::S>($t0) A1_vector_destroy_empty$A2_Vectors_S$($t0) // return () } @@ -1432,7 +1432,7 @@ object "test_A2_Vectors_test_destroy_non_empty_fail" { function A2_Vectors_one_elem_struct() -> $result { let $t1, $t2, $t3, $t4, $t5, $t6 let $locals := $Malloc(32) - // $t0 := vector::empty() + // $t0 := vector::empty<0x2::Vectors::S>() mstore($locals, A1_vector_empty$A2_Vectors_S$()) // $t1 := borrow_local($t0) $t1 := $MakePtr(false, $locals) @@ -1442,7 +1442,7 @@ object "test_A2_Vectors_test_destroy_non_empty_fail" { $t3 := true // $t4 := 789 $t4 := 789 - // $t5 := pack Vectors::S($t2, $t3, $t4) + // $t5 := pack 0x2::Vectors::S($t2, $t3, $t4) { let $mem := $Malloc(25) $MemoryStoreU128(add($mem, 0), $t2) @@ -1450,7 +1450,7 @@ object "test_A2_Vectors_test_destroy_non_empty_fail" { $MemoryStoreU64(add($mem, 16), $t4) $t5 := $mem } - // vector::push_back($t1, $t5) + // vector::push_back<0x2::Vectors::S>($t1, $t5) A1_vector_push_back$A2_Vectors_S$($t1, $t5) // $t6 := move($t0) $t6 := mload($locals) @@ -3121,7 +3121,7 @@ object "test_A2_Vectors_test_one_elem_struct" { mstore($locals, A2_Vectors_one_elem_struct()) // $t1 := borrow_local($t0) $t1 := $MakePtr(false, $locals) - // $t2 := vector::length($t1) + // $t2 := vector::length<0x2::Vectors::S>($t1) $t2 := A1_vector_length$A2_Vectors_S$($t1) // $t3 := 1 $t3 := 1 @@ -3138,9 +3138,9 @@ object "test_A2_Vectors_test_one_elem_struct" { $t6 := $MakePtr(false, $locals) // $t7 := 0 $t7 := 0 - // $t8 := vector::borrow($t6, $t7) + // $t8 := vector::borrow<0x2::Vectors::S>($t6, $t7) $t8 := A1_vector_borrow$A2_Vectors_S$($t6, $t7) - // $t9 := borrow_field.x($t8) + // $t9 := borrow_field<0x2::Vectors::S>.x($t8) $t9 := $t8 // $t10 := read_ref($t9) $t10 := $LoadU128($t9) @@ -3171,9 +3171,9 @@ object "test_A2_Vectors_test_one_elem_struct" { $t14 := $MakePtr(false, $locals) // $t15 := 0 $t15 := 0 - // $t16 := vector::borrow($t14, $t15) + // $t16 := vector::borrow<0x2::Vectors::S>($t14, $t15) $t16 := A1_vector_borrow$A2_Vectors_S$($t14, $t15) - // $t17 := borrow_field.y($t16) + // $t17 := borrow_field<0x2::Vectors::S>.y($t16) $t17 := $IndexPtr($t16, 24) // $t18 := read_ref($t17) $t18 := $LoadU8($t17) @@ -3204,9 +3204,9 @@ object "test_A2_Vectors_test_one_elem_struct" { $t22 := $MakePtr(false, $locals) // $t23 := 0 $t23 := 0 - // $t24 := vector::borrow($t22, $t23) + // $t24 := vector::borrow<0x2::Vectors::S>($t22, $t23) $t24 := A1_vector_borrow$A2_Vectors_S$($t22, $t23) - // $t25 := borrow_field.z($t24) + // $t25 := borrow_field<0x2::Vectors::S>.z($t24) $t25 := $IndexPtr($t24, 16) // $t26 := read_ref($t25) $t26 := $LoadU64($t25) @@ -3257,7 +3257,7 @@ object "test_A2_Vectors_test_one_elem_struct" { function A2_Vectors_one_elem_struct() -> $result { let $t1, $t2, $t3, $t4, $t5, $t6 let $locals := $Malloc(32) - // $t0 := vector::empty() + // $t0 := vector::empty<0x2::Vectors::S>() mstore($locals, A1_vector_empty$A2_Vectors_S$()) // $t1 := borrow_local($t0) $t1 := $MakePtr(false, $locals) @@ -3267,7 +3267,7 @@ object "test_A2_Vectors_test_one_elem_struct" { $t3 := true // $t4 := 789 $t4 := 789 - // $t5 := pack Vectors::S($t2, $t3, $t4) + // $t5 := pack 0x2::Vectors::S($t2, $t3, $t4) { let $mem := $Malloc(25) $MemoryStoreU128(add($mem, 0), $t2) @@ -3275,7 +3275,7 @@ object "test_A2_Vectors_test_one_elem_struct" { $MemoryStoreU64(add($mem, 16), $t4) $t5 := $mem } - // vector::push_back($t1, $t5) + // vector::push_back<0x2::Vectors::S>($t1, $t5) A1_vector_push_back$A2_Vectors_S$($t1, $t5) // $t6 := move($t0) $t6 := mload($locals) @@ -6666,9 +6666,9 @@ object "test_A2_Vectors_test_vector_equality_struct" { $Abort($t7) } case 4 { - // $t2 := vector::empty() + // $t2 := vector::empty<0x2::Vectors::R>() mstore($locals, A1_vector_empty$A2_Vectors_R$()) - // $t3 := vector::empty() + // $t3 := vector::empty<0x2::Vectors::R>() mstore(add($locals, 32), A1_vector_empty$A2_Vectors_R$()) // $t4 := copy($t2) $t4 := mload($locals) @@ -6689,7 +6689,7 @@ object "test_A2_Vectors_test_vector_equality_struct" { $t9 := true // $t10 := 9 $t10 := 9 - // $t11 := pack Vectors::S($t8, $t9, $t10) + // $t11 := pack 0x2::Vectors::S($t8, $t9, $t10) { let $mem := $Malloc(25) $MemoryStoreU128(add($mem, 0), $t8) @@ -6699,7 +6699,7 @@ object "test_A2_Vectors_test_vector_equality_struct" { } // $t12 := Vectors::one_elem_u64() $t12 := A2_Vectors_one_elem_u64() - // $t13 := pack Vectors::R($t11, $t12) + // $t13 := pack 0x2::Vectors::R($t11, $t12) { let $mem := $Malloc(64) $MemoryStoreU256(add($mem, 0), $t11) @@ -6708,7 +6708,7 @@ object "test_A2_Vectors_test_vector_equality_struct" { } // $t14 := borrow_local($t2) $t14 := $MakePtr(false, $locals) - // vector::push_back($t14, $t13) + // vector::push_back<0x2::Vectors::R>($t14, $t13) A1_vector_push_back$A2_Vectors_R$($t14, $t13) // $t15 := copy($t2) $t15 := mload($locals) @@ -6737,7 +6737,7 @@ object "test_A2_Vectors_test_vector_equality_struct" { // label L5 // $t19 := borrow_local($t3) $t19 := $MakePtr(false, add($locals, 32)) - // vector::push_back($t19, $t13) + // vector::push_back<0x2::Vectors::R>($t19, $t13) A1_vector_push_back$A2_Vectors_R$($t19, $t13) // $t20 := copy($t2) $t20 := mload($locals) @@ -6770,7 +6770,7 @@ object "test_A2_Vectors_test_vector_equality_struct" { $t25 := false // $t26 := 9 $t26 := 9 - // $t27 := pack Vectors::S($t24, $t25, $t26) + // $t27 := pack 0x2::Vectors::S($t24, $t25, $t26) { let $mem := $Malloc(25) $MemoryStoreU128(add($mem, 0), $t24) @@ -6780,7 +6780,7 @@ object "test_A2_Vectors_test_vector_equality_struct" { } // $t28 := Vectors::one_elem_u64() $t28 := A2_Vectors_one_elem_u64() - // $t29 := pack Vectors::R($t27, $t28) + // $t29 := pack 0x2::Vectors::R($t27, $t28) { let $mem := $Malloc(64) $MemoryStoreU256(add($mem, 0), $t27) @@ -6789,7 +6789,7 @@ object "test_A2_Vectors_test_vector_equality_struct" { } // $t30 := borrow_local($t2) $t30 := $MakePtr(false, $locals) - // vector::push_back($t30, $t13) + // vector::push_back<0x2::Vectors::R>($t30, $t13) A1_vector_push_back$A2_Vectors_R$($t30, $t13) // $t31 := copy($t2) $t31 := mload($locals) @@ -6818,7 +6818,7 @@ object "test_A2_Vectors_test_vector_equality_struct" { // label L11 // $t35 := borrow_local($t3) $t35 := $MakePtr(false, add($locals, 32)) - // vector::push_back($t35, $t29) + // vector::push_back<0x2::Vectors::R>($t35, $t29) A1_vector_push_back$A2_Vectors_R$($t35, $t29) // $t36 := move($t2) $t36 := mload($locals) @@ -7282,7 +7282,7 @@ object "test_A2_Vectors_test_vectors_in_structs" { $t9 := true // $t10 := 9 $t10 := 9 - // $t11 := pack Vectors::S($t8, $t9, $t10) + // $t11 := pack 0x2::Vectors::S($t8, $t9, $t10) { let $mem := $Malloc(25) $MemoryStoreU128(add($mem, 0), $t8) @@ -7292,7 +7292,7 @@ object "test_A2_Vectors_test_vectors_in_structs" { } // $t12 := move($t1) $t12 := mload($locals) - // $t0 := pack Vectors::R($t11, $t12) + // $t0 := pack 0x2::Vectors::R($t11, $t12) { let $mem := $Malloc(64) $MemoryStoreU256(add($mem, 0), $t11) @@ -7301,7 +7301,7 @@ object "test_A2_Vectors_test_vectors_in_structs" { } // $t13 := borrow_local($t0) $t13 := $MakePtr(false, r) - // $t14 := borrow_field.v($t13) + // $t14 := borrow_field<0x2::Vectors::R>.v($t13) $t14 := $IndexPtr($t13, 32) // $t15 := vector::length($t14) $t15 := A1_vector_length$u64$($t14) @@ -7318,7 +7318,7 @@ object "test_A2_Vectors_test_vectors_in_structs" { // label L2 // $t19 := borrow_local($t0) $t19 := $MakePtr(false, r) - // $t20 := borrow_field.v($t19) + // $t20 := borrow_field<0x2::Vectors::R>.v($t19) $t20 := $IndexPtr($t19, 32) // $t21 := 0 $t21 := 0 @@ -7351,7 +7351,7 @@ object "test_A2_Vectors_test_vectors_in_structs" { // label L5 // $t27 := borrow_local($t0) $t27 := $MakePtr(false, r) - // $t28 := borrow_field.v($t27) + // $t28 := borrow_field<0x2::Vectors::R>.v($t27) $t28 := $IndexPtr($t27, 32) // $t29 := 1 $t29 := 1 @@ -7384,7 +7384,7 @@ object "test_A2_Vectors_test_vectors_in_structs" { // label L8 // $t35 := borrow_local($t0) $t35 := $MakePtr(false, r) - // $t36 := borrow_field.v($t35) + // $t36 := borrow_field<0x2::Vectors::R>.v($t35) $t36 := $IndexPtr($t35, 32) // $t37 := 2 $t37 := 2 @@ -7419,7 +7419,7 @@ object "test_A2_Vectors_test_vectors_in_structs" { $t43 := 41 // $t44 := borrow_local($t0) $t44 := $MakePtr(false, r) - // $t45 := borrow_field.v($t44) + // $t45 := borrow_field<0x2::Vectors::R>.v($t44) $t45 := $IndexPtr($t44, 32) // $t46 := 1 $t46 := 1 @@ -7429,7 +7429,7 @@ object "test_A2_Vectors_test_vectors_in_structs" { $StoreU64($t47, $t43) // $t48 := borrow_local($t0) $t48 := $MakePtr(false, r) - // $t49 := borrow_field.v($t48) + // $t49 := borrow_field<0x2::Vectors::R>.v($t48) $t49 := $IndexPtr($t48, 32) // $t50 := 1 $t50 := 1 @@ -7464,7 +7464,7 @@ object "test_A2_Vectors_test_vectors_in_structs" { $t56 := A2_Vectors_one_elem_u64() // $t57 := borrow_local($t0) $t57 := $MakePtr(false, r) - // $t58 := borrow_field.v($t57) + // $t58 := borrow_field<0x2::Vectors::R>.v($t57) $t58 := $IndexPtr($t57, 32) // write_ref($t58, $t56) if $IsStoragePtr($t58){ @@ -7482,7 +7482,7 @@ object "test_A2_Vectors_test_vectors_in_structs" { $StoreU256($t58, $t56) // $t59 := borrow_local($t0) $t59 := $MakePtr(false, r) - // $t60 := borrow_field.v($t59) + // $t60 := borrow_field<0x2::Vectors::R>.v($t59) $t60 := $IndexPtr($t59, 32) // $t61 := vector::length($t60) $t61 := A1_vector_length$u64$($t60) @@ -7511,7 +7511,7 @@ object "test_A2_Vectors_test_vectors_in_structs" { // label L17 // $t65 := borrow_local($t0) $t65 := $MakePtr(false, r) - // $t66 := borrow_field.v($t65) + // $t66 := borrow_field<0x2::Vectors::R>.v($t65) $t66 := $IndexPtr($t65, 32) // $t67 := 0 $t67 := 0 diff --git a/third_party/move/evm/move-to-yul/tests/test-dispatcher/DispatcherArrayDecoding.exp b/third_party/move/evm/move-to-yul/tests/test-dispatcher/DispatcherArrayDecoding.exp index 970b17cc61d8c..8d10b80137a38 100644 --- a/third_party/move/evm/move-to-yul/tests/test-dispatcher/DispatcherArrayDecoding.exp +++ b/third_party/move/evm/move-to-yul/tests/test-dispatcher/DispatcherArrayDecoding.exp @@ -461,7 +461,7 @@ object "A2_M" { case 3 { // $t7 := borrow_local($t0) $t7 := $MakePtr(false, $locals) - // $t8 := vector::length>($t7) + // $t8 := vector::length>($t7) $t8 := A1_vector_length$vec$A2_U256_U256$$($t7) // $t9 := 0 $t9 := 0 @@ -488,17 +488,17 @@ object "A2_M" { // label L2 // $t11 := borrow_local($t0) $t11 := $MakePtr(false, $locals) - // $t12 := vector::borrow>($t11, $t1) + // $t12 := vector::borrow>($t11, $t1) $t12 := A1_vector_borrow$vec$A2_U256_U256$$($t11, i) // $t13 := 0 $t13 := 0 - // $t14 := vector::borrow($t12, $t13) + // $t14 := vector::borrow<0x2::U256::U256>($t12, $t13) $t14 := A1_vector_borrow$A2_U256_U256$($t12, $t13) // $t15 := read_ref($t14) $t15 := $LoadU256($t14) // $t16 := 1 $t16 := 1 - // $t17 := vector::borrow($t12, $t16) + // $t17 := vector::borrow<0x2::U256::U256>($t12, $t16) $t17 := A1_vector_borrow$A2_U256_U256$($t12, $t16) // $t18 := read_ref($t17) $t18 := $LoadU256($t17) @@ -689,9 +689,9 @@ object "A2_M" { // label L2 // $t10 := borrow_local($t0) $t10 := $MakePtr(false, $locals) - // $t11 := vector::borrow>($t10, $t1) + // $t11 := vector::borrow>($t10, $t1) $t11 := A1_vector_borrow$vec$A2_U256_U256$$($t10, i) - // $t12 := vector::length($t11) + // $t12 := vector::length<0x2::U256::U256>($t11) $t12 := A1_vector_length$A2_U256_U256$($t11) // $t13 := 0 $t13 := 0 @@ -726,7 +726,7 @@ object "A2_M" { } case 10 { // label L5 - // $t15 := vector::borrow($t11, $t2) + // $t15 := vector::borrow<0x2::U256::U256>($t11, $t2) $t15 := A1_vector_borrow$A2_U256_U256$($t11, j) // $t16 := read_ref($t15) $t16 := $LoadU256($t15) @@ -959,7 +959,7 @@ object "A2_M" { case 3 { // $t7 := borrow_local($t0) $t7 := $MakePtr(false, $locals) - // $t8 := vector::length>($t7) + // $t8 := vector::length>($t7) $t8 := A1_vector_length$vec$A2_U256_U256$$($t7) // $t9 := 0 $t9 := 0 @@ -986,17 +986,17 @@ object "A2_M" { // label L2 // $t11 := borrow_local($t0) $t11 := $MakePtr(false, $locals) - // $t12 := vector::borrow>($t11, $t1) + // $t12 := vector::borrow>($t11, $t1) $t12 := A1_vector_borrow$vec$A2_U256_U256$$($t11, i) // $t13 := 0 $t13 := 0 - // $t14 := vector::borrow($t12, $t13) + // $t14 := vector::borrow<0x2::U256::U256>($t12, $t13) $t14 := A1_vector_borrow$A2_U256_U256$($t12, $t13) // $t15 := read_ref($t14) $t15 := $LoadU256($t14) // $t16 := 1 $t16 := 1 - // $t17 := vector::borrow($t12, $t16) + // $t17 := vector::borrow<0x2::U256::U256>($t12, $t16) $t17 := A1_vector_borrow$A2_U256_U256$($t12, $t16) // $t18 := read_ref($t17) $t18 := $LoadU256($t17) diff --git a/third_party/move/evm/move-to-yul/tests/test-dispatcher/DispatcherBasicStorage.exp b/third_party/move/evm/move-to-yul/tests/test-dispatcher/DispatcherBasicStorage.exp index bc0463b511e92..f18ac758a350e 100644 --- a/third_party/move/evm/move-to-yul/tests/test-dispatcher/DispatcherBasicStorage.exp +++ b/third_party/move/evm/move-to-yul/tests/test-dispatcher/DispatcherBasicStorage.exp @@ -26,7 +26,7 @@ object "A2_M" { let $t0, $t1 // $t0 := 0 $t0 := 0 - // $t1 := pack M::Storage($t0) + // $t1 := pack 0x2::M::Storage($t0) { let $mem := $Malloc(8) $MemoryStoreU64(add($mem, 0), $t0) @@ -139,7 +139,7 @@ object "A2_M" { } function A2_M_current(self) -> $result { let $t1, $t2 - // $t1 := borrow_field.counter($t0) + // $t1 := borrow_field<0x2::M::Storage>.counter($t0) $t1 := self // $t2 := read_ref($t1) $t2 := $LoadU64($t1) @@ -149,7 +149,7 @@ object "A2_M" { function A2_M_increment(self) { let $t1, $t2, $t3, $t4, $t5 - // $t1 := borrow_field.counter($t0) + // $t1 := borrow_field<0x2::M::Storage>.counter($t0) $t1 := self // $t2 := read_ref($t1) $t2 := $LoadU64($t1) @@ -157,7 +157,7 @@ object "A2_M" { $t3 := 1 // $t4 := +($t2, $t3) $t4 := $AddU64($t2, $t3) - // $t5 := borrow_field.counter($t0) + // $t5 := borrow_field<0x2::M::Storage>.counter($t0) $t5 := self // write_ref($t5, $t4) $StoreU64($t5, $t4) @@ -166,7 +166,7 @@ object "A2_M" { function A2_M_receive(self) { let $t1, $t2, $t3, $t4, $t5 - // $t1 := borrow_field.counter($t0) + // $t1 := borrow_field<0x2::M::Storage>.counter($t0) $t1 := self // $t2 := read_ref($t1) $t2 := $LoadU64($t1) @@ -174,7 +174,7 @@ object "A2_M" { $t3 := 2 // $t4 := +($t2, $t3) $t4 := $AddU64($t2, $t3) - // $t5 := borrow_field.counter($t0) + // $t5 := borrow_field<0x2::M::Storage>.counter($t0) $t5 := self // write_ref($t5, $t4) $StoreU64($t5, $t4) diff --git a/third_party/move/evm/move-to-yul/tests/test-dispatcher/DispatcherEncodingStorage.exp b/third_party/move/evm/move-to-yul/tests/test-dispatcher/DispatcherEncodingStorage.exp index 9112f59810d17..b748bf5ebed78 100644 --- a/third_party/move/evm/move-to-yul/tests/test-dispatcher/DispatcherEncodingStorage.exp +++ b/third_party/move/evm/move-to-yul/tests/test-dispatcher/DispatcherEncodingStorage.exp @@ -61,13 +61,13 @@ object "A2_M" { $t5 := $MakePtr(false, add($locals, 32)) // $t6 := move($t1) $t6 := mload($locals) - // $t7 := pack M::T($t6) + // $t7 := pack 0x2::M::T($t6) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t6) $t7 := $mem } - // move_to>($t7, $t5) + // move_to<0x2::M::T>($t7, $t5) { let $base_offset := $MakeTypeStorageBase(0, 0x2e75402e, $LoadU256($t5)) if $AlignedStorageLoad($base_offset) { @@ -96,7 +96,7 @@ object "A2_M" { } // $t8 := 0x42 $t8 := 0x42 - // $t9 := borrow_global>($t8) + // $t9 := borrow_global<0x2::M::T>($t8) { let $base_offset := $MakeTypeStorageBase(0, 0x2e75402e, $t8) if iszero($AlignedStorageLoad($base_offset)) { @@ -104,7 +104,7 @@ object "A2_M" { } $t9 := $MakePtr(true, add($base_offset, 32)) } - // $t10 := borrow_field>.v($t9) + // $t10 := borrow_field<0x2::M::T>.v($t9) $t10 := $t9 // $t11 := read_ref($t10) $t11 := $LoadU256($t10) @@ -139,19 +139,19 @@ object "A2_M" { $t4 := 65 // vector::push_back($t3, $t4) A1_vector_push_back$u8$($t3, $t4) - // $t2 := vector::empty() + // $t2 := vector::empty<0x2::U256::U256>() mstore(add($locals, 32), A1_vector_empty$A2_U256_U256$()) // $t5 := borrow_local($t2) $t5 := $MakePtr(false, add($locals, 32)) // $t6 := 64 $t6 := 64 - // vector::push_back($t5, $t6) + // vector::push_back<0x2::U256::U256>($t5, $t6) A1_vector_push_back$A2_U256_U256$($t5, $t6) // $t7 := borrow_local($t2) $t7 := $MakePtr(false, add($locals, 32)) // $t8 := 65 $t8 := 65 - // vector::push_back($t7, $t8) + // vector::push_back<0x2::U256::U256>($t7, $t8) A1_vector_push_back$A2_U256_U256$($t7, $t8) // $t9 := 0x42 $t9 := 0x42 @@ -163,14 +163,14 @@ object "A2_M" { $t11 := mload($locals) // $t12 := move($t2) $t12 := mload(add($locals, 32)) - // $t13 := pack M::State($t11, $t12) + // $t13 := pack 0x2::M::State($t11, $t12) { let $mem := $Malloc(64) $MemoryStoreU256(add($mem, 0), $t11) $MemoryStoreU256(add($mem, 32), $t12) $t13 := $mem } - // move_to($t13, $t10) + // move_to<0x2::M::State>($t13, $t10) { let $base_offset := $MakeTypeStorageBase(0, 0x7d9cc237, $LoadU256($t10)) if $AlignedStorageLoad($base_offset) { @@ -213,7 +213,7 @@ object "A2_M" { } // $t14 := 0x42 $t14 := 0x42 - // $t15 := borrow_global($t14) + // $t15 := borrow_global<0x2::M::State>($t14) { let $base_offset := $MakeTypeStorageBase(0, 0x7d9cc237, $t14) if iszero($AlignedStorageLoad($base_offset)) { @@ -221,7 +221,7 @@ object "A2_M" { } $t15 := $MakePtr(true, add($base_offset, 32)) } - // $t16 := borrow_field.s1($t15) + // $t16 := borrow_field<0x2::M::State>.s1($t15) $t16 := $t15 // $t17 := read_ref($t16) $t17 := $LoadU256($t16) @@ -242,7 +242,7 @@ object "A2_M" { } // $t18 := 0x42 $t18 := 0x42 - // $t19 := borrow_global($t18) + // $t19 := borrow_global<0x2::M::State>($t18) { let $base_offset := $MakeTypeStorageBase(0, 0x7d9cc237, $t18) if iszero($AlignedStorageLoad($base_offset)) { @@ -250,7 +250,7 @@ object "A2_M" { } $t19 := $MakePtr(true, add($base_offset, 32)) } - // $t20 := borrow_field.s2($t19) + // $t20 := borrow_field<0x2::M::State>.s2($t19) $t20 := $IndexPtr($t19, 32) // $t21 := read_ref($t20) $t21 := $LoadU256($t20) diff --git a/third_party/move/evm/move-to-yul/tests/test-dispatcher/ExternalCall.exp b/third_party/move/evm/move-to-yul/tests/test-dispatcher/ExternalCall.exp index a4be571a266c6..3026fbefb4c60 100644 --- a/third_party/move/evm/move-to-yul/tests/test-dispatcher/ExternalCall.exp +++ b/third_party/move/evm/move-to-yul/tests/test-dispatcher/ExternalCall.exp @@ -114,7 +114,7 @@ object "A2_M" { // label L1 // $t4 := move($t1) $t4 := v - // $t5 := ExternalResult::unwrap($t4) + // $t5 := ExternalResult::unwrap<0x2::U256::U256>($t4) $t5 := A2_ExternalResult_unwrap$A2_U256_U256$($t4) // return $t5 $result := $t5 @@ -133,7 +133,7 @@ object "A2_M" { v := A2_M_success(addr) // $t2 := borrow_local($t1) $t2 := $MakePtr(false, v) - // $t3 := ExternalResult::is_ok($t2) + // $t3 := ExternalResult::is_ok<0x2::U256::U256>($t2) $t3 := A2_ExternalResult_is_ok$A2_U256_U256$($t2) // if ($t3) goto L1 else goto L0 switch $t3 @@ -152,7 +152,7 @@ object "A2_M" { // label L1 // $t4 := move($t1) $t4 := v - // $t5 := ExternalResult::unwrap($t4) + // $t5 := ExternalResult::unwrap<0x2::Evm::Unit>($t4) $t5 := A2_ExternalResult_unwrap$A2_Evm_Unit$($t4) // drop($t5) $Free($t5, 1) @@ -169,7 +169,7 @@ object "A2_M" { v := A2_M_test_unit(addr) // $t2 := borrow_local($t1) $t2 := $MakePtr(false, v) - // $t3 := ExternalResult::is_ok($t2) + // $t3 := ExternalResult::is_ok<0x2::Evm::Unit>($t2) $t3 := A2_ExternalResult_is_ok$A2_Evm_Unit$($t2) // if ($t3) goto L1 else goto L0 switch $t3 @@ -197,7 +197,7 @@ object "A2_M" { let data, v, $t2, $t3, $t4, $t5, $t6 // $t2 := 0 $t2 := 0 - // $t3 := vector::empty() + // $t3 := vector::empty<0x2::U256::U256>() $t3 := A1_vector_empty$A2_U256_U256$() // $t4 := 0x3 $t4 := 0x3 @@ -251,7 +251,7 @@ object "A2_M" { // label L0 // $t7 := borrow_local($t1) $t7 := $MakePtr(false, value) - // $t8 := ExternalResult::is_err_reason($t7) + // $t8 := ExternalResult::is_err_reason<0x2::U256::U256>($t7) $t8 := A2_ExternalResult_is_err_reason$A2_U256_U256$($t7) // if ($t8) goto L3 else goto L2 switch $t8 @@ -267,7 +267,7 @@ object "A2_M" { value := A2_M_test_try_call($t3, $t2) // $t4 := borrow_local($t1) $t4 := $MakePtr(false, value) - // $t5 := ExternalResult::is_ok($t4) + // $t5 := ExternalResult::is_ok<0x2::U256::U256>($t4) $t5 := A2_ExternalResult_is_ok$A2_U256_U256$($t4) // if ($t5) goto L1 else goto L0 switch $t5 @@ -286,7 +286,7 @@ object "A2_M" { // label L2 // $t10 := borrow_local($t1) $t10 := $MakePtr(false, value) - // $t11 := ExternalResult::is_panic($t10) + // $t11 := ExternalResult::is_panic<0x2::U256::U256>($t10) $t11 := A2_ExternalResult_is_panic$A2_U256_U256$($t10) // if ($t11) goto L5 else goto L4 switch $t11 @@ -314,12 +314,12 @@ object "A2_M" { function A2_ExternalResult_is_panic$A2_U256_U256$(result) -> $result { let $t1, $t2 - // $t1 := borrow_field>.panic_code($t0) + // $t1 := borrow_field<0x2::ExternalResult::ExternalResult<#0>>.panic_code($t0) { let $field_ptr := $IndexPtr(result, 96) $t1 := $MakePtr($IsStoragePtr($field_ptr), $LoadU256($field_ptr)) } - // $t2 := option::is_some($t1) + // $t2 := option::is_some<0x2::U256::U256>($t1) $t2 := A1_option_is_some$A2_U256_U256$($t1) // return $t2 $result := $t2 @@ -327,7 +327,7 @@ object "A2_M" { function A1_option_is_some$A2_U256_U256$(t) -> $result { let $t1, $t2, $t3 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$A2_U256_U256$($t1) @@ -356,7 +356,7 @@ object "A2_M" { } function A2_ExternalResult_is_ok$A2_U256_U256$(result) -> $result { let $t1, $t2 - // $t1 := borrow_field>.value($t0) + // $t1 := borrow_field<0x2::ExternalResult::ExternalResult<#0>>.value($t0) { $t1 := $MakePtr($IsStoragePtr(result), $LoadU256(result)) } @@ -412,9 +412,9 @@ object "A2_M" { $t2 := A1_option_some$vec$u8$$(error) // $t3 := option::none>() $t3 := A1_option_none$vec$u8$$() - // $t4 := option::none() + // $t4 := option::none<0x2::U256::U256>() $t4 := A1_option_none$A2_U256_U256$() - // $t5 := pack ExternalResult::ExternalResult<#0>($t1, $t2, $t3, $t4) + // $t5 := pack 0x2::ExternalResult::ExternalResult<#0>($t1, $t2, $t3, $t4) { let $mem := $Malloc(128) $MemoryStoreU256(add($mem, 0), $t1) @@ -431,7 +431,7 @@ object "A2_M" { let $t0, $t1 // $t0 := vector::empty<#0>() $t0 := A1_vector_empty$A2_U256_U256$() - // $t1 := pack option::Option<#0>($t0) + // $t1 := pack 0x1::option::Option<#0>($t0) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t0) @@ -449,7 +449,7 @@ object "A2_M" { let $t0, $t1 // $t0 := vector::empty<#0>() $t0 := A1_vector_empty$vec$u8$$() - // $t1 := pack option::Option<#0>($t0) + // $t1 := pack 0x1::option::Option<#0>($t0) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t0) @@ -467,7 +467,7 @@ object "A2_M" { let $t1, $t2 // $t1 := vector::singleton<#0>($t0) $t1 := A1_vector_singleton$vec$u8$$(e) - // $t2 := pack option::Option<#0>($t1) + // $t2 := pack 0x1::option::Option<#0>($t1) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t1) @@ -529,9 +529,9 @@ object "A2_M" { $t6 := A1_option_none$vec$u8$$() // $t7 := option::none>() $t7 := A1_option_none$vec$u8$$() - // $t8 := option::some($t0) + // $t8 := option::some<0x2::U256::U256>($t0) $t8 := A1_option_some$A2_U256_U256$(panic_code) - // $t9 := pack ExternalResult::ExternalResult<#0>($t5, $t7, $t6, $t8) + // $t9 := pack 0x2::ExternalResult::ExternalResult<#0>($t5, $t7, $t6, $t8) { let $mem := $Malloc(128) $MemoryStoreU256(add($mem, 0), $t5) @@ -548,7 +548,7 @@ object "A2_M" { let $t1, $t2 // $t1 := vector::singleton<#0>($t0) $t1 := A1_vector_singleton$A2_U256_U256$(e) - // $t2 := pack option::Option<#0>($t1) + // $t2 := pack 0x1::option::Option<#0>($t1) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t1) @@ -596,9 +596,9 @@ object "A2_M" { $t6 := A1_option_some$vec$u8$$(error) // $t7 := option::none>() $t7 := A1_option_none$vec$u8$$() - // $t8 := option::none() + // $t8 := option::none<0x2::U256::U256>() $t8 := A1_option_none$A2_U256_U256$() - // $t9 := pack ExternalResult::ExternalResult<#0>($t5, $t7, $t6, $t8) + // $t9 := pack 0x2::ExternalResult::ExternalResult<#0>($t5, $t7, $t6, $t8) { let $mem := $Malloc(128) $MemoryStoreU256(add($mem, 0), $t5) @@ -619,9 +619,9 @@ object "A2_M" { $t2 := A1_option_none$vec$u8$$() // $t3 := option::none>() $t3 := A1_option_none$vec$u8$$() - // $t4 := option::none() + // $t4 := option::none<0x2::U256::U256>() $t4 := A1_option_none$A2_U256_U256$() - // $t5 := pack ExternalResult::ExternalResult<#0>($t1, $t2, $t3, $t4) + // $t5 := pack 0x2::ExternalResult::ExternalResult<#0>($t1, $t2, $t3, $t4) { let $mem := $Malloc(128) $MemoryStoreU256(add($mem, 0), $t1) @@ -636,7 +636,7 @@ object "A2_M" { function A2_ExternalResult_is_err_reason$A2_U256_U256$(result) -> $result { let $t1, $t2 - // $t1 := borrow_field>.err_reason($t0) + // $t1 := borrow_field<0x2::ExternalResult::ExternalResult<#0>>.err_reason($t0) { let $field_ptr := $IndexPtr(result, 64) $t1 := $MakePtr($IsStoragePtr($field_ptr), $LoadU256($field_ptr)) @@ -649,7 +649,7 @@ object "A2_M" { function A1_option_is_some$vec$u8$$(t) -> $result { let $t1, $t2, $t3 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$vec$u8$$($t1) @@ -742,7 +742,7 @@ object "A2_M" { } function A2_ExternalResult_is_ok$A2_Evm_Unit$(result) -> $result { let $t1, $t2 - // $t1 := borrow_field>.value($t0) + // $t1 := borrow_field<0x2::ExternalResult::ExternalResult<#0>>.value($t0) { $t1 := $MakePtr($IsStoragePtr(result), $LoadU256(result)) } @@ -754,7 +754,7 @@ object "A2_M" { function A1_option_is_some$A2_Evm_Unit$(t) -> $result { let $t1, $t2, $t3 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$A2_Evm_Unit$($t1) @@ -827,9 +827,9 @@ object "A2_M" { $t2 := A1_option_some$vec$u8$$(error) // $t3 := option::none>() $t3 := A1_option_none$vec$u8$$() - // $t4 := option::none() + // $t4 := option::none<0x2::U256::U256>() $t4 := A1_option_none$A2_U256_U256$() - // $t5 := pack ExternalResult::ExternalResult<#0>($t1, $t2, $t3, $t4) + // $t5 := pack 0x2::ExternalResult::ExternalResult<#0>($t1, $t2, $t3, $t4) { let $mem := $Malloc(128) $MemoryStoreU256(add($mem, 0), $t1) @@ -846,7 +846,7 @@ object "A2_M" { let $t0, $t1 // $t0 := vector::empty<#0>() $t0 := A1_vector_empty$A2_Evm_Unit$() - // $t1 := pack option::Option<#0>($t0) + // $t1 := pack 0x1::option::Option<#0>($t0) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), $t0) @@ -868,9 +868,9 @@ object "A2_M" { $t6 := A1_option_none$vec$u8$$() // $t7 := option::none>() $t7 := A1_option_none$vec$u8$$() - // $t8 := option::some($t0) + // $t8 := option::some<0x2::U256::U256>($t0) $t8 := A1_option_some$A2_U256_U256$(panic_code) - // $t9 := pack ExternalResult::ExternalResult<#0>($t5, $t7, $t6, $t8) + // $t9 := pack 0x2::ExternalResult::ExternalResult<#0>($t5, $t7, $t6, $t8) { let $mem := $Malloc(128) $MemoryStoreU256(add($mem, 0), $t5) @@ -891,9 +891,9 @@ object "A2_M" { $t6 := A1_option_some$vec$u8$$(error) // $t7 := option::none>() $t7 := A1_option_none$vec$u8$$() - // $t8 := option::none() + // $t8 := option::none<0x2::U256::U256>() $t8 := A1_option_none$A2_U256_U256$() - // $t9 := pack ExternalResult::ExternalResult<#0>($t5, $t7, $t6, $t8) + // $t9 := pack 0x2::ExternalResult::ExternalResult<#0>($t5, $t7, $t6, $t8) { let $mem := $Malloc(128) $MemoryStoreU256(add($mem, 0), $t5) @@ -908,7 +908,7 @@ object "A2_M" { function A2_ExternalResult_unwrap$A2_Evm_Unit$(result) -> $result { let err_data, err_reason, panic_code, value, $t5, $t6, $t7, $t8, $t9 - // ($t5, $t6, $t7, $t8) := unpack ExternalResult::ExternalResult<#0>($t0) + // ($t5, $t6, $t7, $t8) := unpack 0x2::ExternalResult::ExternalResult<#0>($t0) $t5 := $MemoryLoadU256(add(result, 0)) $t6 := $MemoryLoadU256(add(result, 32)) $t7 := $MemoryLoadU256(add(result, 64)) @@ -918,7 +918,7 @@ object "A2_M" { A1_option_destroy_none$vec$u8$$($t6) // option::destroy_none>($t7) A1_option_destroy_none$vec$u8$$($t7) - // option::destroy_none($t8) + // option::destroy_none<0x2::U256::U256>($t8) A1_option_destroy_none$A2_U256_U256$($t8) // $t9 := option::destroy_some<#0>($t5) $t9 := A1_option_destroy_some$A2_Evm_Unit$($t5) @@ -958,7 +958,7 @@ object "A2_M" { // label L2 // $t6 := move($t0) $t6 := t - // $t2 := unpack option::Option<#0>($t6) + // $t2 := unpack 0x1::option::Option<#0>($t6) mstore($locals, $MemoryLoadU256(add($t6, 0))) $Free($t6, 32) // $t7 := borrow_local($t2) @@ -1031,7 +1031,7 @@ object "A2_M" { // label L2 // $t4 := move($t0) $t4 := t - // $t5 := unpack option::Option<#0>($t4) + // $t5 := unpack 0x1::option::Option<#0>($t4) $t5 := $MemoryLoadU256(add($t4, 0)) $Free($t4, 32) // vector::destroy_empty<#0>($t5) @@ -1050,7 +1050,7 @@ object "A2_M" { } function A1_option_is_none$A2_U256_U256$(t) -> $result { let $t1, $t2 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$A2_U256_U256$($t1) @@ -1089,7 +1089,7 @@ object "A2_M" { // label L2 // $t4 := move($t0) $t4 := t - // $t5 := unpack option::Option<#0>($t4) + // $t5 := unpack 0x1::option::Option<#0>($t4) $t5 := $MemoryLoadU256(add($t4, 0)) $Free($t4, 32) // vector::destroy_empty<#0>($t5) @@ -1108,7 +1108,7 @@ object "A2_M" { } function A1_option_is_none$vec$u8$$(t) -> $result { let $t1, $t2 - // $t1 := borrow_field>.vec($t0) + // $t1 := borrow_field<0x1::option::Option<#0>>.vec($t0) $t1 := t // $t2 := vector::is_empty<#0>($t1) $t2 := A1_vector_is_empty$vec$u8$$($t1) @@ -1164,7 +1164,7 @@ object "A2_M" { function A2_ExternalResult_unwrap$A2_U256_U256$(result) -> $result { let err_data, err_reason, panic_code, value, $t5, $t6, $t7, $t8, $t9 - // ($t5, $t6, $t7, $t8) := unpack ExternalResult::ExternalResult<#0>($t0) + // ($t5, $t6, $t7, $t8) := unpack 0x2::ExternalResult::ExternalResult<#0>($t0) $t5 := $MemoryLoadU256(add(result, 0)) $t6 := $MemoryLoadU256(add(result, 32)) $t7 := $MemoryLoadU256(add(result, 64)) @@ -1174,7 +1174,7 @@ object "A2_M" { A1_option_destroy_none$vec$u8$$($t6) // option::destroy_none>($t7) A1_option_destroy_none$vec$u8$$($t7) - // option::destroy_none($t8) + // option::destroy_none<0x2::U256::U256>($t8) A1_option_destroy_none$A2_U256_U256$($t8) // $t9 := option::destroy_some<#0>($t5) $t9 := A1_option_destroy_some$A2_U256_U256$($t5) @@ -1214,7 +1214,7 @@ object "A2_M" { // label L2 // $t6 := move($t0) $t6 := t - // $t2 := unpack option::Option<#0>($t6) + // $t2 := unpack 0x1::option::Option<#0>($t6) mstore($locals, $MemoryLoadU256(add($t6, 0))) $Free($t6, 32) // $t7 := borrow_local($t2) diff --git a/third_party/move/evm/move-to-yul/tests/test-events/CallEmit.exp b/third_party/move/evm/move-to-yul/tests/test-events/CallEmit.exp index ab8e443702abe..57270d396370a 100644 --- a/third_party/move/evm/move-to-yul/tests/test-events/CallEmit.exp +++ b/third_party/move/evm/move-to-yul/tests/test-events/CallEmit.exp @@ -137,7 +137,7 @@ object "A2_M" { $Abort(97) function A2_M_do_event_1(from, to, amount) { let $t3 - // $t3 := pack M::Event_1($t0, $t1, $t2) + // $t3 := pack 0x2::M::Event_1($t0, $t1, $t2) { let $mem := $Malloc(65) $MemoryStoreU8(add($mem, 64), from) @@ -145,14 +145,14 @@ object "A2_M" { $MemoryStoreU256(add($mem, 32), amount) $t3 := $mem } - // Evm::emit($t3) + // Evm::emit<0x2::M::Event_1>($t3) A2_Evm_emit$A2_M_Event_1$($t3) // return () } function A2_M_do_event_2(v1, v2, v3, v4) { let $t4 - // $t4 := pack M::Event_2($t0, $t1, $t2, $t3) + // $t4 := pack 0x2::M::Event_2($t0, $t1, $t2, $t3) { let $mem := $Malloc(73) $MemoryStoreU8(add($mem, 72), v1) @@ -161,14 +161,14 @@ object "A2_M" { $MemoryStoreU256(add($mem, 0), v4) $t4 := $mem } - // Evm::emit($t4) + // Evm::emit<0x2::M::Event_2>($t4) A2_Evm_emit$A2_M_Event_2$($t4) // return () } function A2_M_do_event_3(from, to, amount) { let $t3 - // $t3 := pack M::Event_3($t0, $t1, $t2) + // $t3 := pack 0x2::M::Event_3($t0, $t1, $t2) { let $mem := $Malloc(65) $MemoryStoreU8(add($mem, 64), from) @@ -176,14 +176,14 @@ object "A2_M" { $MemoryStoreU256(add($mem, 32), amount) $t3 := $mem } - // Evm::emit($t3) + // Evm::emit<0x2::M::Event_3>($t3) A2_Evm_emit$A2_M_Event_3$($t3) // return () } function A2_M_do_event_4(v1, v2, v3) { let $t3 - // $t3 := pack M::Event_4($t0, $t1, $t2) + // $t3 := pack 0x2::M::Event_4($t0, $t1, $t2) { let $mem := $Malloc(96) $MemoryStoreU256(add($mem, 0), v1) @@ -191,28 +191,28 @@ object "A2_M" { $MemoryStoreU256(add($mem, 64), v3) $t3 := $mem } - // Evm::emit($t3) + // Evm::emit<0x2::M::Event_4>($t3) A2_Evm_emit$A2_M_Event_4$($t3) // return () } function A2_M_do_event_5(bys, str) { let $t2 - // $t2 := pack M::Event_5($t0, $t1) + // $t2 := pack 0x2::M::Event_5($t0, $t1) { let $mem := $Malloc(64) $MemoryStoreU256(add($mem, 0), bys) $MemoryStoreU256(add($mem, 32), str) $t2 := $mem } - // Evm::emit($t2) + // Evm::emit<0x2::M::Event_5>($t2) A2_Evm_emit$A2_M_Event_5$($t2) // return () } function A2_M_do_event_6(bys, str, uint16_array) { let $t3 - // $t3 := pack M::Event_6($t0, $t1, $t2) + // $t3 := pack 0x2::M::Event_6($t0, $t1, $t2) { let $mem := $Malloc(96) $MemoryStoreU256(add($mem, 0), bys) @@ -220,41 +220,41 @@ object "A2_M" { $MemoryStoreU256(add($mem, 64), uint16_array) $t3 := $mem } - // Evm::emit($t3) + // Evm::emit<0x2::M::Event_6>($t3) A2_Evm_emit$A2_M_Event_6$($t3) // return () } function A2_M_do_event_7(bys) { let $t1 - // $t1 := pack M::Event_7($t0) + // $t1 := pack 0x2::M::Event_7($t0) { let $mem := $Malloc(32) $MemoryStoreU256(add($mem, 0), bys) $t1 := $mem } - // Evm::emit($t1) + // Evm::emit<0x2::M::Event_7>($t1) A2_Evm_emit$A2_M_Event_7$($t1) // return () } function A2_M_do_event_8(bys, strs) { let $t2 - // $t2 := pack M::Event_8($t0, $t1) + // $t2 := pack 0x2::M::Event_8($t0, $t1) { let $mem := $Malloc(64) $MemoryStoreU256(add($mem, 0), bys) $MemoryStoreU256(add($mem, 32), strs) $t2 := $mem } - // Evm::emit($t2) + // Evm::emit<0x2::M::Event_8>($t2) A2_Evm_emit$A2_M_Event_8$($t2) // return () } function A2_M_do_transfer(from, to, amount) { let $t3 - // $t3 := pack M::Transfer($t0, $t1, $t2) + // $t3 := pack 0x2::M::Transfer($t0, $t1, $t2) { let $mem := $Malloc(96) $MemoryStoreU256(add($mem, 0), from) @@ -262,7 +262,7 @@ object "A2_M" { $MemoryStoreU256(add($mem, 64), amount) $t3 := $mem } - // Evm::emit($t3) + // Evm::emit<0x2::M::Transfer>($t3) A2_Evm_emit$A2_M_Transfer$($t3) // return () } diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/assign.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/assign.exp index 3c08a832d5864..deeab73004ab4 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/assign.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/assign.exp @@ -7,7 +7,7 @@ module 0x42::assign { f: u64, g: 0x42::assign::T, } - private fun assign_field(s: &mut 0x42::assign::S,f: u64) { + private fun assign_field(s: &mut S,f: u64) { select assign::S.f<&mut S>(s) = f; Tuple() } @@ -15,11 +15,11 @@ module 0x42::assign { x = 42; Tuple() } - private fun assign_pattern(s: 0x42::assign::S,f: u64,h: u64): u64 { + private fun assign_pattern(s: S,f: u64,h: u64): u64 { assign::S{ f, g: assign::T{ h } } = s; Add(f, h) } - private fun assign_struct(s: &mut 0x42::assign::S) { + private fun assign_struct(s: &mut S) { s = pack assign::S(42, pack assign::T(42)); Tuple() } diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/borrow.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/borrow.exp index aa5da65f26753..2ede6b56aa928 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/borrow.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/borrow.exp @@ -17,7 +17,7 @@ module 0x42::borrow { struct S { f: u64, } - private fun field(s: &0x42::borrow::S): u64 { + private fun field(s: &S): u64 { { let r: &u64 = Borrow(Immutable)(select borrow::S.f<&S>(s)); Deref(r) @@ -35,7 +35,7 @@ module 0x42::borrow { Deref(r) } } - private fun mut_field(s: &mut 0x42::borrow::S): u64 { + private fun mut_field(s: &mut S): u64 { { let r: &mut u64 = Borrow(Mutable)(select borrow::S.f<&mut S>(s)); r = 22; diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/bug_14471_receiver_inference.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/bug_14471_receiver_inference.exp index e89706cc35f45..e89103eda02a7 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/bug_14471_receiver_inference.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/bug_14471_receiver_inference.exp @@ -10,10 +10,10 @@ module 0x815::m { struct ValueWrap { val: u64, } - private fun contains(self: &0x815::m::Table<#0, #1>,_key: #0): bool { + private fun contains(self: &Table,_key: T1): bool { true } - private fun add(self: &mut 0x815::m::Table<#0, #1>,_key: #0,_val: #1) { + private fun add(self: &mut Table,_key: T1,_val: T2) { Tuple() } public fun add_when_missing(key: address,val: u64) diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/conditional_borrow.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/conditional_borrow.exp index ab04f99298c2a..2e4693e518bd7 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/conditional_borrow.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/conditional_borrow.exp @@ -47,7 +47,7 @@ module 0x8675::M { } } } - private fun test1b(r: 0x8675::M::S): u64 { + private fun test1b(r: S): u64 { { let x: S = pack M::S(3); { diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/escape_autoref.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/escape_autoref.exp index a40f32b864ff6..9b8e310000ede 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/escape_autoref.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/escape_autoref.exp @@ -6,10 +6,10 @@ module 0x42::m { struct ObjectCore { owner: address, } - private fun make(): 0x42::m::Object { + private fun make(): Object { Abort(0) } - private fun owner_correct(o: 0x42::m::Object): address + private fun owner_correct(o: Object): address acquires 0x42::m::ObjectCore(*) { { @@ -17,7 +17,7 @@ module 0x42::m { select m::ObjectCore.owner<&ObjectCore>(BorrowGlobal(Immutable)(addr)) } } - private fun owner_read_ref_missing(o: 0x42::m::Object): address + private fun owner_read_ref_missing(o: Object): address acquires 0x42::m::ObjectCore(*) { select m::ObjectCore.owner<&ObjectCore>(BorrowGlobal(Immutable)(select m::Object.inner(o))) diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/fields.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/fields.exp index 163b526a45095..8806b10eaaeaf 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/fields.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/fields.exp @@ -10,26 +10,26 @@ module 0x42::fields { f: u64, g: 0x42::fields::T, } - private fun read_generic_val(x: 0x42::fields::G): u64 { + private fun read_generic_val(x: G): u64 { select fields::G.f>(x) } - private fun read_ref(x: &0x42::fields::S): u64 { + private fun read_ref(x: &S): u64 { select fields::T.h(select fields::S.g<&S>(x)) } - private fun read_val(x: 0x42::fields::S): u64 { + private fun read_val(x: S): u64 { select fields::T.h(select fields::S.g(x)) } - private fun write_generic_val(x: &mut 0x42::fields::G,v: u64) { + private fun write_generic_val(x: &mut G,v: u64) { select fields::G.f<&mut G>(x) = v } - private fun write_local_direct(): 0x42::fields::S { + private fun write_local_direct(): S { { let x: S = pack fields::S(0, pack fields::T(0)); select fields::T.h(select fields::S.g(x)) = 42; x } } - private fun write_local_via_ref(): 0x42::fields::S { + private fun write_local_via_ref(): S { { let x: S = pack fields::S(0, pack fields::T(0)); { @@ -39,7 +39,7 @@ module 0x42::fields { } } } - private fun write_local_via_ref_2(): 0x42::fields::S { + private fun write_local_via_ref_2(): S { { let x: S = pack fields::S(0, pack fields::T(0)); { @@ -49,11 +49,11 @@ module 0x42::fields { } } } - private fun write_param(x: &mut 0x42::fields::S) { + private fun write_param(x: &mut S) { select fields::T.h(select fields::S.g<&mut S>(x)) = 42; Tuple() } - private fun write_val(x: 0x42::fields::S): 0x42::fields::S { + private fun write_val(x: S): S { select fields::T.h(select fields::S.g(x)) = 42; x } diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/fields_invalid.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/fields_invalid.exp index 073c71cfa0aa0..4911ab49100bf 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/fields_invalid.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/fields_invalid.exp @@ -7,7 +7,7 @@ module 0x42::fields { f: u64, g: 0x42::fields::T, } - private fun write_ref(x: &0x42::fields::S) { + private fun write_ref(x: &S) { select fields::T.h(select fields::S.g<&S>(x)) = 42; Tuple() } diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/freeze_mut_ref.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/freeze_mut_ref.exp index 2ac56bce08722..cf24cf3290946 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/freeze_mut_ref.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/freeze_mut_ref.exp @@ -7,20 +7,20 @@ module 0x42::freeze_mut_ref { struct S { dummy_field: bool, } - public fun borrow_mut(map: &mut vector<#0>): � { + public fun borrow_mut(map: &mut vector): &Element { Freeze(false)(vector::borrow_mut(map, 0)) } - public fun borrow_mut2(v: &mut #0): � { + public fun borrow_mut2(v: &mut Element): &Element { Freeze(false)(v) } - public fun borrow_mut3(v1: &mut #0,v2: �): � { + public fun borrow_mut3(v1: &mut Element,v2: &Element): &Element { if true { Freeze(false)(v1) } else { v2 } } - public fun borrow_mut4(v: &mut #0): � { + public fun borrow_mut4(v: &mut Element): &Element { return Freeze(false)(v) } private fun t0() { @@ -30,7 +30,7 @@ module 0x42::freeze_mut_ref { Tuple() } } - private fun t1(s: &mut 0x42::freeze_mut_ref::S): &0x42::freeze_mut_ref::S { + private fun t1(s: &mut S): &S { Freeze(false)(s) } private fun t2(u1: &mut u64,u2: &mut u64): (&u64, &mut u64) { @@ -46,7 +46,7 @@ module 0x42::freeze_mut_ref { } } } - public fun t5(s: &mut 0x42::freeze_mut_ref::G) { + public fun t5(s: &mut G) { { let x: u64 = 0; { @@ -69,7 +69,7 @@ module 0x42::freeze_mut_ref { } } } - private fun t6(cond: bool,s: &mut 0x42::freeze_mut_ref::S,other: &0x42::freeze_mut_ref::S) { + private fun t6(cond: bool,s: &mut S,other: &S) { { let x: &S; if cond { @@ -80,7 +80,7 @@ module 0x42::freeze_mut_ref { Tuple() } } - private fun t7(cond: bool,s: &mut 0x42::freeze_mut_ref::S,other: &0x42::freeze_mut_ref::S) { + private fun t7(cond: bool,s: &mut S,other: &S) { { let _x: &S; _x: &S = if cond { @@ -91,7 +91,7 @@ module 0x42::freeze_mut_ref { Tuple() } } - private fun t8(cond: bool,s: &mut 0x42::freeze_mut_ref::S,other: &0x42::freeze_mut_ref::S) { + private fun t8(cond: bool,s: &mut S,other: &S) { { let _x: &S = if cond { Freeze(false)(s) diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/matching_ability_err.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/matching_ability_err.exp index 0651beefd376c..a3dfa3d3f7cab 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/matching_ability_err.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/matching_ability_err.exp @@ -22,7 +22,7 @@ module 0xc0ffee::m { b: 0xc0ffee::m::Box, } } - public fun condition_requires_copy(o: 0xc0ffee::m::Outer): 0xc0ffee::m::Outer { + public fun condition_requires_copy(o: Outer): Outer { match (o) { m::Outer::One{ i } if m::consume(i) => { pack m::Outer::One(i) @@ -33,7 +33,7 @@ module 0xc0ffee::m { } } - private fun consume(self: 0xc0ffee::m::Inner): bool { + private fun consume(self: Inner): bool { match (self) { m::Inner::Inner1{ x: _ } => { Tuple() @@ -45,7 +45,7 @@ module 0xc0ffee::m { ; true } - public fun matched_value_not_consumed(o: 0xc0ffee::m::Outer) { + public fun matched_value_not_consumed(o: Outer) { match (o) { m::Outer::One{ i: _ } => { Tuple() diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/matching_coverage_err.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/matching_coverage_err.exp index e8f9edfc18894..805678cbb5cf7 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/matching_coverage_err.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/matching_coverage_err.exp @@ -22,7 +22,7 @@ module 0xc0ffee::m { b: 0xc0ffee::m::Box, } } - public fun exhaustive_tuple(i: &0xc0ffee::m::Inner) { + public fun exhaustive_tuple(i: &Inner) { match (Tuple(i, i)) { (m::Inner::Inner1{ x: _ }, _: &Inner): (&Inner, &Inner) => { Tuple() @@ -33,7 +33,7 @@ module 0xc0ffee::m { } } - public fun exhaustive_via_merge(o: &0xc0ffee::m::Outer) { + public fun exhaustive_via_merge(o: &Outer) { match (o) { m::Outer::None => { Tuple() @@ -50,7 +50,7 @@ module 0xc0ffee::m { } } - public fun non_exhaustive(o: &0xc0ffee::m::Outer) { + public fun non_exhaustive(o: &Outer) { match (o) { m::Outer::None => { Tuple() @@ -61,7 +61,7 @@ module 0xc0ffee::m { } } - public fun non_exhaustive_because_of_cond(o: &0xc0ffee::m::Outer) { + public fun non_exhaustive_because_of_cond(o: &Outer) { match (o) { m::Outer::None => { Tuple() @@ -75,7 +75,7 @@ module 0xc0ffee::m { } } - public fun non_exhaustive_because_of_nested(o: &0xc0ffee::m::Outer) { + public fun non_exhaustive_because_of_nested(o: &Outer) { match (o) { m::Outer::None => { Tuple() @@ -89,7 +89,7 @@ module 0xc0ffee::m { } } - public fun non_exhaustive_tuple(i: &0xc0ffee::m::Inner) { + public fun non_exhaustive_tuple(i: &Inner) { match (Tuple(i, i)) { (m::Inner::Inner1{ x: _ }, _: &Inner): (&Inner, &Inner) => { Tuple() @@ -97,7 +97,7 @@ module 0xc0ffee::m { } } - public fun non_exhaustive_tuple2(i: &0xc0ffee::m::Inner) { + public fun non_exhaustive_tuple2(i: &Inner) { match (Tuple(i, i)) { (m::Inner::Inner1{ x: _ }, _: &Inner): (&Inner, &Inner) => { Tuple() @@ -108,7 +108,7 @@ module 0xc0ffee::m { } } - public fun unreachable(o: &0xc0ffee::m::Outer) { + public fun unreachable(o: &Outer) { match (o) { m::Outer::None => { Tuple() @@ -125,7 +125,7 @@ module 0xc0ffee::m { } } - public fun unreachable_via_overlaying_pattern(o: &0xc0ffee::m::Outer) { + public fun unreachable_via_overlaying_pattern(o: &Outer) { match (o) { m::Outer::None => { Tuple() @@ -145,7 +145,7 @@ module 0xc0ffee::m { } } - public fun unreachable_via_repeated_pattern(o: &0xc0ffee::m::Outer) { + public fun unreachable_via_repeated_pattern(o: &Outer) { match (o) { m::Outer::None => { Tuple() diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/matching_ok.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/matching_ok.exp index 859d8147944cc..c7116654488be 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/matching_ok.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/matching_ok.exp @@ -55,7 +55,7 @@ module 0xc0ffee::m { b: 0xc0ffee::m::Box, } } - public fun inner_value(self: 0xc0ffee::m::Inner): u64 { + public fun inner_value(self: Inner): u64 { match (self) { m::Inner::Inner1{ x } => { x @@ -66,7 +66,7 @@ module 0xc0ffee::m { } } - public fun is_inner1(self: &0xc0ffee::m::Inner): bool { + public fun is_inner1(self: &Inner): bool { match (self) { m::Inner::Inner1{ x: _ } => { true @@ -77,7 +77,7 @@ module 0xc0ffee::m { } } - public fun is_some(x: &0xc0ffee::m::Option<#0>): bool { + public fun is_some(x: &Option): bool { match (x) { m::Option::None => { false @@ -88,7 +88,7 @@ module 0xc0ffee::m { } } - public fun is_some_dropped(x: 0xc0ffee::m::Option<#0>): bool { + public fun is_some_dropped(x: Option): bool { match (x) { m::Option::None => { false @@ -99,7 +99,7 @@ module 0xc0ffee::m { } } - public fun is_some_specialized(x: &0xc0ffee::m::Option<0xc0ffee::m::Option>): bool { + public fun is_some_specialized(x: &Option>): bool { match (x) { m::Option::None> => { false @@ -113,7 +113,7 @@ module 0xc0ffee::m { } } - public fun outer_value(o: 0xc0ffee::m::Outer): u64 { + public fun outer_value(o: Outer): u64 { match (o) { m::Outer::None => { 0 @@ -127,7 +127,7 @@ module 0xc0ffee::m { } } - public fun outer_value_nested(o: 0xc0ffee::m::Outer): u64 { + public fun outer_value_nested(o: Outer): u64 { match (o) { m::Outer::None => { 0 @@ -144,7 +144,7 @@ module 0xc0ffee::m { } } - public fun outer_value_with_cond(o: 0xc0ffee::m::Outer): u64 { + public fun outer_value_with_cond(o: Outer): u64 { match (o) { m::Outer::None => { 0 @@ -161,7 +161,7 @@ module 0xc0ffee::m { } } - public fun outer_value_with_cond_ref(o: &0xc0ffee::m::Outer): bool { + public fun outer_value_with_cond_ref(o: &Outer): bool { match (o) { m::Outer::None => { false @@ -178,7 +178,7 @@ module 0xc0ffee::m { } } - private fun select_common_fields(s: 0xc0ffee::m::CommonFields): u64 { + private fun select_common_fields(s: CommonFields): u64 { Add(select_variants m::CommonFields.Foo.x|m::CommonFields.Bar.x(s), match (s) { m::CommonFields::Foo{ x: _, y } => { y @@ -189,13 +189,13 @@ module 0xc0ffee::m { } ) } - private fun select_common_fields_different_offset(s: 0xc0ffee::m::CommonFieldsAtDifferentOffset): u64 { + private fun select_common_fields_different_offset(s: CommonFieldsAtDifferentOffset): u64 { select_variants m::CommonFieldsAtDifferentOffset.Bar.z|m::CommonFieldsAtDifferentOffset.Baz.z|m::CommonFieldsAtDifferentOffset.Balt.z(s) } - private fun test_common(s: 0xc0ffee::m::CommonFields): bool { + private fun test_common(s: CommonFields): bool { test_variants m::CommonFields::Foo|Bar(s) } - private fun test_common_ref(s: &0xc0ffee::m::CommonFields): bool { + private fun test_common_ref(s: &CommonFields): bool { test_variants m::CommonFields::Foo|Bar(s) } } // end 0xc0ffee::m diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/matching_refutable_err.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/matching_refutable_err.exp index 24100f7e3de48..c930a13a552b1 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/matching_refutable_err.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/matching_refutable_err.exp @@ -6,7 +6,7 @@ module 0x815::m { 0: u64, } } - private fun t(self: 0x815::m::E): u64 { + private fun t(self: E): u64 { { let m::E::Some{ 0: x } = self; x diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/mutate_immutable_cmp.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/mutate_immutable_cmp.exp index 367381c68d0ce..f78da5ffeca47 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/mutate_immutable_cmp.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/mutate_immutable_cmp.exp @@ -9,7 +9,7 @@ module 0x8675309::M { struct S { f: u64, } - private fun t0(s: &mut 0x8675309::M::S) { + private fun t0(s: &mut S) { s = pack M::S(2); s = pack M::S(0); Borrow(Immutable)(0) = 1; diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/operators.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/operators.exp index 3582d351ad0b5..3260942440feb 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/operators.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/operators.exp @@ -9,10 +9,10 @@ module 0x42::operators { private fun bools(x: bool,y: bool): bool { Or(Or(Or(And(x, y), And(x, Not(y))), And(Not(x), y)), And(Not(x), Not(y))) } - private fun equality(x: #0,y: #0): bool { + private fun equality(x: T,y: T): bool { Eq(x, y) } - private fun inequality(x: #0,y: #0): bool { + private fun inequality(x: T,y: T): bool { Neq(x, y) } private fun order(x: u64,y: u64): bool { diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/pack_order.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/pack_order.exp index f68992472d90f..52cea517af73a 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/pack_order.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/pack_order.exp @@ -5,10 +5,10 @@ module 0x42::pack_unpack { f2: u8, f3: u8, } - private fun pack1(x: u8,y: u8,z: u8): 0x42::pack_unpack::S { + private fun pack1(x: u8,y: u8,z: u8): S { pack pack_unpack::S(x, y, z) } - private fun pack2(x: u8,y: u8,z: u8): 0x42::pack_unpack::S { + private fun pack2(x: u8,y: u8,z: u8): S { { let $f1: u8 = x; { @@ -17,13 +17,13 @@ module 0x42::pack_unpack { } } } - private fun pack3(x: u8,y: u8,z: u8): 0x42::pack_unpack::S { + private fun pack3(x: u8,y: u8,z: u8): S { { let $f2: u8 = x; pack pack_unpack::S(y, $f2, z) } } - private fun pack4(x: u8,y: u8,z: u8): 0x42::pack_unpack::S { + private fun pack4(x: u8,y: u8,z: u8): S { { let $f2: u8 = x; { @@ -32,13 +32,13 @@ module 0x42::pack_unpack { } } } - private fun pack5(x: u8,y: u8,z: u8): 0x42::pack_unpack::S { + private fun pack5(x: u8,y: u8,z: u8): S { { let $f3: u8 = x; pack pack_unpack::S(y, z, $f3) } } - private fun pack6(x: u8,y: u8,z: u8): 0x42::pack_unpack::S { + private fun pack6(x: u8,y: u8,z: u8): S { { let $f3: u8 = x; { diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/pack_unpack.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/pack_unpack.exp index 538ca510e66cd..50897a53c5ba0 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/pack_unpack.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/pack_unpack.exp @@ -7,10 +7,10 @@ module 0x42::pack_unpack { f: u64, g: 0x42::pack_unpack::T, } - private fun pack(x: u64,y: u64): 0x42::pack_unpack::S { + private fun pack(x: u64,y: u64): S { pack pack_unpack::S(x, pack pack_unpack::T(y)) } - private fun unpack(s: 0x42::pack_unpack::S): (u64, u64) { + private fun unpack(s: S): (u64, u64) { { let pack_unpack::S{ f, g: pack_unpack::T{ h } } = s; Tuple(f, h) diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/spec_construct.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/spec_construct.exp index 65f990e067324..906f7604749fa 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/spec_construct.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/spec_construct.exp @@ -7,7 +7,7 @@ module 0x42::m { struct S { data: vector<0x42::m::E>, } - public fun foo(v: &0x42::m::S): u8 { + public fun foo(v: &S): u8 { select m::E.k<&E>(vector::borrow(Borrow(Immutable)(select m::S.data<&S>(v)), 0)) } } // end 0x42::m diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/v1-typing/mutate_immutable.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/v1-typing/mutate_immutable.exp index f5a7cc7aba81a..232c30beb914d 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/v1-typing/mutate_immutable.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/v1-typing/mutate_immutable.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct S { f: u64, } - private fun t0(s: &mut 0x8675309::M::S) { + private fun t0(s: &mut S) { s = pack M::S(0); Borrow(Immutable)(0) = 1; { diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/wildcard3.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/wildcard3.exp index ce586a539c721..d88443f618863 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/wildcard3.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/wildcard3.exp @@ -12,7 +12,7 @@ module 0xc0ffee::m { } } } - public fun foo(s: 0xc0ffee::m::S) { + public fun foo(s: S) { { let _: S = s; Tuple() diff --git a/third_party/move/move-compiler-v2/tests/checking/abilities/tuple.exp b/third_party/move/move-compiler-v2/tests/checking/abilities/tuple.exp index 9179e41d22c3a..2b347473d4478 100644 --- a/third_party/move/move-compiler-v2/tests/checking/abilities/tuple.exp +++ b/third_party/move/move-compiler-v2/tests/checking/abilities/tuple.exp @@ -3,7 +3,7 @@ module 0x42::tuple { struct S { f: u64, } - private fun tuple(x: u64): (u64, 0x42::tuple::S) { + private fun tuple(x: u64): (u64, S) { Tuple(x, pack tuple::S(Add(x, 1))) } private fun use_tuple(x: u64): u64 { diff --git a/third_party/move/move-compiler-v2/tests/checking/abilities/v1/phantom_param_op_abilities.exp b/third_party/move/move-compiler-v2/tests/checking/abilities/v1/phantom_param_op_abilities.exp index 65fc58b4fccf4..21ea211538722 100644 --- a/third_party/move/move-compiler-v2/tests/checking/abilities/v1/phantom_param_op_abilities.exp +++ b/third_party/move/move-compiler-v2/tests/checking/abilities/v1/phantom_param_op_abilities.exp @@ -18,7 +18,7 @@ module 0x42::M { struct RequireStore { a: #0, } - private fun f1(ref: &mut 0x42::M::HasDrop<0x42::M::NoAbilities, u64>) { + private fun f1(ref: &mut HasDrop) { ref = pack M::HasDrop(1); Tuple() } @@ -26,17 +26,17 @@ module 0x42::M { _: HasDrop = pack M::HasDrop(1); Tuple() } - private fun f3(_x: 0x42::M::HasDrop<0x42::M::NoAbilities, u64>) { + private fun f3(_x: HasDrop) { Tuple() } - private fun f4(x: 0x42::M::HasCopy<0x42::M::NoAbilities, u64>): (0x42::M::HasCopy<0x42::M::NoAbilities, u64>, 0x42::M::HasCopy<0x42::M::NoAbilities, u64>) { + private fun f4(x: HasCopy): (HasCopy, HasCopy) { Tuple(Copy(x), x) } - private fun f5(s: &signer,x: 0x42::M::HasKey<0x42::M::NoAbilities, u64>) { + private fun f5(s: &signer,x: HasKey) { MoveTo>(s, x); Tuple() } - private fun f6(): 0x42::M::HasKey<0x42::M::NoAbilities, u64> + private fun f6(): HasKey acquires 0x42::M::HasKey(*) { MoveFrom>(0x0) @@ -44,7 +44,7 @@ module 0x42::M { private fun f7(): bool { exists>(0x0) } - private fun f8(): 0x42::M::RequireStore<0x42::M::HasStore<0x42::M::NoAbilities, u64>> { + private fun f8(): RequireStore> { pack M::RequireStore>(pack M::HasStore(1)) } } // end 0x42::M diff --git a/third_party/move/move-compiler-v2/tests/checking/dotdot/dotdot_valid.exp b/third_party/move/move-compiler-v2/tests/checking/dotdot/dotdot_valid.exp index 71f94e6f025b8..8de9c715617c4 100644 --- a/third_party/move/move-compiler-v2/tests/checking/dotdot/dotdot_valid.exp +++ b/third_party/move/move-compiler-v2/tests/checking/dotdot/dotdot_valid.exp @@ -45,13 +45,13 @@ module 0x42::test { 2: u32, 3: u64, } - private inline fun lambda_param(f: |0x42::test::S2|bool): bool { + private inline fun lambda_param(f: |S2|bool): bool { { let x: S2 = pack test::S2(true, pack test::S0(false)); (f)(x) } } - private fun nested1(x: 0x42::test::S4) { + private fun nested1(x: S4) { { let test::S4{ x: _x, y: _ } = x; { @@ -75,7 +75,7 @@ module 0x42::test { } } } - private fun nested1_ref(x: &0x42::test::S4) { + private fun nested1_ref(x: &S4) { { let test::S4{ x: _x, y: _ } = x; { @@ -99,67 +99,67 @@ module 0x42::test { } } } - private fun nested2(x: 0x42::test::S5) { + private fun nested2(x: S5) { { let test::S5{ 0: _, 1: test::S1{ 0: _ } } = x; Tuple() } } - private fun nested2_ref(x: &0x42::test::S5) { + private fun nested2_ref(x: &S5) { { let test::S5{ 0: _, 1: test::S1{ 0: _ } } = x; Tuple() } } - private fun nested3(x: 0x42::test::S5>) { + private fun nested3(x: S5>) { { let test::S5>{ 0: _, 1: test::S4{ x: _, y: _ } } = x; Tuple() } } - private fun nested3_ref(x: &0x42::test::S5>) { + private fun nested3_ref(x: &S5>) { { let test::S5>{ 0: _, 1: test::S4{ x: _, y: _ } } = x; Tuple() } } - private fun nested4(x: 0x42::test::S4<0x42::test::S1>) { + private fun nested4(x: S4) { { let test::S4{ x: test::S1{ 0: _ }, y: _ } = x; Tuple() } } - private fun nested4_ref(x: &0x42::test::S4<0x42::test::S1>) { + private fun nested4_ref(x: &S4) { { let test::S4{ x: test::S1{ 0: _ }, y: _ } = x; Tuple() } } - private fun simple_0(x: 0x42::test::S0) { + private fun simple_0(x: S0) { { let test::S0{ dummy_field: _ } = x; Tuple() } } - private fun simple_0_ref(x: &0x42::test::S0) { + private fun simple_0_ref(x: &S0) { { let test::S0{ dummy_field: _ } = x; Tuple() } } - private fun simple_1(x: 0x42::test::S1) { + private fun simple_1(x: S1) { { let test::S1{ 0: _ } = x; Tuple() } } - private fun simple_1_ref(x: &mut 0x42::test::S1) { + private fun simple_1_ref(x: &mut S1) { { let test::S1{ 0: _ } = x; Tuple() } } - private fun simple_2(x: 0x42::test::S2) { + private fun simple_2(x: S2) { { let test::S2{ 0: _, 1: _ } = x; { @@ -186,7 +186,7 @@ module 0x42::test { } } } - private fun simple_2_ref(x: &0x42::test::S2) { + private fun simple_2_ref(x: &S2) { { let test::S2{ 0: _, 1: _ } = x; { @@ -213,7 +213,7 @@ module 0x42::test { } } } - private fun simple_3(x: 0x42::test::S3) { + private fun simple_3(x: S3) { { let test::S3{ x: _, y: _ } = x; { @@ -225,7 +225,7 @@ module 0x42::test { } } } - private fun simple_3_ref(x: 0x42::test::S3) { + private fun simple_3_ref(x: S3) { { let test::S3{ x: _, y: _ } = x; { @@ -237,7 +237,7 @@ module 0x42::test { } } } - private fun simple_4(x: 0x42::test::E1): u8 { + private fun simple_4(x: E1): u8 { match (x) { test::E1::A{ 0: x, 1: _ } => { x @@ -251,7 +251,7 @@ module 0x42::test { } } - private fun simple_4_ref(x: &0x42::test::E1): &u8 { + private fun simple_4_ref(x: &E1): &u8 { match (x) { test::E1::A{ 0: x, 1: _ } => { x @@ -262,7 +262,7 @@ module 0x42::test { } } - private fun simple_5(x: 0x42::test::E1): u8 { + private fun simple_5(x: E1): u8 { match (x) { test::E1::A{ 0: _, 1: y } => { if y { @@ -280,7 +280,7 @@ module 0x42::test { } } - private fun simple_6(x: &0x42::test::S7) { + private fun simple_6(x: &S7) { { let test::S7{ 0: _w, 1: _, 2: _, 3: _z } = x; { diff --git a/third_party/move/move-compiler-v2/tests/checking/dotdot/extra_dotdot.exp b/third_party/move/move-compiler-v2/tests/checking/dotdot/extra_dotdot.exp index 14221b9623b21..cf7a808320552 100644 --- a/third_party/move/move-compiler-v2/tests/checking/dotdot/extra_dotdot.exp +++ b/third_party/move/move-compiler-v2/tests/checking/dotdot/extra_dotdot.exp @@ -10,7 +10,7 @@ module 0x42::test { 1: u8, 2: address, } - private fun extra_dotdot(x: 0x42::test::S,y: 0x42::test::T) { + private fun extra_dotdot(x: S,y: T) { { let test::S{ 0: _x, 1: _, 2: _ } = x; { diff --git a/third_party/move/move-compiler-v2/tests/checking/inlining/lambda.exp b/third_party/move/move-compiler-v2/tests/checking/inlining/lambda.exp index b3ac0b9bccd11..b9080d09fb545 100644 --- a/third_party/move/move-compiler-v2/tests/checking/inlining/lambda.exp +++ b/third_party/move/move-compiler-v2/tests/checking/inlining/lambda.exp @@ -16,7 +16,7 @@ module 0x42::LambdaTest1 { module 0x42::LambdaTest2 { use 0x42::LambdaTest1; // resolved as: 0x42::LambdaTest1 use std::vector; - public inline fun foreach(v: &vector<#0>,action: |�|) { + public inline fun foreach(v: &vector,action: |&T|) { { let i: u64 = 0; loop { diff --git a/third_party/move/move-compiler-v2/tests/checking/inlining/lambda_typed.exp b/third_party/move/move-compiler-v2/tests/checking/inlining/lambda_typed.exp index b3ac0b9bccd11..b9080d09fb545 100644 --- a/third_party/move/move-compiler-v2/tests/checking/inlining/lambda_typed.exp +++ b/third_party/move/move-compiler-v2/tests/checking/inlining/lambda_typed.exp @@ -16,7 +16,7 @@ module 0x42::LambdaTest1 { module 0x42::LambdaTest2 { use 0x42::LambdaTest1; // resolved as: 0x42::LambdaTest1 use std::vector; - public inline fun foreach(v: &vector<#0>,action: |�|) { + public inline fun foreach(v: &vector,action: |&T|) { { let i: u64 = 0; loop { diff --git a/third_party/move/move-compiler-v2/tests/checking/inlining/resources_valid.exp b/third_party/move/move-compiler-v2/tests/checking/inlining/resources_valid.exp index 21b9eabd6a4a8..1a3c18119c4dd 100644 --- a/third_party/move/move-compiler-v2/tests/checking/inlining/resources_valid.exp +++ b/third_party/move/move-compiler-v2/tests/checking/inlining/resources_valid.exp @@ -3,10 +3,10 @@ module 0x42::objects { struct ReaderRef { addr: address, } - public fun get_addr(ref: &0x42::objects::ReaderRef<#0>): address { + public fun get_addr(ref: &ReaderRef): address { select objects::ReaderRef.addr<&ReaderRef>(ref) } - public inline fun reader(ref: &0x42::objects::ReaderRef<#0>): � { + public inline fun reader(ref: &ReaderRef): &T { BorrowGlobal(Immutable)(objects::get_addr(ref)) } } // end 0x42::objects @@ -15,7 +15,7 @@ module 0x42::token { struct Token { val: u64, } - public fun get_value(ref: &0x42::objects::ReaderRef<0x42::token::Token>): u64 + public fun get_value(ref: &objects::ReaderRef): u64 acquires 0x42::token::Token(*) { select token::Token.val<&Token>({ diff --git a/third_party/move/move-compiler-v2/tests/checking/inlining/test_12670.exp b/third_party/move/move-compiler-v2/tests/checking/inlining/test_12670.exp index 14ded7e3c10d8..8122d025a34bb 100644 --- a/third_party/move/move-compiler-v2/tests/checking/inlining/test_12670.exp +++ b/third_party/move/move-compiler-v2/tests/checking/inlining/test_12670.exp @@ -4,7 +4,7 @@ module 0x1::Test { struct S { x: u8, } - private fun foo(xs: vector<0x1::Test::S>) { + private fun foo(xs: vector) { { let sum: u8 = 0; { diff --git a/third_party/move/move-compiler-v2/tests/checking/naming/generics_shadowing.exp b/third_party/move/move-compiler-v2/tests/checking/naming/generics_shadowing.exp index 121cfb4d68b33..8edd453e33526 100644 --- a/third_party/move/move-compiler-v2/tests/checking/naming/generics_shadowing.exp +++ b/third_party/move/move-compiler-v2/tests/checking/naming/generics_shadowing.exp @@ -3,7 +3,7 @@ module 0x2::M { struct S { dummy_field: bool, } - private fun foo(s: #0): #0 { + private fun foo(s: S): S { { let s: S = s; { diff --git a/third_party/move/move-compiler-v2/tests/checking/positional_fields/assign_field.exp b/third_party/move/move-compiler-v2/tests/checking/positional_fields/assign_field.exp index 66c17ae08d807..81f20a0b029dc 100644 --- a/third_party/move/move-compiler-v2/tests/checking/positional_fields/assign_field.exp +++ b/third_party/move/move-compiler-v2/tests/checking/positional_fields/assign_field.exp @@ -38,7 +38,7 @@ module 0x42::test { } } } - private fun assign1(x: 0x42::test::S1): u64 { + private fun assign1(x: S1): u64 { { let count: u64 = 0; loop { @@ -60,14 +60,14 @@ module 0x42::test { count } } - private fun assign_chained(x: 0x42::test::S3) { + private fun assign_chained(x: S3) { Add(Add(select test::S0.x(select test::S2.0(select test::S3.0(x))), select test::S0.x(select test::S3.1(x))), select test::S0.x(select test::S2.0(select test::S3.2(x)))); select test::S0.x(select test::S2.0(select test::S3.0(x))) = 0; select test::S0.x(select test::S3.1(x)) = 1; select test::S0.x(select test::S2.0(select test::S3.2(x))) = 2; Tuple() } - private fun assign_enum(x: &mut 0x42::test::E) { + private fun assign_enum(x: &mut E) { match (x) { test::E::V1{ 0: x, 1: y } => { x = 42; @@ -83,12 +83,12 @@ module 0x42::test { } } - private fun simple(x: 0x42::test::S1) { + private fun simple(x: S1) { select test::S1.0(x) = 42; select test::S1.1(x) = true; Tuple() } - private fun simple_ref(x: &mut 0x42::test::S1) { + private fun simple_ref(x: &mut S1) { select test::S1.0<&mut S1>(x) = 42; select test::S1.1<&mut S1>(x) = true; Tuple() diff --git a/third_party/move/move-compiler-v2/tests/checking/positional_fields/bind_anonymous_field.exp b/third_party/move/move-compiler-v2/tests/checking/positional_fields/bind_anonymous_field.exp index 3cad8094244fe..1a0b7be9954d6 100644 --- a/third_party/move/move-compiler-v2/tests/checking/positional_fields/bind_anonymous_field.exp +++ b/third_party/move/move-compiler-v2/tests/checking/positional_fields/bind_anonymous_field.exp @@ -15,7 +15,7 @@ module 0x42::test { 0: bool, 1: 0x42::test::S0, } - private fun match(x: 0x42::test::E1) { + private fun match(x: E1) { match (x) { test::E1::V1{ 0: test::S0{ 0: _x } } => { Tuple() @@ -26,13 +26,13 @@ module 0x42::test { } } - private fun nested(x: 0x42::test::S1) { + private fun nested(x: S1) { { let test::S1{ 0: _x, 1: test::S0{ 0: _y } } = x; Tuple() } } - private fun simple(x: 0x42::test::S0) { + private fun simple(x: S0) { { let test::S0{ 0: _x } = x; Tuple() diff --git a/third_party/move/move-compiler-v2/tests/checking/positional_fields/common_access.exp b/third_party/move/move-compiler-v2/tests/checking/positional_fields/common_access.exp index 64c0f5d84aacf..38c21b2652857 100644 --- a/third_party/move/move-compiler-v2/tests/checking/positional_fields/common_access.exp +++ b/third_party/move/move-compiler-v2/tests/checking/positional_fields/common_access.exp @@ -8,7 +8,7 @@ module 0x42::test { 0: u8, } } - private fun common_access(x: 0x42::test::Foo): u8 { + private fun common_access(x: Foo): u8 { select_variants test::Foo.A.0|test::Foo.B.0(x) } } // end 0x42::test diff --git a/third_party/move/move-compiler-v2/tests/checking/positional_fields/decl_ok.exp b/third_party/move/move-compiler-v2/tests/checking/positional_fields/decl_ok.exp index d5eadf5b7a3a8..d0188cbba98fb 100644 --- a/third_party/move/move-compiler-v2/tests/checking/positional_fields/decl_ok.exp +++ b/third_party/move/move-compiler-v2/tests/checking/positional_fields/decl_ok.exp @@ -20,7 +20,7 @@ module 0x42::test { 1: u8, 2: #0, } - private fun bar(x: 0x42::test::S2) { + private fun bar(x: S2) { select test::S2.0(x); Tuple() } @@ -30,7 +30,7 @@ module 0x42::test { pack test::E1::V3(42, true); Tuple() } - private fun foo(x: 0x42::test::S2) { + private fun foo(x: S2) { select test::S2.0(x); select test::S2.1(x); Tuple() diff --git a/third_party/move/move-compiler-v2/tests/checking/positional_fields/named_tuple_construct_ok.exp b/third_party/move/move-compiler-v2/tests/checking/positional_fields/named_tuple_construct_ok.exp index 855a685508fa3..30bd1a8bb884a 100644 --- a/third_party/move/move-compiler-v2/tests/checking/positional_fields/named_tuple_construct_ok.exp +++ b/third_party/move/move-compiler-v2/tests/checking/positional_fields/named_tuple_construct_ok.exp @@ -29,22 +29,22 @@ module 0x42::test { x: #0, y: u8, } - private fun S0_inhabited(): 0x42::test::S0 { + private fun S0_inhabited(): S0 { pack test::S0(false) } - private fun S1_inhabited(): 0x42::test::S1 { + private fun S1_inhabited(): S1 { pack test::S1(0) } - private fun S2_inhabited(): 0x42::test::S2 { + private fun S2_inhabited(): S2 { pack test::S2(0, false) } - private fun S3_test(x: #0): 0x42::test::S3<#0> { + private fun S3_test(x: T): S3 { pack test::S3(x, 0) } - private fun nested_0(): 0x42::test::S3<0x42::test::S4> { + private fun nested_0(): S3 { pack test::S3(pack test::S4(false), 0) } - private fun nested_1(): 0x42::test::S5<0x42::test::S0> { + private fun nested_1(): S5 { pack test::S5(pack test::S0(false), 0) } private fun test_variant() { diff --git a/third_party/move/move-compiler-v2/tests/checking/receiver/calls.exp b/third_party/move/move-compiler-v2/tests/checking/receiver/calls.exp index 7ccdbc18f5b68..db1d6cf8b7e2f 100644 --- a/third_party/move/move-compiler-v2/tests/checking/receiver/calls.exp +++ b/third_party/move/move-compiler-v2/tests/checking/receiver/calls.exp @@ -3,19 +3,19 @@ module 0x42::m { struct S { x: u64, } - private inline fun inline_receiver_ref_mut(self: &mut 0x42::m::S,y: u64): u64 { + private inline fun inline_receiver_ref_mut(self: &mut S,y: u64): u64 { Add(select m::S.x<&mut S>(self), y) } - private fun receiver(self: 0x42::m::S,y: u64): u64 { + private fun receiver(self: S,y: u64): u64 { Add(select m::S.x(self), y) } - private fun receiver_ref(self: &0x42::m::S,y: u64): u64 { + private fun receiver_ref(self: &S,y: u64): u64 { Add(select m::S.x<&S>(self), y) } - private fun receiver_ref_mut(self: &mut 0x42::m::S,y: u64): u64 { + private fun receiver_ref_mut(self: &mut S,y: u64): u64 { Add(select m::S.x<&mut S>(self), y) } - private fun test_call_styles(s: 0x42::m::S): u64 { + private fun test_call_styles(s: S): u64 { m::receiver(s, 1); m::receiver_ref(Borrow(Immutable)(s), 1); m::receiver_ref_mut(Borrow(Mutable)(s), 1); diff --git a/third_party/move/move-compiler-v2/tests/checking/receiver/calls_with_freeze.exp b/third_party/move/move-compiler-v2/tests/checking/receiver/calls_with_freeze.exp index 0061771a73d3c..3568ee31e45af 100644 --- a/third_party/move/move-compiler-v2/tests/checking/receiver/calls_with_freeze.exp +++ b/third_party/move/move-compiler-v2/tests/checking/receiver/calls_with_freeze.exp @@ -3,10 +3,10 @@ module 0x42::m { struct S { x: u64, } - private fun sum(self: &0x42::m::S,_other: &0x42::m::S): u64 { + private fun sum(self: &S,_other: &S): u64 { Abort(1) } - private fun test_arg_freeze(s: 0x42::m::S): u64 { + private fun test_arg_freeze(s: S): u64 { { let p1: &S = Borrow(Immutable)(s); { diff --git a/third_party/move/move-compiler-v2/tests/checking/receiver/decl_errors.exp b/third_party/move/move-compiler-v2/tests/checking/receiver/decl_errors.exp index e20c148f536a6..4f4835bda6621 100644 --- a/third_party/move/move-compiler-v2/tests/checking/receiver/decl_errors.exp +++ b/third_party/move/move-compiler-v2/tests/checking/receiver/decl_errors.exp @@ -45,10 +45,10 @@ module 0x42::m { struct S { x: u64, } - private fun receiver(self: 0x42::m::S) { + private fun receiver(self: S) { Tuple() } - private fun receiver_for_external_type(self: 0x42::n::T) { + private fun receiver_for_external_type(self: n::T) { Tuple() } private fun receiver_for_external_vector(self: vector) { @@ -57,10 +57,10 @@ module 0x42::m { private fun receiver_for_primitive(self: &u64) { Tuple() } - private fun receiver_non_linear_instantiated(self: 0x42::m::G<#0, #0>) { + private fun receiver_non_linear_instantiated(self: G) { Tuple() } - private fun receiver_partial_instantiated(self: 0x42::m::G) { + private fun receiver_partial_instantiated(self: G) { Tuple() } } // end 0x42::m diff --git a/third_party/move/move-compiler-v2/tests/checking/receiver/dont_warn_unused_self.exp b/third_party/move/move-compiler-v2/tests/checking/receiver/dont_warn_unused_self.exp index b1f25c778b2a5..2f6c8d9fb2115 100644 --- a/third_party/move/move-compiler-v2/tests/checking/receiver/dont_warn_unused_self.exp +++ b/third_party/move/move-compiler-v2/tests/checking/receiver/dont_warn_unused_self.exp @@ -11,7 +11,7 @@ module 0x42::m { struct S { x: u64, } - private fun receiver(self: 0x42::m::S,y: u64) { + private fun receiver(self: S,y: u64) { Tuple() } spec { diff --git a/third_party/move/move-compiler-v2/tests/checking/receiver/generic_calls.exp b/third_party/move/move-compiler-v2/tests/checking/receiver/generic_calls.exp index b0ef28a181601..2c10daec390de 100644 --- a/third_party/move/move-compiler-v2/tests/checking/receiver/generic_calls.exp +++ b/third_party/move/move-compiler-v2/tests/checking/receiver/generic_calls.exp @@ -3,30 +3,30 @@ module 0x42::m { struct S { x: #0, } - private fun id(self: 0x42::m::S<#0>): 0x42::m::S<#0> { + private fun id(self: S): S { self } - private inline fun inlined(f: |0x42::m::S<#0>|0x42::m::S<#0>,s: 0x42::m::S<#0>) { + private inline fun inlined(f: |S|S,s: S) { (f)(s); Tuple() } - private fun receiver(self: 0x42::m::S<#0>,y: #0) { + private fun receiver(self: S,y: T) { select m::S.x>(self) = y; Tuple() } - private fun receiver_more_generics(self: 0x42::m::S<#0>,_y: #1) { + private fun receiver_more_generics(self: S,_y: R) { Tuple() } - private fun receiver_needs_type_args(self: 0x42::m::S<#0>,_y: #0) { + private fun receiver_needs_type_args(self: S,_y: T) { Abort(1) } - private fun receiver_ref(self: &0x42::m::S<#0>,_y: #0) { + private fun receiver_ref(self: &S,_y: T) { Tuple() } - private fun receiver_ref_mut(self: &mut 0x42::m::S<#0>,y: #0) { + private fun receiver_ref_mut(self: &mut S,y: T) { select m::S.x<&mut S>(self) = y } - private fun test_call_styles(s: 0x42::m::S,x: u64) { + private fun test_call_styles(s: S,x: u64) { m::receiver(s, x); m::receiver_ref(Borrow(Immutable)(s), x); m::receiver_ref_mut(Borrow(Mutable)(s), x); @@ -34,7 +34,7 @@ module 0x42::m { m::receiver_needs_type_args(s, x); Tuple() } - private fun test_receiver_inference(s: 0x42::m::S) { + private fun test_receiver_inference(s: S) { { let (s: S): (S) = Tuple(s); { diff --git a/third_party/move/move-compiler-v2/tests/checking/receiver/generic_calls_typed.exp b/third_party/move/move-compiler-v2/tests/checking/receiver/generic_calls_typed.exp index b0ef28a181601..2c10daec390de 100644 --- a/third_party/move/move-compiler-v2/tests/checking/receiver/generic_calls_typed.exp +++ b/third_party/move/move-compiler-v2/tests/checking/receiver/generic_calls_typed.exp @@ -3,30 +3,30 @@ module 0x42::m { struct S { x: #0, } - private fun id(self: 0x42::m::S<#0>): 0x42::m::S<#0> { + private fun id(self: S): S { self } - private inline fun inlined(f: |0x42::m::S<#0>|0x42::m::S<#0>,s: 0x42::m::S<#0>) { + private inline fun inlined(f: |S|S,s: S) { (f)(s); Tuple() } - private fun receiver(self: 0x42::m::S<#0>,y: #0) { + private fun receiver(self: S,y: T) { select m::S.x>(self) = y; Tuple() } - private fun receiver_more_generics(self: 0x42::m::S<#0>,_y: #1) { + private fun receiver_more_generics(self: S,_y: R) { Tuple() } - private fun receiver_needs_type_args(self: 0x42::m::S<#0>,_y: #0) { + private fun receiver_needs_type_args(self: S,_y: T) { Abort(1) } - private fun receiver_ref(self: &0x42::m::S<#0>,_y: #0) { + private fun receiver_ref(self: &S,_y: T) { Tuple() } - private fun receiver_ref_mut(self: &mut 0x42::m::S<#0>,y: #0) { + private fun receiver_ref_mut(self: &mut S,y: T) { select m::S.x<&mut S>(self) = y } - private fun test_call_styles(s: 0x42::m::S,x: u64) { + private fun test_call_styles(s: S,x: u64) { m::receiver(s, x); m::receiver_ref(Borrow(Immutable)(s), x); m::receiver_ref_mut(Borrow(Mutable)(s), x); @@ -34,7 +34,7 @@ module 0x42::m { m::receiver_needs_type_args(s, x); Tuple() } - private fun test_receiver_inference(s: 0x42::m::S) { + private fun test_receiver_inference(s: S) { { let (s: S): (S) = Tuple(s); { diff --git a/third_party/move/move-compiler-v2/tests/checking/receiver/same_names.exp b/third_party/move/move-compiler-v2/tests/checking/receiver/same_names.exp index 2dacf49d882be..9f205590de554 100644 --- a/third_party/move/move-compiler-v2/tests/checking/receiver/same_names.exp +++ b/third_party/move/move-compiler-v2/tests/checking/receiver/same_names.exp @@ -3,7 +3,7 @@ module 0x42::b { struct MyOtherList { len: u64, } - public fun len(self: &0x42::b::MyOtherList): u64 { + public fun len(self: &MyOtherList): u64 { select b::MyOtherList.len<&MyOtherList>(self) } } // end 0x42::b @@ -11,17 +11,17 @@ module 0x42::a { struct MyList { len: u64, } - public fun len(self: &0x42::a::MyList): u64 { + public fun len(self: &MyList): u64 { select a::MyList.len<&MyList>(self) } } // end 0x42::a module 0x42::c { use 0x42::a; // resolved as: 0x42::a use 0x42::b; // resolved as: 0x42::b - private inline fun foo(f: |(0x42::a::MyList, 0x42::b::MyOtherList)|,x: 0x42::a::MyList,y: 0x42::b::MyOtherList) { + private inline fun foo(f: |(a::MyList, b::MyOtherList)|,x: a::MyList,y: b::MyOtherList) { (f)(x, y) } - private fun test(x: 0x42::a::MyList,y: 0x42::b::MyOtherList) { + private fun test(x: a::MyList,y: b::MyOtherList) { { let (x: a::MyList, y: b::MyOtherList): (a::MyList, b::MyOtherList) = Tuple(x, y); { diff --git a/third_party/move/move-compiler-v2/tests/checking/receiver/same_names_typed.exp b/third_party/move/move-compiler-v2/tests/checking/receiver/same_names_typed.exp index 2dacf49d882be..9f205590de554 100644 --- a/third_party/move/move-compiler-v2/tests/checking/receiver/same_names_typed.exp +++ b/third_party/move/move-compiler-v2/tests/checking/receiver/same_names_typed.exp @@ -3,7 +3,7 @@ module 0x42::b { struct MyOtherList { len: u64, } - public fun len(self: &0x42::b::MyOtherList): u64 { + public fun len(self: &MyOtherList): u64 { select b::MyOtherList.len<&MyOtherList>(self) } } // end 0x42::b @@ -11,17 +11,17 @@ module 0x42::a { struct MyList { len: u64, } - public fun len(self: &0x42::a::MyList): u64 { + public fun len(self: &MyList): u64 { select a::MyList.len<&MyList>(self) } } // end 0x42::a module 0x42::c { use 0x42::a; // resolved as: 0x42::a use 0x42::b; // resolved as: 0x42::b - private inline fun foo(f: |(0x42::a::MyList, 0x42::b::MyOtherList)|,x: 0x42::a::MyList,y: 0x42::b::MyOtherList) { + private inline fun foo(f: |(a::MyList, b::MyOtherList)|,x: a::MyList,y: b::MyOtherList) { (f)(x, y) } - private fun test(x: 0x42::a::MyList,y: 0x42::b::MyOtherList) { + private fun test(x: a::MyList,y: b::MyOtherList) { { let (x: a::MyList, y: b::MyOtherList): (a::MyList, b::MyOtherList) = Tuple(x, y); { diff --git a/third_party/move/move-compiler-v2/tests/checking/receiver/vectors.exp b/third_party/move/move-compiler-v2/tests/checking/receiver/vectors.exp index 036ee78391b29..8fce705c3af8d 100644 --- a/third_party/move/move-compiler-v2/tests/checking/receiver/vectors.exp +++ b/third_party/move/move-compiler-v2/tests/checking/receiver/vectors.exp @@ -1,12 +1,12 @@ // -- Model dump before bytecode pipeline module 0x1::vector { - private fun receiver(self: vector<#0>,_y: #0) { + private fun receiver(self: vector,_y: T) { Tuple() } - private fun receiver_ref(self: &vector<#0>,_y: #0) { + private fun receiver_ref(self: &vector,_y: T) { Tuple() } - private fun receiver_ref_mut(self: &mut vector<#0>,_y: #0) { + private fun receiver_ref_mut(self: &mut vector,_y: T) { Tuple() } private fun test_call_styles(s: vector,x: u64) { diff --git a/third_party/move/move-compiler-v2/tests/checking/specs/conditions_ok.exp b/third_party/move/move-compiler-v2/tests/checking/specs/conditions_ok.exp index 662b02e08d47d..5524b749b2ebc 100644 --- a/third_party/move/move-compiler-v2/tests/checking/specs/conditions_ok.exp +++ b/third_party/move/move-compiler-v2/tests/checking/specs/conditions_ok.exp @@ -20,7 +20,7 @@ module 0x42::M { ensures And(Eq($t0, result0()), Eq(result1(), true)); } - private fun with_emits(_guid: vector,_msg: #0,x: u64): u64 { + private fun with_emits(_guid: vector,_msg: T,x: u64): u64 { x } spec { diff --git a/third_party/move/move-compiler-v2/tests/checking/specs/inline_fun_in_spec.exp b/third_party/move/move-compiler-v2/tests/checking/specs/inline_fun_in_spec.exp index 2a255ec036435..007310efd886e 100644 --- a/third_party/move/move-compiler-v2/tests/checking/specs/inline_fun_in_spec.exp +++ b/third_party/move/move-compiler-v2/tests/checking/specs/inline_fun_in_spec.exp @@ -32,7 +32,7 @@ module 0x42::m { }; } - private inline fun exec(f: |#0|#1,x: #0): #1 { + private inline fun exec(f: |T|R,x: T): R { { let r: R = (f)(x); spec { @@ -74,7 +74,7 @@ module 0x42::m { }); } - private inline fun get(a: address): � { + private inline fun get(a: address): &R { BorrowGlobal(Immutable)(a) } } // end 0x42::m diff --git a/third_party/move/move-compiler-v2/tests/checking/specs/inline_fun_in_spec_typed.exp b/third_party/move/move-compiler-v2/tests/checking/specs/inline_fun_in_spec_typed.exp index 0b0133cc30042..06ac84e29aaa4 100644 --- a/third_party/move/move-compiler-v2/tests/checking/specs/inline_fun_in_spec_typed.exp +++ b/third_party/move/move-compiler-v2/tests/checking/specs/inline_fun_in_spec_typed.exp @@ -32,7 +32,7 @@ module 0x42::m { }; } - private inline fun exec(f: |#0|#1,x: #0): #1 { + private inline fun exec(f: |T|R,x: T): R { { let r: R = (f)(x); spec { @@ -74,7 +74,7 @@ module 0x42::m { }); } - private inline fun get(a: address): � { + private inline fun get(a: address): &R { BorrowGlobal(Immutable)(a) } } // end 0x42::m diff --git a/third_party/move/move-compiler-v2/tests/checking/specs/intrinsic_decl_ok.exp b/third_party/move/move-compiler-v2/tests/checking/specs/intrinsic_decl_ok.exp index a377c93e8b35c..04ca7c2e62df2 100644 --- a/third_party/move/move-compiler-v2/tests/checking/specs/intrinsic_decl_ok.exp +++ b/third_party/move/move-compiler-v2/tests/checking/specs/intrinsic_decl_ok.exp @@ -12,20 +12,20 @@ module 0x42::M { spec { } - private native fun contains(t: &0x42::M::MyTable2<#0, #1>,k: #0): bool; - private native fun borrow(t: &0x42::M::MyTable2<#0, #1>,k: #0):  - private native fun borrow_mut(t: &mut 0x42::M::MyTable1<#0, #1>,k: #0): &mut #1; - private native fun destroy_empty(t: 0x42::M::MyTable1<#0, #1>); - private native fun length(t: &0x42::M::MyTable1<#0, #1>): u64; - private native fun remove(t: &mut 0x42::M::MyTable2<#0, #1>,k: #0): #1; - private native fun new(): 0x42::M::MyTable1<#0, #1>; - private native fun new2(): 0x42::M::MyTable2<#0, #1>; - spec fun spec_len(t: 0x42::M::MyTable1<#0, #1>): num; - spec fun spec_set(t: 0x42::M::MyTable1<#0, #1>,k: #0,v: #1): 0x42::M::MyTable1<#0, #1>; - spec fun spec_get(t: 0x42::M::MyTable1<#0, #1>,k: #0): #1; - spec fun spec_len2(t: 0x42::M::MyTable2<#0, #1>): num; - spec fun spec_del(t: 0x42::M::MyTable2<#0, #1>): num; - spec fun spec_has_key(t: 0x42::M::MyTable2<#0, #1>,k: #0): bool; + private native fun contains(t: &MyTable2,k: K): bool; + private native fun borrow(t: &MyTable2,k: K): &V; + private native fun borrow_mut(t: &mut MyTable1,k: K): &mut V; + private native fun destroy_empty(t: MyTable1); + private native fun length(t: &MyTable1): u64; + private native fun remove(t: &mut MyTable2,k: K): V; + private native fun new(): MyTable1; + private native fun new2(): MyTable2; + spec fun spec_len(t: MyTable1<#0, #1>): num; + spec fun spec_set(t: MyTable1<#0, #1>,k: #0,v: #1): MyTable1<#0, #1>; + spec fun spec_get(t: MyTable1<#0, #1>,k: #0): #1; + spec fun spec_len2(t: MyTable2<#0, #1>): num; + spec fun spec_del(t: MyTable2<#0, #1>): num; + spec fun spec_has_key(t: MyTable2<#0, #1>,k: #0): bool; } // end 0x42::M // -- Sourcified model before bytecode pipeline diff --git a/third_party/move/move-compiler-v2/tests/checking/specs/move_function_in_spec_ok.exp b/third_party/move/move-compiler-v2/tests/checking/specs/move_function_in_spec_ok.exp index 9266d040570f5..983ba541a7124 100644 --- a/third_party/move/move-compiler-v2/tests/checking/specs/move_function_in_spec_ok.exp +++ b/third_party/move/move-compiler-v2/tests/checking/specs/move_function_in_spec_ok.exp @@ -25,7 +25,7 @@ module 0x42::move_function_in_spec { Eq
(select move_function_in_spec::TypeInfo.account_address<&TypeInfo>(ty), new_addr) } } - public fun type_of(): 0x42::move_function_in_spec::TypeInfo { + public fun type_of(): TypeInfo { Abort(1) } spec fun $no_change(target: address,new_addr: address): bool { @@ -34,7 +34,7 @@ module 0x42::move_function_in_spec { Eq
(select move_function_in_spec::TypeInfo.account_address<0x42::move_function_in_spec::TypeInfo>(ty), new_addr) } } - spec fun $type_of(): 0x42::move_function_in_spec::TypeInfo { + spec fun $type_of(): TypeInfo { Tuple() } } // end 0x42::move_function_in_spec diff --git a/third_party/move/move-compiler-v2/tests/checking/specs/quantifiers_ok.exp b/third_party/move/move-compiler-v2/tests/checking/specs/quantifiers_ok.exp index b4258f9204f1d..113804cb1f31b 100644 --- a/third_party/move/move-compiler-v2/tests/checking/specs/quantifiers_ok.exp +++ b/third_party/move/move-compiler-v2/tests/checking/specs/quantifiers_ok.exp @@ -3,10 +3,10 @@ module 0x42::M { struct S { x: u64, } - spec fun exists_in_vector(v: vector<0x42::M::S>): bool { + spec fun exists_in_vector(v: vector): bool { exists s: 0x42::M::S: v: Gt(select M::S.x<0x42::M::S>(s), 0) } - spec fun some_in_vector(v: vector<0x42::M::S>): 0x42::M::S { + spec fun some_in_vector(v: vector): S { choose s: 0x42::M::S: v: Eq(select M::S.x<0x42::M::S>(s), 0) } } // end 0x42::M diff --git a/third_party/move/move-compiler-v2/tests/checking/specs/structs_ok.exp b/third_party/move/move-compiler-v2/tests/checking/specs/structs_ok.exp index 4f8d0f14f9d35..43214d6022fa7 100644 --- a/third_party/move/move-compiler-v2/tests/checking/specs/structs_ok.exp +++ b/third_party/move/move-compiler-v2/tests/checking/specs/structs_ok.exp @@ -15,19 +15,19 @@ module 0x42::M { y: bool, z: vector, } - public fun f(r: 0x42::M::R): 0x42::M::T { + public fun f(r: R): T { pack M::T(select M::S.x(select M::R.s(r))) } - spec fun struct_access(s: 0x42::M::S): u64 { + spec fun struct_access(s: S): u64 { select M::S.x<0x42::M::S>(s) } - spec fun nested_struct_access(r: 0x42::M::R): bool { + spec fun nested_struct_access(r: R): bool { select M::S.y<0x42::M::S>(select M::R.s<0x42::M::R>(r)) } - spec fun struct_pack(x: u64,y: bool,z: vector): 0x42::M::S { + spec fun struct_pack(x: u64,y: bool,z: vector): S { pack M::S(x, y, z) } - spec fun struct_pack_other_order(x: u64,y: bool,z: vector): 0x42::M::S { + spec fun struct_pack_other_order(x: u64,y: bool,z: vector): S { { let $z: vector = z; { @@ -36,13 +36,13 @@ module 0x42::M { } } } - spec fun generic_struct_pack(x: u64,y: bool): 0x42::M::G { + spec fun generic_struct_pack(x: u64,y: bool): G { pack M::G(x, y) } - spec fun generic_struct_pack_instantiated(x: u64,y: bool): 0x42::M::G { + spec fun generic_struct_pack_instantiated(x: u64,y: bool): G { pack M::G(x, y) } - spec fun resource_global(addr: address): 0x42::M::T { + spec fun resource_global(addr: address): T { global<0x42::M::T>(addr) } spec fun resource_global_exists(addr: address): bool { diff --git a/third_party/move/move-compiler-v2/tests/checking/specs/update_field_ok.exp b/third_party/move/move-compiler-v2/tests/checking/specs/update_field_ok.exp index 1e22285d1e847..7e15d2d3c36be 100644 --- a/third_party/move/move-compiler-v2/tests/checking/specs/update_field_ok.exp +++ b/third_party/move/move-compiler-v2/tests/checking/specs/update_field_ok.exp @@ -4,7 +4,7 @@ module 0x42::update_field_ok { x: u64, y: u64, } - private fun f(r: &mut 0x42::update_field_ok::R) { + private fun f(r: &mut R) { select update_field_ok::R.x<&mut R>(r) = 1; Tuple() } @@ -13,7 +13,7 @@ module 0x42::update_field_ok { ensures Eq<0x42::update_field_ok::R>(Freeze(false)($t0), update_field_ok::assign_x_1(Old<0x42::update_field_ok::R>($t0))); } - spec fun assign_x_1(r: 0x42::update_field_ok::R): 0x42::update_field_ok::R { + spec fun assign_x_1(r: R): R { update update_field_ok::R.x<0x42::update_field_ok::R>(r, 1) } } // end 0x42::update_field_ok diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/assign_tuple_wg.exp b/third_party/move/move-compiler-v2/tests/checking/typing/assign_tuple_wg.exp index 574e85d52c464..bdd2fc85f3254 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/assign_tuple_wg.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/assign_tuple_wg.exp @@ -18,7 +18,7 @@ module 0xc0ffee::dummy2 { struct State { value: u64, } - private fun tuple_assignments(s: &signer,state: 0xc0ffee::dummy2::State) { + private fun tuple_assignments(s: &signer,state: State) { { let (): () = MoveTo(s, state); Tuple() diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/binary_add.exp b/third_party/move/move-compiler-v2/tests/checking/typing/binary_add.exp index dbf962cd18cc3..fd8094767a75d 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/binary_add.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/binary_add.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct R { f: u64, } - private fun t0(x: u64,r: 0x8675309::M::R) { + private fun t0(x: u64,r: R) { 0; 1; 1; diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/binary_and.exp b/third_party/move/move-compiler-v2/tests/checking/typing/binary_and.exp index dc36e8c925bf4..73a8766017937 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/binary_and.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/binary_and.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct R { f: bool, } - private fun t0(x: bool,r: 0x8675309::M::R) { + private fun t0(x: bool,r: R) { false; false; false; diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/binary_bit_and.exp b/third_party/move/move-compiler-v2/tests/checking/typing/binary_bit_and.exp index 51af76228c585..39e24786a4398 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/binary_bit_and.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/binary_bit_and.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct R { f: u64, } - private fun t0(x: u64,r: 0x8675309::M::R) { + private fun t0(x: u64,r: R) { 0; 0; 0; diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/binary_bit_or.exp b/third_party/move/move-compiler-v2/tests/checking/typing/binary_bit_or.exp index e1a72e723b680..ce3e511d8babf 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/binary_bit_or.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/binary_bit_or.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct R { f: u64, } - private fun t0(x: u64,r: 0x8675309::M::R) { + private fun t0(x: u64,r: R) { 0; 1; 1; diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/binary_div.exp b/third_party/move/move-compiler-v2/tests/checking/typing/binary_div.exp index dd1fa987c3b92..0495092f02468 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/binary_div.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/binary_div.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct R { f: u64, } - private fun t0(x: u64,r: 0x8675309::M::R) { + private fun t0(x: u64,r: R) { Div(0, 0); Div(1, 0); 0; diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/binary_geq.exp b/third_party/move/move-compiler-v2/tests/checking/typing/binary_geq.exp index c7e5cc27f39b7..2a29ec5402b29 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/binary_geq.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/binary_geq.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct R { f: u64, } - private fun t0(x: u64,r: 0x8675309::M::R) { + private fun t0(x: u64,r: R) { true; true; false; diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/binary_gt.exp b/third_party/move/move-compiler-v2/tests/checking/typing/binary_gt.exp index 525e08a390065..f8b6c74e19878 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/binary_gt.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/binary_gt.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct R { f: u64, } - private fun t0(x: u64,r: 0x8675309::M::R) { + private fun t0(x: u64,r: R) { false; true; false; diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/binary_leq.exp b/third_party/move/move-compiler-v2/tests/checking/typing/binary_leq.exp index 46bcecd2e7496..7d4f67a317c34 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/binary_leq.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/binary_leq.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct R { f: u64, } - private fun t0(x: u64,r: 0x8675309::M::R) { + private fun t0(x: u64,r: R) { true; false; true; diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/binary_lt.exp b/third_party/move/move-compiler-v2/tests/checking/typing/binary_lt.exp index 6e41d78887518..a39b2db954320 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/binary_lt.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/binary_lt.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct R { f: u64, } - private fun t0(x: u64,r: 0x8675309::M::R) { + private fun t0(x: u64,r: R) { false; false; true; diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/binary_mod.exp b/third_party/move/move-compiler-v2/tests/checking/typing/binary_mod.exp index 3e85e951d274e..5821dccc1c2b3 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/binary_mod.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/binary_mod.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct R { f: u64, } - private fun t0(x: u64,r: 0x8675309::M::R) { + private fun t0(x: u64,r: R) { Mod(0, 0); Mod(1, 0); 0; diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/binary_mul.exp b/third_party/move/move-compiler-v2/tests/checking/typing/binary_mul.exp index 2481477f406fe..f2796fad68ebc 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/binary_mul.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/binary_mul.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct R { f: u64, } - private fun t0(x: u64,r: 0x8675309::M::R) { + private fun t0(x: u64,r: R) { 0; 0; 0; diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/binary_or.exp b/third_party/move/move-compiler-v2/tests/checking/typing/binary_or.exp index f46f636d7c160..3f789c99b0013 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/binary_or.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/binary_or.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct R { f: bool, } - private fun t0(x: bool,r: 0x8675309::M::R) { + private fun t0(x: bool,r: R) { true; true; true; diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/binary_shl.exp b/third_party/move/move-compiler-v2/tests/checking/typing/binary_shl.exp index 5f0d862687573..3b588ae51c05d 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/binary_shl.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/binary_shl.exp @@ -4,7 +4,7 @@ module 0x8675309::M { f: u64, b: u8, } - private fun t0(x: u64,b: u8,r: 0x8675309::M::R) { + private fun t0(x: u64,b: u8,r: R) { 0; 1; 0; diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/binary_shr.exp b/third_party/move/move-compiler-v2/tests/checking/typing/binary_shr.exp index c55184dca4e32..83b8b2181e934 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/binary_shr.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/binary_shr.exp @@ -4,7 +4,7 @@ module 0x8675309::M { f: u64, b: u8, } - private fun t0(x: u64,b: u8,r: 0x8675309::M::R) { + private fun t0(x: u64,b: u8,r: R) { 0; 1; 0; diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/binary_sub.exp b/third_party/move/move-compiler-v2/tests/checking/typing/binary_sub.exp index 902548d10ec08..bd16e85576bda 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/binary_sub.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/binary_sub.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct R { f: u64, } - private fun t0(x: u64,r: 0x8675309::M::R) { + private fun t0(x: u64,r: R) { 0; 1; Sub(0, 1); diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/binary_xor.exp b/third_party/move/move-compiler-v2/tests/checking/typing/binary_xor.exp index b5faec5a1be9c..0d24ebfbf52cb 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/binary_xor.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/binary_xor.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct R { f: u64, } - private fun t0(x: u64,r: 0x8675309::M::R) { + private fun t0(x: u64,r: R) { 0; 1; 1; diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/borrow_field.exp b/third_party/move/move-compiler-v2/tests/checking/typing/borrow_field.exp index fb3de2221bc38..6da28f42b0d35 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/borrow_field.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/borrow_field.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct S { f: u64, } - private fun t0(s: &0x8675309::M::S,s_mut: &mut 0x8675309::M::S,s_mut2: &mut 0x8675309::M::S): (&u64, &u64, &mut u64) { + private fun t0(s: &S,s_mut: &mut S,s_mut2: &mut S): (&u64, &u64, &mut u64) { Tuple(Borrow(Immutable)(select M::S.f<&S>(s)), Borrow(Immutable)(select M::S.f<&mut S>(s_mut)), Borrow(Mutable)(select M::S.f<&mut S>(s_mut2))) } } // end 0x8675309::M diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/borrow_field_chain.exp b/third_party/move/move-compiler-v2/tests/checking/typing/borrow_field_chain.exp index 7a6a1d92c128d..70d4ba0fd60ae 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/borrow_field_chain.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/borrow_field_chain.exp @@ -9,7 +9,7 @@ module 0x8675309::M { struct X3 { f: u64, } - private fun t0(x1: &0x8675309::M::X1,x1_mut: &mut 0x8675309::M::X1) { + private fun t0(x1: &X1,x1_mut: &mut X1) { Borrow(Immutable)(select M::X1.x2<&X1>(x1)); Borrow(Immutable)(select M::X2.x3(select M::X1.x2<&X1>(x1))); Borrow(Immutable)(select M::X3.f(select M::X2.x3(select M::X1.x2<&X1>(x1)))); diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/borrow_field_complex_root_expr.exp b/third_party/move/move-compiler-v2/tests/checking/typing/borrow_field_complex_root_expr.exp index 2e51aff34975f..8effc39a97ef2 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/borrow_field_complex_root_expr.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/borrow_field_complex_root_expr.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct S { f: u64, } - private fun t0(cond: bool,s: &0x8675309::M::S,s_mut: &mut 0x8675309::M::S) { + private fun t0(cond: bool,s: &S,s_mut: &mut S) { Borrow(Immutable)(select M::S.f<&S>(if cond { s } else { diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/borrow_field_non_ref_root.exp b/third_party/move/move-compiler-v2/tests/checking/typing/borrow_field_non_ref_root.exp index 87875ab352442..d3eaf882a2445 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/borrow_field_non_ref_root.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/borrow_field_non_ref_root.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct S { f: u64, } - private fun t0(cond: bool,s: 0x8675309::M::S) { + private fun t0(cond: bool,s: S) { Borrow(Immutable)(select M::S.f(s)); Borrow(Mutable)(select M::S.f(s)); Borrow(Immutable)(select M::S.f(if cond { diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/borrow_local.exp b/third_party/move/move-compiler-v2/tests/checking/typing/borrow_local.exp index 6469134b48c13..c048387e43b32 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/borrow_local.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/borrow_local.exp @@ -6,7 +6,7 @@ module 0x8675309::M { struct S { dummy_field: bool, } - private fun t0(b: bool,u: u64,s: 0x8675309::M::S,r: 0x8675309::M::R): 0x8675309::M::R { + private fun t0(b: bool,u: u64,s: S,r: R): R { Borrow(Immutable)(b); Borrow(Mutable)(b); Borrow(Immutable)(u); @@ -17,7 +17,7 @@ module 0x8675309::M { Borrow(Mutable)(r); r } - private fun t1(): 0x8675309::M::R { + private fun t1(): R { { let b: bool = true; { diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/break_any_type.exp b/third_party/move/move-compiler-v2/tests/checking/typing/break_any_type.exp index 2b911015619f5..88c5ed384a9da 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/break_any_type.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/break_any_type.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct Coin { dummy_field: bool, } - private fun foo(c: 0x8675309::M::Coin) { + private fun foo(c: Coin) { M::Coin{ dummy_field: _ } = c; Tuple() } diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/continue_any_type.exp b/third_party/move/move-compiler-v2/tests/checking/typing/continue_any_type.exp index 43502815f4f30..2799fd5291964 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/continue_any_type.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/continue_any_type.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct Coin { dummy_field: bool, } - private fun foo(c: 0x8675309::M::Coin) { + private fun foo(c: Coin) { M::Coin{ dummy_field: _ } = c; Tuple() } diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/derefrence.exp b/third_party/move/move-compiler-v2/tests/checking/typing/derefrence.exp index a98c47c892c1c..8c7a6c1aceb7b 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/derefrence.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/derefrence.exp @@ -7,7 +7,7 @@ module 0x8675309::M { struct X { dummy_field: bool, } - private fun t0(x: &u64,x_mut: &mut u64,s: &0x8675309::M::S,s_mut: &mut 0x8675309::M::S) { + private fun t0(x: &u64,x_mut: &mut u64,s: &S,s_mut: &mut S) { Deref(x); Deref(x_mut); Deref(s); diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/entry_signature_no_warning.exp b/third_party/move/move-compiler-v2/tests/checking/typing/entry_signature_no_warning.exp index d51e71724aaac..314382987eb04 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/entry_signature_no_warning.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/entry_signature_no_warning.exp @@ -9,10 +9,10 @@ module 0x42::M { public entry fun signer_ref(_: &signer) { Tuple() } - public entry fun struct_arg(_: 0x42::M::CoolStruct) { + public entry fun struct_arg(_: CoolStruct) { Tuple() } - public entry fun struct_ret(): 0x42::M::CoolStruct { + public entry fun struct_ret(): CoolStruct { pack M::CoolStruct(false) } public entry fun u64_ret(): u64 { diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/eq.exp b/third_party/move/move-compiler-v2/tests/checking/typing/eq.exp index 14f1dbac9fd8a..0f6289490929e 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/eq.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/eq.exp @@ -9,7 +9,7 @@ module 0x8675309::M { struct S { u: u64, } - private fun t0(r: &0x8675309::M::R,r_mut: &mut 0x8675309::M::R,s: 0x8675309::M::S,s_ref: &0x8675309::M::S,s_mut: &mut 0x8675309::M::S) { + private fun t0(r: &R,r_mut: &mut R,s: S,s_ref: &S,s_mut: &mut S) { false; false; false; diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/exp_list.exp b/third_party/move/move-compiler-v2/tests/checking/typing/exp_list.exp index 4ecc70487d887..423fbbc8ff7f7 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/exp_list.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/exp_list.exp @@ -6,10 +6,10 @@ module 0x8675309::M { struct S { dummy_field: bool, } - private fun t0(): (u64, 0x8675309::M::S, 0x8675309::M::R<0x8675309::M::R>) { + private fun t0(): (u64, S, R>) { Tuple(0, pack M::S(false), pack M::R>(pack M::R(1))) } - private fun t1(s: &0x8675309::M::S,r: &mut 0x8675309::M::R): (u64, &0x8675309::M::S, &mut 0x8675309::M::R) { + private fun t1(s: &S,r: &mut R): (u64, &S, &mut R) { Tuple(0, s, r) } } // end 0x8675309::M diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/hex_and_decimal_address.exp b/third_party/move/move-compiler-v2/tests/checking/typing/hex_and_decimal_address.exp index 9831e1b3d18c1..7bbed33ec8cf2 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/hex_and_decimal_address.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/hex_and_decimal_address.exp @@ -3,10 +3,10 @@ module 0x7b::M { struct S { dummy_field: bool, } - public fun s(): 0x7b::M::S { + public fun s(): S { pack M::S(false) } - public fun take(_s: 0x7b::M::S) { + public fun take(_s: S) { Tuple() } } // end 0x7b::M diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field.exp b/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field.exp index 5fa0efa999196..cc51779b1ed1b 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct S { f: u64, } - private fun t0(s: &0x8675309::M::S,s_mut: &mut 0x8675309::M::S): (u64, u64) { + private fun t0(s: &S,s_mut: &mut S): (u64, u64) { Tuple(select M::S.f<&S>(s), select M::S.f<&mut S>(s_mut)) } } // end 0x8675309::M diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field_chain.exp b/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field_chain.exp index 9767a4568682a..5f505db3a6d37 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field_chain.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field_chain.exp @@ -9,7 +9,7 @@ module 0x8675309::M { struct X3 { f: u64, } - private fun t0(x1: &0x8675309::M::X1,x1_mut: &mut 0x8675309::M::X1,x2: &0x8675309::M::X2,x2_mut: &mut 0x8675309::M::X2) { + private fun t0(x1: &X1,x1_mut: &mut X1,x2: &X2,x2_mut: &mut X2) { select M::X3.f(select M::X2.x3(select M::X1.x2<&X1>(x1))); select M::X3.f(select M::X2.x3(select M::X1.x2<&mut X1>(x1_mut))); select M::X3.f(select M::X2.x3<&X2>(x2)); diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field_complex_root_expr.exp b/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field_complex_root_expr.exp index 0d2b566b8124e..f3d40cef51c37 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field_complex_root_expr.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field_complex_root_expr.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct S { f: u64, } - private fun t0(cond: bool,s: &0x8675309::M::S,s_mut: &mut 0x8675309::M::S) { + private fun t0(cond: bool,s: &S,s_mut: &mut S) { select M::S.f<&S>(if cond { s } else { diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field_non_ref_non_local_root.exp b/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field_non_ref_non_local_root.exp index 08019a77055c7..f94c9cb4a3e05 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field_non_ref_non_local_root.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field_non_ref_non_local_root.exp @@ -3,13 +3,13 @@ module 0x8675309::M { struct S { f: u64, } - private fun bar(): 0x8675309::M::S { + private fun bar(): S { pack M::S(0) } - private fun foo(): &0x8675309::M::S { + private fun foo(): &S { Abort(0) } - private fun t0(cond: bool,_s: 0x8675309::M::S) { + private fun t0(cond: bool,_s: S) { select M::S.f<&S>(M::foo()); select M::S.f(M::bar()); select M::S.f<&S>(if cond { diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field_non_ref_root.exp b/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field_non_ref_root.exp index f6826224d11d1..730ca3e3600da 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field_non_ref_root.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/implicit_deref_borrow_field_non_ref_root.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct S { f: u64, } - private fun t0(cond: bool,s: 0x8675309::M::S) { + private fun t0(cond: bool,s: S) { select M::S.f(s); select M::S.f(if cond { pack M::S(0) diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/loop_result_type.exp b/third_party/move/move-compiler-v2/tests/checking/typing/loop_result_type.exp index c14b82e5a0425..10ffc738309aa 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/loop_result_type.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/loop_result_type.exp @@ -9,7 +9,7 @@ module 0x2::M { private fun foo(_x: u64) { Tuple() } - private fun t0(): 0x2::X::R { + private fun t0(): X::R { loop { Tuple() } @@ -25,7 +25,7 @@ module 0x2::M { Tuple() }) } - private fun t3(): 0x2::X::R { + private fun t3(): X::R { { let x: X::R = loop { 0; diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/main_arguments_various_caes.exp b/third_party/move/move-compiler-v2/tests/checking/typing/main_arguments_various_caes.exp index 43625a99b9391..ebd403606785e 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/main_arguments_various_caes.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/main_arguments_various_caes.exp @@ -9,13 +9,13 @@ module 0x42::M { struct S { dummy_field: bool, } - public fun eat(r: 0x42::M::R) { + public fun eat(r: R) { M::R{ dummy_field: _ } = r } } // end 0x42::M module _0 { use 0x42::M::{S, R, Cup}; // resolved as: 0x42::M - private fun main(_s: &signer,_a0: #0,_a1: vector<#0>,_a2: vector>,_a3: 0x42::M::S,_a4: 0x42::M::R,_a5: 0x42::M::Cup,_a6: 0x42::M::Cup<#0>,_a7: vector<0x42::M::S>) { + private fun main(_s: &signer,_a0: T,_a1: vector,_a2: vector>,_a3: M::S,_a4: M::R,_a5: M::Cup,_a6: M::Cup,_a7: vector) { Abort(0) } } // end _0 diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/mutable_eq_and_neq.exp b/third_party/move/move-compiler-v2/tests/checking/typing/mutable_eq_and_neq.exp index 6d09192fac363..adc57ec46e5eb 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/mutable_eq_and_neq.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/mutable_eq_and_neq.exp @@ -11,7 +11,7 @@ module 0x8675309::M { f: u64, g: u64, } - private fun t(r1: &mut u64,r2: &mut u64,s: &mut 0x8675309::M::S) { + private fun t(r1: &mut u64,r2: &mut u64,s: &mut S) { Eq(Freeze(false)(r1), Freeze(false)(r1)); Eq(Freeze(false)(r1), Freeze(false)(r2)); Eq(Freeze(false)(r2), Freeze(false)(r2)); @@ -30,13 +30,13 @@ module 0x8675309::M { Neq(Freeze(false)(Borrow(Mutable)(select M::S.g<&mut S>(s))), Freeze(false)(Borrow(Mutable)(select M::S.g<&mut S>(s)))); Tuple() } - private fun t1(p: &mut 0x8675309::M::P) { + private fun t1(p: &mut P) { { let comp: bool = Eq(Freeze(false)(Borrow(Mutable)(select M::P.b1<&mut P>(p))), Freeze(false)(Borrow(Mutable)(select M::P.b2<&mut P>(p)))); select M::B.f(select M::P.b1<&mut P>(p)) = comp } } - private fun t2(p: &mut 0x8675309::M::P) { + private fun t2(p: &mut P) { { let comp: bool = Neq(Freeze(false)(Borrow(Mutable)(select M::P.b1<&mut P>(p))), Freeze(false)(Borrow(Mutable)(select M::P.b2<&mut P>(p)))); select M::B.f(select M::P.b1<&mut P>(p)) = comp diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/mutate.exp b/third_party/move/move-compiler-v2/tests/checking/typing/mutate.exp index aa834bfc75fc4..8ddf9c8239941 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/mutate.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/mutate.exp @@ -3,10 +3,10 @@ module 0x8675309::M { struct S { f: u64, } - private fun bar(s: &mut 0x8675309::M::S): &mut 0x8675309::M::S { + private fun bar(s: &mut S): &mut S { s } - private fun baz(): 0x8675309::M::S { + private fun baz(): S { pack M::S(0) } private fun foo(x: &mut u64): &mut u64 { diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/neq.exp b/third_party/move/move-compiler-v2/tests/checking/typing/neq.exp index 348b5cf618bd4..f1976389c8105 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/neq.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/neq.exp @@ -9,7 +9,7 @@ module 0x8675309::M { struct S { u: u64, } - private fun t0(r: &0x8675309::M::R,r_mut: &mut 0x8675309::M::R,s: 0x8675309::M::S,s_ref: &0x8675309::M::S,s_mut: &mut 0x8675309::M::S) { + private fun t0(r: &R,r_mut: &mut R,s: S,s_ref: &S,s_mut: &mut S) { true; true; true; diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/nested_post_process.exp b/third_party/move/move-compiler-v2/tests/checking/typing/nested_post_process.exp index dec031e483fb0..f962be66efbfa 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/nested_post_process.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/nested_post_process.exp @@ -10,7 +10,7 @@ module 0x42::simple_map { struct SimpleMap { data: vector<0x42::simple_map::Element<#0, #1>>, } - public fun borrow(map: &0x42::simple_map::SimpleMap<#0, #1>,key: �):  { + public fun borrow(map: &SimpleMap,key: &Key): &Value { { let maybe_idx: 0x1::option::Option = simple_map::find(map, key); if option::is_some(Borrow(Immutable)(maybe_idx)) { @@ -24,7 +24,7 @@ module 0x42::simple_map { } } } - private fun find(map: &0x42::simple_map::SimpleMap<#0, #1>,key: �): 0x1::option::Option { + private fun find(map: &SimpleMap,key: &Key): 0x1::option::Option { { let leng: u64 = vector::length>(Borrow(Immutable)(select simple_map::SimpleMap.data<&SimpleMap>(map))); { diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/other_builtins.exp b/third_party/move/move-compiler-v2/tests/checking/typing/other_builtins.exp index 8410c9263c7b4..c9bac663000b3 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/other_builtins.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/other_builtins.exp @@ -1,6 +1,6 @@ // -- Model dump before bytecode pipeline module 0x8675309::M { - private fun any(): #0 { + private fun any(): T { Abort(0) } private fun foo(x: &mut u64) { diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/return_any_type.exp b/third_party/move/move-compiler-v2/tests/checking/typing/return_any_type.exp index b056763411ee1..9cd94b1ea8825 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/return_any_type.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/return_any_type.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct Coin { dummy_field: bool, } - private fun foo(c: 0x8675309::M::Coin) { + private fun foo(c: Coin) { M::Coin{ dummy_field: _ } = c; Tuple() } diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/return_type_explicit_exp.exp b/third_party/move/move-compiler-v2/tests/checking/typing/return_type_explicit_exp.exp index 4266fc83608c4..71676a3601e39 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/return_type_explicit_exp.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/return_type_explicit_exp.exp @@ -13,7 +13,7 @@ module 0x8675309::M { private fun t1(): u64 { return 0 } - private fun t2(): (u64, bool, 0x8675309::M::R) { + private fun t2(): (u64, bool, R) { loop { if true { return Tuple(0, false, pack M::R(false)) diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/return_type_last_exp.exp b/third_party/move/move-compiler-v2/tests/checking/typing/return_type_last_exp.exp index 1ad84ba57f52a..1efd715b2ff84 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/return_type_last_exp.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/return_type_last_exp.exp @@ -9,7 +9,7 @@ module 0x8675309::M { private fun t1(): u64 { 0 } - private fun t2(): (u64, bool, 0x8675309::M::R) { + private fun t2(): (u64, bool, R) { Tuple(0, false, pack M::R(false)) } } // end 0x8675309::M diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/struct_no_field_list.exp b/third_party/move/move-compiler-v2/tests/checking/typing/struct_no_field_list.exp index cf2cabae91622..070f921e332b9 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/struct_no_field_list.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/struct_no_field_list.exp @@ -3,7 +3,7 @@ module 0x42::m { struct S { dummy_field: bool, } - private fun f(_s: 0x42::m::S): 0x42::m::S { + private fun f(_s: S): S { pack m::S(false) } private fun d() { diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/subtype_args.exp b/third_party/move/move-compiler-v2/tests/checking/typing/subtype_args.exp index 371c553c2f185..4f9d394213ba6 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/subtype_args.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/subtype_args.exp @@ -3,16 +3,16 @@ module 0x8675309::M { struct S { dummy_field: bool, } - private fun imm(_x: �) { + private fun imm(_x: &T) { Tuple() } - private fun imm_imm(_x: �,_y: �) { + private fun imm_imm(_x: &T,_y: &T) { Tuple() } - private fun imm_mut(_x: �,_y: &mut #0) { + private fun imm_mut(_x: &T,_y: &mut T) { Tuple() } - private fun mut_imm(_x: &mut #0,_y: �) { + private fun mut_imm(_x: &mut T,_y: &T) { Tuple() } private fun t0() { diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/subtype_return.exp b/third_party/move/move-compiler-v2/tests/checking/typing/subtype_return.exp index b015634b5f61d..ae5aaddde3f22 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/subtype_return.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/subtype_return.exp @@ -6,7 +6,7 @@ module 0x8675309::M { private fun t0(u: &mut u64): &u64 { Freeze(false)(u) } - private fun t1(s: &mut 0x8675309::M::S): &0x8675309::M::S { + private fun t1(s: &mut S): &S { Freeze(false)(s) } private fun t2(u1: &mut u64,u2: &mut u64): (&u64, &mut u64) { diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/tuple.exp b/third_party/move/move-compiler-v2/tests/checking/typing/tuple.exp index 9179e41d22c3a..2b347473d4478 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/tuple.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/tuple.exp @@ -3,7 +3,7 @@ module 0x42::tuple { struct S { f: u64, } - private fun tuple(x: u64): (u64, 0x42::tuple::S) { + private fun tuple(x: u64): (u64, S) { Tuple(x, pack tuple::S(Add(x, 1))) } private fun use_tuple(x: u64): u64 { diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/type_variable_join_single_unpack.exp b/third_party/move/move-compiler-v2/tests/checking/typing/type_variable_join_single_unpack.exp index 744ddbce697f8..ebfb56730b924 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/type_variable_join_single_unpack.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/type_variable_join_single_unpack.exp @@ -4,7 +4,7 @@ module 0x8675309::M { f1: #0, f2: #0, } - private fun new(): 0x8675309::M::Box<#0> { + private fun new(): Box { Abort(0) } private fun t0() { diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/type_variable_join_single_unpack_assign.exp b/third_party/move/move-compiler-v2/tests/checking/typing/type_variable_join_single_unpack_assign.exp index 324811e2bf95c..73269d41aa3c1 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/type_variable_join_single_unpack_assign.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/type_variable_join_single_unpack_assign.exp @@ -4,7 +4,7 @@ module 0x8675309::M { f1: #0, f2: #0, } - private fun new(): 0x8675309::M::Box<#0> { + private fun new(): Box { Abort(0) } private fun t0() { diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/type_variable_join_threaded_pack.exp b/third_party/move/move-compiler-v2/tests/checking/typing/type_variable_join_threaded_pack.exp index b2bad04f60ca2..cb79ee03e4703 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/type_variable_join_threaded_pack.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/type_variable_join_threaded_pack.exp @@ -3,13 +3,13 @@ module 0x2::Container { struct T { f: #0, } - public fun get(_self: &0x2::Container::T<#0>): #0 { + public fun get(_self: &T): V { Abort(0) } - public fun new(): 0x2::Container::T<#0> { + public fun new(): T { Abort(0) } - public fun put(_self: &mut 0x2::Container::T<#0>,_item: #0) { + public fun put(_self: &mut T,_item: V) { Abort(0) } } // end 0x2::Container @@ -19,7 +19,7 @@ module 0x2::M { f1: #0, f2: #0, } - private fun t0(): 0x2::M::Box { + private fun t0(): Box { { let v: Container::T = Container::new(); { diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/unary_not.exp b/third_party/move/move-compiler-v2/tests/checking/typing/unary_not.exp index b3ef557ff8284..6028cd1a02094 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/unary_not.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/unary_not.exp @@ -3,7 +3,7 @@ module 0x8675309::M { struct R { f: bool, } - private fun t0(x: bool,r: 0x8675309::M::R) { + private fun t0(x: bool,r: R) { false; true; Not(x); diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/v1-examples/multi_pool_money_market_token.exp b/third_party/move/move-compiler-v2/tests/checking/typing/v1-examples/multi_pool_money_market_token.exp index 6cff64e15ab04..f4e0e789dbb91 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/v1-examples/multi_pool_money_market_token.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/v1-examples/multi_pool_money_market_token.exp @@ -22,13 +22,13 @@ module 0x2::Token { type: #0, value: u64, } - public fun create(type: #0,value: u64): 0x2::Token::Coin<#0> { + public fun create(type: ATy,value: u64): Coin { pack Token::Coin(type, value) } - public fun value(coin: &0x2::Token::Coin<#0>): u64 { + public fun value(coin: &Coin): u64 { select Token::Coin.value<&Coin>(coin) } - public fun deposit(coin: &mut 0x2::Token::Coin<#0>,check: 0x2::Token::Coin<#0>) { + public fun deposit(coin: &mut Coin,check: Coin) { { let Token::Coin{ type, value } = check; if Eq(Borrow(Immutable)(select Token::Coin.type<&mut Coin>(coin)), Borrow(Immutable)(type)) { @@ -40,7 +40,7 @@ module 0x2::Token { Tuple() } } - public fun destroy_zero(coin: 0x2::Token::Coin<#0>) { + public fun destroy_zero(coin: Coin) { { let Token::Coin{ type: _, value } = coin; if Eq(value, 0) { @@ -50,17 +50,17 @@ module 0x2::Token { } } } - public fun join(xus: 0x2::Token::Coin<#0>,coin2: 0x2::Token::Coin<#0>): 0x2::Token::Coin<#0> { + public fun join(xus: Coin,coin2: Coin): Coin { Token::deposit(Borrow(Mutable)(xus), coin2); xus } - public fun split(coin: 0x2::Token::Coin<#0>,amount: u64): (0x2::Token::Coin<#0>, 0x2::Token::Coin<#0>) { + public fun split(coin: Coin,amount: u64): (Coin, Coin) { { let other: Coin = Token::withdraw(Borrow(Mutable)(coin), amount); Tuple(coin, other) } } - public fun withdraw(coin: &mut 0x2::Token::Coin<#0>,amount: u64): 0x2::Token::Coin<#0> { + public fun withdraw(coin: &mut Coin,amount: u64): Coin { if Ge(select Token::Coin.value<&mut Coin>(coin), amount) { Tuple() } else { @@ -73,12 +73,12 @@ module 0x2::Token { module 0x2::Map { struct T { } - public native fun empty(): 0x2::Map::T<#0, #1>; - public native fun remove(m: &0x2::Map::T<#0, #1>,k: �): #1; - public native fun contains_key(m: &0x2::Map::T<#0, #1>,k: �): bool; - public native fun get(m: &0x2::Map::T<#0, #1>,k: �):  - public native fun get_mut(m: &mut 0x2::Map::T<#0, #1>,k: �): &mut #1; - public native fun insert(m: &0x2::Map::T<#0, #1>,k: #0,v: #1); + public native fun empty(): T; + public native fun remove(m: &T,k: &K): V; + public native fun contains_key(m: &T,k: &K): bool; + public native fun get(m: &T,k: &K): &V; + public native fun get_mut(m: &mut T,k: &K): &mut V; + public native fun insert(m: &T,k: K,v: V); } // end 0x2::Map module 0x3::OneToOneMarket { use std::signer; @@ -96,7 +96,7 @@ module 0x3::OneToOneMarket { struct Price { price: u64, } - public fun borrow(account: &signer,pool_owner: address,amount: u64): 0x2::Token::Coin<#1> + public fun borrow(account: &signer,pool_owner: address,amount: u64): Token::Coin acquires 0x3::OneToOneMarket::Price(*) acquires 0x3::OneToOneMarket::Pool(*) acquires 0x3::OneToOneMarket::DepositRecord(*) @@ -113,7 +113,7 @@ module 0x3::OneToOneMarket { Token::withdraw(Borrow(Mutable)(select OneToOneMarket::Pool.coin<&mut Pool>(pool)), amount) } } - public fun deposit(account: &signer,pool_owner: address,coin: 0x2::Token::Coin<#0>) + public fun deposit(account: &signer,pool_owner: address,coin: Token::Coin) acquires 0x3::OneToOneMarket::Pool(*) acquires 0x3::OneToOneMarket::DepositRecord(*) { @@ -126,7 +126,7 @@ module 0x3::OneToOneMarket { } } } - private fun accept(account: &signer,init: 0x2::Token::Coin<#0>) { + private fun accept(account: &signer,init: Token::Coin) { { let sender: address = signer::address_of(account); if Not(exists>(sender)) { @@ -211,7 +211,7 @@ module 0x3::OneToOneMarket { } } } - public fun register_price(account: &signer,initial_in: 0x2::Token::Coin<#0>,initial_out: 0x2::Token::Coin<#1>,price: u64) { + public fun register_price(account: &signer,initial_in: Token::Coin,initial_out: Token::Coin,price: u64) { OneToOneMarket::accept(account, initial_in); OneToOneMarket::accept(account, initial_out); MoveTo>(account, pack OneToOneMarket::Price(price)) @@ -284,12 +284,12 @@ module 0x70dd::ToddNickels { }; MoveTo(account, pack ToddNickels::Wallet(Token::create(pack ToddNickels::T(false), 0))) } - public fun destroy(c: 0x2::Token::Coin<0x70dd::ToddNickels::T>) + public fun destroy(c: Token::Coin) acquires 0x70dd::ToddNickels::Wallet(*) { Token::deposit(Borrow(Mutable)(select ToddNickels::Wallet.nickels<&mut Wallet>(BorrowGlobal(Mutable)(0x70dd))), c) } - public fun mint(account: &signer): 0x2::Token::Coin<0x70dd::ToddNickels::T> { + public fun mint(account: &signer): Token::Coin { if Eq
(signer::address_of(account), 0x70dd) { Tuple() } else { diff --git a/third_party/move/move-compiler-v2/tests/checking/typing/v1-examples/simple_money_market_token.exp b/third_party/move/move-compiler-v2/tests/checking/typing/v1-examples/simple_money_market_token.exp index fb55569ddefc7..f28f09f7ddb92 100644 --- a/third_party/move/move-compiler-v2/tests/checking/typing/v1-examples/simple_money_market_token.exp +++ b/third_party/move/move-compiler-v2/tests/checking/typing/v1-examples/simple_money_market_token.exp @@ -4,13 +4,13 @@ module 0x2::Token { type: #0, value: u64, } - public fun create(type: #0,value: u64): 0x2::Token::Coin<#0> { + public fun create(type: ATy,value: u64): Coin { pack Token::Coin(type, value) } - public fun value(coin: &0x2::Token::Coin<#0>): u64 { + public fun value(coin: &Coin): u64 { select Token::Coin.value<&Coin>(coin) } - public fun deposit(coin: &mut 0x2::Token::Coin<#0>,check: 0x2::Token::Coin<#0>) { + public fun deposit(coin: &mut Coin,check: Coin) { { let Token::Coin{ type, value } = check; if Eq(Borrow(Immutable)(select Token::Coin.type<&mut Coin>(coin)), Borrow(Immutable)(type)) { @@ -22,7 +22,7 @@ module 0x2::Token { Tuple() } } - public fun destroy_zero(coin: 0x2::Token::Coin<#0>) { + public fun destroy_zero(coin: Coin) { { let Token::Coin{ type: _, value } = coin; if Eq(value, 0) { @@ -32,17 +32,17 @@ module 0x2::Token { } } } - public fun join(xus: 0x2::Token::Coin<#0>,coin2: 0x2::Token::Coin<#0>): 0x2::Token::Coin<#0> { + public fun join(xus: Coin,coin2: Coin): Coin { Token::deposit(Borrow(Mutable)(xus), coin2); xus } - public fun split(coin: 0x2::Token::Coin<#0>,amount: u64): (0x2::Token::Coin<#0>, 0x2::Token::Coin<#0>) { + public fun split(coin: Coin,amount: u64): (Coin, Coin) { { let other: Coin = Token::withdraw(Borrow(Mutable)(coin), amount); Tuple(coin, other) } } - public fun withdraw(coin: &mut 0x2::Token::Coin<#0>,amount: u64): 0x2::Token::Coin<#0> { + public fun withdraw(coin: &mut Coin,amount: u64): Coin { if Ge(select Token::Coin.value<&mut Coin>(coin), amount) { Tuple() } else { @@ -69,12 +69,12 @@ module 0x70dd::ToddNickels { }; MoveTo(account, pack ToddNickels::Wallet(Token::create(pack ToddNickels::T(false), 0))) } - public fun destroy(c: 0x2::Token::Coin<0x70dd::ToddNickels::T>) + public fun destroy(c: Token::Coin) acquires 0x70dd::ToddNickels::Wallet(*) { Token::deposit(Borrow(Mutable)(select ToddNickels::Wallet.nickels<&mut Wallet>(BorrowGlobal(Mutable)(0x70dd))), c) } - public fun mint(account: &signer): 0x2::Token::Coin<0x70dd::ToddNickels::T> { + public fun mint(account: &signer): Token::Coin { if Eq
(signer::address_of(account), 0x70dd) { Tuple() } else { @@ -98,7 +98,7 @@ module 0xb055::OneToOneMarket { struct Price { price: u64, } - public fun borrow(account: &signer,amount: u64): 0x2::Token::Coin<#1> + public fun borrow(account: &signer,amount: u64): Token::Coin acquires 0xb055::OneToOneMarket::Price(*) acquires 0xb055::OneToOneMarket::Pool(*) acquires 0xb055::OneToOneMarket::DepositRecord(*) @@ -115,7 +115,7 @@ module 0xb055::OneToOneMarket { Token::withdraw(Borrow(Mutable)(select OneToOneMarket::Pool.coin<&mut Pool>(pool)), amount) } } - public fun deposit(account: &signer,coin: 0x2::Token::Coin<#0>) + public fun deposit(account: &signer,coin: Token::Coin) acquires 0xb055::OneToOneMarket::Pool(*) acquires 0xb055::OneToOneMarket::DepositRecord(*) { @@ -128,7 +128,7 @@ module 0xb055::OneToOneMarket { } } } - private fun accept(account: &signer,init: 0x2::Token::Coin<#0>) { + private fun accept(account: &signer,init: Token::Coin) { { let sender: address = signer::address_of(account); if Not(exists>(sender)) { @@ -199,7 +199,7 @@ module 0xb055::OneToOneMarket { } } } - public fun register_price(account: &signer,initial_in: 0x2::Token::Coin<#0>,initial_out: 0x2::Token::Coin<#1>,price: u64) { + public fun register_price(account: &signer,initial_in: Token::Coin,initial_out: Token::Coin,price: u64) { { let sender: address = signer::address_of(account); if Eq
(sender, 0xb055) { diff --git a/third_party/move/move-compiler-v2/tests/checking/variants/variants_allow_match_fun_1.exp b/third_party/move/move-compiler-v2/tests/checking/variants/variants_allow_match_fun_1.exp index 649c566da4103..1abaaa8079872 100644 --- a/third_party/move/move-compiler-v2/tests/checking/variants/variants_allow_match_fun_1.exp +++ b/third_party/move/move-compiler-v2/tests/checking/variants/variants_allow_match_fun_1.exp @@ -10,10 +10,10 @@ module 0x815::m { z: u32, } } - private fun caller(c: 0x815::m::CommonFields): bool { + private fun caller(c: CommonFields): bool { m::match(c) } - private fun match(c: 0x815::m::CommonFields): bool { + private fun match(c: CommonFields): bool { match (c) { m::CommonFields::Foo{ x, y: _ } => { Gt(x, 0) diff --git a/third_party/move/move-compiler-v2/tests/checking/variants/variants_allow_match_fun_3.exp b/third_party/move/move-compiler-v2/tests/checking/variants/variants_allow_match_fun_3.exp index 0dfccce0f9d65..16ae0b37ecef0 100644 --- a/third_party/move/move-compiler-v2/tests/checking/variants/variants_allow_match_fun_3.exp +++ b/third_party/move/move-compiler-v2/tests/checking/variants/variants_allow_match_fun_3.exp @@ -10,10 +10,10 @@ module 0x815::m { z: u32, } } - private fun caller(c: 0x815::m::CommonFields): bool { + private fun caller(c: CommonFields): bool { And(m::match(c, 22), true) } - private fun match(c: 0x815::m::CommonFields,t: u64): bool { + private fun match(c: CommonFields,t: u64): bool { match (c) { m::CommonFields::Foo{ x, y: _ } => { Gt(x, t) diff --git a/third_party/move/move-compiler-v2/tests/checking/variants/variants_allow_match_var.exp b/third_party/move/move-compiler-v2/tests/checking/variants/variants_allow_match_var.exp index 175da89836607..574285468902b 100644 --- a/third_party/move/move-compiler-v2/tests/checking/variants/variants_allow_match_var.exp +++ b/third_party/move/move-compiler-v2/tests/checking/variants/variants_allow_match_var.exp @@ -10,7 +10,7 @@ module 0x815::m { z: u32, } } - private fun match(c: 0x815::m::CommonFields,t: u64): bool { + private fun match(c: CommonFields,t: u64): bool { match (c) { m::CommonFields::Foo{ x, y: _ } => { { diff --git a/third_party/move/move-compiler-v2/tests/checking/variants/variants_constants.exp b/third_party/move/move-compiler-v2/tests/checking/variants/variants_constants.exp index 134c88e0ca58d..a58db1808bd05 100644 --- a/third_party/move/move-compiler-v2/tests/checking/variants/variants_constants.exp +++ b/third_party/move/move-compiler-v2/tests/checking/variants/variants_constants.exp @@ -33,7 +33,7 @@ module 0x815::m { Eq(select_variants m::Color.RGB.red(c), 1) } } - private fun t4(c: &0x815::m::Color) { + private fun t4(c: &Color) { match (c) { m::Color::Red => { Abort(1) diff --git a/third_party/move/move-compiler-v2/tests/checking/variants/variants_ok.exp b/third_party/move/move-compiler-v2/tests/checking/variants/variants_ok.exp index 76f71fc84a256..3327aba9b16e9 100644 --- a/third_party/move/move-compiler-v2/tests/checking/variants/variants_ok.exp +++ b/third_party/move/move-compiler-v2/tests/checking/variants/variants_ok.exp @@ -32,7 +32,7 @@ module 0x815::m { other: u32, } } - private fun t1(self: 0x815::m::Color): bool { + private fun t1(self: Color): bool { match (self) { m::Color::RGB{ red, green, blue } => { Gt(Add(Add(red, green), blue), 0) @@ -46,7 +46,7 @@ module 0x815::m { } } - private fun t1_address_qualified(self: 0x815::m::Color): bool { + private fun t1_address_qualified(self: Color): bool { match (self) { m::Color::RGB{ red, green, blue } => { Gt(Add(Add(red, green), blue), 0) @@ -60,7 +60,7 @@ module 0x815::m { } } - private fun t1_field_named(self: 0x815::m::Color): bool { + private fun t1_field_named(self: Color): bool { match (self) { m::Color::RGB{ red: r, green: g, blue } => { Gt(Add(Add(r, g), blue), 0) @@ -74,7 +74,7 @@ module 0x815::m { } } - private fun t1_module_qualified(self: 0x815::m::Color): bool { + private fun t1_module_qualified(self: Color): bool { match (self) { m::Color::RGB{ red, green, blue } => { Gt(Add(Add(red, green), blue), 0) @@ -88,7 +88,7 @@ module 0x815::m { } } - private fun t1_uses_block(self: 0x815::m::Color): bool { + private fun t1_uses_block(self: Color): bool { match (self) { m::Color::RGB{ red, green, blue } => { Gt(Add(Add(red, green), blue), 0) @@ -102,7 +102,7 @@ module 0x815::m { } } - private fun t1_uses_block_no_comma(self: 0x815::m::Color): bool { + private fun t1_uses_block_no_comma(self: Color): bool { match (self) { m::Color::RGB{ red, green, blue } => { Gt(Add(Add(red, green), blue), 0) @@ -116,7 +116,7 @@ module 0x815::m { } } - private fun t2(self: 0x815::m::Color): bool { + private fun t2(self: Color): bool { match (self) { m::Color::RGB{ red, green, blue } => { Gt(Add(Add(red, green), blue), 0) @@ -127,7 +127,7 @@ module 0x815::m { } } - private fun t3(self: 0x815::m::Color): bool { + private fun t3(self: Color): bool { match (Borrow(Immutable)(self)) { m::Color::RGB{ red, green, blue } => { Gt(Add(Add(Deref(red), Deref(green)), Deref(blue)), 0) @@ -138,7 +138,7 @@ module 0x815::m { } } - private fun t4(self: 0x815::m::Color): 0x815::m::Color { + private fun t4(self: Color): Color { match (Borrow(Mutable)(self)) { m::Color::RGB{ red, green: _, blue: _ } => { red = 2 @@ -150,7 +150,7 @@ module 0x815::m { ; self } - private fun t5_freeze(self: 0x815::m::Color): u64 { + private fun t5_freeze(self: Color): u64 { { let x: u64 = 1; { @@ -170,7 +170,7 @@ module 0x815::m { } } } - private fun t6_construct(self: 0x815::m::Color): 0x815::m::Color { + private fun t6_construct(self: Color): Color { match (self) { m::Color::RGB{ red, green, blue } => { pack m::Color::RGB(Add(red, 1), Sub(green, 1), blue) @@ -181,13 +181,13 @@ module 0x815::m { } } - private fun t7_let_unpack(self: 0x815::m::Color): u64 { + private fun t7_let_unpack(self: Color): u64 { { let m::Color::RGB{ red, green, blue } = self; Add(Add(red, green), blue) } } - private fun t8_unqualified_variant(self: 0x815::m::Color): bool { + private fun t8_unqualified_variant(self: Color): bool { match (self) { m::Color::RGB{ red, green, blue } => { And(Neq(red, green), Neq(green, blue)) @@ -201,10 +201,10 @@ module 0x815::m { } } - private fun t9_common_field(self: 0x815::m::CommonFields): u64 { + private fun t9_common_field(self: CommonFields): u64 { select_variants m::CommonFields.Foo.x|m::CommonFields.Bar.x(self) } - private fun t9_common_field_ref(self: &0x815::m::CommonFields): &u64 { + private fun t9_common_field_ref(self: &CommonFields): &u64 { Borrow(Immutable)(select_variants m::CommonFields.Foo.x|m::CommonFields.Bar.x<&CommonFields>(self)) } } // end 0x815::m diff --git a/third_party/move/move-compiler-v2/tests/checking/variants/variants_test_no_parenthesis_ok.exp b/third_party/move/move-compiler-v2/tests/checking/variants/variants_test_no_parenthesis_ok.exp index ba51ed291cd60..97f7cc058eebf 100644 --- a/third_party/move/move-compiler-v2/tests/checking/variants/variants_test_no_parenthesis_ok.exp +++ b/third_party/move/move-compiler-v2/tests/checking/variants/variants_test_no_parenthesis_ok.exp @@ -17,19 +17,19 @@ module 0x815::m { 0: u64, } } - private fun test(c: 0x815::m::Color): bool { + private fun test(c: Color): bool { test_variants m::Color::Red|RGB(c) } - private fun test_fully_qualified(c: 0x815::m::Color): bool { + private fun test_fully_qualified(c: Color): bool { test_variants m::Color::Red(c) } - private fun test_generic(x: &0x815::m::Generic<#0>): bool { + private fun test_generic(x: &Generic): bool { test_variants m::Generic::Foo(x) } - private fun test_generic_qualified(x: &0x815::m::Generic<#0>): bool { + private fun test_generic_qualified(x: &Generic): bool { test_variants m::Generic::Foo(x) } - private fun test_qualified(c: 0x815::m::Color): bool { + private fun test_qualified(c: Color): bool { test_variants m::Color::Red|RGB(c) } } // end 0x815::m diff --git a/third_party/move/move-compiler-v2/tests/checking/variants/variants_test_ok.exp b/third_party/move/move-compiler-v2/tests/checking/variants/variants_test_ok.exp index ba51ed291cd60..97f7cc058eebf 100644 --- a/third_party/move/move-compiler-v2/tests/checking/variants/variants_test_ok.exp +++ b/third_party/move/move-compiler-v2/tests/checking/variants/variants_test_ok.exp @@ -17,19 +17,19 @@ module 0x815::m { 0: u64, } } - private fun test(c: 0x815::m::Color): bool { + private fun test(c: Color): bool { test_variants m::Color::Red|RGB(c) } - private fun test_fully_qualified(c: 0x815::m::Color): bool { + private fun test_fully_qualified(c: Color): bool { test_variants m::Color::Red(c) } - private fun test_generic(x: &0x815::m::Generic<#0>): bool { + private fun test_generic(x: &Generic): bool { test_variants m::Generic::Foo(x) } - private fun test_generic_qualified(x: &0x815::m::Generic<#0>): bool { + private fun test_generic_qualified(x: &Generic): bool { test_variants m::Generic::Foo(x) } - private fun test_qualified(c: 0x815::m::Color): bool { + private fun test_qualified(c: Color): bool { test_variants m::Color::Red|RGB(c) } } // end 0x815::m diff --git a/third_party/move/move-compiler-v2/tests/checking/variants/variants_test_parse_ok2.exp b/third_party/move/move-compiler-v2/tests/checking/variants/variants_test_parse_ok2.exp index ed7a8321e9ecc..89a8fa4425a82 100644 --- a/third_party/move/move-compiler-v2/tests/checking/variants/variants_test_parse_ok2.exp +++ b/third_party/move/move-compiler-v2/tests/checking/variants/variants_test_parse_ok2.exp @@ -9,7 +9,7 @@ module 0x815::m { Red, Blue, } - private fun test_red_or_rgb(c: 0x815::m::Color): bool { + private fun test_red_or_rgb(c: Color): bool { test_variants m::Color::Red(c) } } // end 0x815::m diff --git a/third_party/move/move-compiler-v2/tests/cyclic-instantiation-checker/v1-tests/recursive_one_arg_just_type_params_ok.exp b/third_party/move/move-compiler-v2/tests/cyclic-instantiation-checker/v1-tests/recursive_one_arg_just_type_params_ok.exp index 146f11afd9e7c..d5e393f16eb61 100644 --- a/third_party/move/move-compiler-v2/tests/cyclic-instantiation-checker/v1-tests/recursive_one_arg_just_type_params_ok.exp +++ b/third_party/move/move-compiler-v2/tests/cyclic-instantiation-checker/v1-tests/recursive_one_arg_just_type_params_ok.exp @@ -1,6 +1,6 @@ // -- Model dump before bytecode pipeline module 0x8675309::M { - public fun f(x: #0) { + public fun f(x: T) { M::f(x) } } // end 0x8675309::M diff --git a/third_party/move/move-compiler-v2/tests/folding/non_constant_empty_vec.exp b/third_party/move/move-compiler-v2/tests/folding/non_constant_empty_vec.exp index bbd2c0938bbce..339a8bdf36d94 100644 --- a/third_party/move/move-compiler-v2/tests/folding/non_constant_empty_vec.exp +++ b/third_party/move/move-compiler-v2/tests/folding/non_constant_empty_vec.exp @@ -3,10 +3,10 @@ module 0x42::M { struct S { dummy_field: bool, } - public fun empty_generic_vec(): vector<#0> { + public fun empty_generic_vec(): vector { Vector() } - public fun empty_generic_vec_vec(): vector> { + public fun empty_generic_vec_vec(): vector> { Vector>() } public fun empty_signer_vec(): vector { @@ -15,10 +15,10 @@ module 0x42::M { public fun empty_signer_vec_vec(): vector> { Vector>() } - public fun empty_struct_vec(): vector<0x42::M::S> { + public fun empty_struct_vec(): vector { Vector() } - public fun empty_struct_vec_vec(): vector> { + public fun empty_struct_vec_vec(): vector> { Vector>() } } // end 0x42::M diff --git a/third_party/move/move-compiler-v2/tests/lambda-lifting/pattern.exp b/third_party/move/move-compiler-v2/tests/lambda-lifting/pattern.exp index d4b2a8af34dae..0b9d7af753a8c 100644 --- a/third_party/move/move-compiler-v2/tests/lambda-lifting/pattern.exp +++ b/third_party/move/move-compiler-v2/tests/lambda-lifting/pattern.exp @@ -3,10 +3,10 @@ module 0xcafe::m { struct S { x: #0, } - private fun consume(s: 0xcafe::m::S<#0>,x: #0,f: |(0xcafe::m::S<#0>, #0)|#0): #0 { + private fun consume(s: S,x: T,f: |(S, T)|T): T { (f)(s, x) } - private fun pattern(s: 0xcafe::m::S,x: u64): u64 { + private fun pattern(s: S,x: u64): u64 { m::consume(s, x, |(m::S{ x }, _y: u64): (S, u64)| { let y: u64 = x; Add(x, y) @@ -20,13 +20,13 @@ module 0xcafe::m { struct S { x: #0, } - private fun consume(s: 0xcafe::m::S<#0>,x: #0,f: |(0xcafe::m::S<#0>, #0)|#0): #0 { + private fun consume(s: S,x: T,f: |(S, T)|T): T { (f)(s, x) } - private fun pattern(s: 0xcafe::m::S,x: u64): u64 { + private fun pattern(s: S,x: u64): u64 { m::consume(s, x, closure m::pattern$lambda$1()) } - private fun pattern$lambda$1(param$0: 0xcafe::m::S,_y: u64): u64 { + private fun pattern$lambda$1(param$0: S,_y: u64): u64 { { let m::S{ x } = param$0; { diff --git a/third_party/move/move-compiler-v2/tests/op-equal/valid0.exp b/third_party/move/move-compiler-v2/tests/op-equal/valid0.exp index 6a9969545b227..3d819831e8a3e 100644 --- a/third_party/move/move-compiler-v2/tests/op-equal/valid0.exp +++ b/third_party/move/move-compiler-v2/tests/op-equal/valid0.exp @@ -14,25 +14,25 @@ module 0x42::test { x: u256 = Add(x, 1); x } - private fun coin_inc_new_1(self: &mut 0x42::test::Coin) { + private fun coin_inc_new_1(self: &mut Coin) { { let $t1: &mut u256 = Borrow(Mutable)(select test::Coin.0<&mut Coin>(self)); $t1 = Add(Deref($t1), 1) }; Tuple() } - private fun coin_inc_new_2(self: &mut 0x42::test::Coin) { + private fun coin_inc_new_2(self: &mut Coin) { { let p: &mut u256 = Borrow(Mutable)(select test::Coin.0<&mut Coin>(self)); p = Add(Deref(p), 1); Tuple() } } - private fun coin_inc_old_1(self: &mut 0x42::test::Coin) { + private fun coin_inc_old_1(self: &mut Coin) { select test::Coin.0<&mut Coin>(self) = Add(select test::Coin.0<&mut Coin>(self), 1); Tuple() } - private fun coin_inc_old_2(self: &mut 0x42::test::Coin) { + private fun coin_inc_old_2(self: &mut Coin) { { let p: &mut u256 = Borrow(Mutable)(select test::Coin.0<&mut Coin>(self)); p = Add(Deref(p), 1); @@ -62,14 +62,14 @@ module 0x42::test { x = Add(Deref(x), 1); Tuple() } - private fun inc_vec_coin_new(x: vector<0x42::test::Coin>,index: u64) { + private fun inc_vec_coin_new(x: vector,index: u64) { { let $t1: &mut u256 = Borrow(Mutable)(select test::Coin.0(vector::borrow_mut(Borrow(Mutable)(x), index))); $t1 = Add(Deref($t1), 1) }; Tuple() } - private fun inc_vec_coin_old(x: vector<0x42::test::Coin>,index: u64) { + private fun inc_vec_coin_old(x: vector,index: u64) { select test::Coin.0(vector::borrow_mut(Borrow(Mutable)(x), index)) = Add(select test::Coin.0(vector::borrow(Borrow(Immutable)(x), index)), 1); Tuple() } @@ -84,25 +84,25 @@ module 0x42::test { vector::borrow_mut(Borrow(Mutable)(x), index) = Add(Deref(vector::borrow(Borrow(Immutable)(x), index)), 1); Tuple() } - private fun inc_vec_wrapped_coin_new(x: vector<0x42::test::Wrapper<0x42::test::Coin>>,index: u64) { + private fun inc_vec_wrapped_coin_new(x: vector>,index: u64) { { let $t1: &mut u256 = Borrow(Mutable)(select test::Coin.0(select test::Wrapper.0>(vector::borrow_mut>(Borrow(Mutable)(x), index)))); $t1 = Add(Deref($t1), 1) }; Tuple() } - private fun inc_vec_wrapped_coin_old(x: vector<0x42::test::Wrapper<0x42::test::Coin>>,index: u64) { + private fun inc_vec_wrapped_coin_old(x: vector>,index: u64) { select test::Coin.0(select test::Wrapper.0>(vector::borrow_mut>(Borrow(Mutable)(x), index))) = Add(select test::Coin.0(select test::Wrapper.0>(vector::borrow>(Borrow(Immutable)(x), index))), 1); Tuple() } - private fun inc_wrapped_coin_new(x: &mut 0x42::test::Wrapper<0x42::test::Coin>) { + private fun inc_wrapped_coin_new(x: &mut Wrapper) { { let $t1: &mut u256 = Borrow(Mutable)(select test::Coin.0(select test::Wrapper.0<&mut Wrapper>(x))); $t1 = Add(Deref($t1), 1) }; Tuple() } - private fun inc_wrapped_coin_old(x: &mut 0x42::test::Wrapper<0x42::test::Coin>) { + private fun inc_wrapped_coin_old(x: &mut Wrapper) { select test::Coin.0(select test::Wrapper.0<&mut Wrapper>(x)) = Add(select test::Coin.0(select test::Wrapper.0<&mut Wrapper>(x)), 1); Tuple() } diff --git a/third_party/move/move-compiler-v2/tests/op-equal/valid1.exp b/third_party/move/move-compiler-v2/tests/op-equal/valid1.exp index 1a98595706b80..1369ebdbc51c5 100644 --- a/third_party/move/move-compiler-v2/tests/op-equal/valid1.exp +++ b/third_party/move/move-compiler-v2/tests/op-equal/valid1.exp @@ -6,7 +6,7 @@ module 0x42::test { struct Wrapper { 0: #0, } - private fun bitand_vec_coin_new(x: vector<0x42::test::Coin>,index: u64) { + private fun bitand_vec_coin_new(x: vector,index: u64) { { let $t1: &mut u256 = Borrow(Mutable)(select test::Coin.0(vector::borrow_mut(Borrow(Mutable)(x), index))); $t1 = BitAnd(Deref($t1), 42) @@ -20,28 +20,28 @@ module 0x42::test { }; Tuple() } - private fun coin_double(self: &mut 0x42::test::Coin) { + private fun coin_double(self: &mut Coin) { { let $t1: &mut u256 = Borrow(Mutable)(select test::Coin.0<&mut Coin>(self)); $t1 = Mul(Deref($t1), 2) }; Tuple() } - private fun coin_mod_2(self: &mut 0x42::test::Coin) { + private fun coin_mod_2(self: &mut Coin) { { let $t1: &mut u256 = Borrow(Mutable)(select test::Coin.0<&mut Coin>(self)); $t1 = Mod(Deref($t1), 2) }; Tuple() } - private fun half_wrapped_coin_new(x: &mut 0x42::test::Wrapper<0x42::test::Coin>) { + private fun half_wrapped_coin_new(x: &mut Wrapper) { { let $t1: &mut u256 = Borrow(Mutable)(select test::Coin.0(select test::Wrapper.0<&mut Wrapper>(x))); $t1 = Div(Deref($t1), 2) }; Tuple() } - private fun shl_vec_wrapped_coin_old(x: vector<0x42::test::Wrapper<0x42::test::Coin>>,index: u64) { + private fun shl_vec_wrapped_coin_old(x: vector>,index: u64) { { let $t1: &mut u256 = Borrow(Mutable)(select test::Coin.0(select test::Wrapper.0>(vector::borrow_mut>(Borrow(Mutable)(x), index)))); $t1 = Shl(Deref($t1), 1) @@ -67,7 +67,7 @@ module 0x42::test { }; Tuple() } - private fun xor_vec_wrapped_coin_new(x: vector<0x42::test::Wrapper<0x42::test::Coin>>,index: u64) { + private fun xor_vec_wrapped_coin_new(x: vector>,index: u64) { { let $t1: &mut u256 = Borrow(Mutable)(select test::Coin.0(select test::Wrapper.0>(vector::borrow_mut>(Borrow(Mutable)(x), index)))); $t1 = Xor(Deref($t1), 1) diff --git a/third_party/move/move-compiler-v2/tests/op-equal/valid2.exp b/third_party/move/move-compiler-v2/tests/op-equal/valid2.exp index 0ae6d16638878..e8c5f393627ac 100644 --- a/third_party/move/move-compiler-v2/tests/op-equal/valid2.exp +++ b/third_party/move/move-compiler-v2/tests/op-equal/valid2.exp @@ -3,7 +3,7 @@ module 0xc0ffee::m { struct S { x: u64, } - private fun foo(self: &mut 0xc0ffee::m::S): u64 { + private fun foo(self: &mut S): u64 { { let $t1: &mut u64 = Borrow(Mutable)(select m::S.x<&mut S>(self)); $t1 = Add(Deref($t1), 1) diff --git a/third_party/move/move-compiler-v2/tests/simplifier-elimination/binary_add.exp b/third_party/move/move-compiler-v2/tests/simplifier-elimination/binary_add.exp index 17be3e272d322..bd4b2b38ac8da 100644 --- a/third_party/move/move-compiler-v2/tests/simplifier-elimination/binary_add.exp +++ b/third_party/move/move-compiler-v2/tests/simplifier-elimination/binary_add.exp @@ -53,7 +53,7 @@ module 0x8675309::M { struct R { f: u64, } - private fun t0(x: u64,r: 0x8675309::M::R) { + private fun t0(x: u64,r: R) { Add(Copy(x), Move(x)); Add(select M::R.f(r), select M::R.f(r)); Add(Add(Add(1, select M::R.f(r)), select M::R.f(r)), 0); diff --git a/third_party/move/move-compiler-v2/tests/simplifier/conditional_borrow.exp b/third_party/move/move-compiler-v2/tests/simplifier/conditional_borrow.exp index 244c465398f02..eb1d17caa267e 100644 --- a/third_party/move/move-compiler-v2/tests/simplifier/conditional_borrow.exp +++ b/third_party/move/move-compiler-v2/tests/simplifier/conditional_borrow.exp @@ -47,7 +47,7 @@ module 0x8675::M { } } } - private fun test1b(r: 0x8675::M::S): u64 { + private fun test1b(r: S): u64 { { let x: S = pack M::S(3); { diff --git a/third_party/move/move-compiler-v2/tests/simplifier/random.exp b/third_party/move/move-compiler-v2/tests/simplifier/random.exp index 6e0e8a65c6213..a5c62ea1ca5a5 100644 --- a/third_party/move/move-compiler-v2/tests/simplifier/random.exp +++ b/third_party/move/move-compiler-v2/tests/simplifier/random.exp @@ -12,10 +12,10 @@ module 0x8675::M { f: u64, g: u64, } - private fun id(r: �): � { + private fun id(r: &T): &T { r } - private fun id_mut(r: &mut #0): &mut #0 { + private fun id_mut(r: &mut T): &mut T { r } private inline fun iterloop(x: u64,y: &u64): u64 { diff --git a/third_party/move/move-compiler-v2/tests/simplifier/simplifier_test4.exp b/third_party/move/move-compiler-v2/tests/simplifier/simplifier_test4.exp index 47074f5a96c6a..8c31feee56126 100644 --- a/third_party/move/move-compiler-v2/tests/simplifier/simplifier_test4.exp +++ b/third_party/move/move-compiler-v2/tests/simplifier/simplifier_test4.exp @@ -6,10 +6,10 @@ module 0x8675309::M { private fun bar(_s: &mut u64,_u: u64) { Tuple() } - private fun foo(_s: &0x8675309::M::S,_u: u64) { + private fun foo(_s: &S,_u: u64) { Tuple() } - private fun t0(s: &mut 0x8675309::M::S) { + private fun t0(s: &mut S) { { let x: u64 = 0; { @@ -34,7 +34,7 @@ module 0x8675309::M { } } } - private fun t1(s: &mut 0x8675309::M::S) { + private fun t1(s: &mut S) { M::bar(Borrow(Mutable)(select M::S.f<&mut S>(s)), select M::S.f<&mut S>(s) = 0; 1) } diff --git a/third_party/move/move-model/bytecode/ast-generator-tests/tests/match.exp b/third_party/move/move-model/bytecode/ast-generator-tests/tests/match.exp index b73b6ca767690..35705886bb3e5 100644 --- a/third_party/move/move-model/bytecode/ast-generator-tests/tests/match.exp +++ b/third_party/move/move-model/bytecode/ast-generator-tests/tests/match.exp @@ -9,37 +9,37 @@ fun id(self: &Entity): u64 { } --- Stackless Bytecode -fun m::id($t0|self: &m::Entity): u64 { +fun m::id($t0|self: &0x815::m::Entity): u64 { var $t1|return: u64 - var $t2: &m::Entity + var $t2: &0x815::m::Entity var $t3: bool - var $t4: &m::Entity + var $t4: &0x815::m::Entity var $t5: &u64 var $t6: u64 - var $t7: &m::Entity + var $t7: &0x815::m::Entity var $t8: bool - var $t9: &m::Entity + var $t9: &0x815::m::Entity var $t10: &u64 var $t11: u64 - var $t12: &m::Entity + var $t12: &0x815::m::Entity var $t13: u64 var $t14: u64 0: $t2 := copy($t0) - 1: $t3 := test_variant m::Entity::Person($t2) + 1: $t3 := test_variant 0x815::m::Entity::Person($t2) 2: if ($t3) goto 3 else goto 9 3: label L1 4: $t4 := move($t0) - 5: $t5 := borrow_variant_field.id($t4) + 5: $t5 := borrow_variant_field<0x815::m::Entity::Person>.id($t4) 6: $t6 := read_ref($t5) 7: $t1 := $t6 8: goto 24 9: label L0 10: $t7 := copy($t0) - 11: $t8 := test_variant m::Entity::Institution($t7) + 11: $t8 := test_variant 0x815::m::Entity::Institution($t7) 12: if ($t8) goto 13 else goto 19 13: label L4 14: $t9 := move($t0) - 15: $t10 := borrow_variant_field.id($t9) + 15: $t10 := borrow_variant_field<0x815::m::Entity::Institution>.id($t9) 16: $t11 := read_ref($t10) 17: $t1 := $t11 18: goto 24 @@ -54,29 +54,29 @@ fun m::id($t0|self: &m::Entity): u64 { } --- Raw Generated AST -_t2: &m::Entity = self; +_t2: &Entity = self; _t3: bool = test_variants m::Entity::Person(_t2); loop { loop { if (Not(_t3)) break; - _t4: &m::Entity = self; + _t4: &Entity = self; _t5: &u64 = select_variants m::Entity.id(_t4); _t6: u64 = Deref(_t5); _t1: u64 = _t6; break[1] }; - _t7: &m::Entity = self; + _t7: &Entity = self; _t8: bool = test_variants m::Entity::Institution(_t7); loop { loop { if (Not(_t8)) break; - _t9: &m::Entity = self; + _t9: &Entity = self; _t10: &u64 = select_variants m::Entity.id(_t9); _t11: u64 = Deref(_t10); _t1: u64 = _t11; break[1] }; - _t12: &m::Entity = self; + _t12: &Entity = self; _t13: u64 = 14566554180833181697; Abort(_t13) }; @@ -86,23 +86,23 @@ _t14: u64 = _t1; return _t14 --- If-Transformed Generated AST -_t2: &m::Entity = self; +_t2: &Entity = self; _t3: bool = test_variants m::Entity::Person(_t2); if _t3 { - _t4: &m::Entity = self; + _t4: &Entity = self; _t5: &u64 = select_variants m::Entity.id(_t4); _t6: u64 = Deref(_t5); _t1: u64 = _t6 } else { - _t7: &m::Entity = self; + _t7: &Entity = self; _t8: bool = test_variants m::Entity::Institution(_t7); if _t8 { - _t9: &m::Entity = self; + _t9: &Entity = self; _t10: &u64 = select_variants m::Entity.id(_t9); _t11: u64 = Deref(_t10); _t1: u64 = _t11 } else { - _t12: &m::Entity = self; + _t12: &Entity = self; _t13: u64 = 14566554180833181697; Abort(_t13) } @@ -137,23 +137,23 @@ fun id2(self: Entity): u64 { } --- Stackless Bytecode -fun m::id2($t0|self: m::Entity): u64 { - var $t1|$t2: &m::Entity +fun m::id2($t0|self: 0x815::m::Entity): u64 { + var $t1|$t2: &0x815::m::Entity var $t2|$t5: u64 - var $t3: &m::Entity - var $t4: &m::Entity + var $t3: &0x815::m::Entity + var $t4: &0x815::m::Entity var $t5: bool - var $t6: &m::Entity + var $t6: &0x815::m::Entity var $t7: &u64 var $t8: u64 var $t9: u64 var $t10: bool - var $t11: &m::Entity - var $t12: m::Entity + var $t11: &0x815::m::Entity + var $t12: 0x815::m::Entity var $t13: u64 - var $t14: &m::Entity + var $t14: &0x815::m::Entity var $t15: bool - var $t16: m::Entity + var $t16: 0x815::m::Entity var $t17: u64 var $t18: u64 var $t19: u64 @@ -161,11 +161,11 @@ fun m::id2($t0|self: m::Entity): u64 { 0: $t3 := borrow_local($t0) 1: $t1 := $t3 2: $t4 := copy($t1) - 3: $t5 := test_variant m::Entity::Person($t4) + 3: $t5 := test_variant 0x815::m::Entity::Person($t4) 4: if ($t5) goto 5 else goto 19 5: label L1 6: $t6 := copy($t1) - 7: $t7 := borrow_variant_field.id($t6) + 7: $t7 := borrow_variant_field<0x815::m::Entity::Person>.id($t6) 8: $t8 := read_ref($t7) 9: $t9 := 0 10: $t10 := >($t8, $t9) @@ -174,16 +174,16 @@ fun m::id2($t0|self: m::Entity): u64 { 13: $t11 := move($t1) 14: drop($t11) 15: $t12 := move($t0) - 16: $t13 := unpack_variant m::Entity::Person($t12) + 16: $t13 := unpack_variant 0x815::m::Entity::Person($t12) 17: $t2 := $t13 18: goto 33 19: label L0 20: $t14 := move($t1) - 21: $t15 := test_variant m::Entity::Institution($t14) + 21: $t15 := test_variant 0x815::m::Entity::Institution($t14) 22: if ($t15) goto 23 else goto 29 23: label L5 24: $t16 := move($t0) - 25: ($t17, $t18) := unpack_variant m::Entity::Institution($t16) + 25: ($t17, $t18) := unpack_variant 0x815::m::Entity::Institution($t16) 26: drop($t18) 27: $t2 := $t17 28: goto 33 @@ -197,31 +197,31 @@ fun m::id2($t0|self: m::Entity): u64 { } --- Raw Generated AST -_t3: &m::Entity = Borrow(Immutable)(self); -_t1: &m::Entity = _t3; -_t4: &m::Entity = _t1; +_t3: &Entity = Borrow(Immutable)(self); +_t1: &Entity = _t3; +_t4: &Entity = _t1; _t5: bool = test_variants m::Entity::Person(_t4); loop { loop { if (Not(_t5)) break; - _t6: &m::Entity = _t1; + _t6: &Entity = _t1; _t7: &u64 = select_variants m::Entity.id(_t6); _t8: u64 = Deref(_t7); _t9: u64 = 0; _t10: bool = Gt(_t8, _t9); if (Not(_t10)) break; - _t11: &m::Entity = _t1; - _t12: m::Entity = self; + _t11: &Entity = _t1; + _t12: Entity = self; m::Entity::Person{ id: _t13 } = _t12; _t2: u64 = _t13; break[1] }; - _t14: &m::Entity = _t1; + _t14: &Entity = _t1; _t15: bool = test_variants m::Entity::Institution(_t14); loop { loop { if (Not(_t15)) break; - _t16: m::Entity = self; + _t16: Entity = self; m::Entity::Institution{ id: _t17, admin: _t18 } = _t16; _t2: u64 = _t17; break[1] @@ -236,29 +236,29 @@ _t20: u64 = _t2; return _t20 --- If-Transformed Generated AST -_t3: &m::Entity = Borrow(Immutable)(self); -_t1: &m::Entity = _t3; -_t4: &m::Entity = _t1; +_t3: &Entity = Borrow(Immutable)(self); +_t1: &Entity = _t3; +_t4: &Entity = _t1; _t5: bool = test_variants m::Entity::Person(_t4); loop { loop { if (Not(_t5)) break; - _t6: &m::Entity = _t1; + _t6: &Entity = _t1; _t7: &u64 = select_variants m::Entity.id(_t6); _t8: u64 = Deref(_t7); _t9: u64 = 0; _t10: bool = Gt(_t8, _t9); if (Not(_t10)) break; - _t11: &m::Entity = _t1; - _t12: m::Entity = self; + _t11: &Entity = _t1; + _t12: Entity = self; m::Entity::Person{ id: _t13 } = _t12; _t2: u64 = _t13; break[1] }; - _t14: &m::Entity = _t1; + _t14: &Entity = _t1; _t15: bool = test_variants m::Entity::Institution(_t14); if _t15 { - _t16: m::Entity = self; + _t16: Entity = self; m::Entity::Institution{ id: _t17, admin: _t18 } = _t16; _t2: u64 = _t17 } else { @@ -274,7 +274,7 @@ return _t20 { let _t2: u64; { - let _t1: &m::Entity = Borrow(Immutable)(self); + let _t1: &Entity = Borrow(Immutable)(self); loop { loop { if (Not(test_variants m::Entity::Person(_t1))) break; diff --git a/third_party/move/move-model/bytecode/tests/borrow/basic_test.exp b/third_party/move/move-model/bytecode/tests/borrow/basic_test.exp index 56d9c7305b1cd..642a1c7f3fa3e 100644 --- a/third_party/move/move-model/bytecode/tests/borrow/basic_test.exp +++ b/third_party/move/move-model/bytecode/tests/borrow/basic_test.exp @@ -1,21 +1,21 @@ ============ initial translation from Move ================ [variant baseline] -fun TestBorrow::test1(): TestBorrow::R { - var $t0|r: TestBorrow::R +fun TestBorrow::test1(): 0x42::TestBorrow::R { + var $t0|r: 0x42::TestBorrow::R var $t1|x_ref: &mut u64 var $t2: u64 - var $t3: TestBorrow::R - var $t4: &mut TestBorrow::R + var $t3: 0x42::TestBorrow::R + var $t4: &mut 0x42::TestBorrow::R var $t5: &mut u64 var $t6: u64 var $t7: &mut u64 - var $t8: TestBorrow::R + var $t8: 0x42::TestBorrow::R 0: $t2 := 3 - 1: $t3 := pack TestBorrow::R($t2) + 1: $t3 := pack 0x42::TestBorrow::R($t2) 2: $t0 := $t3 3: $t4 := borrow_local($t0) - 4: $t5 := borrow_field.x($t4) + 4: $t5 := borrow_field<0x42::TestBorrow::R>.x($t4) 5: $t1 := $t5 6: $t6 := 0 7: $t7 := move($t1) @@ -37,12 +37,12 @@ fun TestBorrow::test2($t0|x_ref: &mut u64, $t1|v: u64) { [variant baseline] -public fun TestBorrow::test3($t0|r_ref: &mut TestBorrow::R, $t1|v: u64) { - var $t2: &mut TestBorrow::R +public fun TestBorrow::test3($t0|r_ref: &mut 0x42::TestBorrow::R, $t1|v: u64) { + var $t2: &mut 0x42::TestBorrow::R var $t3: &mut u64 var $t4: u64 0: $t2 := move($t0) - 1: $t3 := borrow_field.x($t2) + 1: $t3 := borrow_field<0x42::TestBorrow::R>.x($t2) 2: $t4 := move($t1) 3: TestBorrow::test2($t3, $t4) 4: return () @@ -50,15 +50,15 @@ public fun TestBorrow::test3($t0|r_ref: &mut TestBorrow::R, $t1|v: u64) { [variant baseline] -fun TestBorrow::test4(): TestBorrow::R { - var $t0|r: TestBorrow::R +fun TestBorrow::test4(): 0x42::TestBorrow::R { + var $t0|r: 0x42::TestBorrow::R var $t1: u64 - var $t2: TestBorrow::R - var $t3: &mut TestBorrow::R + var $t2: 0x42::TestBorrow::R + var $t3: &mut 0x42::TestBorrow::R var $t4: u64 - var $t5: TestBorrow::R + var $t5: 0x42::TestBorrow::R 0: $t1 := 3 - 1: $t2 := pack TestBorrow::R($t1) + 1: $t2 := pack 0x42::TestBorrow::R($t1) 2: $t0 := $t2 3: $t3 := borrow_local($t0) 4: $t4 := 0 @@ -69,26 +69,26 @@ fun TestBorrow::test4(): TestBorrow::R { [variant baseline] -public fun TestBorrow::test5($t0|r_ref: &mut TestBorrow::R): &mut u64 { - var $t1: &mut TestBorrow::R +public fun TestBorrow::test5($t0|r_ref: &mut 0x42::TestBorrow::R): &mut u64 { + var $t1: &mut 0x42::TestBorrow::R var $t2: &mut u64 0: $t1 := move($t0) - 1: $t2 := borrow_field.x($t1) + 1: $t2 := borrow_field<0x42::TestBorrow::R>.x($t1) 2: return $t2 } [variant baseline] -fun TestBorrow::test6(): TestBorrow::R { - var $t0|r: TestBorrow::R +fun TestBorrow::test6(): 0x42::TestBorrow::R { + var $t0|r: 0x42::TestBorrow::R var $t1: u64 - var $t2: TestBorrow::R - var $t3: &mut TestBorrow::R + var $t2: 0x42::TestBorrow::R + var $t3: &mut 0x42::TestBorrow::R var $t4: &mut u64 var $t5: u64 - var $t6: TestBorrow::R + var $t6: 0x42::TestBorrow::R 0: $t1 := 3 - 1: $t2 := pack TestBorrow::R($t1) + 1: $t2 := pack 0x42::TestBorrow::R($t1) 2: $t0 := $t2 3: $t3 := borrow_local($t0) 4: $t4 := TestBorrow::test5($t3) @@ -101,24 +101,24 @@ fun TestBorrow::test6(): TestBorrow::R { [variant baseline] fun TestBorrow::test7($t0|b: bool) { - var $t1|r1: TestBorrow::R - var $t2|r2: TestBorrow::R - var $t3|r_ref: &mut TestBorrow::R + var $t1|r1: 0x42::TestBorrow::R + var $t2|r2: 0x42::TestBorrow::R + var $t3|r_ref: &mut 0x42::TestBorrow::R var $t4: u64 - var $t5: TestBorrow::R + var $t5: 0x42::TestBorrow::R var $t6: u64 - var $t7: TestBorrow::R - var $t8: &mut TestBorrow::R + var $t7: 0x42::TestBorrow::R + var $t8: &mut 0x42::TestBorrow::R var $t9: bool - var $t10: &mut TestBorrow::R - var $t11: &mut TestBorrow::R - var $t12: &mut TestBorrow::R + var $t10: &mut 0x42::TestBorrow::R + var $t11: &mut 0x42::TestBorrow::R + var $t12: &mut 0x42::TestBorrow::R var $t13: u64 0: $t4 := 3 - 1: $t5 := pack TestBorrow::R($t4) + 1: $t5 := pack 0x42::TestBorrow::R($t4) 2: $t1 := $t5 3: $t6 := 4 - 4: $t7 := pack TestBorrow::R($t6) + 4: $t7 := pack 0x42::TestBorrow::R($t6) 5: $t2 := $t7 6: $t8 := borrow_local($t1) 7: $t3 := $t8 @@ -139,41 +139,41 @@ fun TestBorrow::test7($t0|b: bool) { [variant baseline] -fun TestBorrow::test8($t0|b: bool, $t1|n: u64, $t2|r_ref: &mut TestBorrow::R) { - var $t3|r1: TestBorrow::R - var $t4|r2: TestBorrow::R - var $t5|t_ref: &mut TestBorrow::R +fun TestBorrow::test8($t0|b: bool, $t1|n: u64, $t2|r_ref: &mut 0x42::TestBorrow::R) { + var $t3|r1: 0x42::TestBorrow::R + var $t4|r2: 0x42::TestBorrow::R + var $t5|t_ref: &mut 0x42::TestBorrow::R var $t6: u64 - var $t7: TestBorrow::R + var $t7: 0x42::TestBorrow::R var $t8: u64 - var $t9: TestBorrow::R - var $t10: &mut TestBorrow::R + var $t9: 0x42::TestBorrow::R + var $t10: &mut 0x42::TestBorrow::R var $t11: u64 var $t12: u64 var $t13: bool - var $t14: &mut TestBorrow::R + var $t14: &mut 0x42::TestBorrow::R var $t15: u64 var $t16: u64 var $t17: u64 var $t18: u64 var $t19: bool - var $t20: &mut TestBorrow::R - var $t21: &mut TestBorrow::R + var $t20: &mut 0x42::TestBorrow::R + var $t21: &mut 0x42::TestBorrow::R var $t22: u64 var $t23: u64 var $t24: u64 var $t25: bool - var $t26: &mut TestBorrow::R - var $t27: &mut TestBorrow::R + var $t26: &mut 0x42::TestBorrow::R + var $t27: &mut 0x42::TestBorrow::R var $t28: u64 - var $t29: &mut TestBorrow::R - var $t30: &mut TestBorrow::R + var $t29: &mut 0x42::TestBorrow::R + var $t30: &mut 0x42::TestBorrow::R var $t31: u64 0: $t6 := 3 - 1: $t7 := pack TestBorrow::R($t6) + 1: $t7 := pack 0x42::TestBorrow::R($t6) 2: $t3 := $t7 3: $t8 := 4 - 4: $t9 := pack TestBorrow::R($t8) + 4: $t9 := pack 0x42::TestBorrow::R($t8) 5: $t4 := $t9 6: $t10 := borrow_local($t4) 7: $t5 := $t10 @@ -232,21 +232,21 @@ fun TestBorrow::test8($t0|b: bool, $t1|n: u64, $t2|r_ref: &mut TestBorrow::R) { ============ after pipeline `borrow` ================ [variant baseline] -fun TestBorrow::test1(): TestBorrow::R { - var $t0|r: TestBorrow::R +fun TestBorrow::test1(): 0x42::TestBorrow::R { + var $t0|r: 0x42::TestBorrow::R var $t1|x_ref: &mut u64 [unused] var $t2: u64 - var $t3: &mut TestBorrow::R + var $t3: &mut 0x42::TestBorrow::R var $t4: &mut u64 var $t5: u64 - var $t6: TestBorrow::R + var $t6: 0x42::TestBorrow::R 0: $t2 := 3 - 1: $t0 := pack TestBorrow::R($t2) + 1: $t0 := pack 0x42::TestBorrow::R($t2) 2: $t3 := borrow_local($t0) # live_nodes: Reference($t3) # borrowed_by: LocalRoot($t0) -> {(@, Reference($t3))} # borrows_from: Reference($t3) -> {(@, LocalRoot($t0))} - 3: $t4 := borrow_field.x($t3) + 3: $t4 := borrow_field<0x42::TestBorrow::R>.x($t3) # live_nodes: Reference($t4) # borrowed_by: LocalRoot($t0) -> {(@, Reference($t3))}, Reference($t3) -> {(.x (u64), Reference($t4))} # borrows_from: Reference($t3) -> {(@, LocalRoot($t0))}, Reference($t4) -> {(.x (u64), Reference($t3))} @@ -275,10 +275,10 @@ fun TestBorrow::test2($t0|x_ref: &mut u64, $t1|v: u64) { [variant baseline] -public fun TestBorrow::test3($t0|r_ref: &mut TestBorrow::R, $t1|v: u64) { +public fun TestBorrow::test3($t0|r_ref: &mut 0x42::TestBorrow::R, $t1|v: u64) { var $t2: &mut u64 # live_nodes: LocalRoot($t1), Reference($t0) - 0: $t2 := borrow_field.x($t0) + 0: $t2 := borrow_field<0x42::TestBorrow::R>.x($t0) # live_nodes: LocalRoot($t1), Reference($t2) # borrowed_by: Reference($t0) -> {(.x (u64), Reference($t2))} # borrows_from: Reference($t2) -> {(.x (u64), Reference($t0))} @@ -291,14 +291,14 @@ public fun TestBorrow::test3($t0|r_ref: &mut TestBorrow::R, $t1|v: u64) { [variant baseline] -fun TestBorrow::test4(): TestBorrow::R { - var $t0|r: TestBorrow::R +fun TestBorrow::test4(): 0x42::TestBorrow::R { + var $t0|r: 0x42::TestBorrow::R var $t1: u64 - var $t2: &mut TestBorrow::R + var $t2: &mut 0x42::TestBorrow::R var $t3: u64 - var $t4: TestBorrow::R + var $t4: 0x42::TestBorrow::R 0: $t1 := 3 - 1: $t0 := pack TestBorrow::R($t1) + 1: $t0 := pack 0x42::TestBorrow::R($t1) 2: $t2 := borrow_local($t0) # live_nodes: Reference($t2) # borrowed_by: LocalRoot($t0) -> {(@, Reference($t2))} @@ -319,10 +319,10 @@ fun TestBorrow::test4(): TestBorrow::R { [variant baseline] -public fun TestBorrow::test5($t0|r_ref: &mut TestBorrow::R): &mut u64 { +public fun TestBorrow::test5($t0|r_ref: &mut 0x42::TestBorrow::R): &mut u64 { var $t1: &mut u64 # live_nodes: Reference($t0) - 0: $t1 := borrow_field.x($t0) + 0: $t1 := borrow_field<0x42::TestBorrow::R>.x($t0) # live_nodes: Reference($t1) # borrowed_by: Reference($t0) -> {(.x (u64), Reference($t1))} # borrows_from: Reference($t1) -> {(.x (u64), Reference($t0))} @@ -331,15 +331,15 @@ public fun TestBorrow::test5($t0|r_ref: &mut TestBorrow::R): &mut u64 { [variant baseline] -fun TestBorrow::test6(): TestBorrow::R { - var $t0|r: TestBorrow::R +fun TestBorrow::test6(): 0x42::TestBorrow::R { + var $t0|r: 0x42::TestBorrow::R var $t1: u64 - var $t2: &mut TestBorrow::R + var $t2: &mut 0x42::TestBorrow::R var $t3: &mut u64 var $t4: u64 - var $t5: TestBorrow::R + var $t5: 0x42::TestBorrow::R 0: $t1 := 3 - 1: $t0 := pack TestBorrow::R($t1) + 1: $t0 := pack 0x42::TestBorrow::R($t1) 2: $t2 := borrow_local($t0) # live_nodes: Reference($t2) # borrowed_by: LocalRoot($t0) -> {(@, Reference($t2))} @@ -365,22 +365,22 @@ fun TestBorrow::test6(): TestBorrow::R { [variant baseline] fun TestBorrow::test7($t0|b: bool) { - var $t1|r1: TestBorrow::R - var $t2|r2: TestBorrow::R - var $t3|r_ref: &mut TestBorrow::R + var $t1|r1: 0x42::TestBorrow::R + var $t2|r2: 0x42::TestBorrow::R + var $t3|r_ref: &mut 0x42::TestBorrow::R var $t4: u64 var $t5: u64 - var $t6: &mut TestBorrow::R - var $t7: &mut TestBorrow::R + var $t6: &mut 0x42::TestBorrow::R + var $t7: &mut 0x42::TestBorrow::R var $t8: u64 # live_nodes: LocalRoot($t0) 0: $t4 := 3 # live_nodes: LocalRoot($t0) - 1: $t1 := pack TestBorrow::R($t4) + 1: $t1 := pack 0x42::TestBorrow::R($t4) # live_nodes: LocalRoot($t0) 2: $t5 := 4 # live_nodes: LocalRoot($t0) - 3: $t2 := pack TestBorrow::R($t5) + 3: $t2 := pack 0x42::TestBorrow::R($t5) # live_nodes: LocalRoot($t0) 4: $t6 := borrow_local($t1) # live_nodes: LocalRoot($t0), Reference($t6) @@ -455,32 +455,32 @@ fun TestBorrow::test7($t0|b: bool) { [variant baseline] -fun TestBorrow::test8($t0|b: bool, $t1|n: u64, $t2|r_ref: &mut TestBorrow::R) { - var $t3|r1: TestBorrow::R - var $t4|r2: TestBorrow::R - var $t5|t_ref: &mut TestBorrow::R +fun TestBorrow::test8($t0|b: bool, $t1|n: u64, $t2|r_ref: &mut 0x42::TestBorrow::R) { + var $t3|r1: 0x42::TestBorrow::R + var $t4|r2: 0x42::TestBorrow::R + var $t5|t_ref: &mut 0x42::TestBorrow::R var $t6: u64 var $t7: u64 - var $t8: &mut TestBorrow::R + var $t8: &mut 0x42::TestBorrow::R var $t9: u64 var $t10: bool var $t11: u64 var $t12: u64 var $t13: u64 var $t14: bool - var $t15: &mut TestBorrow::R - var $t16: &mut TestBorrow::R + var $t15: &mut 0x42::TestBorrow::R + var $t16: &mut 0x42::TestBorrow::R var $t17: u64 var $t18: u64 var $t19: u64 # live_nodes: LocalRoot($t0), LocalRoot($t1), Reference($t2) 0: $t6 := 3 # live_nodes: LocalRoot($t0), LocalRoot($t1), Reference($t2) - 1: $t3 := pack TestBorrow::R($t6) + 1: $t3 := pack 0x42::TestBorrow::R($t6) # live_nodes: LocalRoot($t0), LocalRoot($t1), Reference($t2) 2: $t7 := 4 # live_nodes: LocalRoot($t0), LocalRoot($t1), Reference($t2) - 3: $t4 := pack TestBorrow::R($t7) + 3: $t4 := pack 0x42::TestBorrow::R($t7) # live_nodes: LocalRoot($t0), LocalRoot($t1), Reference($t2) 4: $t8 := borrow_local($t4) # live_nodes: LocalRoot($t0), LocalRoot($t1), Reference($t2), Reference($t8) diff --git a/third_party/move/move-model/bytecode/tests/borrow/function_call.exp b/third_party/move/move-model/bytecode/tests/borrow/function_call.exp index 38764bb039850..076624b485816 100644 --- a/third_party/move/move-model/bytecode/tests/borrow/function_call.exp +++ b/third_party/move/move-model/bytecode/tests/borrow/function_call.exp @@ -78,23 +78,23 @@ public intrinsic fun vector::swap_remove<#0>($t0|v: &mut vector<#0>, $t1|i: u64) [variant baseline] -fun MultiLayerCalling::inner($t0|has_vector: &mut MultiLayerCalling::HasVector): &mut MultiLayerCalling::HasAnotherVector { - var $t1: &mut MultiLayerCalling::HasVector - var $t2: &mut vector +fun MultiLayerCalling::inner($t0|has_vector: &mut 0x2::MultiLayerCalling::HasVector): &mut 0x2::MultiLayerCalling::HasAnotherVector { + var $t1: &mut 0x2::MultiLayerCalling::HasVector + var $t2: &mut vector<0x2::MultiLayerCalling::HasAnotherVector> var $t3: u64 - var $t4: &mut MultiLayerCalling::HasAnotherVector + var $t4: &mut 0x2::MultiLayerCalling::HasAnotherVector 0: $t1 := move($t0) - 1: $t2 := borrow_field.v($t1) + 1: $t2 := borrow_field<0x2::MultiLayerCalling::HasVector>.v($t1) 2: $t3 := 7 - 3: $t4 := vector::borrow_mut($t2, $t3) + 3: $t4 := vector::borrow_mut<0x2::MultiLayerCalling::HasAnotherVector>($t2, $t3) 4: return $t4 } [variant baseline] -fun MultiLayerCalling::mid($t0|has_vector: &mut MultiLayerCalling::HasVector): &mut MultiLayerCalling::HasAnotherVector { - var $t1: &mut MultiLayerCalling::HasVector - var $t2: &mut MultiLayerCalling::HasAnotherVector +fun MultiLayerCalling::mid($t0|has_vector: &mut 0x2::MultiLayerCalling::HasVector): &mut 0x2::MultiLayerCalling::HasAnotherVector { + var $t1: &mut 0x2::MultiLayerCalling::HasVector + var $t2: &mut 0x2::MultiLayerCalling::HasAnotherVector 0: $t1 := move($t0) 1: $t2 := MultiLayerCalling::inner($t1) 2: return $t2 @@ -102,14 +102,14 @@ fun MultiLayerCalling::mid($t0|has_vector: &mut MultiLayerCalling::HasVector): & [variant baseline] -fun MultiLayerCalling::outer($t0|has_vector: &mut MultiLayerCalling::HasVector) { - var $t1: &mut MultiLayerCalling::HasVector - var $t2: &mut MultiLayerCalling::HasAnotherVector +fun MultiLayerCalling::outer($t0|has_vector: &mut 0x2::MultiLayerCalling::HasVector) { + var $t1: &mut 0x2::MultiLayerCalling::HasVector + var $t2: &mut 0x2::MultiLayerCalling::HasAnotherVector var $t3: &mut vector var $t4: u8 0: $t1 := move($t0) 1: $t2 := MultiLayerCalling::mid($t1) - 2: $t3 := borrow_field.v($t2) + 2: $t3 := borrow_field<0x2::MultiLayerCalling::HasAnotherVector>.v($t2) 3: $t4 := 42 4: vector::push_back($t3, $t4) 5: return () @@ -202,60 +202,60 @@ public intrinsic fun vector::swap_remove<#0>($t0|v: &mut vector<#0>, $t1|i: u64) [variant baseline] -fun MultiLayerCalling::inner($t0|has_vector: &mut MultiLayerCalling::HasVector): &mut MultiLayerCalling::HasAnotherVector { - var $t1: &mut vector +fun MultiLayerCalling::inner($t0|has_vector: &mut 0x2::MultiLayerCalling::HasVector): &mut 0x2::MultiLayerCalling::HasAnotherVector { + var $t1: &mut vector<0x2::MultiLayerCalling::HasAnotherVector> var $t2: u64 - var $t3: &mut MultiLayerCalling::HasAnotherVector + var $t3: &mut 0x2::MultiLayerCalling::HasAnotherVector # live_nodes: Reference($t0) - 0: $t1 := borrow_field.v($t0) + 0: $t1 := borrow_field<0x2::MultiLayerCalling::HasVector>.v($t0) # live_nodes: Reference($t1) - # borrowed_by: Reference($t0) -> {(.v (vector), Reference($t1))} - # borrows_from: Reference($t1) -> {(.v (vector), Reference($t0))} + # borrowed_by: Reference($t0) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>), Reference($t1))} + # borrows_from: Reference($t1) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>), Reference($t0))} 1: $t2 := 7 # live_nodes: Reference($t1) - # borrowed_by: Reference($t0) -> {(.v (vector), Reference($t1))} - # borrows_from: Reference($t1) -> {(.v (vector), Reference($t0))} - 2: $t3 := vector::borrow_mut($t1, $t2) + # borrowed_by: Reference($t0) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>), Reference($t1))} + # borrows_from: Reference($t1) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>), Reference($t0))} + 2: $t3 := vector::borrow_mut<0x2::MultiLayerCalling::HasAnotherVector>($t1, $t2) # live_nodes: Reference($t3) - # borrowed_by: Reference($t0) -> {(.v (vector), Reference($t1))}, Reference($t1) -> {([], Reference($t3))} - # borrows_from: Reference($t1) -> {(.v (vector), Reference($t0))}, Reference($t3) -> {([], Reference($t1))} + # borrowed_by: Reference($t0) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>), Reference($t1))}, Reference($t1) -> {([], Reference($t3))} + # borrows_from: Reference($t1) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>), Reference($t0))}, Reference($t3) -> {([], Reference($t1))} 3: return $t3 } [variant baseline] -fun MultiLayerCalling::mid($t0|has_vector: &mut MultiLayerCalling::HasVector): &mut MultiLayerCalling::HasAnotherVector { - var $t1: &mut MultiLayerCalling::HasAnotherVector +fun MultiLayerCalling::mid($t0|has_vector: &mut 0x2::MultiLayerCalling::HasVector): &mut 0x2::MultiLayerCalling::HasAnotherVector { + var $t1: &mut 0x2::MultiLayerCalling::HasAnotherVector # live_nodes: Reference($t0) 0: $t1 := MultiLayerCalling::inner($t0) # live_nodes: Reference($t1) - # borrowed_by: Reference($t0) -> {(.v (vector)/[], Reference($t1))} - # borrows_from: Reference($t1) -> {(.v (vector)/[], Reference($t0))} + # borrowed_by: Reference($t0) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>)/[], Reference($t1))} + # borrows_from: Reference($t1) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>)/[], Reference($t0))} 1: return $t1 } [variant baseline] -fun MultiLayerCalling::outer($t0|has_vector: &mut MultiLayerCalling::HasVector) { - var $t1: &mut MultiLayerCalling::HasAnotherVector +fun MultiLayerCalling::outer($t0|has_vector: &mut 0x2::MultiLayerCalling::HasVector) { + var $t1: &mut 0x2::MultiLayerCalling::HasAnotherVector var $t2: &mut vector var $t3: u8 # live_nodes: Reference($t0) 0: $t1 := MultiLayerCalling::mid($t0) # live_nodes: Reference($t1) - # borrowed_by: Reference($t0) -> {(.v (vector)/[], Reference($t1))} - # borrows_from: Reference($t1) -> {(.v (vector)/[], Reference($t0))} - 1: $t2 := borrow_field.v($t1) + # borrowed_by: Reference($t0) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>)/[], Reference($t1))} + # borrows_from: Reference($t1) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>)/[], Reference($t0))} + 1: $t2 := borrow_field<0x2::MultiLayerCalling::HasAnotherVector>.v($t1) # live_nodes: Reference($t2) - # borrowed_by: Reference($t0) -> {(.v (vector)/[], Reference($t1))}, Reference($t1) -> {(.v (vector), Reference($t2))} - # borrows_from: Reference($t1) -> {(.v (vector)/[], Reference($t0))}, Reference($t2) -> {(.v (vector), Reference($t1))} + # borrowed_by: Reference($t0) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>)/[], Reference($t1))}, Reference($t1) -> {(.v (vector), Reference($t2))} + # borrows_from: Reference($t1) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>)/[], Reference($t0))}, Reference($t2) -> {(.v (vector), Reference($t1))} 2: $t3 := 42 # live_nodes: Reference($t2) - # borrowed_by: Reference($t0) -> {(.v (vector)/[], Reference($t1))}, Reference($t1) -> {(.v (vector), Reference($t2))} - # borrows_from: Reference($t1) -> {(.v (vector)/[], Reference($t0))}, Reference($t2) -> {(.v (vector), Reference($t1))} + # borrowed_by: Reference($t0) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>)/[], Reference($t1))}, Reference($t1) -> {(.v (vector), Reference($t2))} + # borrows_from: Reference($t1) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>)/[], Reference($t0))}, Reference($t2) -> {(.v (vector), Reference($t1))} 3: vector::push_back($t2, $t3) - # borrowed_by: Reference($t0) -> {(.v (vector)/[], Reference($t1))}, Reference($t1) -> {(.v (vector), Reference($t2))} - # borrows_from: Reference($t1) -> {(.v (vector)/[], Reference($t0))}, Reference($t2) -> {(.v (vector), Reference($t1))} + # borrowed_by: Reference($t0) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>)/[], Reference($t1))}, Reference($t1) -> {(.v (vector), Reference($t2))} + # borrows_from: Reference($t1) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>)/[], Reference($t0))}, Reference($t2) -> {(.v (vector), Reference($t1))} 4: return () } @@ -268,9 +268,9 @@ borrowed_by: Reference($t0) -> {([], Return(0))} borrows_from: Return(0) -> {([], Reference($t0))} fun MultiLayerCalling::inner[baseline] -borrowed_by: Reference($t0) -> {(.v (vector)/[], Return(0))} -borrows_from: Return(0) -> {(.v (vector)/[], Reference($t0))} +borrowed_by: Reference($t0) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>)/[], Return(0))} +borrows_from: Return(0) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>)/[], Reference($t0))} fun MultiLayerCalling::mid[baseline] -borrowed_by: Reference($t0) -> {(.v (vector)/[], Return(0))} -borrows_from: Return(0) -> {(.v (vector)/[], Reference($t0))} +borrowed_by: Reference($t0) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>)/[], Return(0))} +borrows_from: Return(0) -> {(.v (vector<0x2::MultiLayerCalling::HasAnotherVector>)/[], Reference($t0))} diff --git a/third_party/move/move-model/bytecode/tests/borrow/hyper_edge.exp b/third_party/move/move-model/bytecode/tests/borrow/hyper_edge.exp index 40b0b00802900..43729e7c1a943 100644 --- a/third_party/move/move-model/bytecode/tests/borrow/hyper_edge.exp +++ b/third_party/move/move-model/bytecode/tests/borrow/hyper_edge.exp @@ -78,13 +78,13 @@ public intrinsic fun vector::swap_remove<#0>($t0|v: &mut vector<#0>, $t1|i: u64) [variant baseline] -public fun Collection::borrow_mut<#0>($t0|c: &mut Collection::Collection<#0>, $t1|i: u64): &mut #0 { - var $t2: &mut Collection::Collection<#0> +public fun Collection::borrow_mut<#0>($t0|c: &mut 0x2::Collection::Collection<#0>, $t1|i: u64): &mut #0 { + var $t2: &mut 0x2::Collection::Collection<#0> var $t3: &mut vector<#0> var $t4: u64 var $t5: &mut #0 0: $t2 := move($t0) - 1: $t3 := borrow_field>.items($t2) + 1: $t3 := borrow_field<0x2::Collection::Collection<#0>>.items($t2) 2: $t4 := move($t1) 3: $t5 := vector::borrow_mut<#0>($t3, $t4) 4: return $t5 @@ -92,37 +92,37 @@ public fun Collection::borrow_mut<#0>($t0|c: &mut Collection::Collection<#0>, $t [variant baseline] -public fun Collection::make_collection<#0>(): Collection::Collection<#0> { +public fun Collection::make_collection<#0>(): 0x2::Collection::Collection<#0> { var $t0: vector<#0> var $t1: address - var $t2: Collection::Collection<#0> + var $t2: 0x2::Collection::Collection<#0> 0: $t0 := vector::empty<#0>() 1: $t1 := 0x2 - 2: $t2 := pack Collection::Collection<#0>($t0, $t1) + 2: $t2 := pack 0x2::Collection::Collection<#0>($t0, $t1) 3: return $t2 } [variant baseline] public fun Test::foo<#0>($t0|i: u64) { - var $t1|c: Collection::Collection> - var $t2|t: &mut Test::Token<#0> - var $t3: Collection::Collection> - var $t4: &mut Collection::Collection> + var $t1|c: 0x2::Collection::Collection<0x2::Test::Token<#0>> + var $t2|t: &mut 0x2::Test::Token<#0> + var $t3: 0x2::Collection::Collection<0x2::Test::Token<#0>> + var $t4: &mut 0x2::Collection::Collection<0x2::Test::Token<#0>> var $t5: u64 - var $t6: &mut Test::Token<#0> + var $t6: &mut 0x2::Test::Token<#0> var $t7: u64 - var $t8: &mut Test::Token<#0> + var $t8: &mut 0x2::Test::Token<#0> var $t9: &mut u64 - 0: $t3 := Collection::make_collection>() + 0: $t3 := Collection::make_collection<0x2::Test::Token<#0>>() 1: $t1 := $t3 2: $t4 := borrow_local($t1) 3: $t5 := move($t0) - 4: $t6 := Collection::borrow_mut>($t4, $t5) + 4: $t6 := Collection::borrow_mut<0x2::Test::Token<#0>>($t4, $t5) 5: $t2 := $t6 6: $t7 := 0 7: $t8 := move($t2) - 8: $t9 := borrow_field>.value($t8) + 8: $t9 := borrow_field<0x2::Test::Token<#0>>.value($t8) 9: write_ref($t9, $t7) 10: return () } @@ -214,11 +214,11 @@ public intrinsic fun vector::swap_remove<#0>($t0|v: &mut vector<#0>, $t1|i: u64) [variant baseline] -public fun Collection::borrow_mut<#0>($t0|c: &mut Collection::Collection<#0>, $t1|i: u64): &mut #0 { +public fun Collection::borrow_mut<#0>($t0|c: &mut 0x2::Collection::Collection<#0>, $t1|i: u64): &mut #0 { var $t2: &mut vector<#0> var $t3: &mut #0 # live_nodes: LocalRoot($t1), Reference($t0) - 0: $t2 := borrow_field>.items($t0) + 0: $t2 := borrow_field<0x2::Collection::Collection<#0>>.items($t0) # live_nodes: LocalRoot($t1), Reference($t2) # borrowed_by: Reference($t0) -> {(.items (vector<#0>), Reference($t2))} # borrows_from: Reference($t2) -> {(.items (vector<#0>), Reference($t0))} @@ -231,48 +231,48 @@ public fun Collection::borrow_mut<#0>($t0|c: &mut Collection::Collection<#0>, $t [variant baseline] -public fun Collection::make_collection<#0>(): Collection::Collection<#0> { +public fun Collection::make_collection<#0>(): 0x2::Collection::Collection<#0> { var $t0: vector<#0> var $t1: address - var $t2: Collection::Collection<#0> + var $t2: 0x2::Collection::Collection<#0> 0: $t0 := vector::empty<#0>() 1: $t1 := 0x2 - 2: $t2 := pack Collection::Collection<#0>($t0, $t1) + 2: $t2 := pack 0x2::Collection::Collection<#0>($t0, $t1) 3: return $t2 } [variant baseline] public fun Test::foo<#0>($t0|i: u64) { - var $t1|c: Collection::Collection> - var $t2|t: &mut Test::Token<#0> [unused] - var $t3: &mut Collection::Collection> - var $t4: &mut Test::Token<#0> + var $t1|c: 0x2::Collection::Collection<0x2::Test::Token<#0>> + var $t2|t: &mut 0x2::Test::Token<#0> [unused] + var $t3: &mut 0x2::Collection::Collection<0x2::Test::Token<#0>> + var $t4: &mut 0x2::Test::Token<#0> var $t5: u64 var $t6: &mut u64 # live_nodes: LocalRoot($t0) - 0: $t1 := Collection::make_collection>() + 0: $t1 := Collection::make_collection<0x2::Test::Token<#0>>() # live_nodes: LocalRoot($t0) 1: $t3 := borrow_local($t1) # live_nodes: LocalRoot($t0), Reference($t3) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t3))} # borrows_from: Reference($t3) -> {(@, LocalRoot($t1))} - 2: $t4 := Collection::borrow_mut>($t3, $t0) + 2: $t4 := Collection::borrow_mut<0x2::Test::Token<#0>>($t3, $t0) # live_nodes: LocalRoot($t0), Reference($t4) - # borrowed_by: LocalRoot($t1) -> {(@, Reference($t3))}, Reference($t3) -> {(.items (vector>)/[], Reference($t4))} - # borrows_from: Reference($t3) -> {(@, LocalRoot($t1))}, Reference($t4) -> {(.items (vector>)/[], Reference($t3))} + # borrowed_by: LocalRoot($t1) -> {(@, Reference($t3))}, Reference($t3) -> {(.items (vector<0x2::Test::Token<#0>>)/[], Reference($t4))} + # borrows_from: Reference($t3) -> {(@, LocalRoot($t1))}, Reference($t4) -> {(.items (vector<0x2::Test::Token<#0>>)/[], Reference($t3))} 3: $t5 := 0 # live_nodes: LocalRoot($t0), Reference($t4) - # borrowed_by: LocalRoot($t1) -> {(@, Reference($t3))}, Reference($t3) -> {(.items (vector>)/[], Reference($t4))} - # borrows_from: Reference($t3) -> {(@, LocalRoot($t1))}, Reference($t4) -> {(.items (vector>)/[], Reference($t3))} - 4: $t6 := borrow_field>.value($t4) + # borrowed_by: LocalRoot($t1) -> {(@, Reference($t3))}, Reference($t3) -> {(.items (vector<0x2::Test::Token<#0>>)/[], Reference($t4))} + # borrows_from: Reference($t3) -> {(@, LocalRoot($t1))}, Reference($t4) -> {(.items (vector<0x2::Test::Token<#0>>)/[], Reference($t3))} + 4: $t6 := borrow_field<0x2::Test::Token<#0>>.value($t4) # live_nodes: LocalRoot($t0), Reference($t6) - # borrowed_by: LocalRoot($t1) -> {(@, Reference($t3))}, Reference($t3) -> {(.items (vector>)/[], Reference($t4))}, Reference($t4) -> {(.value (u64), Reference($t6))} - # borrows_from: Reference($t3) -> {(@, LocalRoot($t1))}, Reference($t4) -> {(.items (vector>)/[], Reference($t3))}, Reference($t6) -> {(.value (u64), Reference($t4))} + # borrowed_by: LocalRoot($t1) -> {(@, Reference($t3))}, Reference($t3) -> {(.items (vector<0x2::Test::Token<#0>>)/[], Reference($t4))}, Reference($t4) -> {(.value (u64), Reference($t6))} + # borrows_from: Reference($t3) -> {(@, LocalRoot($t1))}, Reference($t4) -> {(.items (vector<0x2::Test::Token<#0>>)/[], Reference($t3))}, Reference($t6) -> {(.value (u64), Reference($t4))} 5: write_ref($t6, $t5) # live_nodes: LocalRoot($t0) - # borrowed_by: LocalRoot($t1) -> {(@, Reference($t3))}, Reference($t3) -> {(.items (vector>)/[], Reference($t4))}, Reference($t4) -> {(.value (u64), Reference($t6))} - # borrows_from: Reference($t3) -> {(@, LocalRoot($t1))}, Reference($t4) -> {(.items (vector>)/[], Reference($t3))}, Reference($t6) -> {(.value (u64), Reference($t4))} + # borrowed_by: LocalRoot($t1) -> {(@, Reference($t3))}, Reference($t3) -> {(.items (vector<0x2::Test::Token<#0>>)/[], Reference($t4))}, Reference($t4) -> {(.value (u64), Reference($t6))} + # borrows_from: Reference($t3) -> {(@, LocalRoot($t1))}, Reference($t4) -> {(.items (vector<0x2::Test::Token<#0>>)/[], Reference($t3))}, Reference($t6) -> {(.value (u64), Reference($t4))} 6: return () } diff --git a/third_party/move/move-model/bytecode/tests/borrow_strong/basic_test.exp b/third_party/move/move-model/bytecode/tests/borrow_strong/basic_test.exp index 306d38d91de86..14b016a0701ea 100644 --- a/third_party/move/move-model/bytecode/tests/borrow_strong/basic_test.exp +++ b/third_party/move/move-model/bytecode/tests/borrow_strong/basic_test.exp @@ -1,23 +1,23 @@ ============ initial translation from Move ================ [variant baseline] -fun TestBorrow::test1(): TestBorrow::R { - var $t0|r: TestBorrow::R +fun TestBorrow::test1(): 0x42::TestBorrow::R { + var $t0|r: 0x42::TestBorrow::R var $t1|x_ref: &mut u64 var $t2: u64 var $t3: u64 - var $t4: TestBorrow::R - var $t5: &mut TestBorrow::R + var $t4: 0x42::TestBorrow::R + var $t5: &mut 0x42::TestBorrow::R var $t6: &mut u64 var $t7: u64 var $t8: &mut u64 - var $t9: TestBorrow::R + var $t9: 0x42::TestBorrow::R 0: $t2 := 3 1: $t3 := 4 - 2: $t4 := pack TestBorrow::R($t2, $t3) + 2: $t4 := pack 0x42::TestBorrow::R($t2, $t3) 3: $t0 := $t4 4: $t5 := borrow_local($t0) - 5: $t6 := borrow_field.x($t5) + 5: $t6 := borrow_field<0x42::TestBorrow::R>.x($t5) 6: $t1 := $t6 7: $t7 := 0 8: $t8 := move($t1) @@ -28,33 +28,33 @@ fun TestBorrow::test1(): TestBorrow::R { [variant baseline] -fun TestBorrow::test10($t0|b: bool): TestBorrow::R { - var $t1|r: TestBorrow::R +fun TestBorrow::test10($t0|b: bool): 0x42::TestBorrow::R { + var $t1|r: 0x42::TestBorrow::R var $t2|r_field: &mut u64 - var $t3|r_ref: &mut TestBorrow::R + var $t3|r_ref: &mut 0x42::TestBorrow::R var $t4: u64 var $t5: u64 - var $t6: TestBorrow::R - var $t7: &mut TestBorrow::R - var $t8: &mut TestBorrow::R + var $t6: 0x42::TestBorrow::R + var $t7: &mut 0x42::TestBorrow::R + var $t8: &mut 0x42::TestBorrow::R var $t9: &mut u64 var $t10: bool var $t11: &mut u64 var $t12: bool - var $t13: &mut TestBorrow::R + var $t13: &mut 0x42::TestBorrow::R var $t14: &mut u64 - var $t15: &mut TestBorrow::R + var $t15: &mut 0x42::TestBorrow::R var $t16: u64 var $t17: &mut u64 - var $t18: TestBorrow::R + var $t18: 0x42::TestBorrow::R 0: $t4 := 3 1: $t5 := 4 - 2: $t6 := pack TestBorrow::R($t4, $t5) + 2: $t6 := pack 0x42::TestBorrow::R($t4, $t5) 3: $t1 := $t6 4: $t7 := borrow_local($t1) 5: $t3 := $t7 6: $t8 := copy($t3) - 7: $t9 := borrow_field.x($t8) + 7: $t9 := borrow_field<0x42::TestBorrow::R>.x($t8) 8: $t2 := $t9 9: $t10 := copy($t0) 10: if ($t10) goto 11 else goto 19 @@ -91,12 +91,12 @@ fun TestBorrow::test2($t0|x_ref: &mut u64, $t1|v: u64) { [variant baseline] -public fun TestBorrow::test3($t0|r_ref: &mut TestBorrow::R, $t1|v: u64) { - var $t2: &mut TestBorrow::R +public fun TestBorrow::test3($t0|r_ref: &mut 0x42::TestBorrow::R, $t1|v: u64) { + var $t2: &mut 0x42::TestBorrow::R var $t3: &mut u64 var $t4: u64 0: $t2 := move($t0) - 1: $t3 := borrow_field.x($t2) + 1: $t3 := borrow_field<0x42::TestBorrow::R>.x($t2) 2: $t4 := move($t1) 3: TestBorrow::test2($t3, $t4) 4: return () @@ -104,17 +104,17 @@ public fun TestBorrow::test3($t0|r_ref: &mut TestBorrow::R, $t1|v: u64) { [variant baseline] -fun TestBorrow::test4(): TestBorrow::R { - var $t0|r: TestBorrow::R +fun TestBorrow::test4(): 0x42::TestBorrow::R { + var $t0|r: 0x42::TestBorrow::R var $t1: u64 var $t2: u64 - var $t3: TestBorrow::R - var $t4: &mut TestBorrow::R + var $t3: 0x42::TestBorrow::R + var $t4: &mut 0x42::TestBorrow::R var $t5: u64 - var $t6: TestBorrow::R + var $t6: 0x42::TestBorrow::R 0: $t1 := 3 1: $t2 := 4 - 2: $t3 := pack TestBorrow::R($t1, $t2) + 2: $t3 := pack 0x42::TestBorrow::R($t1, $t2) 3: $t0 := $t3 4: $t4 := borrow_local($t0) 5: $t5 := 0 @@ -125,28 +125,28 @@ fun TestBorrow::test4(): TestBorrow::R { [variant baseline] -public fun TestBorrow::test5($t0|r_ref: &mut TestBorrow::R): &mut u64 { - var $t1: &mut TestBorrow::R +public fun TestBorrow::test5($t0|r_ref: &mut 0x42::TestBorrow::R): &mut u64 { + var $t1: &mut 0x42::TestBorrow::R var $t2: &mut u64 0: $t1 := move($t0) - 1: $t2 := borrow_field.x($t1) + 1: $t2 := borrow_field<0x42::TestBorrow::R>.x($t1) 2: return $t2 } [variant baseline] -fun TestBorrow::test6(): TestBorrow::R { - var $t0|r: TestBorrow::R +fun TestBorrow::test6(): 0x42::TestBorrow::R { + var $t0|r: 0x42::TestBorrow::R var $t1: u64 var $t2: u64 - var $t3: TestBorrow::R - var $t4: &mut TestBorrow::R + var $t3: 0x42::TestBorrow::R + var $t4: &mut 0x42::TestBorrow::R var $t5: &mut u64 var $t6: u64 - var $t7: TestBorrow::R + var $t7: 0x42::TestBorrow::R 0: $t1 := 3 1: $t2 := 4 - 2: $t3 := pack TestBorrow::R($t1, $t2) + 2: $t3 := pack 0x42::TestBorrow::R($t1, $t2) 3: $t0 := $t3 4: $t4 := borrow_local($t0) 5: $t5 := TestBorrow::test5($t4) @@ -159,28 +159,28 @@ fun TestBorrow::test6(): TestBorrow::R { [variant baseline] fun TestBorrow::test7($t0|b: bool) { - var $t1|r1: TestBorrow::R - var $t2|r2: TestBorrow::R - var $t3|r_ref: &mut TestBorrow::R + var $t1|r1: 0x42::TestBorrow::R + var $t2|r2: 0x42::TestBorrow::R + var $t3|r_ref: &mut 0x42::TestBorrow::R var $t4: u64 var $t5: u64 - var $t6: TestBorrow::R + var $t6: 0x42::TestBorrow::R var $t7: u64 var $t8: u64 - var $t9: TestBorrow::R - var $t10: &mut TestBorrow::R + var $t9: 0x42::TestBorrow::R + var $t10: &mut 0x42::TestBorrow::R var $t11: bool - var $t12: &mut TestBorrow::R - var $t13: &mut TestBorrow::R - var $t14: &mut TestBorrow::R + var $t12: &mut 0x42::TestBorrow::R + var $t13: &mut 0x42::TestBorrow::R + var $t14: &mut 0x42::TestBorrow::R var $t15: u64 0: $t4 := 3 1: $t5 := 4 - 2: $t6 := pack TestBorrow::R($t4, $t5) + 2: $t6 := pack 0x42::TestBorrow::R($t4, $t5) 3: $t1 := $t6 4: $t7 := 4 5: $t8 := 5 - 6: $t9 := pack TestBorrow::R($t7, $t8) + 6: $t9 := pack 0x42::TestBorrow::R($t7, $t8) 7: $t2 := $t9 8: $t10 := borrow_local($t1) 9: $t3 := $t10 @@ -201,45 +201,45 @@ fun TestBorrow::test7($t0|b: bool) { [variant baseline] -fun TestBorrow::test8($t0|b: bool, $t1|n: u64, $t2|r_ref: &mut TestBorrow::R) { - var $t3|r1: TestBorrow::R - var $t4|r2: TestBorrow::R - var $t5|t_ref: &mut TestBorrow::R +fun TestBorrow::test8($t0|b: bool, $t1|n: u64, $t2|r_ref: &mut 0x42::TestBorrow::R) { + var $t3|r1: 0x42::TestBorrow::R + var $t4|r2: 0x42::TestBorrow::R + var $t5|t_ref: &mut 0x42::TestBorrow::R var $t6: u64 var $t7: u64 - var $t8: TestBorrow::R + var $t8: 0x42::TestBorrow::R var $t9: u64 var $t10: u64 - var $t11: TestBorrow::R - var $t12: &mut TestBorrow::R + var $t11: 0x42::TestBorrow::R + var $t12: &mut 0x42::TestBorrow::R var $t13: u64 var $t14: u64 var $t15: bool - var $t16: &mut TestBorrow::R + var $t16: &mut 0x42::TestBorrow::R var $t17: u64 var $t18: u64 var $t19: u64 var $t20: u64 var $t21: bool - var $t22: &mut TestBorrow::R - var $t23: &mut TestBorrow::R + var $t22: &mut 0x42::TestBorrow::R + var $t23: &mut 0x42::TestBorrow::R var $t24: u64 var $t25: u64 var $t26: u64 var $t27: bool - var $t28: &mut TestBorrow::R - var $t29: &mut TestBorrow::R + var $t28: &mut 0x42::TestBorrow::R + var $t29: &mut 0x42::TestBorrow::R var $t30: u64 - var $t31: &mut TestBorrow::R - var $t32: &mut TestBorrow::R + var $t31: &mut 0x42::TestBorrow::R + var $t32: &mut 0x42::TestBorrow::R var $t33: u64 0: $t6 := 3 1: $t7 := 4 - 2: $t8 := pack TestBorrow::R($t6, $t7) + 2: $t8 := pack 0x42::TestBorrow::R($t6, $t7) 3: $t3 := $t8 4: $t9 := 4 5: $t10 := 5 - 6: $t11 := pack TestBorrow::R($t9, $t10) + 6: $t11 := pack 0x42::TestBorrow::R($t9, $t10) 7: $t4 := $t11 8: $t12 := borrow_local($t4) 9: $t5 := $t12 @@ -297,20 +297,20 @@ fun TestBorrow::test8($t0|b: bool, $t1|n: u64, $t2|r_ref: &mut TestBorrow::R) { [variant baseline] -fun TestBorrow::test9($t0|b: bool, $t1|r_ref: &mut TestBorrow::R): &mut u64 { +fun TestBorrow::test9($t0|b: bool, $t1|r_ref: &mut 0x42::TestBorrow::R): &mut u64 { var $t2|r_field: &mut u64 - var $t3: &mut TestBorrow::R + var $t3: &mut 0x42::TestBorrow::R var $t4: &mut u64 var $t5: bool var $t6: &mut u64 - var $t7: &mut TestBorrow::R + var $t7: &mut 0x42::TestBorrow::R var $t8: &mut u64 - var $t9: &mut TestBorrow::R + var $t9: &mut 0x42::TestBorrow::R var $t10: u64 var $t11: &mut u64 var $t12: &mut u64 0: $t3 := copy($t1) - 1: $t4 := borrow_field.x($t3) + 1: $t4 := borrow_field<0x42::TestBorrow::R>.x($t3) 2: $t2 := $t4 3: $t5 := move($t0) 4: if ($t5) goto 5 else goto 12 @@ -318,7 +318,7 @@ fun TestBorrow::test9($t0|b: bool, $t1|r_ref: &mut TestBorrow::R): &mut u64 { 6: $t6 := move($t2) 7: drop($t6) 8: $t7 := move($t1) - 9: $t8 := borrow_field.y($t7) + 9: $t8 := borrow_field<0x42::TestBorrow::R>.y($t7) 10: $t2 := $t8 11: goto 16 12: label L0 @@ -336,23 +336,23 @@ fun TestBorrow::test9($t0|b: bool, $t1|r_ref: &mut TestBorrow::R): &mut u64 { ============ after pipeline `borrow_strong` ================ [variant baseline] -fun TestBorrow::test1(): TestBorrow::R { - var $t0|r: TestBorrow::R +fun TestBorrow::test1(): 0x42::TestBorrow::R { + var $t0|r: 0x42::TestBorrow::R var $t1|x_ref: &mut u64 [unused] var $t2: u64 var $t3: u64 - var $t4: &mut TestBorrow::R + var $t4: &mut 0x42::TestBorrow::R var $t5: &mut u64 var $t6: u64 - var $t7: TestBorrow::R + var $t7: 0x42::TestBorrow::R 0: $t2 := 3 1: $t3 := 4 - 2: $t0 := pack TestBorrow::R($t2, $t3) + 2: $t0 := pack 0x42::TestBorrow::R($t2, $t3) 3: $t4 := borrow_local($t0) # live_nodes: Reference($t4) # borrowed_by: LocalRoot($t0) -> {(@, Reference($t4))} # borrows_from: Reference($t4) -> {(@, LocalRoot($t0))} - 4: $t5 := borrow_field.x($t4) + 4: $t5 := borrow_field<0x42::TestBorrow::R>.x($t4) # live_nodes: Reference($t5) # borrowed_by: LocalRoot($t0) -> {(@, Reference($t4))}, Reference($t4) -> {(.x (u64), Reference($t5))} # borrows_from: Reference($t4) -> {(@, LocalRoot($t0))}, Reference($t5) -> {(.x (u64), Reference($t4))} @@ -372,28 +372,28 @@ fun TestBorrow::test1(): TestBorrow::R { [variant baseline] -fun TestBorrow::test10($t0|b: bool): TestBorrow::R { - var $t1|r: TestBorrow::R +fun TestBorrow::test10($t0|b: bool): 0x42::TestBorrow::R { + var $t1|r: 0x42::TestBorrow::R var $t2|r_field: &mut u64 - var $t3|r_ref: &mut TestBorrow::R [unused] + var $t3|r_ref: &mut 0x42::TestBorrow::R [unused] var $t4: u64 var $t5: u64 - var $t6: &mut TestBorrow::R + var $t6: &mut 0x42::TestBorrow::R var $t7: &mut u64 var $t8: u64 - var $t9: TestBorrow::R + var $t9: 0x42::TestBorrow::R # live_nodes: LocalRoot($t0) 0: $t4 := 3 # live_nodes: LocalRoot($t0) 1: $t5 := 4 # live_nodes: LocalRoot($t0) - 2: $t1 := pack TestBorrow::R($t4, $t5) + 2: $t1 := pack 0x42::TestBorrow::R($t4, $t5) # live_nodes: LocalRoot($t0) 3: $t6 := borrow_local($t1) # live_nodes: LocalRoot($t0), Reference($t6) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t6))} # borrows_from: Reference($t6) -> {(@, LocalRoot($t1))} - 4: $t7 := borrow_field.x($t6) + 4: $t7 := borrow_field<0x42::TestBorrow::R>.x($t6) # live_nodes: LocalRoot($t0), Reference($t6), Reference($t7) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t6))}, Reference($t6) -> {(.x (u64), Reference($t7))} # borrows_from: Reference($t6) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(.x (u64), Reference($t6))} @@ -487,10 +487,10 @@ fun TestBorrow::test2($t0|x_ref: &mut u64, $t1|v: u64) { [variant baseline] -public fun TestBorrow::test3($t0|r_ref: &mut TestBorrow::R, $t1|v: u64) { +public fun TestBorrow::test3($t0|r_ref: &mut 0x42::TestBorrow::R, $t1|v: u64) { var $t2: &mut u64 # live_nodes: LocalRoot($t1), Reference($t0) - 0: $t2 := borrow_field.x($t0) + 0: $t2 := borrow_field<0x42::TestBorrow::R>.x($t0) # live_nodes: LocalRoot($t1), Reference($t2) # borrowed_by: Reference($t0) -> {(.x (u64), Reference($t2))} # borrows_from: Reference($t2) -> {(.x (u64), Reference($t0))} @@ -503,16 +503,16 @@ public fun TestBorrow::test3($t0|r_ref: &mut TestBorrow::R, $t1|v: u64) { [variant baseline] -fun TestBorrow::test4(): TestBorrow::R { - var $t0|r: TestBorrow::R +fun TestBorrow::test4(): 0x42::TestBorrow::R { + var $t0|r: 0x42::TestBorrow::R var $t1: u64 var $t2: u64 - var $t3: &mut TestBorrow::R + var $t3: &mut 0x42::TestBorrow::R var $t4: u64 - var $t5: TestBorrow::R + var $t5: 0x42::TestBorrow::R 0: $t1 := 3 1: $t2 := 4 - 2: $t0 := pack TestBorrow::R($t1, $t2) + 2: $t0 := pack 0x42::TestBorrow::R($t1, $t2) 3: $t3 := borrow_local($t0) # live_nodes: Reference($t3) # borrowed_by: LocalRoot($t0) -> {(@, Reference($t3))} @@ -533,10 +533,10 @@ fun TestBorrow::test4(): TestBorrow::R { [variant baseline] -public fun TestBorrow::test5($t0|r_ref: &mut TestBorrow::R): &mut u64 { +public fun TestBorrow::test5($t0|r_ref: &mut 0x42::TestBorrow::R): &mut u64 { var $t1: &mut u64 # live_nodes: Reference($t0) - 0: $t1 := borrow_field.x($t0) + 0: $t1 := borrow_field<0x42::TestBorrow::R>.x($t0) # live_nodes: Reference($t1) # borrowed_by: Reference($t0) -> {(.x (u64), Reference($t1))} # borrows_from: Reference($t1) -> {(.x (u64), Reference($t0))} @@ -545,17 +545,17 @@ public fun TestBorrow::test5($t0|r_ref: &mut TestBorrow::R): &mut u64 { [variant baseline] -fun TestBorrow::test6(): TestBorrow::R { - var $t0|r: TestBorrow::R +fun TestBorrow::test6(): 0x42::TestBorrow::R { + var $t0|r: 0x42::TestBorrow::R var $t1: u64 var $t2: u64 - var $t3: &mut TestBorrow::R + var $t3: &mut 0x42::TestBorrow::R var $t4: &mut u64 var $t5: u64 - var $t6: TestBorrow::R + var $t6: 0x42::TestBorrow::R 0: $t1 := 3 1: $t2 := 4 - 2: $t0 := pack TestBorrow::R($t1, $t2) + 2: $t0 := pack 0x42::TestBorrow::R($t1, $t2) 3: $t3 := borrow_local($t0) # live_nodes: Reference($t3) # borrowed_by: LocalRoot($t0) -> {(@, Reference($t3))} @@ -581,28 +581,28 @@ fun TestBorrow::test6(): TestBorrow::R { [variant baseline] fun TestBorrow::test7($t0|b: bool) { - var $t1|r1: TestBorrow::R - var $t2|r2: TestBorrow::R - var $t3|r_ref: &mut TestBorrow::R + var $t1|r1: 0x42::TestBorrow::R + var $t2|r2: 0x42::TestBorrow::R + var $t3|r_ref: &mut 0x42::TestBorrow::R var $t4: u64 var $t5: u64 var $t6: u64 var $t7: u64 - var $t8: &mut TestBorrow::R - var $t9: &mut TestBorrow::R + var $t8: &mut 0x42::TestBorrow::R + var $t9: &mut 0x42::TestBorrow::R var $t10: u64 # live_nodes: LocalRoot($t0) 0: $t4 := 3 # live_nodes: LocalRoot($t0) 1: $t5 := 4 # live_nodes: LocalRoot($t0) - 2: $t1 := pack TestBorrow::R($t4, $t5) + 2: $t1 := pack 0x42::TestBorrow::R($t4, $t5) # live_nodes: LocalRoot($t0) 3: $t6 := 4 # live_nodes: LocalRoot($t0) 4: $t7 := 5 # live_nodes: LocalRoot($t0) - 5: $t2 := pack TestBorrow::R($t6, $t7) + 5: $t2 := pack 0x42::TestBorrow::R($t6, $t7) # live_nodes: LocalRoot($t0) 6: $t8 := borrow_local($t1) # live_nodes: LocalRoot($t0), Reference($t8) @@ -677,23 +677,23 @@ fun TestBorrow::test7($t0|b: bool) { [variant baseline] -fun TestBorrow::test8($t0|b: bool, $t1|n: u64, $t2|r_ref: &mut TestBorrow::R) { - var $t3|r1: TestBorrow::R - var $t4|r2: TestBorrow::R - var $t5|t_ref: &mut TestBorrow::R +fun TestBorrow::test8($t0|b: bool, $t1|n: u64, $t2|r_ref: &mut 0x42::TestBorrow::R) { + var $t3|r1: 0x42::TestBorrow::R + var $t4|r2: 0x42::TestBorrow::R + var $t5|t_ref: &mut 0x42::TestBorrow::R var $t6: u64 var $t7: u64 var $t8: u64 var $t9: u64 - var $t10: &mut TestBorrow::R + var $t10: &mut 0x42::TestBorrow::R var $t11: u64 var $t12: bool var $t13: u64 var $t14: u64 var $t15: u64 var $t16: bool - var $t17: &mut TestBorrow::R - var $t18: &mut TestBorrow::R + var $t17: &mut 0x42::TestBorrow::R + var $t18: &mut 0x42::TestBorrow::R var $t19: u64 var $t20: u64 var $t21: u64 @@ -702,13 +702,13 @@ fun TestBorrow::test8($t0|b: bool, $t1|n: u64, $t2|r_ref: &mut TestBorrow::R) { # live_nodes: LocalRoot($t0), LocalRoot($t1), Reference($t2) 1: $t7 := 4 # live_nodes: LocalRoot($t0), LocalRoot($t1), Reference($t2) - 2: $t3 := pack TestBorrow::R($t6, $t7) + 2: $t3 := pack 0x42::TestBorrow::R($t6, $t7) # live_nodes: LocalRoot($t0), LocalRoot($t1), Reference($t2) 3: $t8 := 4 # live_nodes: LocalRoot($t0), LocalRoot($t1), Reference($t2) 4: $t9 := 5 # live_nodes: LocalRoot($t0), LocalRoot($t1), Reference($t2) - 5: $t4 := pack TestBorrow::R($t8, $t9) + 5: $t4 := pack 0x42::TestBorrow::R($t8, $t9) # live_nodes: LocalRoot($t0), LocalRoot($t1), Reference($t2) 6: $t10 := borrow_local($t4) # live_nodes: LocalRoot($t0), LocalRoot($t1), Reference($t2), Reference($t10) @@ -879,12 +879,12 @@ fun TestBorrow::test8($t0|b: bool, $t1|n: u64, $t2|r_ref: &mut TestBorrow::R) { [variant baseline] -fun TestBorrow::test9($t0|b: bool, $t1|r_ref: &mut TestBorrow::R): &mut u64 { +fun TestBorrow::test9($t0|b: bool, $t1|r_ref: &mut 0x42::TestBorrow::R): &mut u64 { var $t2|r_field: &mut u64 var $t3: &mut u64 var $t4: u64 # live_nodes: LocalRoot($t0), Reference($t1) - 0: $t3 := borrow_field.x($t1) + 0: $t3 := borrow_field<0x42::TestBorrow::R>.x($t1) # live_nodes: LocalRoot($t0), Reference($t1), Reference($t3) # borrowed_by: Reference($t1) -> {(.x (u64), Reference($t3))} # borrows_from: Reference($t3) -> {(.x (u64), Reference($t1))} @@ -904,7 +904,7 @@ fun TestBorrow::test9($t0|b: bool, $t1|r_ref: &mut TestBorrow::R): &mut u64 { # live_nodes: LocalRoot($t0), Reference($t1) # borrowed_by: Reference($t1) -> {(.x (u64), Reference($t3))}, Reference($t3) -> {(@, Reference($t2))} # borrows_from: Reference($t2) -> {(@, Reference($t3))}, Reference($t3) -> {(.x (u64), Reference($t1))} - 5: $t2 := borrow_field.y($t1) + 5: $t2 := borrow_field<0x42::TestBorrow::R>.y($t1) # live_nodes: LocalRoot($t0), Reference($t2) # borrowed_by: Reference($t1) -> {(.y (u64), Reference($t2)), (.x (u64), Reference($t3))}, Reference($t3) -> {(@, Reference($t2))} # borrows_from: Reference($t2) -> {(.y (u64), Reference($t1)), (@, Reference($t3))}, Reference($t3) -> {(.x (u64), Reference($t1))} diff --git a/third_party/move/move-model/bytecode/tests/borrow_strong/mut_ref.exp b/third_party/move/move-model/bytecode/tests/borrow_strong/mut_ref.exp index d241c08064816..c101769364277 100644 --- a/third_party/move/move-model/bytecode/tests/borrow_strong/mut_ref.exp +++ b/third_party/move/move-model/bytecode/tests/borrow_strong/mut_ref.exp @@ -78,23 +78,23 @@ public intrinsic fun vector::swap_remove<#0>($t0|v: &mut vector<#0>, $t1|i: u64) [variant baseline] -fun TestMutRef::call_return_ref_different_path($t0|b: bool): TestMutRef::N { +fun TestMutRef::call_return_ref_different_path($t0|b: bool): 0x1::TestMutRef::N { var $t1|r: &mut u64 - var $t2|x: TestMutRef::N + var $t2|x: 0x1::TestMutRef::N var $t3: u64 var $t4: u64 - var $t5: TestMutRef::T - var $t6: TestMutRef::N + var $t5: 0x1::TestMutRef::T + var $t6: 0x1::TestMutRef::N var $t7: bool - var $t8: &mut TestMutRef::N + var $t8: &mut 0x1::TestMutRef::N var $t9: &mut u64 var $t10: u64 var $t11: &mut u64 - var $t12: TestMutRef::N + var $t12: 0x1::TestMutRef::N 0: $t3 := 1 1: $t4 := 2 - 2: $t5 := pack TestMutRef::T($t4) - 3: $t6 := pack TestMutRef::N($t3, $t5) + 2: $t5 := pack 0x1::TestMutRef::T($t4) + 3: $t6 := pack 0x1::TestMutRef::N($t3, $t5) 4: $t2 := $t6 5: $t7 := move($t0) 6: $t8 := borrow_local($t2) @@ -109,29 +109,29 @@ fun TestMutRef::call_return_ref_different_path($t0|b: bool): TestMutRef::N { [variant baseline] -fun TestMutRef::call_return_ref_different_path_vec($t0|b: bool): TestMutRef::V { +fun TestMutRef::call_return_ref_different_path_vec($t0|b: bool): 0x1::TestMutRef::V { var $t1|is: vector var $t2|r: &mut u64 - var $t3|ts: vector - var $t4|x: TestMutRef::V + var $t3|ts: vector<0x1::TestMutRef::T> + var $t4|x: 0x1::TestMutRef::V var $t5: vector - var $t6: vector + var $t6: vector<0x1::TestMutRef::T> var $t7: &mut vector var $t8: u64 var $t9: &mut vector var $t10: u64 var $t11: vector - var $t12: vector - var $t13: TestMutRef::V + var $t12: vector<0x1::TestMutRef::T> + var $t13: 0x1::TestMutRef::V var $t14: bool - var $t15: &mut TestMutRef::V + var $t15: &mut 0x1::TestMutRef::V var $t16: &mut u64 var $t17: u64 var $t18: &mut u64 - var $t19: TestMutRef::V + var $t19: 0x1::TestMutRef::V 0: $t5 := vector::empty() 1: $t1 := $t5 - 2: $t6 := vector::empty() + 2: $t6 := vector::empty<0x1::TestMutRef::T>() 3: $t3 := $t6 4: $t7 := borrow_local($t1) 5: $t8 := 1 @@ -141,7 +141,7 @@ fun TestMutRef::call_return_ref_different_path_vec($t0|b: bool): TestMutRef::V { 9: vector::push_back($t9, $t10) 10: $t11 := move($t1) 11: $t12 := move($t3) - 12: $t13 := pack TestMutRef::V($t11, $t12) + 12: $t13 := pack 0x1::TestMutRef::V($t11, $t12) 13: $t4 := $t13 14: $t14 := move($t0) 15: $t15 := borrow_local($t4) @@ -156,35 +156,35 @@ fun TestMutRef::call_return_ref_different_path_vec($t0|b: bool): TestMutRef::V { [variant baseline] -fun TestMutRef::call_return_ref_different_path_vec2($t0|b: bool): TestMutRef::V { +fun TestMutRef::call_return_ref_different_path_vec2($t0|b: bool): 0x1::TestMutRef::V { var $t1|is: vector var $t2|r: &mut u64 - var $t3|ts: vector - var $t4|x: TestMutRef::V + var $t3|ts: vector<0x1::TestMutRef::T> + var $t4|x: 0x1::TestMutRef::V var $t5: vector - var $t6: vector + var $t6: vector<0x1::TestMutRef::T> var $t7: &mut vector var $t8: u64 var $t9: &mut vector var $t10: u64 - var $t11: &mut vector + var $t11: &mut vector<0x1::TestMutRef::T> var $t12: u64 - var $t13: TestMutRef::T - var $t14: &mut vector + var $t13: 0x1::TestMutRef::T + var $t14: &mut vector<0x1::TestMutRef::T> var $t15: u64 - var $t16: TestMutRef::T + var $t16: 0x1::TestMutRef::T var $t17: vector - var $t18: vector - var $t19: TestMutRef::V + var $t18: vector<0x1::TestMutRef::T> + var $t19: 0x1::TestMutRef::V var $t20: bool - var $t21: &mut TestMutRef::V + var $t21: &mut 0x1::TestMutRef::V var $t22: &mut u64 var $t23: u64 var $t24: &mut u64 - var $t25: TestMutRef::V + var $t25: 0x1::TestMutRef::V 0: $t5 := vector::empty() 1: $t1 := $t5 - 2: $t6 := vector::empty() + 2: $t6 := vector::empty<0x1::TestMutRef::T>() 3: $t3 := $t6 4: $t7 := borrow_local($t1) 5: $t8 := 1 @@ -194,15 +194,15 @@ fun TestMutRef::call_return_ref_different_path_vec2($t0|b: bool): TestMutRef::V 9: vector::push_back($t9, $t10) 10: $t11 := borrow_local($t3) 11: $t12 := 3 - 12: $t13 := pack TestMutRef::T($t12) - 13: vector::push_back($t11, $t13) + 12: $t13 := pack 0x1::TestMutRef::T($t12) + 13: vector::push_back<0x1::TestMutRef::T>($t11, $t13) 14: $t14 := borrow_local($t3) 15: $t15 := 4 - 16: $t16 := pack TestMutRef::T($t15) - 17: vector::push_back($t14, $t16) + 16: $t16 := pack 0x1::TestMutRef::T($t15) + 17: vector::push_back<0x1::TestMutRef::T>($t14, $t16) 18: $t17 := move($t1) 19: $t18 := move($t3) - 20: $t19 := pack TestMutRef::V($t17, $t18) + 20: $t19 := pack 0x1::TestMutRef::V($t17, $t18) 21: $t4 := $t19 22: $t20 := move($t0) 23: $t21 := borrow_local($t4) @@ -217,35 +217,35 @@ fun TestMutRef::call_return_ref_different_path_vec2($t0|b: bool): TestMutRef::V [variant baseline] -fun TestMutRef::call_return_ref_different_path_vec2_incorrect($t0|b: bool): TestMutRef::V { +fun TestMutRef::call_return_ref_different_path_vec2_incorrect($t0|b: bool): 0x1::TestMutRef::V { var $t1|is: vector var $t2|r: &mut u64 - var $t3|ts: vector - var $t4|x: TestMutRef::V + var $t3|ts: vector<0x1::TestMutRef::T> + var $t4|x: 0x1::TestMutRef::V var $t5: vector - var $t6: vector + var $t6: vector<0x1::TestMutRef::T> var $t7: &mut vector var $t8: u64 var $t9: &mut vector var $t10: u64 - var $t11: &mut vector + var $t11: &mut vector<0x1::TestMutRef::T> var $t12: u64 - var $t13: TestMutRef::T - var $t14: &mut vector + var $t13: 0x1::TestMutRef::T + var $t14: &mut vector<0x1::TestMutRef::T> var $t15: u64 - var $t16: TestMutRef::T + var $t16: 0x1::TestMutRef::T var $t17: vector - var $t18: vector - var $t19: TestMutRef::V + var $t18: vector<0x1::TestMutRef::T> + var $t19: 0x1::TestMutRef::V var $t20: bool - var $t21: &mut TestMutRef::V + var $t21: &mut 0x1::TestMutRef::V var $t22: &mut u64 var $t23: u64 var $t24: &mut u64 - var $t25: TestMutRef::V + var $t25: 0x1::TestMutRef::V 0: $t5 := vector::empty() 1: $t1 := $t5 - 2: $t6 := vector::empty() + 2: $t6 := vector::empty<0x1::TestMutRef::T>() 3: $t3 := $t6 4: $t7 := borrow_local($t1) 5: $t8 := 1 @@ -255,15 +255,15 @@ fun TestMutRef::call_return_ref_different_path_vec2_incorrect($t0|b: bool): Test 9: vector::push_back($t9, $t10) 10: $t11 := borrow_local($t3) 11: $t12 := 3 - 12: $t13 := pack TestMutRef::T($t12) - 13: vector::push_back($t11, $t13) + 12: $t13 := pack 0x1::TestMutRef::T($t12) + 13: vector::push_back<0x1::TestMutRef::T>($t11, $t13) 14: $t14 := borrow_local($t3) 15: $t15 := 4 - 16: $t16 := pack TestMutRef::T($t15) - 17: vector::push_back($t14, $t16) + 16: $t16 := pack 0x1::TestMutRef::T($t15) + 17: vector::push_back<0x1::TestMutRef::T>($t14, $t16) 18: $t17 := move($t1) 19: $t18 := move($t3) - 20: $t19 := pack TestMutRef::V($t17, $t18) + 20: $t19 := pack 0x1::TestMutRef::V($t17, $t18) 21: $t4 := $t19 22: $t20 := move($t0) 23: $t21 := borrow_local($t4) @@ -278,27 +278,27 @@ fun TestMutRef::call_return_ref_different_path_vec2_incorrect($t0|b: bool): Test [variant baseline] -fun TestMutRef::call_return_ref_different_root($t0|b: bool): (TestMutRef::T, TestMutRef::R) { +fun TestMutRef::call_return_ref_different_root($t0|b: bool): (0x1::TestMutRef::T, 0x1::TestMutRef::R) { var $t1|r: &mut u64 - var $t2|x: TestMutRef::T - var $t3|y: TestMutRef::R + var $t2|x: 0x1::TestMutRef::T + var $t3|y: 0x1::TestMutRef::R var $t4: u64 - var $t5: TestMutRef::T + var $t5: 0x1::TestMutRef::T var $t6: u64 - var $t7: TestMutRef::R + var $t7: 0x1::TestMutRef::R var $t8: bool - var $t9: &mut TestMutRef::T - var $t10: &mut TestMutRef::R + var $t9: &mut 0x1::TestMutRef::T + var $t10: &mut 0x1::TestMutRef::R var $t11: &mut u64 var $t12: u64 var $t13: &mut u64 - var $t14: TestMutRef::T - var $t15: TestMutRef::R + var $t14: 0x1::TestMutRef::T + var $t15: 0x1::TestMutRef::R 0: $t4 := 1 - 1: $t5 := pack TestMutRef::T($t4) + 1: $t5 := pack 0x1::TestMutRef::T($t4) 2: $t2 := $t5 3: $t6 := 10 - 4: $t7 := pack TestMutRef::R($t6) + 4: $t7 := pack 0x1::TestMutRef::R($t6) 5: $t3 := $t7 6: $t8 := move($t0) 7: $t9 := borrow_local($t2) @@ -315,26 +315,26 @@ fun TestMutRef::call_return_ref_different_root($t0|b: bool): (TestMutRef::T, Tes [variant baseline] -fun TestMutRef::return_ref_different_path($t0|b: bool, $t1|x: &mut TestMutRef::N): &mut u64 { +fun TestMutRef::return_ref_different_path($t0|b: bool, $t1|x: &mut 0x1::TestMutRef::N): &mut u64 { var $t2|tmp#$2: &mut u64 var $t3: bool - var $t4: &mut TestMutRef::N + var $t4: &mut 0x1::TestMutRef::N var $t5: &mut u64 - var $t6: &mut TestMutRef::N - var $t7: &mut TestMutRef::T + var $t6: &mut 0x1::TestMutRef::N + var $t7: &mut 0x1::TestMutRef::T var $t8: &mut u64 var $t9: &mut u64 0: $t3 := move($t0) 1: if ($t3) goto 2 else goto 7 2: label L1 3: $t4 := move($t1) - 4: $t5 := borrow_field.value($t4) + 4: $t5 := borrow_field<0x1::TestMutRef::N>.value($t4) 5: $t2 := $t5 6: goto 13 7: label L0 8: $t6 := move($t1) - 9: $t7 := borrow_field.t($t6) - 10: $t8 := borrow_field.value($t7) + 9: $t7 := borrow_field<0x1::TestMutRef::N>.t($t6) + 10: $t8 := borrow_field<0x1::TestMutRef::T>.value($t7) 11: $t2 := $t8 12: goto 13 13: label L2 @@ -344,14 +344,14 @@ fun TestMutRef::return_ref_different_path($t0|b: bool, $t1|x: &mut TestMutRef::N [variant baseline] -fun TestMutRef::return_ref_different_path_vec($t0|b: bool, $t1|x: &mut TestMutRef::V): &mut u64 { +fun TestMutRef::return_ref_different_path_vec($t0|b: bool, $t1|x: &mut 0x1::TestMutRef::V): &mut u64 { var $t2|tmp#$2: &mut u64 var $t3: bool - var $t4: &mut TestMutRef::V + var $t4: &mut 0x1::TestMutRef::V var $t5: &mut vector var $t6: u64 var $t7: &mut u64 - var $t8: &mut TestMutRef::V + var $t8: &mut 0x1::TestMutRef::V var $t9: &mut vector var $t10: u64 var $t11: &mut u64 @@ -360,14 +360,14 @@ fun TestMutRef::return_ref_different_path_vec($t0|b: bool, $t1|x: &mut TestMutRe 1: if ($t3) goto 2 else goto 9 2: label L1 3: $t4 := move($t1) - 4: $t5 := borrow_field.is($t4) + 4: $t5 := borrow_field<0x1::TestMutRef::V>.is($t4) 5: $t6 := 1 6: $t7 := vector::borrow_mut($t5, $t6) 7: $t2 := $t7 8: goto 16 9: label L0 10: $t8 := move($t1) - 11: $t9 := borrow_field.is($t8) + 11: $t9 := borrow_field<0x1::TestMutRef::V>.is($t8) 12: $t10 := 0 13: $t11 := vector::borrow_mut($t9, $t10) 14: $t2 := $t11 @@ -379,34 +379,34 @@ fun TestMutRef::return_ref_different_path_vec($t0|b: bool, $t1|x: &mut TestMutRe [variant baseline] -fun TestMutRef::return_ref_different_path_vec2($t0|b: bool, $t1|x: &mut TestMutRef::V): &mut u64 { +fun TestMutRef::return_ref_different_path_vec2($t0|b: bool, $t1|x: &mut 0x1::TestMutRef::V): &mut u64 { var $t2|tmp#$2: &mut u64 var $t3: bool - var $t4: &mut TestMutRef::V + var $t4: &mut 0x1::TestMutRef::V var $t5: &mut vector var $t6: u64 var $t7: &mut u64 - var $t8: &mut TestMutRef::V - var $t9: &mut vector + var $t8: &mut 0x1::TestMutRef::V + var $t9: &mut vector<0x1::TestMutRef::T> var $t10: u64 - var $t11: &mut TestMutRef::T + var $t11: &mut 0x1::TestMutRef::T var $t12: &mut u64 var $t13: &mut u64 0: $t3 := move($t0) 1: if ($t3) goto 2 else goto 9 2: label L1 3: $t4 := move($t1) - 4: $t5 := borrow_field.is($t4) + 4: $t5 := borrow_field<0x1::TestMutRef::V>.is($t4) 5: $t6 := 1 6: $t7 := vector::borrow_mut($t5, $t6) 7: $t2 := $t7 8: goto 17 9: label L0 10: $t8 := move($t1) - 11: $t9 := borrow_field.ts($t8) + 11: $t9 := borrow_field<0x1::TestMutRef::V>.ts($t8) 12: $t10 := 0 - 13: $t11 := vector::borrow_mut($t9, $t10) - 14: $t12 := borrow_field.value($t11) + 13: $t11 := vector::borrow_mut<0x1::TestMutRef::T>($t9, $t10) + 14: $t12 := borrow_field<0x1::TestMutRef::T>.value($t11) 15: $t2 := $t12 16: goto 17 17: label L2 @@ -416,14 +416,14 @@ fun TestMutRef::return_ref_different_path_vec2($t0|b: bool, $t1|x: &mut TestMutR [variant baseline] -fun TestMutRef::return_ref_different_root($t0|b: bool, $t1|x: &mut TestMutRef::T, $t2|y: &mut TestMutRef::R): &mut u64 { +fun TestMutRef::return_ref_different_root($t0|b: bool, $t1|x: &mut 0x1::TestMutRef::T, $t2|y: &mut 0x1::TestMutRef::R): &mut u64 { var $t3|tmp#$3: &mut u64 var $t4: bool - var $t5: &mut TestMutRef::R - var $t6: &mut TestMutRef::T + var $t5: &mut 0x1::TestMutRef::R + var $t6: &mut 0x1::TestMutRef::T var $t7: &mut u64 - var $t8: &mut TestMutRef::T - var $t9: &mut TestMutRef::R + var $t8: &mut 0x1::TestMutRef::T + var $t9: &mut 0x1::TestMutRef::R var $t10: &mut u64 var $t11: &mut u64 0: $t4 := move($t0) @@ -432,14 +432,14 @@ fun TestMutRef::return_ref_different_root($t0|b: bool, $t1|x: &mut TestMutRef::T 3: $t5 := move($t2) 4: drop($t5) 5: $t6 := move($t1) - 6: $t7 := borrow_field.value($t6) + 6: $t7 := borrow_field<0x1::TestMutRef::T>.value($t6) 7: $t3 := $t7 8: goto 16 9: label L0 10: $t8 := move($t1) 11: drop($t8) 12: $t9 := move($t2) - 13: $t10 := borrow_field.value($t9) + 13: $t10 := borrow_field<0x1::TestMutRef::R>.value($t9) 14: $t3 := $t10 15: goto 16 16: label L2 @@ -534,24 +534,24 @@ public intrinsic fun vector::swap_remove<#0>($t0|v: &mut vector<#0>, $t1|i: u64) [variant baseline] -fun TestMutRef::call_return_ref_different_path($t0|b: bool): TestMutRef::N { +fun TestMutRef::call_return_ref_different_path($t0|b: bool): 0x1::TestMutRef::N { var $t1|r: &mut u64 [unused] - var $t2|x: TestMutRef::N + var $t2|x: 0x1::TestMutRef::N var $t3: u64 var $t4: u64 - var $t5: TestMutRef::T - var $t6: &mut TestMutRef::N + var $t5: 0x1::TestMutRef::T + var $t6: &mut 0x1::TestMutRef::N var $t7: &mut u64 var $t8: u64 - var $t9: TestMutRef::N + var $t9: 0x1::TestMutRef::N # live_nodes: LocalRoot($t0) 0: $t3 := 1 # live_nodes: LocalRoot($t0) 1: $t4 := 2 # live_nodes: LocalRoot($t0) - 2: $t5 := pack TestMutRef::T($t4) + 2: $t5 := pack 0x1::TestMutRef::T($t4) # live_nodes: LocalRoot($t0) - 3: $t2 := pack TestMutRef::N($t3, $t5) + 3: $t2 := pack 0x1::TestMutRef::N($t3, $t5) # live_nodes: LocalRoot($t0) 4: $t6 := borrow_local($t2) # live_nodes: LocalRoot($t0), Reference($t6) @@ -559,44 +559,44 @@ fun TestMutRef::call_return_ref_different_path($t0|b: bool): TestMutRef::N { # borrows_from: Reference($t6) -> {(@, LocalRoot($t2))} 5: $t7 := TestMutRef::return_ref_different_path($t0, $t6) # live_nodes: LocalRoot($t0), Reference($t7) - # borrowed_by: LocalRoot($t2) -> {(@, Reference($t6))}, Reference($t6) -> {(.value (u64), Reference($t7)), (.t (TestMutRef::T)/.value (u64), Reference($t7))} - # borrows_from: Reference($t6) -> {(@, LocalRoot($t2))}, Reference($t7) -> {(.value (u64), Reference($t6)), (.t (TestMutRef::T)/.value (u64), Reference($t6))} + # borrowed_by: LocalRoot($t2) -> {(@, Reference($t6))}, Reference($t6) -> {(.value (u64), Reference($t7)), (.t (0x1::TestMutRef::T)/.value (u64), Reference($t7))} + # borrows_from: Reference($t6) -> {(@, LocalRoot($t2))}, Reference($t7) -> {(.value (u64), Reference($t6)), (.t (0x1::TestMutRef::T)/.value (u64), Reference($t6))} 6: $t8 := 5 # live_nodes: LocalRoot($t0), Reference($t7) - # borrowed_by: LocalRoot($t2) -> {(@, Reference($t6))}, Reference($t6) -> {(.value (u64), Reference($t7)), (.t (TestMutRef::T)/.value (u64), Reference($t7))} - # borrows_from: Reference($t6) -> {(@, LocalRoot($t2))}, Reference($t7) -> {(.value (u64), Reference($t6)), (.t (TestMutRef::T)/.value (u64), Reference($t6))} + # borrowed_by: LocalRoot($t2) -> {(@, Reference($t6))}, Reference($t6) -> {(.value (u64), Reference($t7)), (.t (0x1::TestMutRef::T)/.value (u64), Reference($t7))} + # borrows_from: Reference($t6) -> {(@, LocalRoot($t2))}, Reference($t7) -> {(.value (u64), Reference($t6)), (.t (0x1::TestMutRef::T)/.value (u64), Reference($t6))} 7: write_ref($t7, $t8) # live_nodes: LocalRoot($t0) - # borrowed_by: LocalRoot($t2) -> {(@, Reference($t6))}, Reference($t6) -> {(.value (u64), Reference($t7)), (.t (TestMutRef::T)/.value (u64), Reference($t7))} - # borrows_from: Reference($t6) -> {(@, LocalRoot($t2))}, Reference($t7) -> {(.value (u64), Reference($t6)), (.t (TestMutRef::T)/.value (u64), Reference($t6))} + # borrowed_by: LocalRoot($t2) -> {(@, Reference($t6))}, Reference($t6) -> {(.value (u64), Reference($t7)), (.t (0x1::TestMutRef::T)/.value (u64), Reference($t7))} + # borrows_from: Reference($t6) -> {(@, LocalRoot($t2))}, Reference($t7) -> {(.value (u64), Reference($t6)), (.t (0x1::TestMutRef::T)/.value (u64), Reference($t6))} 8: $t9 := move($t2) # live_nodes: LocalRoot($t0), LocalRoot($t9) - # borrowed_by: LocalRoot($t2) -> {(@, Reference($t6))}, Reference($t6) -> {(.value (u64), Reference($t7)), (.t (TestMutRef::T)/.value (u64), Reference($t7))} - # borrows_from: Reference($t6) -> {(@, LocalRoot($t2))}, Reference($t7) -> {(.value (u64), Reference($t6)), (.t (TestMutRef::T)/.value (u64), Reference($t6))} + # borrowed_by: LocalRoot($t2) -> {(@, Reference($t6))}, Reference($t6) -> {(.value (u64), Reference($t7)), (.t (0x1::TestMutRef::T)/.value (u64), Reference($t7))} + # borrows_from: Reference($t6) -> {(@, LocalRoot($t2))}, Reference($t7) -> {(.value (u64), Reference($t6)), (.t (0x1::TestMutRef::T)/.value (u64), Reference($t6))} 9: return $t9 } [variant baseline] -fun TestMutRef::call_return_ref_different_path_vec($t0|b: bool): TestMutRef::V { +fun TestMutRef::call_return_ref_different_path_vec($t0|b: bool): 0x1::TestMutRef::V { var $t1|is: vector var $t2|r: &mut u64 [unused] - var $t3|ts: vector [unused] - var $t4|x: TestMutRef::V - var $t5: vector + var $t3|ts: vector<0x1::TestMutRef::T> [unused] + var $t4|x: 0x1::TestMutRef::V + var $t5: vector<0x1::TestMutRef::T> var $t6: &mut vector var $t7: u64 var $t8: &mut vector var $t9: u64 var $t10: vector - var $t11: &mut TestMutRef::V + var $t11: &mut 0x1::TestMutRef::V var $t12: &mut u64 var $t13: u64 - var $t14: TestMutRef::V + var $t14: 0x1::TestMutRef::V # live_nodes: LocalRoot($t0) 0: $t1 := vector::empty() # live_nodes: LocalRoot($t0) - 1: $t5 := vector::empty() + 1: $t5 := vector::empty<0x1::TestMutRef::T>() # live_nodes: LocalRoot($t0) 2: $t6 := borrow_local($t1) # live_nodes: LocalRoot($t0), Reference($t6) @@ -626,7 +626,7 @@ fun TestMutRef::call_return_ref_different_path_vec($t0|b: bool): TestMutRef::V { # live_nodes: LocalRoot($t0), LocalRoot($t10) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t6)), (@, Reference($t8))} # borrows_from: Reference($t6) -> {(@, LocalRoot($t1))}, Reference($t8) -> {(@, LocalRoot($t1))} - 9: $t4 := pack TestMutRef::V($t10, $t5) + 9: $t4 := pack 0x1::TestMutRef::V($t10, $t5) # live_nodes: LocalRoot($t0), LocalRoot($t10) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t6)), (@, Reference($t8))} # borrows_from: Reference($t6) -> {(@, LocalRoot($t1))}, Reference($t8) -> {(@, LocalRoot($t1))} @@ -655,31 +655,31 @@ fun TestMutRef::call_return_ref_different_path_vec($t0|b: bool): TestMutRef::V { [variant baseline] -fun TestMutRef::call_return_ref_different_path_vec2($t0|b: bool): TestMutRef::V { +fun TestMutRef::call_return_ref_different_path_vec2($t0|b: bool): 0x1::TestMutRef::V { var $t1|is: vector var $t2|r: &mut u64 [unused] - var $t3|ts: vector - var $t4|x: TestMutRef::V + var $t3|ts: vector<0x1::TestMutRef::T> + var $t4|x: 0x1::TestMutRef::V var $t5: &mut vector var $t6: u64 var $t7: &mut vector var $t8: u64 - var $t9: &mut vector + var $t9: &mut vector<0x1::TestMutRef::T> var $t10: u64 - var $t11: TestMutRef::T - var $t12: &mut vector + var $t11: 0x1::TestMutRef::T + var $t12: &mut vector<0x1::TestMutRef::T> var $t13: u64 - var $t14: TestMutRef::T + var $t14: 0x1::TestMutRef::T var $t15: vector - var $t16: vector - var $t17: &mut TestMutRef::V + var $t16: vector<0x1::TestMutRef::T> + var $t17: &mut 0x1::TestMutRef::V var $t18: &mut u64 var $t19: u64 - var $t20: TestMutRef::V + var $t20: 0x1::TestMutRef::V # live_nodes: LocalRoot($t0) 0: $t1 := vector::empty() # live_nodes: LocalRoot($t0) - 1: $t3 := vector::empty() + 1: $t3 := vector::empty<0x1::TestMutRef::T>() # live_nodes: LocalRoot($t0) 2: $t5 := borrow_local($t1) # live_nodes: LocalRoot($t0), Reference($t5) @@ -713,11 +713,11 @@ fun TestMutRef::call_return_ref_different_path_vec2($t0|b: bool): TestMutRef::V # live_nodes: LocalRoot($t0), Reference($t9) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9))} # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))} - 10: $t11 := pack TestMutRef::T($t10) + 10: $t11 := pack 0x1::TestMutRef::T($t10) # live_nodes: LocalRoot($t0), Reference($t9) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9))} # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))} - 11: vector::push_back($t9, $t11) + 11: vector::push_back<0x1::TestMutRef::T>($t9, $t11) # live_nodes: LocalRoot($t0) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9))} # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))} @@ -729,11 +729,11 @@ fun TestMutRef::call_return_ref_different_path_vec2($t0|b: bool): TestMutRef::V # live_nodes: LocalRoot($t0), Reference($t12) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))} # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))} - 14: $t14 := pack TestMutRef::T($t13) + 14: $t14 := pack 0x1::TestMutRef::T($t13) # live_nodes: LocalRoot($t0), Reference($t12) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))} # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))} - 15: vector::push_back($t12, $t14) + 15: vector::push_back<0x1::TestMutRef::T>($t12, $t14) # live_nodes: LocalRoot($t0) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))} # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))} @@ -745,7 +745,7 @@ fun TestMutRef::call_return_ref_different_path_vec2($t0|b: bool): TestMutRef::V # live_nodes: LocalRoot($t0), LocalRoot($t15), LocalRoot($t16) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))} # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))} - 18: $t4 := pack TestMutRef::V($t15, $t16) + 18: $t4 := pack 0x1::TestMutRef::V($t15, $t16) # live_nodes: LocalRoot($t0), LocalRoot($t15), LocalRoot($t16) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))} # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))} @@ -755,50 +755,50 @@ fun TestMutRef::call_return_ref_different_path_vec2($t0|b: bool): TestMutRef::V # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))}, Reference($t17) -> {(@, LocalRoot($t4))} 20: $t18 := TestMutRef::return_ref_different_path_vec2($t0, $t17) # live_nodes: LocalRoot($t0), LocalRoot($t15), LocalRoot($t16), Reference($t18) - # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))}, LocalRoot($t4) -> {(@, Reference($t17))}, Reference($t17) -> {(.is (vector)/[], Reference($t18)), (.ts (vector)/[]/.value (u64), Reference($t18))} - # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))}, Reference($t17) -> {(@, LocalRoot($t4))}, Reference($t18) -> {(.is (vector)/[], Reference($t17)), (.ts (vector)/[]/.value (u64), Reference($t17))} + # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))}, LocalRoot($t4) -> {(@, Reference($t17))}, Reference($t17) -> {(.is (vector)/[], Reference($t18)), (.ts (vector<0x1::TestMutRef::T>)/[]/.value (u64), Reference($t18))} + # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))}, Reference($t17) -> {(@, LocalRoot($t4))}, Reference($t18) -> {(.is (vector)/[], Reference($t17)), (.ts (vector<0x1::TestMutRef::T>)/[]/.value (u64), Reference($t17))} 21: $t19 := 5 # live_nodes: LocalRoot($t0), LocalRoot($t15), LocalRoot($t16), Reference($t18) - # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))}, LocalRoot($t4) -> {(@, Reference($t17))}, Reference($t17) -> {(.is (vector)/[], Reference($t18)), (.ts (vector)/[]/.value (u64), Reference($t18))} - # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))}, Reference($t17) -> {(@, LocalRoot($t4))}, Reference($t18) -> {(.is (vector)/[], Reference($t17)), (.ts (vector)/[]/.value (u64), Reference($t17))} + # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))}, LocalRoot($t4) -> {(@, Reference($t17))}, Reference($t17) -> {(.is (vector)/[], Reference($t18)), (.ts (vector<0x1::TestMutRef::T>)/[]/.value (u64), Reference($t18))} + # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))}, Reference($t17) -> {(@, LocalRoot($t4))}, Reference($t18) -> {(.is (vector)/[], Reference($t17)), (.ts (vector<0x1::TestMutRef::T>)/[]/.value (u64), Reference($t17))} 22: write_ref($t18, $t19) # live_nodes: LocalRoot($t0), LocalRoot($t15), LocalRoot($t16) - # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))}, LocalRoot($t4) -> {(@, Reference($t17))}, Reference($t17) -> {(.is (vector)/[], Reference($t18)), (.ts (vector)/[]/.value (u64), Reference($t18))} - # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))}, Reference($t17) -> {(@, LocalRoot($t4))}, Reference($t18) -> {(.is (vector)/[], Reference($t17)), (.ts (vector)/[]/.value (u64), Reference($t17))} + # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))}, LocalRoot($t4) -> {(@, Reference($t17))}, Reference($t17) -> {(.is (vector)/[], Reference($t18)), (.ts (vector<0x1::TestMutRef::T>)/[]/.value (u64), Reference($t18))} + # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))}, Reference($t17) -> {(@, LocalRoot($t4))}, Reference($t18) -> {(.is (vector)/[], Reference($t17)), (.ts (vector<0x1::TestMutRef::T>)/[]/.value (u64), Reference($t17))} 23: $t20 := move($t4) # live_nodes: LocalRoot($t0), LocalRoot($t15), LocalRoot($t16), LocalRoot($t20) - # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))}, LocalRoot($t4) -> {(@, Reference($t17))}, Reference($t17) -> {(.is (vector)/[], Reference($t18)), (.ts (vector)/[]/.value (u64), Reference($t18))} - # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))}, Reference($t17) -> {(@, LocalRoot($t4))}, Reference($t18) -> {(.is (vector)/[], Reference($t17)), (.ts (vector)/[]/.value (u64), Reference($t17))} + # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))}, LocalRoot($t4) -> {(@, Reference($t17))}, Reference($t17) -> {(.is (vector)/[], Reference($t18)), (.ts (vector<0x1::TestMutRef::T>)/[]/.value (u64), Reference($t18))} + # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))}, Reference($t17) -> {(@, LocalRoot($t4))}, Reference($t18) -> {(.is (vector)/[], Reference($t17)), (.ts (vector<0x1::TestMutRef::T>)/[]/.value (u64), Reference($t17))} 24: return $t20 } [variant baseline] -fun TestMutRef::call_return_ref_different_path_vec2_incorrect($t0|b: bool): TestMutRef::V { +fun TestMutRef::call_return_ref_different_path_vec2_incorrect($t0|b: bool): 0x1::TestMutRef::V { var $t1|is: vector var $t2|r: &mut u64 [unused] - var $t3|ts: vector - var $t4|x: TestMutRef::V + var $t3|ts: vector<0x1::TestMutRef::T> + var $t4|x: 0x1::TestMutRef::V var $t5: &mut vector var $t6: u64 var $t7: &mut vector var $t8: u64 - var $t9: &mut vector + var $t9: &mut vector<0x1::TestMutRef::T> var $t10: u64 - var $t11: TestMutRef::T - var $t12: &mut vector + var $t11: 0x1::TestMutRef::T + var $t12: &mut vector<0x1::TestMutRef::T> var $t13: u64 - var $t14: TestMutRef::T + var $t14: 0x1::TestMutRef::T var $t15: vector - var $t16: vector - var $t17: &mut TestMutRef::V + var $t16: vector<0x1::TestMutRef::T> + var $t17: &mut 0x1::TestMutRef::V var $t18: &mut u64 var $t19: u64 - var $t20: TestMutRef::V + var $t20: 0x1::TestMutRef::V # live_nodes: LocalRoot($t0) 0: $t1 := vector::empty() # live_nodes: LocalRoot($t0) - 1: $t3 := vector::empty() + 1: $t3 := vector::empty<0x1::TestMutRef::T>() # live_nodes: LocalRoot($t0) 2: $t5 := borrow_local($t1) # live_nodes: LocalRoot($t0), Reference($t5) @@ -832,11 +832,11 @@ fun TestMutRef::call_return_ref_different_path_vec2_incorrect($t0|b: bool): Test # live_nodes: LocalRoot($t0), Reference($t9) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9))} # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))} - 10: $t11 := pack TestMutRef::T($t10) + 10: $t11 := pack 0x1::TestMutRef::T($t10) # live_nodes: LocalRoot($t0), Reference($t9) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9))} # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))} - 11: vector::push_back($t9, $t11) + 11: vector::push_back<0x1::TestMutRef::T>($t9, $t11) # live_nodes: LocalRoot($t0) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9))} # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))} @@ -848,11 +848,11 @@ fun TestMutRef::call_return_ref_different_path_vec2_incorrect($t0|b: bool): Test # live_nodes: LocalRoot($t0), Reference($t12) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))} # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))} - 14: $t14 := pack TestMutRef::T($t13) + 14: $t14 := pack 0x1::TestMutRef::T($t13) # live_nodes: LocalRoot($t0), Reference($t12) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))} # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))} - 15: vector::push_back($t12, $t14) + 15: vector::push_back<0x1::TestMutRef::T>($t12, $t14) # live_nodes: LocalRoot($t0) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))} # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))} @@ -864,7 +864,7 @@ fun TestMutRef::call_return_ref_different_path_vec2_incorrect($t0|b: bool): Test # live_nodes: LocalRoot($t0), LocalRoot($t15), LocalRoot($t16) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))} # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))} - 18: $t4 := pack TestMutRef::V($t15, $t16) + 18: $t4 := pack 0x1::TestMutRef::V($t15, $t16) # live_nodes: LocalRoot($t0), LocalRoot($t15), LocalRoot($t16) # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))} # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))} @@ -874,45 +874,45 @@ fun TestMutRef::call_return_ref_different_path_vec2_incorrect($t0|b: bool): Test # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))}, Reference($t17) -> {(@, LocalRoot($t4))} 20: $t18 := TestMutRef::return_ref_different_path_vec2($t0, $t17) # live_nodes: LocalRoot($t0), LocalRoot($t15), LocalRoot($t16), Reference($t18) - # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))}, LocalRoot($t4) -> {(@, Reference($t17))}, Reference($t17) -> {(.is (vector)/[], Reference($t18)), (.ts (vector)/[]/.value (u64), Reference($t18))} - # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))}, Reference($t17) -> {(@, LocalRoot($t4))}, Reference($t18) -> {(.is (vector)/[], Reference($t17)), (.ts (vector)/[]/.value (u64), Reference($t17))} + # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))}, LocalRoot($t4) -> {(@, Reference($t17))}, Reference($t17) -> {(.is (vector)/[], Reference($t18)), (.ts (vector<0x1::TestMutRef::T>)/[]/.value (u64), Reference($t18))} + # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))}, Reference($t17) -> {(@, LocalRoot($t4))}, Reference($t18) -> {(.is (vector)/[], Reference($t17)), (.ts (vector<0x1::TestMutRef::T>)/[]/.value (u64), Reference($t17))} 21: $t19 := 0 # live_nodes: LocalRoot($t0), LocalRoot($t15), LocalRoot($t16), Reference($t18) - # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))}, LocalRoot($t4) -> {(@, Reference($t17))}, Reference($t17) -> {(.is (vector)/[], Reference($t18)), (.ts (vector)/[]/.value (u64), Reference($t18))} - # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))}, Reference($t17) -> {(@, LocalRoot($t4))}, Reference($t18) -> {(.is (vector)/[], Reference($t17)), (.ts (vector)/[]/.value (u64), Reference($t17))} + # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))}, LocalRoot($t4) -> {(@, Reference($t17))}, Reference($t17) -> {(.is (vector)/[], Reference($t18)), (.ts (vector<0x1::TestMutRef::T>)/[]/.value (u64), Reference($t18))} + # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))}, Reference($t17) -> {(@, LocalRoot($t4))}, Reference($t18) -> {(.is (vector)/[], Reference($t17)), (.ts (vector<0x1::TestMutRef::T>)/[]/.value (u64), Reference($t17))} 22: write_ref($t18, $t19) # live_nodes: LocalRoot($t0), LocalRoot($t15), LocalRoot($t16) - # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))}, LocalRoot($t4) -> {(@, Reference($t17))}, Reference($t17) -> {(.is (vector)/[], Reference($t18)), (.ts (vector)/[]/.value (u64), Reference($t18))} - # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))}, Reference($t17) -> {(@, LocalRoot($t4))}, Reference($t18) -> {(.is (vector)/[], Reference($t17)), (.ts (vector)/[]/.value (u64), Reference($t17))} + # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))}, LocalRoot($t4) -> {(@, Reference($t17))}, Reference($t17) -> {(.is (vector)/[], Reference($t18)), (.ts (vector<0x1::TestMutRef::T>)/[]/.value (u64), Reference($t18))} + # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))}, Reference($t17) -> {(@, LocalRoot($t4))}, Reference($t18) -> {(.is (vector)/[], Reference($t17)), (.ts (vector<0x1::TestMutRef::T>)/[]/.value (u64), Reference($t17))} 23: $t20 := move($t4) # live_nodes: LocalRoot($t0), LocalRoot($t15), LocalRoot($t16), LocalRoot($t20) - # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))}, LocalRoot($t4) -> {(@, Reference($t17))}, Reference($t17) -> {(.is (vector)/[], Reference($t18)), (.ts (vector)/[]/.value (u64), Reference($t18))} - # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))}, Reference($t17) -> {(@, LocalRoot($t4))}, Reference($t18) -> {(.is (vector)/[], Reference($t17)), (.ts (vector)/[]/.value (u64), Reference($t17))} + # borrowed_by: LocalRoot($t1) -> {(@, Reference($t5)), (@, Reference($t7))}, LocalRoot($t3) -> {(@, Reference($t9)), (@, Reference($t12))}, LocalRoot($t4) -> {(@, Reference($t17))}, Reference($t17) -> {(.is (vector)/[], Reference($t18)), (.ts (vector<0x1::TestMutRef::T>)/[]/.value (u64), Reference($t18))} + # borrows_from: Reference($t5) -> {(@, LocalRoot($t1))}, Reference($t7) -> {(@, LocalRoot($t1))}, Reference($t9) -> {(@, LocalRoot($t3))}, Reference($t12) -> {(@, LocalRoot($t3))}, Reference($t17) -> {(@, LocalRoot($t4))}, Reference($t18) -> {(.is (vector)/[], Reference($t17)), (.ts (vector<0x1::TestMutRef::T>)/[]/.value (u64), Reference($t17))} 24: return $t20 } [variant baseline] -fun TestMutRef::call_return_ref_different_root($t0|b: bool): (TestMutRef::T, TestMutRef::R) { +fun TestMutRef::call_return_ref_different_root($t0|b: bool): (0x1::TestMutRef::T, 0x1::TestMutRef::R) { var $t1|r: &mut u64 [unused] - var $t2|x: TestMutRef::T - var $t3|y: TestMutRef::R + var $t2|x: 0x1::TestMutRef::T + var $t3|y: 0x1::TestMutRef::R var $t4: u64 var $t5: u64 - var $t6: &mut TestMutRef::T - var $t7: &mut TestMutRef::R + var $t6: &mut 0x1::TestMutRef::T + var $t7: &mut 0x1::TestMutRef::R var $t8: &mut u64 var $t9: u64 - var $t10: TestMutRef::T - var $t11: TestMutRef::R + var $t10: 0x1::TestMutRef::T + var $t11: 0x1::TestMutRef::R # live_nodes: LocalRoot($t0) 0: $t4 := 1 # live_nodes: LocalRoot($t0) - 1: $t2 := pack TestMutRef::T($t4) + 1: $t2 := pack 0x1::TestMutRef::T($t4) # live_nodes: LocalRoot($t0) 2: $t5 := 10 # live_nodes: LocalRoot($t0) - 3: $t3 := pack TestMutRef::R($t5) + 3: $t3 := pack 0x1::TestMutRef::R($t5) # live_nodes: LocalRoot($t0) 4: $t6 := borrow_local($t2) # live_nodes: LocalRoot($t0), Reference($t6) @@ -947,15 +947,15 @@ fun TestMutRef::call_return_ref_different_root($t0|b: bool): (TestMutRef::T, Tes [variant baseline] -fun TestMutRef::return_ref_different_path($t0|b: bool, $t1|x: &mut TestMutRef::N): &mut u64 { +fun TestMutRef::return_ref_different_path($t0|b: bool, $t1|x: &mut 0x1::TestMutRef::N): &mut u64 { var $t2|tmp#$2: &mut u64 - var $t3: &mut TestMutRef::T + var $t3: &mut 0x1::TestMutRef::T # live_nodes: LocalRoot($t0), Reference($t1) 0: if ($t0) goto 1 else goto 4 # live_nodes: LocalRoot($t0), Reference($t1) 1: label L1 # live_nodes: LocalRoot($t0), Reference($t1) - 2: $t2 := borrow_field.value($t1) + 2: $t2 := borrow_field<0x1::TestMutRef::N>.value($t1) # live_nodes: LocalRoot($t0), Reference($t2) # borrowed_by: Reference($t1) -> {(.value (u64), Reference($t2))} # borrows_from: Reference($t2) -> {(.value (u64), Reference($t1))} @@ -963,28 +963,28 @@ fun TestMutRef::return_ref_different_path($t0|b: bool, $t1|x: &mut TestMutRef::N # live_nodes: LocalRoot($t0), Reference($t1) 4: label L0 # live_nodes: LocalRoot($t0), Reference($t1) - 5: $t3 := borrow_field.t($t1) + 5: $t3 := borrow_field<0x1::TestMutRef::N>.t($t1) # live_nodes: LocalRoot($t0), Reference($t3) - # borrowed_by: Reference($t1) -> {(.t (TestMutRef::T), Reference($t3))} - # borrows_from: Reference($t3) -> {(.t (TestMutRef::T), Reference($t1))} - 6: $t2 := borrow_field.value($t3) + # borrowed_by: Reference($t1) -> {(.t (0x1::TestMutRef::T), Reference($t3))} + # borrows_from: Reference($t3) -> {(.t (0x1::TestMutRef::T), Reference($t1))} + 6: $t2 := borrow_field<0x1::TestMutRef::T>.value($t3) # live_nodes: LocalRoot($t0), Reference($t2) - # borrowed_by: Reference($t1) -> {(.t (TestMutRef::T), Reference($t3))}, Reference($t3) -> {(.value (u64), Reference($t2))} - # borrows_from: Reference($t2) -> {(.value (u64), Reference($t3))}, Reference($t3) -> {(.t (TestMutRef::T), Reference($t1))} + # borrowed_by: Reference($t1) -> {(.t (0x1::TestMutRef::T), Reference($t3))}, Reference($t3) -> {(.value (u64), Reference($t2))} + # borrows_from: Reference($t2) -> {(.value (u64), Reference($t3))}, Reference($t3) -> {(.t (0x1::TestMutRef::T), Reference($t1))} 7: goto 8 # live_nodes: LocalRoot($t0), Reference($t2) - # borrowed_by: Reference($t1) -> {(.value (u64), Reference($t2)), (.t (TestMutRef::T), Reference($t3))}, Reference($t3) -> {(.value (u64), Reference($t2))} - # borrows_from: Reference($t2) -> {(.value (u64), Reference($t1)), (.value (u64), Reference($t3))}, Reference($t3) -> {(.t (TestMutRef::T), Reference($t1))} + # borrowed_by: Reference($t1) -> {(.value (u64), Reference($t2)), (.t (0x1::TestMutRef::T), Reference($t3))}, Reference($t3) -> {(.value (u64), Reference($t2))} + # borrows_from: Reference($t2) -> {(.value (u64), Reference($t1)), (.value (u64), Reference($t3))}, Reference($t3) -> {(.t (0x1::TestMutRef::T), Reference($t1))} 8: label L2 # live_nodes: LocalRoot($t0), Reference($t2) - # borrowed_by: Reference($t1) -> {(.value (u64), Reference($t2)), (.t (TestMutRef::T), Reference($t3))}, Reference($t3) -> {(.value (u64), Reference($t2))} - # borrows_from: Reference($t2) -> {(.value (u64), Reference($t1)), (.value (u64), Reference($t3))}, Reference($t3) -> {(.t (TestMutRef::T), Reference($t1))} + # borrowed_by: Reference($t1) -> {(.value (u64), Reference($t2)), (.t (0x1::TestMutRef::T), Reference($t3))}, Reference($t3) -> {(.value (u64), Reference($t2))} + # borrows_from: Reference($t2) -> {(.value (u64), Reference($t1)), (.value (u64), Reference($t3))}, Reference($t3) -> {(.t (0x1::TestMutRef::T), Reference($t1))} 9: return $t2 } [variant baseline] -fun TestMutRef::return_ref_different_path_vec($t0|b: bool, $t1|x: &mut TestMutRef::V): &mut u64 { +fun TestMutRef::return_ref_different_path_vec($t0|b: bool, $t1|x: &mut 0x1::TestMutRef::V): &mut u64 { var $t2|tmp#$2: &mut u64 var $t3: &mut vector var $t4: u64 @@ -995,7 +995,7 @@ fun TestMutRef::return_ref_different_path_vec($t0|b: bool, $t1|x: &mut TestMutRe # live_nodes: LocalRoot($t0), Reference($t1) 1: label L1 # live_nodes: LocalRoot($t0), Reference($t1) - 2: $t3 := borrow_field.is($t1) + 2: $t3 := borrow_field<0x1::TestMutRef::V>.is($t1) # live_nodes: LocalRoot($t0), Reference($t3) # borrowed_by: Reference($t1) -> {(.is (vector), Reference($t3))} # borrows_from: Reference($t3) -> {(.is (vector), Reference($t1))} @@ -1011,7 +1011,7 @@ fun TestMutRef::return_ref_different_path_vec($t0|b: bool, $t1|x: &mut TestMutRe # live_nodes: LocalRoot($t0), Reference($t1) 6: label L0 # live_nodes: LocalRoot($t0), Reference($t1) - 7: $t5 := borrow_field.is($t1) + 7: $t5 := borrow_field<0x1::TestMutRef::V>.is($t1) # live_nodes: LocalRoot($t0), Reference($t5) # borrowed_by: Reference($t1) -> {(.is (vector), Reference($t5))} # borrows_from: Reference($t5) -> {(.is (vector), Reference($t1))} @@ -1036,19 +1036,19 @@ fun TestMutRef::return_ref_different_path_vec($t0|b: bool, $t1|x: &mut TestMutRe [variant baseline] -fun TestMutRef::return_ref_different_path_vec2($t0|b: bool, $t1|x: &mut TestMutRef::V): &mut u64 { +fun TestMutRef::return_ref_different_path_vec2($t0|b: bool, $t1|x: &mut 0x1::TestMutRef::V): &mut u64 { var $t2|tmp#$2: &mut u64 var $t3: &mut vector var $t4: u64 - var $t5: &mut vector + var $t5: &mut vector<0x1::TestMutRef::T> var $t6: u64 - var $t7: &mut TestMutRef::T + var $t7: &mut 0x1::TestMutRef::T # live_nodes: LocalRoot($t0), Reference($t1) 0: if ($t0) goto 1 else goto 6 # live_nodes: LocalRoot($t0), Reference($t1) 1: label L1 # live_nodes: LocalRoot($t0), Reference($t1) - 2: $t3 := borrow_field.is($t1) + 2: $t3 := borrow_field<0x1::TestMutRef::V>.is($t1) # live_nodes: LocalRoot($t0), Reference($t3) # borrowed_by: Reference($t1) -> {(.is (vector), Reference($t3))} # borrows_from: Reference($t3) -> {(.is (vector), Reference($t1))} @@ -1064,36 +1064,36 @@ fun TestMutRef::return_ref_different_path_vec2($t0|b: bool, $t1|x: &mut TestMutR # live_nodes: LocalRoot($t0), Reference($t1) 6: label L0 # live_nodes: LocalRoot($t0), Reference($t1) - 7: $t5 := borrow_field.ts($t1) + 7: $t5 := borrow_field<0x1::TestMutRef::V>.ts($t1) # live_nodes: LocalRoot($t0), Reference($t5) - # borrowed_by: Reference($t1) -> {(.ts (vector), Reference($t5))} - # borrows_from: Reference($t5) -> {(.ts (vector), Reference($t1))} + # borrowed_by: Reference($t1) -> {(.ts (vector<0x1::TestMutRef::T>), Reference($t5))} + # borrows_from: Reference($t5) -> {(.ts (vector<0x1::TestMutRef::T>), Reference($t1))} 8: $t6 := 0 # live_nodes: LocalRoot($t0), Reference($t5) - # borrowed_by: Reference($t1) -> {(.ts (vector), Reference($t5))} - # borrows_from: Reference($t5) -> {(.ts (vector), Reference($t1))} - 9: $t7 := vector::borrow_mut($t5, $t6) + # borrowed_by: Reference($t1) -> {(.ts (vector<0x1::TestMutRef::T>), Reference($t5))} + # borrows_from: Reference($t5) -> {(.ts (vector<0x1::TestMutRef::T>), Reference($t1))} + 9: $t7 := vector::borrow_mut<0x1::TestMutRef::T>($t5, $t6) # live_nodes: LocalRoot($t0), Reference($t7) - # borrowed_by: Reference($t1) -> {(.ts (vector), Reference($t5))}, Reference($t5) -> {([], Reference($t7))} - # borrows_from: Reference($t5) -> {(.ts (vector), Reference($t1))}, Reference($t7) -> {([], Reference($t5))} - 10: $t2 := borrow_field.value($t7) + # borrowed_by: Reference($t1) -> {(.ts (vector<0x1::TestMutRef::T>), Reference($t5))}, Reference($t5) -> {([], Reference($t7))} + # borrows_from: Reference($t5) -> {(.ts (vector<0x1::TestMutRef::T>), Reference($t1))}, Reference($t7) -> {([], Reference($t5))} + 10: $t2 := borrow_field<0x1::TestMutRef::T>.value($t7) # live_nodes: LocalRoot($t0), Reference($t2) - # borrowed_by: Reference($t1) -> {(.ts (vector), Reference($t5))}, Reference($t5) -> {([], Reference($t7))}, Reference($t7) -> {(.value (u64), Reference($t2))} - # borrows_from: Reference($t2) -> {(.value (u64), Reference($t7))}, Reference($t5) -> {(.ts (vector), Reference($t1))}, Reference($t7) -> {([], Reference($t5))} + # borrowed_by: Reference($t1) -> {(.ts (vector<0x1::TestMutRef::T>), Reference($t5))}, Reference($t5) -> {([], Reference($t7))}, Reference($t7) -> {(.value (u64), Reference($t2))} + # borrows_from: Reference($t2) -> {(.value (u64), Reference($t7))}, Reference($t5) -> {(.ts (vector<0x1::TestMutRef::T>), Reference($t1))}, Reference($t7) -> {([], Reference($t5))} 11: goto 12 # live_nodes: LocalRoot($t0), Reference($t2) - # borrowed_by: Reference($t1) -> {(.is (vector), Reference($t3)), (.ts (vector), Reference($t5))}, Reference($t3) -> {([], Reference($t2))}, Reference($t5) -> {([], Reference($t7))}, Reference($t7) -> {(.value (u64), Reference($t2))} - # borrows_from: Reference($t2) -> {([], Reference($t3)), (.value (u64), Reference($t7))}, Reference($t3) -> {(.is (vector), Reference($t1))}, Reference($t5) -> {(.ts (vector), Reference($t1))}, Reference($t7) -> {([], Reference($t5))} + # borrowed_by: Reference($t1) -> {(.is (vector), Reference($t3)), (.ts (vector<0x1::TestMutRef::T>), Reference($t5))}, Reference($t3) -> {([], Reference($t2))}, Reference($t5) -> {([], Reference($t7))}, Reference($t7) -> {(.value (u64), Reference($t2))} + # borrows_from: Reference($t2) -> {([], Reference($t3)), (.value (u64), Reference($t7))}, Reference($t3) -> {(.is (vector), Reference($t1))}, Reference($t5) -> {(.ts (vector<0x1::TestMutRef::T>), Reference($t1))}, Reference($t7) -> {([], Reference($t5))} 12: label L2 # live_nodes: LocalRoot($t0), Reference($t2) - # borrowed_by: Reference($t1) -> {(.is (vector), Reference($t3)), (.ts (vector), Reference($t5))}, Reference($t3) -> {([], Reference($t2))}, Reference($t5) -> {([], Reference($t7))}, Reference($t7) -> {(.value (u64), Reference($t2))} - # borrows_from: Reference($t2) -> {([], Reference($t3)), (.value (u64), Reference($t7))}, Reference($t3) -> {(.is (vector), Reference($t1))}, Reference($t5) -> {(.ts (vector), Reference($t1))}, Reference($t7) -> {([], Reference($t5))} + # borrowed_by: Reference($t1) -> {(.is (vector), Reference($t3)), (.ts (vector<0x1::TestMutRef::T>), Reference($t5))}, Reference($t3) -> {([], Reference($t2))}, Reference($t5) -> {([], Reference($t7))}, Reference($t7) -> {(.value (u64), Reference($t2))} + # borrows_from: Reference($t2) -> {([], Reference($t3)), (.value (u64), Reference($t7))}, Reference($t3) -> {(.is (vector), Reference($t1))}, Reference($t5) -> {(.ts (vector<0x1::TestMutRef::T>), Reference($t1))}, Reference($t7) -> {([], Reference($t5))} 13: return $t2 } [variant baseline] -fun TestMutRef::return_ref_different_root($t0|b: bool, $t1|x: &mut TestMutRef::T, $t2|y: &mut TestMutRef::R): &mut u64 { +fun TestMutRef::return_ref_different_root($t0|b: bool, $t1|x: &mut 0x1::TestMutRef::T, $t2|y: &mut 0x1::TestMutRef::R): &mut u64 { var $t3|tmp#$3: &mut u64 # live_nodes: LocalRoot($t0), Reference($t1), Reference($t2) 0: if ($t0) goto 1 else goto 5 @@ -1102,7 +1102,7 @@ fun TestMutRef::return_ref_different_root($t0|b: bool, $t1|x: &mut TestMutRef::T # live_nodes: LocalRoot($t0), Reference($t1), Reference($t2) 2: drop($t2) # live_nodes: LocalRoot($t0), Reference($t1) - 3: $t3 := borrow_field.value($t1) + 3: $t3 := borrow_field<0x1::TestMutRef::T>.value($t1) # live_nodes: LocalRoot($t0), Reference($t3) # borrowed_by: Reference($t1) -> {(.value (u64), Reference($t3))} # borrows_from: Reference($t3) -> {(.value (u64), Reference($t1))} @@ -1112,7 +1112,7 @@ fun TestMutRef::return_ref_different_root($t0|b: bool, $t1|x: &mut TestMutRef::T # live_nodes: LocalRoot($t0), Reference($t1), Reference($t2) 6: drop($t1) # live_nodes: LocalRoot($t0), Reference($t2) - 7: $t3 := borrow_field.value($t2) + 7: $t3 := borrow_field<0x1::TestMutRef::R>.value($t2) # live_nodes: LocalRoot($t0), Reference($t3) # borrowed_by: Reference($t2) -> {(.value (u64), Reference($t3))} # borrows_from: Reference($t3) -> {(.value (u64), Reference($t2))} @@ -1136,16 +1136,16 @@ borrowed_by: Reference($t0) -> {([], Return(0))} borrows_from: Return(0) -> {([], Reference($t0))} fun TestMutRef::return_ref_different_path[baseline] -borrowed_by: Reference($t1) -> {(.value (u64), Return(0)), (.t (TestMutRef::T)/.value (u64), Return(0))} -borrows_from: Return(0) -> {(.value (u64), Reference($t1)), (.t (TestMutRef::T)/.value (u64), Reference($t1))} +borrowed_by: Reference($t1) -> {(.value (u64), Return(0)), (.t (0x1::TestMutRef::T)/.value (u64), Return(0))} +borrows_from: Return(0) -> {(.value (u64), Reference($t1)), (.t (0x1::TestMutRef::T)/.value (u64), Reference($t1))} fun TestMutRef::return_ref_different_path_vec[baseline] borrowed_by: Reference($t1) -> {(.is (vector)/[], Return(0))} borrows_from: Return(0) -> {(.is (vector)/[], Reference($t1))} fun TestMutRef::return_ref_different_path_vec2[baseline] -borrowed_by: Reference($t1) -> {(.is (vector)/[], Return(0)), (.ts (vector)/[]/.value (u64), Return(0))} -borrows_from: Return(0) -> {(.is (vector)/[], Reference($t1)), (.ts (vector)/[]/.value (u64), Reference($t1))} +borrowed_by: Reference($t1) -> {(.is (vector)/[], Return(0)), (.ts (vector<0x1::TestMutRef::T>)/[]/.value (u64), Return(0))} +borrows_from: Return(0) -> {(.is (vector)/[], Reference($t1)), (.ts (vector<0x1::TestMutRef::T>)/[]/.value (u64), Reference($t1))} fun TestMutRef::return_ref_different_root[baseline] borrowed_by: Reference($t1) -> {(.value (u64), Return(0))}, Reference($t2) -> {(.value (u64), Return(0))} diff --git a/third_party/move/move-model/bytecode/tests/from_move/regression_generic_and_native_type.exp b/third_party/move/move-model/bytecode/tests/from_move/regression_generic_and_native_type.exp index 3adb0bf62745c..5bb62d0aeccad 100644 --- a/third_party/move/move-model/bytecode/tests/from_move/regression_generic_and_native_type.exp +++ b/third_party/move/move-model/bytecode/tests/from_move/regression_generic_and_native_type.exp @@ -96,66 +96,66 @@ public native fun signer::borrow_address($t0|s: &signer): &address; [variant baseline] public fun Diem::market_cap<#0>(): u128 { var $t0: address - var $t1: &Diem::Info<#0> + var $t1: &0x1::Diem::Info<#0> var $t2: &u128 var $t3: u128 0: $t0 := 0xa550c18 - 1: $t1 := borrow_global>($t0) - 2: $t2 := borrow_field>.total_value($t1) + 1: $t1 := borrow_global<0x1::Diem::Info<#0>>($t0) + 2: $t2 := borrow_field<0x1::Diem::Info<#0>>.total_value($t1) 3: $t3 := read_ref($t2) 4: return $t3 } [variant baseline] -public fun Diem::preburn<#0>($t0|preburn_ref: &mut Diem::Preburn<#0>, $t1|coin: Diem::T<#0>) { +public fun Diem::preburn<#0>($t0|preburn_ref: &mut 0x1::Diem::Preburn<#0>, $t1|coin: 0x1::Diem::T<#0>) { var $t2|coin_value: u64 - var $t3|market_cap: &mut Diem::Info<#0> - var $t4: &Diem::T<#0> + var $t3|market_cap: &mut 0x1::Diem::Info<#0> + var $t4: &0x1::Diem::T<#0> var $t5: u64 - var $t6: &mut Diem::Preburn<#0> - var $t7: &mut vector> - var $t8: Diem::T<#0> + var $t6: &mut 0x1::Diem::Preburn<#0> + var $t7: &mut vector<0x1::Diem::T<#0>> + var $t8: 0x1::Diem::T<#0> var $t9: address - var $t10: &mut Diem::Info<#0> - var $t11: &mut Diem::Info<#0> + var $t10: &mut 0x1::Diem::Info<#0> + var $t11: &mut 0x1::Diem::Info<#0> var $t12: &u64 var $t13: u64 var $t14: u64 var $t15: u64 - var $t16: &mut Diem::Info<#0> + var $t16: &mut 0x1::Diem::Info<#0> var $t17: &mut u64 0: $t4 := borrow_local($t1) 1: $t5 := Diem::value<#0>($t4) 2: $t2 := $t5 3: $t6 := move($t0) - 4: $t7 := borrow_field>.requests($t6) + 4: $t7 := borrow_field<0x1::Diem::Preburn<#0>>.requests($t6) 5: $t8 := move($t1) - 6: vector::push_back>($t7, $t8) + 6: vector::push_back<0x1::Diem::T<#0>>($t7, $t8) 7: $t9 := 0xa550c18 - 8: $t10 := borrow_global>($t9) + 8: $t10 := borrow_global<0x1::Diem::Info<#0>>($t9) 9: $t3 := $t10 10: $t11 := copy($t3) - 11: $t12 := borrow_field>.preburn_value($t11) + 11: $t12 := borrow_field<0x1::Diem::Info<#0>>.preburn_value($t11) 12: $t13 := read_ref($t12) 13: $t14 := move($t2) 14: $t15 := +($t13, $t14) 15: $t16 := move($t3) - 16: $t17 := borrow_field>.preburn_value($t16) + 16: $t17 := borrow_field<0x1::Diem::Info<#0>>.preburn_value($t16) 17: write_ref($t17, $t15) 18: return () } [variant baseline] -public fun Diem::preburn_to<#0>($t0|account: &signer, $t1|coin: Diem::T<#0>) { +public fun Diem::preburn_to<#0>($t0|account: &signer, $t1|coin: 0x1::Diem::T<#0>) { var $t2: &signer var $t3: address - var $t4: &mut Diem::Preburn<#0> - var $t5: Diem::T<#0> + var $t4: &mut 0x1::Diem::Preburn<#0> + var $t5: 0x1::Diem::T<#0> 0: $t2 := move($t0) 1: $t3 := signer::address_of($t2) - 2: $t4 := borrow_global>($t3) + 2: $t4 := borrow_global<0x1::Diem::Preburn<#0>>($t3) 3: $t5 := move($t1) 4: Diem::preburn<#0>($t4, $t5) 5: return () @@ -165,24 +165,24 @@ public fun Diem::preburn_to<#0>($t0|account: &signer, $t1|coin: Diem::T<#0>) { [variant baseline] public fun Diem::preburn_value<#0>(): u64 { var $t0: address - var $t1: &Diem::Info<#0> + var $t1: &0x1::Diem::Info<#0> var $t2: &u64 var $t3: u64 0: $t0 := 0xa550c18 - 1: $t1 := borrow_global>($t0) - 2: $t2 := borrow_field>.preburn_value($t1) + 1: $t1 := borrow_global<0x1::Diem::Info<#0>>($t0) + 2: $t2 := borrow_field<0x1::Diem::Info<#0>>.preburn_value($t1) 3: $t3 := read_ref($t2) 4: return $t3 } [variant baseline] -public fun Diem::value<#0>($t0|coin_ref: &Diem::T<#0>): u64 { - var $t1: &Diem::T<#0> +public fun Diem::value<#0>($t0|coin_ref: &0x1::Diem::T<#0>): u64 { + var $t1: &0x1::Diem::T<#0> var $t2: &u64 var $t3: u64 0: $t1 := move($t0) - 1: $t2 := borrow_field>.value($t1) + 1: $t2 := borrow_field<0x1::Diem::T<#0>>.value($t1) 2: $t3 := read_ref($t2) 3: return $t3 } diff --git a/third_party/move/move-model/bytecode/tests/from_move/smoke_test.exp b/third_party/move/move-model/bytecode/tests/from_move/smoke_test.exp index ba97b2cb44214..f2d331aa38554 100644 --- a/third_party/move/move-model/bytecode/tests/from_move/smoke_test.exp +++ b/third_party/move/move-model/bytecode/tests/from_move/smoke_test.exp @@ -123,14 +123,14 @@ fun SmokeTest::bool_ops($t0|a: u64, $t1|b: u64): (bool, bool) { [variant baseline] fun SmokeTest::borrow_global_mut_test($t0|a: address) { var $t1: address - var $t2: &mut SmokeTest::R + var $t2: &mut 0x42::SmokeTest::R var $t3: address - var $t4: &mut SmokeTest::R + var $t4: &mut 0x42::SmokeTest::R 0: $t1 := copy($t0) - 1: $t2 := borrow_global($t1) + 1: $t2 := borrow_global<0x42::SmokeTest::R>($t1) 2: drop($t2) 3: $t3 := move($t0) - 4: $t4 := borrow_global($t3) + 4: $t4 := borrow_global<0x42::SmokeTest::R>($t3) 5: drop($t4) 6: return () } @@ -140,11 +140,11 @@ fun SmokeTest::borrow_global_mut_test($t0|a: address) { fun SmokeTest::create_resource($t0|sender: &signer) { var $t1: &signer var $t2: u64 - var $t3: SmokeTest::R + var $t3: 0x42::SmokeTest::R 0: $t1 := move($t0) 1: $t2 := 1 - 2: $t3 := pack SmokeTest::R($t2) - 3: move_to($t3, $t1) + 2: $t3 := pack 0x42::SmokeTest::R($t2) + 3: move_to<0x42::SmokeTest::R>($t3, $t1) 4: return () } @@ -153,11 +153,11 @@ fun SmokeTest::create_resource($t0|sender: &signer) { fun SmokeTest::create_resoure_generic($t0|sender: &signer) { var $t1: &signer var $t2: u64 - var $t3: SmokeTest::G + var $t3: 0x42::SmokeTest::G 0: $t1 := move($t0) 1: $t2 := 1 - 2: $t3 := pack SmokeTest::G($t2) - 3: move_to>($t3, $t1) + 2: $t3 := pack 0x42::SmokeTest::G($t2) + 3: move_to<0x42::SmokeTest::G>($t3, $t1) 4: return () } @@ -169,16 +169,16 @@ fun SmokeTest::exists_resource($t0|sender: &signer): bool { var $t3: bool 0: $t1 := move($t0) 1: $t2 := signer::address_of($t1) - 2: $t3 := exists($t2) + 2: $t3 := exists<0x42::SmokeTest::R>($t2) 3: return $t3 } [variant baseline] -fun SmokeTest::identity($t0|a: SmokeTest::A, $t1|b: SmokeTest::B, $t2|c: SmokeTest::C): (SmokeTest::A, SmokeTest::B, SmokeTest::C) { - var $t3: SmokeTest::A - var $t4: SmokeTest::B - var $t5: SmokeTest::C +fun SmokeTest::identity($t0|a: 0x42::SmokeTest::A, $t1|b: 0x42::SmokeTest::B, $t2|c: 0x42::SmokeTest::C): (0x42::SmokeTest::A, 0x42::SmokeTest::B, 0x42::SmokeTest::C) { + var $t3: 0x42::SmokeTest::A + var $t4: 0x42::SmokeTest::B + var $t5: 0x42::SmokeTest::C 0: $t3 := move($t0) 1: $t4 := move($t1) 2: $t5 := move($t2) @@ -189,11 +189,11 @@ fun SmokeTest::identity($t0|a: SmokeTest::A, $t1|b: SmokeTest::B, $t2|c: SmokeTe [variant baseline] fun SmokeTest::move_from_addr($t0|a: address) { var $t1: address - var $t2: SmokeTest::R + var $t2: 0x42::SmokeTest::R var $t3: u64 0: $t1 := move($t0) - 1: $t2 := move_from($t1) - 2: $t3 := unpack SmokeTest::R($t2) + 1: $t2 := move_from<0x42::SmokeTest::R>($t1) + 2: $t3 := unpack 0x42::SmokeTest::R($t2) 3: drop($t3) 4: return () } @@ -203,121 +203,121 @@ fun SmokeTest::move_from_addr($t0|a: address) { fun SmokeTest::move_from_addr_to_sender($t0|sender: &signer, $t1|a: address) { var $t2|x: u64 var $t3: address - var $t4: SmokeTest::R + var $t4: 0x42::SmokeTest::R var $t5: u64 var $t6: &signer var $t7: u64 - var $t8: SmokeTest::R + var $t8: 0x42::SmokeTest::R 0: $t3 := move($t1) - 1: $t4 := move_from($t3) - 2: $t5 := unpack SmokeTest::R($t4) + 1: $t4 := move_from<0x42::SmokeTest::R>($t3) + 2: $t5 := unpack 0x42::SmokeTest::R($t4) 3: $t2 := $t5 4: $t6 := move($t0) 5: $t7 := move($t2) - 6: $t8 := pack SmokeTest::R($t7) - 7: move_to($t8, $t6) + 6: $t8 := pack 0x42::SmokeTest::R($t7) + 7: move_to<0x42::SmokeTest::R>($t8, $t6) 8: return () } [variant baseline] -fun SmokeTest::pack_A($t0|a: address, $t1|va: u64): SmokeTest::A { +fun SmokeTest::pack_A($t0|a: address, $t1|va: u64): 0x42::SmokeTest::A { var $t2: address var $t3: u64 - var $t4: SmokeTest::A + var $t4: 0x42::SmokeTest::A 0: $t2 := move($t0) 1: $t3 := move($t1) - 2: $t4 := pack SmokeTest::A($t2, $t3) + 2: $t4 := pack 0x42::SmokeTest::A($t2, $t3) 3: return $t4 } [variant baseline] -fun SmokeTest::pack_B($t0|a: address, $t1|va: u64, $t2|vb: u64): SmokeTest::B { - var $t3|var_a: SmokeTest::A +fun SmokeTest::pack_B($t0|a: address, $t1|va: u64, $t2|vb: u64): 0x42::SmokeTest::B { + var $t3|var_a: 0x42::SmokeTest::A var $t4: address var $t5: u64 - var $t6: SmokeTest::A + var $t6: 0x42::SmokeTest::A var $t7: u64 - var $t8: SmokeTest::A - var $t9: SmokeTest::B + var $t8: 0x42::SmokeTest::A + var $t9: 0x42::SmokeTest::B 0: $t4 := move($t0) 1: $t5 := move($t1) - 2: $t6 := pack SmokeTest::A($t4, $t5) + 2: $t6 := pack 0x42::SmokeTest::A($t4, $t5) 3: $t3 := $t6 4: $t7 := move($t2) 5: $t8 := move($t3) - 6: $t9 := pack SmokeTest::B($t7, $t8) + 6: $t9 := pack 0x42::SmokeTest::B($t7, $t8) 7: return $t9 } [variant baseline] -fun SmokeTest::pack_C($t0|a: address, $t1|va: u64, $t2|vb: u64, $t3|vc: u64): SmokeTest::C { - var $t4|var_a: SmokeTest::A - var $t5|var_b: SmokeTest::B +fun SmokeTest::pack_C($t0|a: address, $t1|va: u64, $t2|vb: u64, $t3|vc: u64): 0x42::SmokeTest::C { + var $t4|var_a: 0x42::SmokeTest::A + var $t5|var_b: 0x42::SmokeTest::B var $t6: address var $t7: u64 - var $t8: SmokeTest::A + var $t8: 0x42::SmokeTest::A var $t9: u64 - var $t10: SmokeTest::A - var $t11: SmokeTest::B + var $t10: 0x42::SmokeTest::A + var $t11: 0x42::SmokeTest::B var $t12: u64 - var $t13: SmokeTest::B - var $t14: SmokeTest::C + var $t13: 0x42::SmokeTest::B + var $t14: 0x42::SmokeTest::C 0: $t6 := move($t0) 1: $t7 := move($t1) - 2: $t8 := pack SmokeTest::A($t6, $t7) + 2: $t8 := pack 0x42::SmokeTest::A($t6, $t7) 3: $t4 := $t8 4: $t9 := move($t2) 5: $t10 := move($t4) - 6: $t11 := pack SmokeTest::B($t9, $t10) + 6: $t11 := pack 0x42::SmokeTest::B($t9, $t10) 7: $t5 := $t11 8: $t12 := move($t3) 9: $t13 := move($t5) - 10: $t14 := pack SmokeTest::C($t12, $t13) + 10: $t14 := pack 0x42::SmokeTest::C($t12, $t13) 11: return $t14 } [variant baseline] -fun SmokeTest::ref_A($t0|a: address, $t1|b: bool): SmokeTest::A { - var $t2|tmp#$2: SmokeTest::A - var $t3|var_a: SmokeTest::A +fun SmokeTest::ref_A($t0|a: address, $t1|b: bool): 0x42::SmokeTest::A { + var $t2|tmp#$2: 0x42::SmokeTest::A + var $t3|var_a: 0x42::SmokeTest::A var $t4: bool var $t5: address var $t6: u64 - var $t7: SmokeTest::A + var $t7: 0x42::SmokeTest::A var $t8: address var $t9: u64 - var $t10: SmokeTest::A - var $t11: SmokeTest::A - var $t12: &SmokeTest::A + var $t10: 0x42::SmokeTest::A + var $t11: 0x42::SmokeTest::A + var $t12: &0x42::SmokeTest::A var $t13: &u64 var $t14: u64 var $t15: u64 var $t16: bool var $t17: u64 - var $t18: SmokeTest::A + var $t18: 0x42::SmokeTest::A 0: $t4 := move($t1) 1: if ($t4) goto 2 else goto 8 2: label L1 3: $t5 := move($t0) 4: $t6 := 1 - 5: $t7 := pack SmokeTest::A($t5, $t6) + 5: $t7 := pack 0x42::SmokeTest::A($t5, $t6) 6: $t2 := $t7 7: goto 14 8: label L0 9: $t8 := move($t0) 10: $t9 := 42 - 11: $t10 := pack SmokeTest::A($t8, $t9) + 11: $t10 := pack 0x42::SmokeTest::A($t8, $t9) 12: $t2 := $t10 13: goto 14 14: label L2 15: $t11 := move($t2) 16: $t3 := $t11 17: $t12 := borrow_local($t3) - 18: $t13 := borrow_field.val($t12) + 18: $t13 := borrow_field<0x42::SmokeTest::A>.val($t12) 19: $t14 := read_ref($t13) 20: $t15 := 42 21: $t16 := !=($t14, $t15) @@ -335,13 +335,13 @@ fun SmokeTest::ref_A($t0|a: address, $t1|b: bool): SmokeTest::A { fun SmokeTest::unpack_A($t0|a: address, $t1|va: u64): (address, u64) { var $t2: address var $t3: u64 - var $t4: SmokeTest::A + var $t4: 0x42::SmokeTest::A var $t5: address var $t6: u64 0: $t2 := move($t0) 1: $t3 := move($t1) - 2: $t4 := pack SmokeTest::A($t2, $t3) - 3: ($t5, $t6) := unpack SmokeTest::A($t4) + 2: $t4 := pack 0x42::SmokeTest::A($t2, $t3) + 3: ($t5, $t6) := unpack 0x42::SmokeTest::A($t4) 4: return ($t5, $t6) } @@ -351,15 +351,15 @@ fun SmokeTest::unpack_B($t0|a: address, $t1|va: u64, $t2|vb: u64): (address, u64 var $t3|aa: address var $t4|v1: u64 var $t5|v2: u64 - var $t6|var_a: SmokeTest::A + var $t6|var_a: 0x42::SmokeTest::A var $t7: address var $t8: u64 - var $t9: SmokeTest::A + var $t9: 0x42::SmokeTest::A var $t10: u64 - var $t11: SmokeTest::A - var $t12: SmokeTest::B + var $t11: 0x42::SmokeTest::A + var $t12: 0x42::SmokeTest::B var $t13: u64 - var $t14: SmokeTest::A + var $t14: 0x42::SmokeTest::A var $t15: address var $t16: u64 var $t17: address @@ -367,13 +367,13 @@ fun SmokeTest::unpack_B($t0|a: address, $t1|va: u64, $t2|vb: u64): (address, u64 var $t19: u64 0: $t7 := move($t0) 1: $t8 := move($t1) - 2: $t9 := pack SmokeTest::A($t7, $t8) + 2: $t9 := pack 0x42::SmokeTest::A($t7, $t8) 3: $t6 := $t9 4: $t10 := move($t2) 5: $t11 := move($t6) - 6: $t12 := pack SmokeTest::B($t10, $t11) - 7: ($t13, $t14) := unpack SmokeTest::B($t12) - 8: ($t15, $t16) := unpack SmokeTest::A($t14) + 6: $t12 := pack 0x42::SmokeTest::B($t10, $t11) + 7: ($t13, $t14) := unpack 0x42::SmokeTest::B($t12) + 8: ($t15, $t16) := unpack 0x42::SmokeTest::A($t14) 9: $t4 := $t16 10: $t3 := $t15 11: $t5 := $t13 @@ -390,21 +390,21 @@ fun SmokeTest::unpack_C($t0|a: address, $t1|va: u64, $t2|vb: u64, $t3|vc: u64): var $t5|v1: u64 var $t6|v2: u64 var $t7|v3: u64 - var $t8|var_a: SmokeTest::A - var $t9|var_b: SmokeTest::B + var $t8|var_a: 0x42::SmokeTest::A + var $t9|var_b: 0x42::SmokeTest::B var $t10: address var $t11: u64 - var $t12: SmokeTest::A + var $t12: 0x42::SmokeTest::A var $t13: u64 - var $t14: SmokeTest::A - var $t15: SmokeTest::B + var $t14: 0x42::SmokeTest::A + var $t15: 0x42::SmokeTest::B var $t16: u64 - var $t17: SmokeTest::B - var $t18: SmokeTest::C + var $t17: 0x42::SmokeTest::B + var $t18: 0x42::SmokeTest::C var $t19: u64 - var $t20: SmokeTest::B + var $t20: 0x42::SmokeTest::B var $t21: u64 - var $t22: SmokeTest::A + var $t22: 0x42::SmokeTest::A var $t23: address var $t24: u64 var $t25: address @@ -413,18 +413,18 @@ fun SmokeTest::unpack_C($t0|a: address, $t1|va: u64, $t2|vb: u64, $t3|vc: u64): var $t28: u64 0: $t10 := move($t0) 1: $t11 := move($t1) - 2: $t12 := pack SmokeTest::A($t10, $t11) + 2: $t12 := pack 0x42::SmokeTest::A($t10, $t11) 3: $t8 := $t12 4: $t13 := move($t2) 5: $t14 := move($t8) - 6: $t15 := pack SmokeTest::B($t13, $t14) + 6: $t15 := pack 0x42::SmokeTest::B($t13, $t14) 7: $t9 := $t15 8: $t16 := move($t3) 9: $t17 := move($t9) - 10: $t18 := pack SmokeTest::C($t16, $t17) - 11: ($t19, $t20) := unpack SmokeTest::C($t18) - 12: ($t21, $t22) := unpack SmokeTest::B($t20) - 13: ($t23, $t24) := unpack SmokeTest::A($t22) + 10: $t18 := pack 0x42::SmokeTest::C($t16, $t17) + 11: ($t19, $t20) := unpack 0x42::SmokeTest::C($t18) + 12: ($t21, $t22) := unpack 0x42::SmokeTest::B($t20) + 13: ($t23, $t24) := unpack 0x42::SmokeTest::A($t22) 14: $t5 := $t24 15: $t4 := $t23 16: $t6 := $t21 diff --git a/third_party/move/move-model/bytecode/tests/livevar/basic_test.exp b/third_party/move/move-model/bytecode/tests/livevar/basic_test.exp index b86f412b221d5..d5f62b2d210b4 100644 --- a/third_party/move/move-model/bytecode/tests/livevar/basic_test.exp +++ b/third_party/move/move-model/bytecode/tests/livevar/basic_test.exp @@ -1,12 +1,12 @@ ============ initial translation from Move ================ [variant baseline] -fun TestLiveVars::test1($t0|r_ref: &TestLiveVars::R): u64 { - var $t1: &TestLiveVars::R +fun TestLiveVars::test1($t0|r_ref: &0x42::TestLiveVars::R): u64 { + var $t1: &0x42::TestLiveVars::R var $t2: &u64 var $t3: u64 0: $t1 := move($t0) - 1: $t2 := borrow_field.x($t1) + 1: $t2 := borrow_field<0x42::TestLiveVars::R>.x($t1) 2: $t3 := read_ref($t2) 3: return $t3 } @@ -14,24 +14,24 @@ fun TestLiveVars::test1($t0|r_ref: &TestLiveVars::R): u64 { [variant baseline] fun TestLiveVars::test2($t0|b: bool): u64 { - var $t1|r1: TestLiveVars::R - var $t2|r2: TestLiveVars::R - var $t3|r_ref: &TestLiveVars::R + var $t1|r1: 0x42::TestLiveVars::R + var $t2|r2: 0x42::TestLiveVars::R + var $t3|r_ref: &0x42::TestLiveVars::R var $t4: u64 - var $t5: TestLiveVars::R + var $t5: 0x42::TestLiveVars::R var $t6: u64 - var $t7: TestLiveVars::R - var $t8: &TestLiveVars::R + var $t7: 0x42::TestLiveVars::R + var $t8: &0x42::TestLiveVars::R var $t9: bool - var $t10: &TestLiveVars::R - var $t11: &TestLiveVars::R - var $t12: &TestLiveVars::R + var $t10: &0x42::TestLiveVars::R + var $t11: &0x42::TestLiveVars::R + var $t12: &0x42::TestLiveVars::R var $t13: u64 0: $t4 := 3 - 1: $t5 := pack TestLiveVars::R($t4) + 1: $t5 := pack 0x42::TestLiveVars::R($t4) 2: $t1 := $t5 3: $t6 := 4 - 4: $t7 := pack TestLiveVars::R($t6) + 4: $t7 := pack 0x42::TestLiveVars::R($t6) 5: $t2 := $t7 6: $t8 := borrow_local($t1) 7: $t3 := $t8 @@ -51,34 +51,34 @@ fun TestLiveVars::test2($t0|b: bool): u64 { [variant baseline] -fun TestLiveVars::test3($t0|n: u64, $t1|r_ref: &TestLiveVars::R): u64 { - var $t2|r1: TestLiveVars::R - var $t3|r2: TestLiveVars::R +fun TestLiveVars::test3($t0|n: u64, $t1|r_ref: &0x42::TestLiveVars::R): u64 { + var $t2|r1: 0x42::TestLiveVars::R + var $t3|r2: 0x42::TestLiveVars::R var $t4: u64 - var $t5: TestLiveVars::R + var $t5: 0x42::TestLiveVars::R var $t6: u64 - var $t7: TestLiveVars::R + var $t7: 0x42::TestLiveVars::R var $t8: u64 var $t9: u64 var $t10: bool - var $t11: &TestLiveVars::R + var $t11: &0x42::TestLiveVars::R var $t12: u64 var $t13: u64 var $t14: u64 var $t15: u64 var $t16: bool - var $t17: &TestLiveVars::R - var $t18: &TestLiveVars::R + var $t17: &0x42::TestLiveVars::R + var $t18: &0x42::TestLiveVars::R var $t19: u64 var $t20: u64 var $t21: u64 - var $t22: &TestLiveVars::R + var $t22: &0x42::TestLiveVars::R var $t23: u64 0: $t4 := 3 - 1: $t5 := pack TestLiveVars::R($t4) + 1: $t5 := pack 0x42::TestLiveVars::R($t4) 2: $t2 := $t5 3: $t6 := 4 - 4: $t7 := pack TestLiveVars::R($t6) + 4: $t7 := pack 0x42::TestLiveVars::R($t6) 5: $t3 := $t7 6: goto 7 7: label L6 @@ -120,11 +120,11 @@ fun TestLiveVars::test3($t0|n: u64, $t1|r_ref: &TestLiveVars::R): u64 { ============ after pipeline `livevar` ================ [variant baseline] -fun TestLiveVars::test1($t0|r_ref: &TestLiveVars::R): u64 { +fun TestLiveVars::test1($t0|r_ref: &0x42::TestLiveVars::R): u64 { var $t1: &u64 var $t2: u64 # live vars: r_ref - 0: $t1 := borrow_field.x($t0) + 0: $t1 := borrow_field<0x42::TestLiveVars::R>.x($t0) # live vars: $t1 1: $t2 := read_ref($t1) # live vars: $t2 @@ -134,22 +134,22 @@ fun TestLiveVars::test1($t0|r_ref: &TestLiveVars::R): u64 { [variant baseline] fun TestLiveVars::test2($t0|b: bool): u64 { - var $t1|r1: TestLiveVars::R - var $t2|r2: TestLiveVars::R - var $t3|r_ref: &TestLiveVars::R + var $t1|r1: 0x42::TestLiveVars::R + var $t2|r2: 0x42::TestLiveVars::R + var $t3|r_ref: &0x42::TestLiveVars::R var $t4: u64 var $t5: u64 - var $t6: &TestLiveVars::R - var $t7: &TestLiveVars::R + var $t6: &0x42::TestLiveVars::R + var $t7: &0x42::TestLiveVars::R var $t8: u64 # live vars: b 0: $t4 := 3 # live vars: b, $t4 - 1: $t1 := pack TestLiveVars::R($t4) + 1: $t1 := pack 0x42::TestLiveVars::R($t4) # live vars: b, r1 2: $t5 := 4 # live vars: b, r1, $t5 - 3: $t2 := pack TestLiveVars::R($t5) + 3: $t2 := pack 0x42::TestLiveVars::R($t5) # live vars: b, r1, r2 4: $t6 := borrow_local($t1) # live vars: b, r2, $t6 @@ -188,9 +188,9 @@ fun TestLiveVars::test2($t0|b: bool): u64 { [variant baseline] -fun TestLiveVars::test3($t0|n: u64, $t1|r_ref: &TestLiveVars::R): u64 { - var $t2|r1: TestLiveVars::R - var $t3|r2: TestLiveVars::R +fun TestLiveVars::test3($t0|n: u64, $t1|r_ref: &0x42::TestLiveVars::R): u64 { + var $t2|r1: 0x42::TestLiveVars::R + var $t3|r2: 0x42::TestLiveVars::R var $t4: u64 var $t5: u64 var $t6: u64 @@ -199,18 +199,18 @@ fun TestLiveVars::test3($t0|n: u64, $t1|r_ref: &TestLiveVars::R): u64 { var $t9: u64 var $t10: u64 var $t11: bool - var $t12: &TestLiveVars::R - var $t13: &TestLiveVars::R + var $t12: &0x42::TestLiveVars::R + var $t13: &0x42::TestLiveVars::R var $t14: u64 var $t15: u64 # live vars: n, r_ref 0: $t4 := 3 # live vars: n, r_ref, $t4 - 1: $t2 := pack TestLiveVars::R($t4) + 1: $t2 := pack 0x42::TestLiveVars::R($t4) # live vars: n, r_ref, r1 2: $t5 := 4 # live vars: n, r_ref, r1, $t5 - 3: $t3 := pack TestLiveVars::R($t5) + 3: $t3 := pack 0x42::TestLiveVars::R($t5) # live vars: n, r_ref, r1, r2 4: goto 5 # live vars: n, r_ref, r1, r2 diff --git a/third_party/move/move-model/bytecode/tests/reaching_def/basic_test.exp b/third_party/move/move-model/bytecode/tests/reaching_def/basic_test.exp index f6a91b898b558..edb808910e04c 100644 --- a/third_party/move/move-model/bytecode/tests/reaching_def/basic_test.exp +++ b/third_party/move/move-model/bytecode/tests/reaching_def/basic_test.exp @@ -25,12 +25,12 @@ fun ReachingDefTest::create_resource($t0|sender: &signer) { var $t1: &signer var $t2: u64 var $t3: bool - var $t4: ReachingDefTest::R + var $t4: 0x42::ReachingDefTest::R 0: $t1 := move($t0) 1: $t2 := 1 2: $t3 := false - 3: $t4 := pack ReachingDefTest::R($t2, $t3) - 4: move_to($t4, $t1) + 3: $t4 := pack 0x42::ReachingDefTest::R($t2, $t3) + 4: move_to<0x42::ReachingDefTest::R>($t4, $t1) 5: return () } @@ -61,11 +61,11 @@ fun ReachingDefTest::create_resource($t0|sender: &signer) { var $t1: &signer var $t2: u64 var $t3: bool - var $t4: ReachingDefTest::R + var $t4: 0x42::ReachingDefTest::R 0: $t1 := move($t0) 1: $t2 := 1 2: $t3 := false - 3: $t4 := pack ReachingDefTest::R($t2, $t3) - 4: move_to($t4, $t0) + 3: $t4 := pack 0x42::ReachingDefTest::R($t2, $t3) + 4: move_to<0x42::ReachingDefTest::R>($t4, $t0) 5: return () } diff --git a/third_party/move/move-model/bytecode/tests/usage_analysis/test.exp b/third_party/move/move-model/bytecode/tests/usage_analysis/test.exp index 3d955b5512ada..6af0754f00c4a 100644 --- a/third_party/move/move-model/bytecode/tests/usage_analysis/test.exp +++ b/third_party/move/move-model/bytecode/tests/usage_analysis/test.exp @@ -4,12 +4,12 @@ public fun Test::update<#0>($t0|x: #0) { var $t1: #0 var $t2: address - var $t3: &mut Test::A<#0, #0> + var $t3: &mut 0x123::Test::A<#0, #0> var $t4: &mut #0 0: $t1 := move($t0) 1: $t2 := 0x1 - 2: $t3 := borrow_global>($t2) - 3: $t4 := borrow_field>.x1($t3) + 2: $t3 := borrow_global<0x123::Test::A<#0, #0>>($t2) + 3: $t4 := borrow_field<0x123::Test::A<#0, #0>>.x1($t3) 4: write_ref($t4, $t1) 5: return () } @@ -17,8 +17,8 @@ public fun Test::update<#0>($t0|x: #0) { [variant baseline] public fun Test::assert_assume_memory() { - 0: assume exists>(0x1) - 1: assert exists>(0x1) + 0: assume exists<0x123::Test::A>(0x1) + 1: assert exists<0x123::Test::A>(0x1) 2: return () } @@ -31,12 +31,12 @@ public fun Test::call_assert_assume_memory() { [variant baseline] -public fun Test::publish<#0>($t0|signer: &signer, $t1|x: Test::A<#0, u8>) { +public fun Test::publish<#0>($t0|signer: &signer, $t1|x: 0x123::Test::A<#0, u8>) { var $t2: &signer - var $t3: Test::A<#0, u8> + var $t3: 0x123::Test::A<#0, u8> 0: $t2 := move($t0) 1: $t3 := move($t1) - 2: move_to>($t3, $t2) + 2: move_to<0x123::Test::A<#0, u8>>($t3, $t2) 3: return () } @@ -46,7 +46,7 @@ public fun Test::test<#0>(): bool { var $t0: address var $t1: bool 0: $t0 := 0x1 - 1: $t1 := exists>($t0) + 1: $t1 := exists<0x123::Test::A>($t0) 2: return $t1 } @@ -64,12 +64,12 @@ public fun Test::update_caller() { public fun Test::update_ints() { var $t0: u64 var $t1: address - var $t2: &mut Test::A + var $t2: &mut 0x123::Test::A var $t3: &mut u64 0: $t0 := 22 1: $t1 := 0x1 - 2: $t2 := borrow_global>($t1) - 3: $t3 := borrow_field>.x1($t2) + 2: $t2 := borrow_global<0x123::Test::A>($t1) + 3: $t3 := borrow_field<0x123::Test::A>.x1($t2) 4: write_ref($t3, $t0) 5: return () } @@ -80,12 +80,12 @@ public fun Test::update_ints() { public fun Test::update<#0>($t0|x: #0) { var $t1: #0 var $t2: address - var $t3: &mut Test::A<#0, #0> + var $t3: &mut 0x123::Test::A<#0, #0> var $t4: &mut #0 0: $t1 := move($t0) 1: $t2 := 0x1 - 2: $t3 := borrow_global>($t2) - 3: $t4 := borrow_field>.x1($t3) + 2: $t3 := borrow_global<0x123::Test::A<#0, #0>>($t2) + 3: $t4 := borrow_field<0x123::Test::A<#0, #0>>.x1($t3) 4: write_ref($t4, $t1) 5: return () } @@ -93,8 +93,8 @@ public fun Test::update<#0>($t0|x: #0) { [variant baseline] public fun Test::assert_assume_memory() { - 0: assume exists>(0x1) - 1: assert exists>(0x1) + 0: assume exists<0x123::Test::A>(0x1) + 1: assert exists<0x123::Test::A>(0x1) 2: return () } @@ -107,12 +107,12 @@ public fun Test::call_assert_assume_memory() { [variant baseline] -public fun Test::publish<#0>($t0|signer: &signer, $t1|x: Test::A<#0, u8>) { +public fun Test::publish<#0>($t0|signer: &signer, $t1|x: 0x123::Test::A<#0, u8>) { var $t2: &signer - var $t3: Test::A<#0, u8> + var $t3: 0x123::Test::A<#0, u8> 0: $t2 := move($t0) 1: $t3 := move($t1) - 2: move_to>($t3, $t2) + 2: move_to<0x123::Test::A<#0, u8>>($t3, $t2) 3: return () } @@ -122,7 +122,7 @@ public fun Test::test<#0>(): bool { var $t0: address var $t1: bool 0: $t0 := 0x1 - 1: $t1 := exists>($t0) + 1: $t1 := exists<0x123::Test::A>($t0) 2: return $t1 } @@ -140,12 +140,12 @@ public fun Test::update_caller() { public fun Test::update_ints() { var $t0: u64 var $t1: address - var $t2: &mut Test::A + var $t2: &mut 0x123::Test::A var $t3: &mut u64 0: $t0 := 22 1: $t1 := 0x1 - 2: $t2 := borrow_global>($t1) - 3: $t3 := borrow_field>.x1($t2) + 2: $t2 := borrow_global<0x123::Test::A>($t1) + 3: $t3 := borrow_field<0x123::Test::A>.x1($t2) 4: write_ref($t3, $t0) 5: return () } diff --git a/third_party/move/move-model/src/ast.rs b/third_party/move/move-model/src/ast.rs index bb3fb2186eb69..440abdd3ad23f 100644 --- a/third_party/move/move-model/src/ast.rs +++ b/third_party/move/move-model/src/ast.rs @@ -2226,7 +2226,7 @@ impl<'a> PatDisplay<'a> { Self { show_type, ..self } } - fn type_ctx(&self) -> TypeDisplayContext<'a> { + fn type_ctx(&self) -> TypeDisplayContext { if let Some(fe) = &self.fun_env { fe.get_type_display_ctx() } else { @@ -3268,7 +3268,7 @@ fn indent(fmt: impl fmt::Display) -> String { } impl<'a> ExpDisplay<'a> { - fn type_ctx(&self) -> TypeDisplayContext<'a> { + fn type_ctx(&self) -> TypeDisplayContext { if let Some(fe) = &self.fun_env { fe.get_type_display_ctx() } else { diff --git a/third_party/move/move-model/src/builder/model_builder.rs b/third_party/move/move-model/src/builder/model_builder.rs index 28ff50dea6796..3fb7e1afa5322 100644 --- a/third_party/move/move-model/src/builder/model_builder.rs +++ b/third_party/move/move-model/src/builder/model_builder.rs @@ -269,6 +269,7 @@ impl<'env> ModelBuilder<'env> { module_name: None, display_type_vars: false, used_modules: BTreeSet::new(), + use_module_qualification: false, } } diff --git a/third_party/move/move-model/src/model.rs b/third_party/move/move-model/src/model.rs index 693c6aebe3b76..c32fe3781f105 100644 --- a/third_party/move/move-model/src/model.rs +++ b/third_party/move/move-model/src/model.rs @@ -2468,7 +2468,12 @@ impl GlobalEnv { writer, "spec fun {}{}", fun.name.display(spool), - self.get_fun_signature_string(&fun.type_params, &fun.params, &fun.result_type) + self.get_fun_signature_string( + &module.get_type_display_ctx(), + &fun.type_params, + &fun.params, + &fun.result_type + ) ); if let Some(exp) = &fun.body { emitln!(writer, " {"); @@ -2498,7 +2503,7 @@ impl GlobalEnv { } pub fn dump_fun(&self, fun: &FunctionEnv) -> String { - let tctx = &self.get_type_display_ctx(); + let tctx = &fun.get_type_display_ctx(); let writer = CodeWriter::new(self.internal_loc()); self.dump_fun_internal(&writer, tctx, fun); writer.extract_result() @@ -2573,12 +2578,12 @@ impl GlobalEnv { /// Helper to create a string for a function signature. fn get_fun_signature_string( &self, + tctx: &TypeDisplayContext, type_params: &[TypeParameter], params: &[Parameter], result_type: &Type, ) -> String { let spool = self.symbol_pool(); - let tctx = &self.get_type_display_ctx(); let type_params_str = if !type_params.is_empty() { format!( "<{}>", @@ -2597,7 +2602,7 @@ impl GlobalEnv { let result_str = if result_type.is_unit() { "".to_owned() } else { - format!(": {}", result_type.display(&self.get_type_display_ctx())) + format!(": {}", result_type.display(tctx)) }; format!("{}({}){}", type_params_str, params_str, result_str) } @@ -2911,6 +2916,15 @@ impl<'env> ModuleEnv<'env> { &self.env.symbol_pool } + /// Returns a context to display types for this module. + pub fn get_type_display_ctx(&self) -> TypeDisplayContext { + TypeDisplayContext { + module_name: Some(self.get_name().clone()), + used_modules: self.get_used_modules(false), + ..TypeDisplayContext::new(self.env) + } + } + /// Gets the underlying bytecode module, if one is attached. pub fn get_verified_module(&'env self) -> Option<&'env CompiledModule> { self.data.compiled_module.as_ref() @@ -3723,16 +3737,15 @@ impl<'env> StructEnv<'env> { } /// Produce a TypeDisplayContext to print types within the scope of this env - pub fn get_type_display_ctx(&self) -> TypeDisplayContext<'env> { + pub fn get_type_display_ctx(&self) -> TypeDisplayContext { let type_param_names = self .get_type_parameters() .iter() .map(|param| param.0) .collect(); TypeDisplayContext { - module_name: Some(self.module_env.get_name().clone()), - used_modules: self.module_env.get_used_modules(false), - ..TypeDisplayContext::new_with_params(self.module_env.env, type_param_names) + type_param_names: Some(type_param_names), + ..self.module_env.get_type_display_ctx() } } } @@ -3892,6 +3905,15 @@ impl<'env> NamedConstantEnv<'env> { pub fn get_value(&self) -> Value { self.data.value.clone() } + + /// Returns a context to display types for this module. + pub fn get_type_display_ctx(&self) -> TypeDisplayContext { + TypeDisplayContext { + module_name: Some(self.module_env.get_name().clone()), + used_modules: self.module_env.get_used_modules(false), + ..TypeDisplayContext::new(self.module_env.env) + } + } } // ================================================================================================= @@ -4740,6 +4762,7 @@ impl<'env> FunctionEnv<'env> { " fun {}{}", self.get_name().display(self.symbol_pool()), self.module_env.env.get_fun_signature_string( + &self.get_type_display_ctx(), &self.data.type_params, &self.data.params, &self.data.result_type @@ -4775,16 +4798,15 @@ impl<'env> FunctionEnv<'env> { } /// Produce a TypeDisplayContext to print types within the scope of this env - pub fn get_type_display_ctx(&self) -> TypeDisplayContext<'env> { + pub fn get_type_display_ctx(&self) -> TypeDisplayContext { let type_param_names = self .get_type_parameters() .iter() .map(|param| param.0) .collect(); TypeDisplayContext { - module_name: Some(self.module_env.get_name().clone()), - used_modules: self.module_env.get_used_modules(false), - ..TypeDisplayContext::new_with_params(self.module_env.env, type_param_names) + type_param_names: Some(type_param_names), + ..self.module_env.get_type_display_ctx() } } } diff --git a/third_party/move/move-model/src/ty.rs b/third_party/move/move-model/src/ty.rs index cf0fd13b1fbd6..97434c3fb8716 100644 --- a/third_party/move/move-model/src/ty.rs +++ b/third_party/move/move-model/src/ty.rs @@ -3262,6 +3262,8 @@ pub struct TypeDisplayContext<'a> { pub display_type_vars: bool, /// Modules which are in `use` and do not need address qualification. pub used_modules: BTreeSet, + /// Whether to use `m::T` for representing types, for stable output in docgen + pub use_module_qualification: bool, } impl<'a> TypeDisplayContext<'a> { @@ -3274,6 +3276,7 @@ impl<'a> TypeDisplayContext<'a> { module_name: None, display_type_vars: false, used_modules: BTreeSet::new(), + use_module_qualification: false, } } @@ -3296,6 +3299,7 @@ impl<'a> TypeDisplayContext<'a> { module_name: None, display_type_vars: false, used_modules: BTreeSet::new(), + use_module_qualification: false, } } @@ -3438,7 +3442,8 @@ impl<'a> TypeDisplay<'a> { } else { let struct_env = env.get_module(mid).into_struct(sid); let module_name = struct_env.module_env.get_name(); - let module_str = if self.context.used_modules.contains(&mid) + let module_str = if self.context.use_module_qualification + || self.context.used_modules.contains(&mid) || Some(module_name) == self.context.module_name.as_ref() { module_name.display(env).to_string() @@ -3451,16 +3456,18 @@ impl<'a> TypeDisplay<'a> { struct_env.get_name().display(env.symbol_pool()) ) }; - if let Some(mname) = &self.context.module_name { - let s = format!("{}::", mname.name().display(self.context.env.symbol_pool())); - if let Some(shortcut) = str.strip_prefix(&s) { - if let Some(tparams) = &self.context.type_param_names { - // Avoid name clash with type parameter - if !tparams.contains(&self.context.env.symbol_pool().make(shortcut)) { - str = shortcut.to_owned() + if !self.context.use_module_qualification { + if let Some(mname) = &self.context.module_name { + let s = format!("{}::", mname.name().display(self.context.env.symbol_pool())); + if let Some(shortcut) = str.strip_prefix(&s) { + if let Some(tparams) = &self.context.type_param_names { + // Avoid name clash with type parameter + if !tparams.contains(&self.context.env.symbol_pool().make(shortcut)) { + str = shortcut.to_owned() + } + } else { + str = shortcut.to_owned(); } - } else { - str = shortcut.to_owned(); } } } diff --git a/third_party/move/move-prover/move-docgen/src/docgen.rs b/third_party/move/move-prover/move-docgen/src/docgen.rs index 7958a0d53e181..88aa960f6a468 100644 --- a/third_party/move/move-prover/move-docgen/src/docgen.rs +++ b/third_party/move/move-prover/move-docgen/src/docgen.rs @@ -1692,26 +1692,27 @@ impl<'env> Docgen<'env> { } /// Creates a type display context for a function. - fn type_display_context_for_fun(&self, func_env: &FunctionEnv<'_>) -> TypeDisplayContext<'_> { - let type_param_names = func_env - .get_type_parameters() - .iter() - .map(|TypeParameter(name, _, _)| *name) - .collect_vec(); - TypeDisplayContext::new_with_params(self.env, type_param_names) + fn type_display_context_for_fun<'a>( + &self, + func_env: &'a FunctionEnv<'a>, + ) -> TypeDisplayContext<'a> { + TypeDisplayContext { + // For consistency in navigation links, always use module qualification + use_module_qualification: true, + ..func_env.get_type_display_ctx() + } } /// Creates a type display context for a struct. - fn type_display_context_for_struct( + fn type_display_context_for_struct<'a>( &self, - struct_env: &StructEnv<'_>, - ) -> TypeDisplayContext<'_> { - let type_param_names = struct_env - .get_type_parameters() - .iter() - .map(|TypeParameter(name, _, _)| *name) - .collect_vec(); - TypeDisplayContext::new_with_params(self.env, type_param_names) + struct_env: &'a StructEnv<'a>, + ) -> TypeDisplayContext<'a> { + TypeDisplayContext { + // For consistency in navigation links, always use module qualification + use_module_qualification: true, + ..struct_env.get_type_display_ctx() + } } /// Increments section nest.