Skip to content

Commit

Permalink
add type param list for struct in dump
Browse files Browse the repository at this point in the history
  • Loading branch information
brmataptos committed Oct 3, 2024
1 parent e8a6216 commit a050828
Show file tree
Hide file tree
Showing 43 changed files with 136 additions and 114 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module 0x815::m {
struct MyMap {
table: m::Table<address, m::ValueWrap>,
}
struct Table {
struct Table<T1,T2> {
x: T1,
y: T2,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module 0x42::fields {
struct T {
h: u64,
}
struct G {
struct G<X> {
f: X,
}
struct S {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module 0xc0ffee::m {
y: u64,
}
}
enum Option {
enum Option<A> {
None,
Some {
value: A,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// -- Model dump before bytecode pipeline
module 0x42::M {
struct Box {
struct Box<T> {
f: T,
}
struct Pair {
struct Pair<T1,T2> {
f1: T1,
f2: T2,
}
Expand All @@ -13,22 +13,22 @@ module 0x42::M {
struct S {
dummy_field: bool,
}
struct Sc {
struct Sc<T> {
dummy_field: bool,
}
struct Scds {
struct Scds<T> {
dummy_field: bool,
}
struct Sd {
struct Sd<T> {
dummy_field: bool,
}
struct Sk {
struct Sk<T> {
dummy_field: bool,
}
struct Ss {
struct Ss<T> {
dummy_field: bool,
}
struct Ssk {
struct Ssk<T> {
dummy_field: bool,
}
private fun c<T>() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
// -- Model dump before bytecode pipeline
module 0x42::M {
struct HasCopy {
struct HasCopy<T1,T2> {
a: T2,
}
struct HasDrop {
struct HasDrop<T1,T2> {
a: T2,
}
struct HasKey {
struct HasKey<T1,T2> {
a: T2,
}
struct HasStore {
struct HasStore<T1,T2> {
a: T2,
}
struct NoAbilities {
dummy_field: bool,
}
struct RequireStore {
struct RequireStore<T> {
a: T,
}
private fun f1(ref: &mut M::HasDrop<M::NoAbilities, u64>) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
// -- Model dump before bytecode pipeline
module 0x42::M {
struct HasAbilities {
struct HasAbilities<T1,T2> {
a: T2,
}
struct HasCopy {
struct HasCopy<T1,T2> {
a: T2,
}
struct HasDrop {
struct HasDrop<T1,T2> {
a: T2,
}
struct HasKey {
struct HasKey<T1,T2> {
a: T2,
}
struct HasStore {
struct HasStore<T1,T2> {
a: T2,
}
struct NoAbilities {
a: bool,
}
struct S1 {
struct S1<T> {
a: T,
}
struct S2 {
a: M::S1<M::HasAbilities<M::NoAbilities, u64>>,
}
struct S3 {
struct S3<T1,T2,T3,T4> {
a: T1,
b: T2,
c: T3,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// -- Model dump before bytecode pipeline
module 0x42::M {
struct HasCopy {
struct HasCopy<T1,T2> {
a: T2,
}
struct HasDrop {
struct HasDrop<T1,T2> {
a: T2,
}
struct HasKey {
struct HasKey<T1,T2> {
a: T2,
}
struct HasStore {
struct HasStore<T1,T2> {
a: T2,
}
struct NoAbilities {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module 0x42::m {
struct T {
dummy_field: bool,
}
struct G {
struct G<T> {
dummy_field: bool,
}
struct R {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// -- Model dump before bytecode pipeline
module 0x42::M {
struct B {
struct B<T> {
dummy_field: bool,
}
struct CupC {
struct CupC<T> {
dummy_field: bool,
}
struct R {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ module 0x42::test {
x: bool,
y: u8,
}
struct S4 {
struct S4<T> {
x: T,
y: test::S3,
}
struct S5 {
struct S5<T,U> {
0: T,
1: U,
}
struct S6 {
struct S6<T,U> {
x: T,
y: U,
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// -- Model dump before bytecode pipeline
module 0x42::objects {
struct ReaderRef {
struct ReaderRef<T> {
addr: address,
}
public fun get_addr<T>(ref: &objects::ReaderRef<#0>): address {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@ warning: unused type parameter

// -- Model dump before bytecode pipeline
module 0x42::test {
struct S0 {
struct S0<T> {
dummy_field: bool,
}
struct S1 {
struct S1<T1,T2> {
dummy_field: bool,
}
struct S2 {
struct S2<T1,T2> {
f: test::S3<T2>,
}
struct S3 {
struct S3<T> {
dummy_field: bool,
}
struct S4 {
struct S4<T,U> {
f: vector<T>,
}
struct S5 {
struct S5<T,U> {
f: vector<T>,
g: vector<U>,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ module 0x42::dependency {
use 0x42::test::{S0};
} // end 0x42::dependency
module 0x42::test {
struct S0 {
struct S0<T> {
dummy_field: bool,
}
struct S1 {
struct S1<T1,T2> {
dummy_field: bool,
}
struct S2 {
struct S2<T1,T2> {
f: test::S3<T2>,
}
struct S3 {
struct S3<T> {
dummy_field: bool,
}
struct S4 {
struct S4<T,U> {
f: vector<T>,
}
struct S5 {
struct S5<T,U> {
f: vector<T>,
g: vector<U>,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module 0x42::test {
0: u8,
1: bool,
}
struct S3 {
struct S3<T1,T2> {
0: T2,
1: u8,
2: T1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ module 0x42::test {
struct S1 {
0: u8,
}
struct S2 {
struct S2<T> {
0: T,
1: u8,
}
struct S3 {
struct S3<T> {
0: T,
1: u8,
}
struct S4 {
struct S4<T> {
x: u8,
y: T,
}
struct S5 {
struct S5<T> {
0: T,
1: test::S3<T>,
}
struct S6 {
struct S6<T> {
dummy_field: bool,
}
} // end 0x42::test
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ module 0x42::test {
0: u8,
1: bool,
}
struct S3 {
struct S3<T> {
0: T,
1: u8,
}
struct S4 {
dummy_field: bool,
}
struct S5 {
struct S5<T> {
x: T,
y: u8,
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// -- Model dump before bytecode pipeline
module 0x42::test {
enum Bar {
enum Bar<T> {
A {
0: T,
}
Expand All @@ -9,7 +9,7 @@ module 0x42::test {
1: bool,
}
}
enum Foo {
enum Foo<T> {
A {
0: T,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module 0x42::n {
} // end 0x42::n
module 0x42::m {
use 0x42::n::{T}; // resolved as: 0x42::n
struct G {
struct G<T,R> {
x: T,
y: R,
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// -- Model dump before bytecode pipeline
module 0x42::m {
struct S {
struct S<T> {
x: T,
}
private fun id<T>(self: m::S<#0>): m::S<#0> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// -- Model dump before bytecode pipeline
module 0x42::m {
struct S {
struct S<T> {
x: T,
}
private fun id<T>(self: m::S<#0>): m::S<#0> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// -- Model dump before bytecode pipeline
module 0x42::M {
struct MyTable1 {
struct MyTable1<K,V> {
dummy_field: bool,
}
spec {
}

struct MyTable2 {
struct MyTable2<K,V> {
dummy_field: bool,
}
spec {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ note: unused schema M::SchemaExp

// -- Model dump before bytecode pipeline
module 0x42::M {
struct S {
struct S<X> {
x: X,
}
private fun add(x: u64): u64 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module 0x42::M {
struct T {
x: u64,
}
struct G {
struct G<T> {
x: T,
y: bool,
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// -- Model dump before bytecode pipeline
module 0x8675309::M {
struct G {
struct G<T> {
f: T,
}
struct R {
Expand Down
Loading

0 comments on commit a050828

Please sign in to comment.