@@ -65,10 +65,50 @@ Cell Deserialize_Cell() {
6565 int s = __builtin_tvm_getglobal (3 );
6666 struct __attribute__((tvm_tuple )) { __tvm_cell c ; __tvm_slice s ; } st =
6767 __builtin_tvm_ldref (__builtin_tvm_cast_to_slice (s ));
68- __builtin_tvm_setglobal (3 , __builtin_tvm_cast_from_slice ( st .s ) );
68+ tvm_setglobal (3 , st .s );
6969 return st .c ;
7070}
7171
7272void tvm_accept (void ) {
7373 __builtin_tvm_accept ();
7474}
75+
76+ __attribute__((overloadable ))
77+ void tvm_setreg (int n , int value ) {
78+ __builtin_tvm_setreg (n , value );
79+ }
80+
81+ __attribute__((overloadable ))
82+ void tvm_setreg (int n , __tvm_builder value ) {
83+ __builtin_tvm_setreg (n , __builtin_tvm_cast_from_builder (value ));
84+ }
85+
86+ __attribute__((overloadable ))
87+ void tvm_setreg (int n , __tvm_cell value ) {
88+ __builtin_tvm_setreg (n , __builtin_tvm_cast_from_cell (value ));
89+ }
90+
91+ __attribute__((overloadable ))
92+ void tvm_setreg (int n , __tvm_slice value ) {
93+ __builtin_tvm_setreg (n , __builtin_tvm_cast_from_slice (value ));
94+ }
95+
96+ __attribute__((overloadable ))
97+ void tvm_setglobal (int n , int value ) {
98+ __builtin_tvm_setglobal (n , value );
99+ }
100+
101+ __attribute__((overloadable ))
102+ void tvm_setglobal (int n , __tvm_builder value ) {
103+ __builtin_tvm_setglobal (n , __builtin_tvm_cast_from_builder (value ));
104+ }
105+
106+ __attribute__((overloadable ))
107+ void tvm_setglobal (int n , __tvm_cell value ) {
108+ __builtin_tvm_setglobal (n , __builtin_tvm_cast_from_cell (value ));
109+ }
110+
111+ __attribute__((overloadable ))
112+ void tvm_setglobal (int n , __tvm_slice value ) {
113+ __builtin_tvm_setglobal (n , __builtin_tvm_cast_from_slice (value ));
114+ }
0 commit comments