Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: (gnovm): garbage collection #3458

Closed
wants to merge 43 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
418a05f
re-calculate
ltzmaxwell Jan 7, 2025
350e2e2
fixup
ltzmaxwell Jan 8, 2025
6dcf54b
api
ltzmaxwell Jan 8, 2025
3b81300
fixup
ltzmaxwell Jan 8, 2025
b935904
fixup
ltzmaxwell Jan 16, 2025
4248a29
defer varg
ltzmaxwell Jan 16, 2025
773c149
avoid duplicate allocation
ltzmaxwell Jan 17, 2025
65c86a9
alloc amino
ltzmaxwell Jan 17, 2025
4229f65
save
ltzmaxwell Jan 17, 2025
bdaaa05
annotation
ltzmaxwell Jan 20, 2025
fff887d
fix
ltzmaxwell Jan 20, 2025
cd6f0b3
introduce alloc flag
ltzmaxwell Jan 22, 2025
1d98f71
fixup
ltzmaxwell Jan 22, 2025
c9b5329
alloc amino
ltzmaxwell Jan 22, 2025
df30fed
alloc string
ltzmaxwell Jan 23, 2025
fed8e05
fixup
ltzmaxwell Jan 23, 2025
630f7d7
initialization alloc
ltzmaxwell Jan 23, 2025
89dc126
fixup
ltzmaxwell Jan 24, 2025
4ef7dad
fixup
ltzmaxwell Jan 27, 2025
5047115
fixup
ltzmaxwell Jan 30, 2025
99454b6
fixup
ltzmaxwell Jan 31, 2025
2af7b88
fixup
ltzmaxwell Jan 31, 2025
25e58a7
fixup
ltzmaxwell Jan 31, 2025
7d8b0f2
save
ltzmaxwell Feb 1, 2025
191304d
fixup
ltzmaxwell Feb 1, 2025
d9f7ec5
fixup
ltzmaxwell Feb 2, 2025
0df0bdd
fixup
ltzmaxwell Feb 3, 2025
29ad210
fix test
ltzmaxwell Feb 3, 2025
56d8a47
fixup
ltzmaxwell Feb 3, 2025
67b47ac
gas
ltzmaxwell Feb 7, 2025
61d2300
string
ltzmaxwell Feb 7, 2025
3bf403b
sync
ltzmaxwell Feb 7, 2025
b8a21f4
test pass
ltzmaxwell Feb 7, 2025
2263ba7
clean
ltzmaxwell Feb 8, 2025
2751b3a
fixup
ltzmaxwell Feb 8, 2025
06c2897
linter
ltzmaxwell Feb 8, 2025
b741026
bound method
ltzmaxwell Feb 9, 2025
3615641
heapitem
ltzmaxwell Feb 9, 2025
de424f0
fmt
ltzmaxwell Feb 9, 2025
5222034
fixup
ltzmaxwell Feb 9, 2025
d910f2d
fixup
ltzmaxwell Feb 9, 2025
c0e053f
fix test
ltzmaxwell Feb 9, 2025
0317c18
Merge branch 'master' into feat/maxwell/gc
ltzmaxwell Feb 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions examples/gno.land/p/demo/avl/z_0_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ func main() {
// "RefCount": "1"
// },
// "Value": {
// "AllocationInfo": {
// "AllocType": false,
// "AllocValue": true,
// "RefCount": "0"
// },
// "T": {
// "@type": "/gno.RefType",
// "ID": "gno.land/p/demo/avl.Node"
Expand Down Expand Up @@ -112,6 +117,11 @@ func main() {
// "RefCount": "1"
// },
// "Value": {
// "AllocationInfo": {
// "AllocType": false,
// "AllocValue": true,
// "RefCount": "0"
// },
// "T": {
// "@type": "/gno.RefType",
// "ID": "gno.land/p/demo/avl.Node"
Expand Down Expand Up @@ -151,6 +161,11 @@ func main() {
// }
// },
// {
// "AllocationInfo": {
// "AllocType": false,
// "AllocValue": false,
// "RefCount": "1"
// },
// "T": {
// "@type": "/gno.PointerType",
// "Elt": {
Expand All @@ -162,7 +177,7 @@ func main() {
// "@type": "/gno.PointerValue",
// "Base": {
// "@type": "/gno.RefValue",
// "Hash": "6da365f0d6cacbcdf53cd5a4b125803cddce08c2",
// "Hash": "08b9751c5355b8fd2b623ae17676bd138de0bbfc",
// "ObjectID": "a8ada09dee16d791fd406d629fe29bb0ed084a30:4"
// },
// "Index": "0",
Expand All @@ -181,7 +196,7 @@ func main() {
// "@type": "/gno.PointerValue",
// "Base": {
// "@type": "/gno.RefValue",
// "Hash": "f216afe7b5a17f4ebdbb98dceccedbc22e237596",
// "Hash": "2edfe4d7ad50120cde0d9168f5b4280af65bf036",
// "ObjectID": "a8ada09dee16d791fd406d629fe29bb0ed084a30:8"
// },
// "Index": "0",
Expand All @@ -204,13 +219,18 @@ func main() {
// "RefCount": "1"
// },
// "Value": {
// "AllocationInfo": {
// "AllocType": false,
// "AllocValue": true,
// "RefCount": "0"
// },
// "T": {
// "@type": "/gno.RefType",
// "ID": "gno.land/p/demo/avl.Node"
// },
// "V": {
// "@type": "/gno.RefValue",
// "Hash": "ff1a50d8489090af37a2c7766d659f0d717939b5",
// "Hash": "b2f140a2cf1fb11e97d1712eaa8cfdf854471fa9",
// "ObjectID": "a8ada09dee16d791fd406d629fe29bb0ed084a30:7"
// }
// }
Expand Down
47 changes: 41 additions & 6 deletions examples/gno.land/p/demo/avl/z_1_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ func main() {
// "RefCount": "1"
// },
// "Value": {
// "AllocationInfo": {
// "AllocType": false,
// "AllocValue": true,
// "RefCount": "0"
// },
// "T": {
// "@type": "/gno.RefType",
// "ID": "gno.land/p/demo/avl.Node"
Expand All @@ -51,6 +56,11 @@ func main() {
// "RefCount": "1"
// },
// "Value": {
// "AllocationInfo": {
// "AllocType": false,
// "AllocValue": true,
// "RefCount": "0"
// },
// "T": {
// "@type": "/gno.RefType",
// "ID": "gno.land/p/demo/avl.Node"
Expand Down Expand Up @@ -131,6 +141,11 @@ func main() {
// "RefCount": "1"
// },
// "Value": {
// "AllocationInfo": {
// "AllocType": false,
// "AllocValue": true,
// "RefCount": "0"
// },
// "T": {
// "@type": "/gno.RefType",
// "ID": "gno.land/p/demo/avl.Node"
Expand Down Expand Up @@ -181,7 +196,7 @@ func main() {
// "@type": "/gno.PointerValue",
// "Base": {
// "@type": "/gno.RefValue",
// "Hash": "cafae89e4d4aaaefe7fdf0691084508d4274a981",
// "Hash": "a0cc447c325cf2aa12f721eebb191e1fa93c15f7",
// "ObjectID": "a8ada09dee16d791fd406d629fe29bb0ed084a30:8"
// },
// "Index": "0",
Expand All @@ -200,7 +215,7 @@ func main() {
// "@type": "/gno.PointerValue",
// "Base": {
// "@type": "/gno.RefValue",
// "Hash": "2e733a8e9e74fe14f0a5d10fb0f6728fa53d052d",
// "Hash": "4aa06e1c00a798f32222f72ddd67bd37735f7148",
// "ObjectID": "a8ada09dee16d791fd406d629fe29bb0ed084a30:14"
// },
// "Index": "0",
Expand All @@ -223,13 +238,18 @@ func main() {
// "RefCount": "1"
// },
// "Value": {
// "AllocationInfo": {
// "AllocType": false,
// "AllocValue": true,
// "RefCount": "0"
// },
// "T": {
// "@type": "/gno.RefType",
// "ID": "gno.land/p/demo/avl.Node"
// },
// "V": {
// "@type": "/gno.RefValue",
// "Hash": "b2e446f490656c19a83c43055de29c96e92a1549",
// "Hash": "9e5c2018cba2da5307f20a4369f7a95d3ab6f5a3",
// "ObjectID": "a8ada09dee16d791fd406d629fe29bb0ed084a30:13"
// }
// }
Expand Down Expand Up @@ -262,6 +282,11 @@ func main() {
// }
// },
// {
// "AllocationInfo": {
// "AllocType": false,
// "AllocValue": false,
// "RefCount": "1"
// },
// "T": {
// "@type": "/gno.PointerType",
// "Elt": {
Expand All @@ -273,14 +298,19 @@ func main() {
// "@type": "/gno.PointerValue",
// "Base": {
// "@type": "/gno.RefValue",
// "Hash": "4e56eeb96eb1d9b27cf603140cd03a1622b6358b",
// "Hash": "16fb81a3dcfd6c6825e0081dc3fba6926d09fe9d",
// "ObjectID": "a8ada09dee16d791fd406d629fe29bb0ed084a30:6"
// },
// "Index": "0",
// "TV": null
// }
// },
// {
// "AllocationInfo": {
// "AllocType": false,
// "AllocValue": false,
// "RefCount": "1"
// },
// "T": {
// "@type": "/gno.PointerType",
// "Elt": {
Expand All @@ -292,7 +322,7 @@ func main() {
// "@type": "/gno.PointerValue",
// "Base": {
// "@type": "/gno.RefValue",
// "Hash": "7b61530859954d1d14b2f696c91c5f37d39c21e7",
// "Hash": "8035ca3ff020f7b499f872d53e142925ba68c112",
// "ObjectID": "a8ada09dee16d791fd406d629fe29bb0ed084a30:12"
// },
// "Index": "0",
Expand All @@ -315,13 +345,18 @@ func main() {
// "RefCount": "1"
// },
// "Value": {
// "AllocationInfo": {
// "AllocType": false,
// "AllocValue": true,
// "RefCount": "0"
// },
// "T": {
// "@type": "/gno.RefType",
// "ID": "gno.land/p/demo/avl.Node"
// },
// "V": {
// "@type": "/gno.RefValue",
// "Hash": "fedc6d430b38c985dc6a985b2fcaee97e88ba6da",
// "Hash": "2c67a961ba53248110f1a87855ccf5b402b1f08d",
// "ObjectID": "a8ada09dee16d791fd406d629fe29bb0ed084a30:11"
// }
// }
Expand Down
54 changes: 47 additions & 7 deletions examples/gno.land/p/demo/avl/z_2_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ func main() {
// "RefCount": "1"
// },
// "Value": {
// "AllocationInfo": {
// "AllocType": false,
// "AllocValue": true,
// "RefCount": "0"
// },
// "T": {
// "@type": "/gno.RefType",
// "ID": "gno.land/p/demo/avl.Node"
Expand All @@ -50,6 +55,11 @@ func main() {
// "RefCount": "1"
// },
// "Value": {
// "AllocationInfo": {
// "AllocType": false,
// "AllocValue": true,
// "RefCount": "0"
// },
// "T": {
// "@type": "/gno.RefType",
// "ID": "gno.land/p/demo/avl.Node"
Expand Down Expand Up @@ -130,6 +140,11 @@ func main() {
// "RefCount": "1"
// },
// "Value": {
// "AllocationInfo": {
// "AllocType": false,
// "AllocValue": true,
// "RefCount": "0"
// },
// "T": {
// "@type": "/gno.RefType",
// "ID": "gno.land/p/demo/avl.Node"
Expand Down Expand Up @@ -180,7 +195,7 @@ func main() {
// "@type": "/gno.PointerValue",
// "Base": {
// "@type": "/gno.RefValue",
// "Hash": "db39c9c0a60e0d5b30dbaf9be6150d3fec16aa4b",
// "Hash": "f3785a060a50e3043d9344e2e05d1f8ed949c936",
// "ObjectID": "a8ada09dee16d791fd406d629fe29bb0ed084a30:9"
// },
// "Index": "0",
Expand All @@ -199,7 +214,7 @@ func main() {
// "@type": "/gno.PointerValue",
// "Base": {
// "@type": "/gno.RefValue",
// "Hash": "b4fc2fdd2d0fe936c87ed2ace97136cffeed207f",
// "Hash": "c2edf01b02b110165f1ebfa0e2b149034e477dee",
// "ObjectID": "a8ada09dee16d791fd406d629fe29bb0ed084a30:15"
// },
// "Index": "0",
Expand All @@ -222,13 +237,18 @@ func main() {
// "RefCount": "1"
// },
// "Value": {
// "AllocationInfo": {
// "AllocType": false,
// "AllocValue": true,
// "RefCount": "0"
// },
// "T": {
// "@type": "/gno.RefType",
// "ID": "gno.land/p/demo/avl.Node"
// },
// "V": {
// "@type": "/gno.RefValue",
// "Hash": "2e9127534f91b385426d76e8e164f50f635cc1de",
// "Hash": "dc9e647607b2abdf0b9c77b8ec4ee4adf7bbbb8c",
// "ObjectID": "a8ada09dee16d791fd406d629fe29bb0ed084a30:14"
// }
// }
Expand Down Expand Up @@ -261,6 +281,11 @@ func main() {
// }
// },
// {
// "AllocationInfo": {
// "AllocType": false,
// "AllocValue": false,
// "RefCount": "2"
// },
// "T": {
// "@type": "/gno.PointerType",
// "Elt": {
Expand All @@ -272,14 +297,19 @@ func main() {
// "@type": "/gno.PointerValue",
// "Base": {
// "@type": "/gno.RefValue",
// "Hash": "43e03b0c877b40c34e12bc2b15560e8ecd42ae9d",
// "Hash": "2f234c29a99816ae48647101c64be373a6611b78",
// "ObjectID": "a8ada09dee16d791fd406d629fe29bb0ed084a30:7"
// },
// "Index": "0",
// "TV": null
// }
// },
// {
// "AllocationInfo": {
// "AllocType": false,
// "AllocValue": false,
// "RefCount": "1"
// },
// "T": {
// "@type": "/gno.PointerType",
// "Elt": {
Expand All @@ -291,7 +321,7 @@ func main() {
// "@type": "/gno.PointerValue",
// "Base": {
// "@type": "/gno.RefValue",
// "Hash": "4b123e2424d900a427f9dee88a70ce61f3cdcf5b",
// "Hash": "56ae2daff88e4c38ddd50c0438ebf87ad5494fd9",
// "ObjectID": "a8ada09dee16d791fd406d629fe29bb0ed084a30:13"
// },
// "Index": "0",
Expand All @@ -314,20 +344,30 @@ func main() {
// "RefCount": "1"
// },
// "Value": {
// "AllocationInfo": {
// "AllocType": false,
// "AllocValue": true,
// "RefCount": "0"
// },
// "T": {
// "@type": "/gno.RefType",
// "ID": "gno.land/p/demo/avl.Node"
// },
// "V": {
// "@type": "/gno.RefValue",
// "Hash": "76d9227e755efd6674d8fa34e12decb7a9855488",
// "Hash": "1618bf34838481730c3db0e55a38fa949963fc88",
// "ObjectID": "a8ada09dee16d791fd406d629fe29bb0ed084a30:12"
// }
// }
// }
// u[a8ada09dee16d791fd406d629fe29bb0ed084a30:3]={
// "Fields": [
// {
// "AllocationInfo": {
// "AllocType": false,
// "AllocValue": false,
// "RefCount": "3"
// },
// "T": {
// "@type": "/gno.PointerType",
// "Elt": {
Expand All @@ -339,7 +379,7 @@ func main() {
// "@type": "/gno.PointerValue",
// "Base": {
// "@type": "/gno.RefValue",
// "Hash": "ff46b4dd63457c3fd59801e725f65af524ec829d",
// "Hash": "9752a7451993923a0096182e1c20160bd740f34b",
// "ObjectID": "a8ada09dee16d791fd406d629fe29bb0ed084a30:11"
// },
// "Index": "0",
Expand Down
Loading
Loading